1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
14 * The Original Code is FUEL.
16 * The Initial Developer of the Original Code is Mozilla Corporation.
17 * Portions created by the Initial Developer are Copyright (C) 2006
18 * the Initial Developer. All Rights Reserved.
21 * Mark Finkle <mfinkle@mozilla.com> (Original Author)
22 * John Resig <jresig@mozilla.com> (Original Author)
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #include
"nsISupports.idl"
39 #include
"extIApplication.idl"
43 interface nsIDOMHTMLDocument
;
45 interface fuelIBookmarkFolder
;
46 interface fuelIBrowserTab
;
49 * Interface representing a collection of annotations associated
50 * with a bookmark or bookmark folder.
52 [scriptable
, uuid(335c9292
-91a1
-4ca0
-ad0b
-07d5f63ed6cd
)]
53 interface fuelIAnnotations
: nsISupports
56 * Array of the annotation names associated with the owning item
58 readonly attribute nsIVariant names
;
61 * Determines if an annotation exists with the given name.
63 * The name of the annotation
64 * @returns true if an annotation exists with the given name,
67 boolean has
(in AString aName
);
70 * Gets the value of an annotation with the given name.
72 * The name of the annotation
73 * @returns A variant containing the value of the annotation. Supports
74 * string, boolean and number.
76 nsIVariant get
(in AString aName
);
79 * Sets the value of an annotation with the given name.
81 * The name of the annotation
83 * The new value of the annotation. Supports string, boolean
86 * The expiration policy for the annotation.
87 * See nsIAnnotationService.
89 void set
(in AString aName
, in nsIVariant aValue
, in PRInt32 aExpiration
);
92 * Removes the named annotation from the owner item.
94 * The name of annotation.
96 void remove
(in AString aName
);
101 * Interface representing a bookmark item.
103 [scriptable
, uuid(808585b6
-7568-4b26
-8c62
-545221bf2b8c
)]
104 interface fuelIBookmark
: nsISupports
107 * The id of the bookmark.
109 readonly attribute
long long id;
112 * The title of the bookmark.
114 attribute AString title
;
117 * The uri of the bookmark.
119 attribute nsIURI uri
;
122 * The description of the bookmark.
124 attribute AString description
;
127 * The keyword associated with the bookmark.
129 attribute AString keyword
;
132 * The type of the bookmark.
133 * values: "bookmark", "separator"
135 readonly attribute AString type
;
138 * The parent folder of the bookmark.
140 attribute fuelIBookmarkFolder parent
;
143 * The annotations object for the bookmark.
145 readonly attribute fuelIAnnotations annotations
;
148 * The events object for the bookmark.
149 * supports: "remove", "change", "visit", "move"
151 readonly attribute extIEvents events
;
154 * Removes the item from the parent folder. Used to
155 * delete a bookmark or separator
162 * Interface representing a bookmark folder. Folders
163 * can hold bookmarks, separators and other folders.
165 [scriptable
, uuid(9f42fe20
-52de
-4a55
-8632-a459c7716aa0
)]
166 interface fuelIBookmarkFolder
: nsISupports
169 * The id of the folder.
171 readonly attribute
long long id;
174 * The title of the folder.
176 attribute AString title
;
179 * The description of the folder.
181 attribute AString description
;
184 * The type of the folder.
187 readonly attribute AString type
;
190 * The parent folder of the folder.
192 attribute fuelIBookmarkFolder parent
;
195 * The annotations object for the folder.
197 readonly attribute fuelIAnnotations annotations
;
200 * The events object for the folder.
201 * supports: "add", "addchild", "remove", "removechild", "change", "move"
203 readonly attribute extIEvents events
;
206 * Array of all bookmarks, separators and folders contained
209 readonly attribute nsIVariant children
;
212 * Adds a new child bookmark to this folder.
214 * The title of bookmark.
216 * The uri of bookmark.
218 fuelIBookmark addBookmark
(in AString aTitle
, in nsIURI aURI
);
221 * Adds a new child separator to this folder.
223 fuelIBookmark addSeparator
();
226 * Adds a new child folder to this folder.
228 * The title of folder.
230 fuelIBookmarkFolder addFolder
(in AString aTitle
);
233 * Removes the folder from the parent folder.
239 * Interface representing a container for bookmark roots. Roots
240 * are the top level parents for the various types of bookmarks in the system.
242 [scriptable
, uuid(c9a80870
-eb3c
-11dc
-95ff
-0800200c9a66
)]
243 interface fuelIBookmarkRoots
: nsISupports
246 * The folder for the 'bookmarks menu' root.
248 readonly attribute fuelIBookmarkFolder menu
;
251 * The folder for the 'personal toolbar' root.
253 readonly attribute fuelIBookmarkFolder toolbar
;
256 * The folder for the 'tags' root.
258 readonly attribute fuelIBookmarkFolder tags
;
261 * The folder for the 'unfiled bookmarks' root.
263 readonly attribute fuelIBookmarkFolder unfiled
;
267 * Interface representing a browser window.
269 [scriptable
, uuid(207edb28
-eb5e
-424e
-a862
-b0e97C8de866
)]
270 interface fuelIWindow
: nsISupports
273 * A collection of browser tabs within the browser window.
275 readonly attribute nsIVariant tabs
;
278 * The currently-active tab within the browser window.
280 readonly attribute fuelIBrowserTab activeTab
;
283 * Open a new browser tab, pointing to the specified URI.
285 * The uri to open the browser tab to
287 fuelIBrowserTab open
(in nsIURI aURI
);
290 * The events object for the browser window.
291 * supports: "TabOpen", "TabClose", "TabMove", "TabSelect"
293 readonly attribute extIEvents events
;
297 * Interface representing a browser tab.
299 [scriptable
, uuid(3073ceff
-777c
-41ce
-9ace
-ab37268147c1
)]
300 interface fuelIBrowserTab
: nsISupports
303 * The current uri of this tab.
305 readonly attribute nsIURI uri
;
308 * The current index of this tab in the browser window.
310 readonly attribute PRInt32 index
;
313 * The browser window that is holding the tab.
315 readonly attribute fuelIWindow window
;
318 * The content document of the browser tab.
320 readonly attribute nsIDOMHTMLDocument document
;
323 * The events object for the browser tab.
326 readonly attribute extIEvents events
;
329 * Load a new URI into this browser tab.
331 * The uri to load into the browser tab
333 void load
(in nsIURI aURI
);
336 * Give focus to this browser tab, and bring it to the front.
341 * Close the browser tab. This may not actually close the tab
342 * as script may abort the close operation.
347 * Moves this browser tab before another browser tab within the window.
349 * The tab before which the target tab will be moved
351 void moveBefore
(in fuelIBrowserTab aBefore
);
354 * Move this browser tab to the last tab within the window.
360 * Interface for managing and accessing the applications systems
362 [scriptable
, uuid(fe74cf80
-aa2d
-11db
-abbd
-0800200c9a66
)]
363 interface fuelIApplication
: extIApplication
366 * The root bookmarks object for the application.
367 * Contains all the bookmark roots in the system.
369 readonly attribute fuelIBookmarkRoots bookmarks
;
372 * An array of browser windows within the application.
374 readonly attribute nsIVariant windows
;
377 * The currently active browser window.
379 readonly attribute fuelIWindow activeWindow
;