1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
12 * This interface derives from nsIURI, to provide additional information
13 * about moz-icon URIs.
15 * What *is* a moz-icon URI you ask? Well, it has the following syntax:
17 * moz-icon:[<valid-url> | //<file-with-extension> | //stock/<stock-icon>]?
18 * ['?'[<parameter-value-pairs>]]
20 * <valid-url> is a valid URL spec.
22 * <file-with-extension> is any filename with an extension, e.g. "dummy.html".
23 * If the file you want an icon for isn't known to exist, you can use this
24 * instead of a URL and just place a dummy file name with the extension or
25 * content type you want.
27 * <stock-icon> is the name of a platform-dependant stock icon.
29 * Legal parameter value pairs are listed below:
32 * Values: [<integer> | button | toolbar | toolbarsmall | menu |
34 * Description: If integer, this is the desired size in square pixels of
36 * Else, use the OS default for the specified keyword context.
39 * Values: [normal | disabled]
40 * Description: The state of the icon.
42 * Parameter: contentType
44 * Description: The mime type we want an icon for. This is ignored by
48 [scriptable
, builtinclass
, uuid(f8fe5ef2
-5f2b
-43f3
-857d
-5b64d192c427
)]
49 interface nsIMozIconURI
: nsIURI
51 /// iconFile: the file URL contained within this moz-icon url, or null.
52 readonly attribute nsIURL iconURL
;
54 /// imageSize: The image area in square pixels, defaults to 16 if unspecified.
55 readonly attribute
unsigned long imageSize
;
57 /// stockIcon: The stock icon name requested from the OS.
58 readonly attribute ACString stockIcon
;
60 /// iconSize: The stock icon size requested from the OS.
61 readonly attribute ACString iconSize
;
63 /// iconState: The stock icon state requested from the OS.
64 readonly attribute ACString iconState
;
66 /// contentType: A valid mime type, or the empty string.
67 readonly attribute ACString contentType
;
69 /// fileExtension: The file extension of the file which we are looking up.
70 readonly attribute ACString fileExtension
;
75 // CID for nsMozIconURI, if implemented on this platform.
76 #define NS_MOZICONURI_CID \
81 { 0x99, 0x7, 0x0, 0x10, 0x83, 0x1, 0xe, 0x9b } \
84 #define NS_MOZICONURIMUTATOR_CID \
89 {0x83, 0x49, 0x83, 0x8e, 0x50, 0x7c, 0x3e, 0xf9} \