Bug 1864652 - Expose settings for Global Privacy Control. r=geckoview-reviewers,ohall...
[gecko.git] / image / nsIIconURI.idl
blobb55ee8d8c7b29892eecc55e6f96ec8f478f7e272
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/. */
7 #include "nsIURL.idl"
9 /**
10 * nsIIconURI
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:
31 * Parameter: size
32 * Values: [<integer> | button | toolbar | toolbarsmall | menu |
33 * dialog]
34 * Description: If integer, this is the desired size in square pixels of
35 * the icon
36 * Else, use the OS default for the specified keyword context.
38 * Parameter: state
39 * Values: [normal | disabled]
40 * Description: The state of the icon.
42 * Parameter: contentType
43 * Values: <mime-type>
44 * Description: The mime type we want an icon for. This is ignored by
45 * stock images.
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;
73 %{C++
75 // CID for nsMozIconURI, if implemented on this platform.
76 #define NS_MOZICONURI_CID \
77 { \
78 0x43a88e0e, \
79 0x2d37, \
80 0x11d5, \
81 { 0x99, 0x7, 0x0, 0x10, 0x83, 0x1, 0xe, 0x9b } \
84 #define NS_MOZICONURIMUTATOR_CID \
85 { \
86 0x1460df3b, \
87 0x774c, \
88 0x4205, \
89 {0x83, 0x49, 0x83, 0x8e, 0x50, 0x7c, 0x3e, 0xf9} \