Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
michael@0 | 2 | * |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #include "nsIURL.idl" |
michael@0 | 8 | |
michael@0 | 9 | /** |
michael@0 | 10 | * nsIIconURI |
michael@0 | 11 | * |
michael@0 | 12 | * This interface derives from nsIURI, to provide additional information |
michael@0 | 13 | * about moz-icon URIs. |
michael@0 | 14 | * |
michael@0 | 15 | * What *is* a moz-icon URI you ask? Well, it has the following syntax: |
michael@0 | 16 | * |
michael@0 | 17 | * moz-icon:[<valid-url> | //<file-with-extension> | //stock/<stock-icon>]? ['?'[<parameter-value-pairs>]] |
michael@0 | 18 | * |
michael@0 | 19 | * <valid-url> is a valid URL spec. |
michael@0 | 20 | * |
michael@0 | 21 | * <file-with-extension> is any filename with an extension, e.g. "dummy.html". |
michael@0 | 22 | * If the file you want an icon for isn't known to exist, you can use this instead of a URL and just |
michael@0 | 23 | * place a dummy file name with the extension or content type you want. |
michael@0 | 24 | * |
michael@0 | 25 | * <stock-icon> is the name of a platform-dependant stock icon. |
michael@0 | 26 | * |
michael@0 | 27 | * Legal parameter value pairs are listed below: |
michael@0 | 28 | * |
michael@0 | 29 | * Parameter: size |
michael@0 | 30 | * Values: [<integer> | button | toolbar | toolbarsmall | menu | dialog] |
michael@0 | 31 | * Description: If integer, this is the desired size in square pixels of the icon |
michael@0 | 32 | * Else, use the OS default for the specified keyword context. |
michael@0 | 33 | * |
michael@0 | 34 | * Parameter: state |
michael@0 | 35 | * Values: [normal | disabled] |
michael@0 | 36 | * Description: The state of the icon. |
michael@0 | 37 | * |
michael@0 | 38 | * Parameter: contentType |
michael@0 | 39 | * Values: <mime-type> |
michael@0 | 40 | * Description: The mime type we want an icon for. This is ignored by stock images. |
michael@0 | 41 | */ |
michael@0 | 42 | |
michael@0 | 43 | [scriptable, uuid(da53adda-cbe3-41bc-a57d-fdd7a0ff448b)] |
michael@0 | 44 | interface nsIMozIconURI : nsIURI |
michael@0 | 45 | { |
michael@0 | 46 | /** |
michael@0 | 47 | * iconFile |
michael@0 | 48 | * |
michael@0 | 49 | * the file URL contained within this moz-icon url, or null. |
michael@0 | 50 | */ |
michael@0 | 51 | attribute nsIURL iconURL; |
michael@0 | 52 | |
michael@0 | 53 | /** |
michael@0 | 54 | * imageSize |
michael@0 | 55 | * |
michael@0 | 56 | * The image area in square pixels, defaulting to 16 if unspecified. |
michael@0 | 57 | */ |
michael@0 | 58 | attribute unsigned long imageSize; |
michael@0 | 59 | |
michael@0 | 60 | /** |
michael@0 | 61 | * stockIcon |
michael@0 | 62 | * |
michael@0 | 63 | * The stock icon name requested from the OS. |
michael@0 | 64 | */ |
michael@0 | 65 | readonly attribute ACString stockIcon; |
michael@0 | 66 | |
michael@0 | 67 | /** |
michael@0 | 68 | * iconSize |
michael@0 | 69 | * |
michael@0 | 70 | * The stock icon size requested from the OS. |
michael@0 | 71 | */ |
michael@0 | 72 | readonly attribute ACString iconSize; |
michael@0 | 73 | |
michael@0 | 74 | /** |
michael@0 | 75 | * iconState |
michael@0 | 76 | * |
michael@0 | 77 | * The stock icon state requested from the OS. |
michael@0 | 78 | */ |
michael@0 | 79 | readonly attribute ACString iconState; |
michael@0 | 80 | |
michael@0 | 81 | /** |
michael@0 | 82 | * contentType |
michael@0 | 83 | * |
michael@0 | 84 | * A valid mime type, or the empty string. |
michael@0 | 85 | */ |
michael@0 | 86 | |
michael@0 | 87 | attribute ACString contentType; |
michael@0 | 88 | |
michael@0 | 89 | /** |
michael@0 | 90 | * fileExtension |
michael@0 | 91 | * |
michael@0 | 92 | * The file extension of the file which we are looking up. |
michael@0 | 93 | */ |
michael@0 | 94 | readonly attribute ACString fileExtension; |
michael@0 | 95 | }; |