1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2/* ***** BEGIN LICENSE BLOCK ***** 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 4 * 5 * The contents of this file are subject to the Mozilla Public License Version 6 * 1.1 (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * http://www.mozilla.org/MPL/ 9 * 10 * Software distributed under the License is distributed on an "AS IS" basis, 11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 12 * for the specific language governing rights and limitations under the 13 * License. 14 * 15 * The Original Code is mozilla.org code. 16 * 17 * The Initial Developer of the Original Code is 18 * Netscape Communications Corporation. 19 * Portions created by the Initial Developer are Copyright (C) 1998 20 * the Initial Developer. All Rights Reserved. 21 * 22 * Contributor(s): 23 * Author: Aaron Leventhal (aaronl@netscape.com) 24 * 25 * Alternatively, the contents of this file may be used under the terms of 26 * either of the GNU General Public License Version 2 or later (the "GPL"), 27 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 28 * in which case the provisions of the GPL or the LGPL are applicable instead 29 * of those above. If you wish to allow use of your version of this file only 30 * under the terms of either the GPL or the LGPL, and not to allow others to 31 * use your version of this file under the terms of the MPL, indicate your 32 * decision by deleting the provisions above and replace them with the notice 33 * and other provisions required by the GPL or the LGPL. If you do not delete 34 * the provisions above, a recipient may use your version of this file under 35 * the terms of any one of the MPL, the GPL or the LGPL. 36 * 37 * ***** END LICENSE BLOCK ***** */ 38 39cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////") 40cpp_quote("//") 41cpp_quote("// ISimpleDOMDocument") 42cpp_quote("//") 43cpp_quote("// @STATUS UNDER_REVIEW") 44cpp_quote("// ---------------------------------------------------------------------------------------------------=") 45cpp_quote("//") 46cpp_quote("// get_URL(out] BSTR *url)") 47cpp_quote("// ---------------------------------------------------------------------------------------------------=") 48cpp_quote("// Get the internet URL associated with this document.") 49cpp_quote("//") 50cpp_quote("// get_title([out BSTR *title") 51cpp_quote("// ---------------------------------------------------------------------------------------------------=") 52cpp_quote("// Get the document's title from the <TITLE> element") 53cpp_quote("//") 54cpp_quote("// get_mimeType([out BSTR *mimeType") 55cpp_quote("// ---------------------------------------------------------------------------------------------------=") 56cpp_quote("// Get the registered mime type, such as text/html") 57cpp_quote("//") 58cpp_quote("// get_docType([out] BSTR *docType") 59cpp_quote("// ---------------------------------------------------------------------------------------------------=") 60cpp_quote("// Get doctype associated with the <!DOCTYPE ..> element") 61cpp_quote("//") 62cpp_quote("// get_nameSpaceURIForID([in] short nameSpaceID, [out] BSTR *nameSpaceURI)") 63cpp_quote("// ---------------------------------------------------------------------------------------------------=") 64cpp_quote("// Some of the methods for ISimpleDOMNode return a nameSpaceID (-1,0,1,2,3,....)") 65cpp_quote("// This method returns the associated namespace URI for each ID.") 66cpp_quote("//") 67cpp_quote("// set_alternateViewMediaTypes([in] BSTR *commaSeparatedMediaType)") 68cpp_quote("// ---------------------------------------------------------------------------------------------------=") 69cpp_quote("// For style property retrieval on nsISimpleDOMNode elements, ") 70cpp_quote("// set the additional alternate media types that properties are available for.") 71cpp_quote("// [in] BSTR *commaSeparatedMediaTypes is a comma separate list, for example \"aural, braille\".") 72cpp_quote("// The alternate media properties are requested with nsISimpleDOMNode::get_computedStyle.") 73cpp_quote("// Note: setting this value on a document will increase memory overhead, and may create a small delay.") 74cpp_quote("//") 75cpp_quote("// W3C media Types:") 76cpp_quote("// * all: Suitable for all devices. ") 77cpp_quote("// * aural: Intended for speech synthesizers. See the section on aural style sheets for details. ") 78cpp_quote("// * braille: Intended for braille tactile feedback devices. ") 79cpp_quote("// * embossed: Intended for paged braille printers. ") 80cpp_quote("// * handheld: Intended for handheld devices - typically small screen, monochrome, limited bandwidth. ") 81cpp_quote("// * print: Intended for paged, opaque material and for documents viewed on screen in print preview mode. Please consult the section on paged media for information about formatting issues that are specific to paged media. ") 82cpp_quote("// * projection: Intended for projected presentations, for example projectors or print to transparencies. Please consult the section on paged media for information about formatting issues that are specific to paged media. ") 83cpp_quote("// * screen: Intended primarily for color computer screens. ") 84cpp_quote("// * tty: intended for media using a fixed-pitch character grid, such as teletypes, terminals, or portable devices with limited display capabilities. Authors should not use pixel units with the tty media type. ") 85cpp_quote("// * tv: Intended for television-type devices - low resolution, color, limited-scrollability screens, sound") 86cpp_quote("// * See latest W3C CSS specs for complete list of media types") 87cpp_quote("//") 88cpp_quote("//") 89cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////") 90cpp_quote("") 91cpp_quote("") 92 93import "objidl.idl"; 94import "oaidl.idl"; 95 96 97const long DISPID_DOC_URL = -5904; 98const long DISPID_DOC_TITLE = -5905; 99const long DISPID_DOC_MIMETYPE = -5906; 100const long DISPID_DOC_DOCTYPE = -5907; 101const long DISPID_DOC_NAMESPACE = -5908; 102const long DISPID_DOC_MEDIATYPES = -5909; 103 104[object, uuid(0D68D6D0-D93D-4d08-A30D-F00DD1F45B24)] 105interface ISimpleDOMDocument : IUnknown 106{ 107 [propget, id(DISPID_DOC_URL)] HRESULT URL( 108 [out, retval] BSTR * url 109 ); 110 [propget, id(DISPID_DOC_TITLE)] HRESULT title( 111 [out, retval] BSTR * title 112 ); 113 [propget, id(DISPID_DOC_MIMETYPE)] HRESULT mimeType( 114 [out, retval] BSTR * mimeType 115 ); 116 [propget, id(DISPID_DOC_DOCTYPE)] HRESULT docType( 117 [out, retval] BSTR * docType 118 ); 119 [propget, id(DISPID_DOC_NAMESPACE)] HRESULT nameSpaceURIForID( 120 [in] short nameSpaceID, 121 [out, retval] BSTR * nameSpaceURI 122 ); 123 [propput, id(DISPID_DOC_MEDIATYPES)] HRESULT alternateViewMediaTypes( 124 [in] BSTR * commaSeparatedMediaTypes 125 ); 126} 127