1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/image/decoders/icon/nsIIconURI.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,95 @@ 1.4 +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#include "nsIURL.idl" 1.11 + 1.12 + /** 1.13 + * nsIIconURI 1.14 + * 1.15 + * This interface derives from nsIURI, to provide additional information 1.16 + * about moz-icon URIs. 1.17 + * 1.18 + * What *is* a moz-icon URI you ask? Well, it has the following syntax: 1.19 + * 1.20 + * moz-icon:[<valid-url> | //<file-with-extension> | //stock/<stock-icon>]? ['?'[<parameter-value-pairs>]] 1.21 + * 1.22 + * <valid-url> is a valid URL spec. 1.23 + * 1.24 + * <file-with-extension> is any filename with an extension, e.g. "dummy.html". 1.25 + * If the file you want an icon for isn't known to exist, you can use this instead of a URL and just 1.26 + * place a dummy file name with the extension or content type you want. 1.27 + * 1.28 + * <stock-icon> is the name of a platform-dependant stock icon. 1.29 + * 1.30 + * Legal parameter value pairs are listed below: 1.31 + * 1.32 + * Parameter: size 1.33 + * Values: [<integer> | button | toolbar | toolbarsmall | menu | dialog] 1.34 + * Description: If integer, this is the desired size in square pixels of the icon 1.35 + * Else, use the OS default for the specified keyword context. 1.36 + * 1.37 + * Parameter: state 1.38 + * Values: [normal | disabled] 1.39 + * Description: The state of the icon. 1.40 + * 1.41 + * Parameter: contentType 1.42 + * Values: <mime-type> 1.43 + * Description: The mime type we want an icon for. This is ignored by stock images. 1.44 + */ 1.45 + 1.46 +[scriptable, uuid(da53adda-cbe3-41bc-a57d-fdd7a0ff448b)] 1.47 +interface nsIMozIconURI : nsIURI 1.48 +{ 1.49 + /** 1.50 + * iconFile 1.51 + * 1.52 + * the file URL contained within this moz-icon url, or null. 1.53 + */ 1.54 + attribute nsIURL iconURL; 1.55 + 1.56 + /** 1.57 + * imageSize 1.58 + * 1.59 + * The image area in square pixels, defaulting to 16 if unspecified. 1.60 + */ 1.61 + attribute unsigned long imageSize; 1.62 + 1.63 + /** 1.64 + * stockIcon 1.65 + * 1.66 + * The stock icon name requested from the OS. 1.67 + */ 1.68 + readonly attribute ACString stockIcon; 1.69 + 1.70 + /** 1.71 + * iconSize 1.72 + * 1.73 + * The stock icon size requested from the OS. 1.74 + */ 1.75 + readonly attribute ACString iconSize; 1.76 + 1.77 + /** 1.78 + * iconState 1.79 + * 1.80 + * The stock icon state requested from the OS. 1.81 + */ 1.82 + readonly attribute ACString iconState; 1.83 + 1.84 + /** 1.85 + * contentType 1.86 + * 1.87 + * A valid mime type, or the empty string. 1.88 + */ 1.89 + 1.90 + attribute ACString contentType; 1.91 + 1.92 + /** 1.93 + * fileExtension 1.94 + * 1.95 + * The file extension of the file which we are looking up. 1.96 + */ 1.97 + readonly attribute ACString fileExtension; 1.98 +};