michael@0: /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIURL.idl" michael@0: michael@0: /** michael@0: * nsIIconURI michael@0: * michael@0: * This interface derives from nsIURI, to provide additional information michael@0: * about moz-icon URIs. michael@0: * michael@0: * What *is* a moz-icon URI you ask? Well, it has the following syntax: michael@0: * michael@0: * moz-icon:[ | // | //stock/]? ['?'[]] michael@0: * michael@0: * is a valid URL spec. michael@0: * michael@0: * is any filename with an extension, e.g. "dummy.html". michael@0: * 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: * place a dummy file name with the extension or content type you want. michael@0: * michael@0: * is the name of a platform-dependant stock icon. michael@0: * michael@0: * Legal parameter value pairs are listed below: michael@0: * michael@0: * Parameter: size michael@0: * Values: [ | button | toolbar | toolbarsmall | menu | dialog] michael@0: * Description: If integer, this is the desired size in square pixels of the icon michael@0: * Else, use the OS default for the specified keyword context. michael@0: * michael@0: * Parameter: state michael@0: * Values: [normal | disabled] michael@0: * Description: The state of the icon. michael@0: * michael@0: * Parameter: contentType michael@0: * Values: michael@0: * Description: The mime type we want an icon for. This is ignored by stock images. michael@0: */ michael@0: michael@0: [scriptable, uuid(da53adda-cbe3-41bc-a57d-fdd7a0ff448b)] michael@0: interface nsIMozIconURI : nsIURI michael@0: { michael@0: /** michael@0: * iconFile michael@0: * michael@0: * the file URL contained within this moz-icon url, or null. michael@0: */ michael@0: attribute nsIURL iconURL; michael@0: michael@0: /** michael@0: * imageSize michael@0: * michael@0: * The image area in square pixels, defaulting to 16 if unspecified. michael@0: */ michael@0: attribute unsigned long imageSize; michael@0: michael@0: /** michael@0: * stockIcon michael@0: * michael@0: * The stock icon name requested from the OS. michael@0: */ michael@0: readonly attribute ACString stockIcon; michael@0: michael@0: /** michael@0: * iconSize michael@0: * michael@0: * The stock icon size requested from the OS. michael@0: */ michael@0: readonly attribute ACString iconSize; michael@0: michael@0: /** michael@0: * iconState michael@0: * michael@0: * The stock icon state requested from the OS. michael@0: */ michael@0: readonly attribute ACString iconState; michael@0: michael@0: /** michael@0: * contentType michael@0: * michael@0: * A valid mime type, or the empty string. michael@0: */ michael@0: michael@0: attribute ACString contentType; michael@0: michael@0: /** michael@0: * fileExtension michael@0: * michael@0: * The file extension of the file which we are looking up. michael@0: */ michael@0: readonly attribute ACString fileExtension; michael@0: };