Fixing bustages

This commit is contained in:
aaronl%netscape.com 2003-04-01 22:57:00 +00:00
parent f18c2a96c5
commit 12310c2ebc
6 changed files with 495 additions and 0 deletions

View File

@ -0,0 +1,7 @@
LIBRARY ISimpleDOMDocumentMarshal.dll
DESCRIPTION 'ISimpleDOMDocument proxy/stub DLL - allows cross-process communication'
EXPORTS DllGetClassObject @1 PRIVATE
DllCanUnloadNow @2 PRIVATE
DllRegisterServer @4 PRIVATE
DllUnregisterServer @5 PRIVATE

View File

@ -0,0 +1,124 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
cpp_quote("//")
cpp_quote("// ISimpleDOMDocument.h")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("//")
cpp_quote("// get_URL(out] BSTR *url)")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Get the internet URL associated with this document.")
cpp_quote("//")
cpp_quote("// get_title([out BSTR *title")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Get the document's title from the <TITLE> element")
cpp_quote("//")
cpp_quote("// get_mimeType([out BSTR *mimeType")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Get the registered mime type, such as text/html")
cpp_quote("//")
cpp_quote("// get_docType([out] BSTR *docType")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Get doctype associated with the <!DOCTYPE ..> element")
cpp_quote("//")
cpp_quote("// get_nameSpaceURIForID([in] short nameSpaceID, [out] BSTR *nameSpaceURI)")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Some of the methods for ISimpleDOMNode return a nameSpaceID (-1,0,1,2,3,....)")
cpp_quote("// This method returns the associated namespace URI for each ID.")
cpp_quote("//")
cpp_quote("// set_alternateViewMediaTypes([in] BSTR *commaSeparatedMediaType)")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// For style property retrieval on nsISimpleDOMNode elements, ")
cpp_quote("// set the additional alternate media types that properties are available for.")
cpp_quote("// [in] BSTR *commaSeparatedMediaTypes is a comma separate list, for example \"aural, braille\".")
cpp_quote("// The alternate media properties are requested with nsISimpleDOMNode::get_computedStyle.")
cpp_quote("// Note: setting this value on a document will increase memory overhead, and may create a small delay.")
cpp_quote("//")
cpp_quote("// W3C media Types:")
cpp_quote("// * all: Suitable for all devices. ")
cpp_quote("// * aural: Intended for speech synthesizers. See the section on aural style sheets for details. ")
cpp_quote("// * braille: Intended for braille tactile feedback devices. ")
cpp_quote("// * embossed: Intended for paged braille printers. ")
cpp_quote("// * handheld: Intended for handheld devices - typically small screen, monochrome, limited bandwidth. ")
cpp_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. ")
cpp_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. ")
cpp_quote("// * screen: Intended primarily for color computer screens. ")
cpp_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. ")
cpp_quote("// * tv: Intended for television-type devices - low resolution, color, limited-scrollability screens, sound")
cpp_quote("// * See latest W3C CSS specs for complete list of media types")
cpp_quote("//")
cpp_quote("//")
cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
cpp_quote("")
cpp_quote("")
import "objidl.idl";
import "oaidl.idl";
const long DISPID_DOC_URL = -5904;
const long DISPID_DOC_TITLE = -5905;
const long DISPID_DOC_MIMETYPE = -5906;
const long DISPID_DOC_DOCTYPE = -5907;
const long DISPID_DOC_NAMESPACE = -5908;
const long DISPID_DOC_MEDIATYPES = -5909;
[object, uuid(0D68D6D0-D93D-4d08-A30D-F00DD1F45B24)]
interface ISimpleDOMDocument : IUnknown
{
[propget, id(DISPID_DOC_URL)] HRESULT URL(
[out, retval] BSTR * url
);
[propget, id(DISPID_DOC_TITLE)] HRESULT title(
[out, retval] BSTR * title
);
[propget, id(DISPID_DOC_MIMETYPE)] HRESULT mimeType(
[out, retval] BSTR * mimeType
);
[propget, id(DISPID_DOC_DOCTYPE)] HRESULT docType(
[out, retval] BSTR * docType
);
[propget, id(DISPID_DOC_NAMESPACE)] HRESULT nameSpaceURIForID(
[in] short nameSpaceID,
[out, retval] BSTR * nameSpaceURI
);
[propput, id(DISPID_DOC_MEDIATYPES)] HRESULT alternateViewMediaTypes(
[in] BSTR * commaSeparatedMediaTypes
);
}

View File

@ -0,0 +1,84 @@
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = accessibility
LIBRARY_NAME = ISimpleDOMDocumentMarshal
DEFFILE = $(srcdir)/ISimpleDOMDocument.def
DEFINES += -DREGISTER_PROXY_DLL -D_WIN32_WINNT=0x400
CSRCS = \
dlldata.c \
ISimpleDOMDocument_p.c \
ISimpleDOMDocument_i.c \
$(NULL)
OS_LIBS += \
kernel32.lib \
rpcndr.lib \
rpcns4.lib \
rpcrt4.lib \
oleaut32.lib \
$(NULL)
MIDL_GENERATED_FILES = \
ISimpleDOMDocument.h \
ISimpleDOMDocument_p.c \
ISimpleDOMDocument_i.c \
dlldata.c \
$(NULL)
SRCDIR_CSRCS = $(addprefix $(srcdir)/,$(CSRCS))
GARBAGE += $(MIDL_GENERATED_FILES) done_gen $(CSRCS) $(SRCDIR_CSRCS)
FORCE_SHARED_LIB = 1
LOCAL_INCLUDES = -I.
SRCS_IN_OBJDIR = 1
EXPORTS = \
ISimpleDOMDocument.h \
ISimpleDOMDocument_i.c \
$(NULL)
include $(topsrcdir)/config/rules.mk
$(MIDL_GENERATED_FILES): done_gen
done_gen: ISimpleDOMDocument.idl
$(RM) $(SRCDIR_CSRCS)
"$(MIDL)" $(srcdir)/ISimpleDOMDocument.idl
touch $@
export:: done_gen
# This marshall dll is also registered in the installer
register::
regsvr32 /s $(DIST)/bin/$(SHARED_LIBRARY)

View File

@ -0,0 +1,7 @@
LIBRARY ISimpleDOMNodeMarshal.dll
DESCRIPTION 'ISimpleDOMNode proxy/stub DLL - enables cross-process communication'
EXPORTS DllGetClassObject @1 PRIVATE
DllCanUnloadNow @2 PRIVATE
DllRegisterServer @4 PRIVATE
DllUnregisterServer @5 PRIVATE

View File

@ -0,0 +1,189 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Author: Aaron Leventhal (aaronl@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
cpp_quote("//")
cpp_quote("// ISimpleDOMNode.h ")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("//")
cpp_quote("// get_nodeInfo(")
cpp_quote("// /* [out] */ BSTR *nodeName, // For elements, this is the tag name")
cpp_quote("// /* [out] */ short *nameSpaceID,")
cpp_quote("// /* [out] */ BSTR *nodeValue, ")
cpp_quote("// /* [out] */ unsigned int *numChildren); ")
cpp_quote("// /* [out] */ unsigned int *uniqueID; // In Win32 accessible events we generate, the target's childID matches to this")
cpp_quote("// /* [out] */ unsigned short *nodeType,")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Get the basic information about a node.")
cpp_quote("// The namespace ID can be mapped to an URI using nsISimpleDOMDocument::get_nameSpaceURIForID()")
cpp_quote("//")
cpp_quote("// get_attributes(")
cpp_quote("// /* [in] */ unsigned short maxAttribs,")
cpp_quote("// /* [out] */ unsigned short *numAttribs,")
cpp_quote("// /* [out] */ BSTR *attribNames,")
cpp_quote("// /* [out] */ short *nameSpaceID,")
cpp_quote("// /* [out] */ BSTR *attribValues);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Returns 3 arrays - the attribute names and values, and a namespace ID for each")
cpp_quote("// If the namespace ID is 0, it's the same namespace as the node's namespace")
cpp_quote("//")
cpp_quote("// get_attributesForNames(")
cpp_quote("// /* [in] */ unsigned short numAttribs,")
cpp_quote("// /* [in] */ BSTR *attribNames,")
cpp_quote("// /* [in] */ short *nameSpaceID,")
cpp_quote("// /* [out] */ BSTR *attribValues);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Takes 2 arrays - the attribute names and namespace IDs, and returns an array of corresponding values")
cpp_quote("// If the namespace ID is 0, it's the same namespace as the node's namespace")
cpp_quote("//")
cpp_quote("// computedStyle( ")
cpp_quote("// /* [in] */ unsigned short maxStyleProperties,")
cpp_quote("// /* [out] */ unsigned short *numStyleProperties, ")
cpp_quote("// /* [in] */ boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes")
cpp_quote("// /* [out] */ BSTR *styleProperties, ")
cpp_quote("// /* [out] */ BSTR *styleValues);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Returns 2 arrays -- the style properties and their values")
cpp_quote("// useAlternateView=FALSE: gets properties for the default media type (usually screen)")
cpp_quote("// useAlternateView=TRUE: properties for media types set w/ nsIDOMSimpleDocument::set_alternateViewMediaTypes()")
cpp_quote("//")
cpp_quote("// computedStyleForProperties( ")
cpp_quote("// /* [in] */ unsigned short numStyleProperties, ")
cpp_quote("// /* [in] */ boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes")
cpp_quote("// /* [in] */ BSTR *styleProperties, ")
cpp_quote("// /* [out] */ BSTR *styleValues);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Scroll the current view so that this dom node is visible.")
cpp_quote("// placeTopLeft=TRUE: scroll until the top left corner of the dom node is at the top left corner of the view.")
cpp_quote("// placeTopLeft=FALSE: scroll minimally to make the dom node visible. Don't scroll at all if already visible.")
cpp_quote("//")
cpp_quote("// scrollTo( ")
cpp_quote("// /* [in] */ boolean placeTopLeft); ")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Returns style property values for those properties in the styleProperties [in] array")
cpp_quote("// Returns 2 arrays -- the style properties and their values")
cpp_quote("// useAlternateView=FALSE: gets properties for the default media type (usually screen)")
cpp_quote("// useAlternateView=TRUE: properties for media types set w/ nsIDOMSimpleDocument::set_alternateViewMediaTypes()")
cpp_quote("//")
cpp_quote("// get_parentNode (/* [in] */ ISimpleDOMNode *newNodePtr);")
cpp_quote("// get_firstChild (/* [in] */ ISimpleDOMNode *newNodePtr);")
cpp_quote("// get_lastChild (/* [in] */ ISimpleDOMNode *newNodePtr);")
cpp_quote("// get_previousSibling(/* [in] */ ISimpleDOMNode *newNodePtr);")
cpp_quote("// get_nextSibling (/* [in] */ ISimpleDOMNode *newNodePtr);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// DOM navigation - get a different node.")
cpp_quote("//")
cpp_quote("//")
cpp_quote("///////////////////////////////////////////////////////////////////////////////////////////////////////")
cpp_quote("")
cpp_quote("")
import "objidl.idl";
import "oaidl.idl";
const long DISPID_NODE_NODEINFO = -5900;
const long DISPID_NODE_ATTRIBUTES = -5901;
const long DISPID_NODE_ATTRIBUTESFORNAMES = -5902;
const long DISPID_NODE_COMPSTYLE = -5903;
const long DISPID_NODE_COMPSTYLEFORPROPS = -5904;
[object, uuid(ef0fcc67-0d76-441b-9737-9e30a066308a)]
interface ISimpleDOMNode : IUnknown
{
const unsigned short NODETYPE_ELEMENT = 1;
const unsigned short NODETYPE_ATTRIBUTE = 2;
const unsigned short NODETYPE_TEXT = 3;
const unsigned short NODETYPE_CDATA_SECTION = 4;
const unsigned short NODETYPE_ENTITY_REFERENCE = 5;
const unsigned short NODETYPE_ENTITY = 6;
const unsigned short NODETYPE_PROCESSING_INSTRUCTION = 7;
const unsigned short NODETYPE_COMMENT = 8;
const unsigned short NODETYPE_DOCUMENT = 9;
const unsigned short NODETYPE_DOCUMENT_TYPE = 10;
const unsigned short NODETYPE_DOCUMENT_FRAGMENT = 11;
const unsigned short NODETYPE_NOTATION = 12;
[propget, id(DISPID_NODE_NODEINFO)] HRESULT nodeInfo(
[out] BSTR *nodeName, // for performance returns NULL for text nodes (true nodeName would be "#text")
[out] short *nameSpaceID,
[out] BSTR *nodeValue,
[out] unsigned int *numChildren,
[out] unsigned int *uniqueID, // In Win32 accessible events we generate, the target's childID matches to this
[out, retval] unsigned short *nodeType
);
[propget, id(DISPID_NODE_ATTRIBUTES)] HRESULT attributes(
[in] unsigned short maxAttribs,
[out, size_is(maxAttribs), length_is(*numAttribs)] BSTR *attribNames,
[out, size_is(maxAttribs), length_is(*numAttribs)] short *nameSpaceID,
[out, size_is(maxAttribs), length_is(*numAttribs)] BSTR *attribValues,
[out, retval] unsigned short *numAttribs
);
[propget, id(DISPID_NODE_ATTRIBUTESFORNAMES)] HRESULT attributesForNames(
[in] unsigned short numAttribs,
[in, size_is(numAttribs), length_is(numAttribs)] BSTR *attribNames,
[in, size_is(numAttribs), length_is(numAttribs)] short *nameSpaceID,
[out, retval, size_is(numAttribs), length_is(numAttribs)] BSTR *attribValues
);
[propget, id(DISPID_NODE_COMPSTYLE)] HRESULT computedStyle(
[in] unsigned short maxStyleProperties,
[in] boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes
[out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR *styleProperties,
[out, size_is(maxStyleProperties), length_is(*numStyleProperties)] BSTR *styleValues,
[out, retval] unsigned short *numStyleProperties
);
[propget, id(DISPID_NODE_COMPSTYLEFORPROPS)] HRESULT computedStyleForProperties(
[in] unsigned short numStyleProperties,
[in] boolean useAlternateView, // If TRUE, returns properites for media as set in nsIDOMDocument::set_alternateViewMediaTypes
[in, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR *styleProperties,
[out, retval, size_is(numStyleProperties), length_is(numStyleProperties)] BSTR *styleValues
);
HRESULT scrollTo([in] boolean placeTopLeft);
[propget] HRESULT parentNode([out, retval] ISimpleDOMNode **node);
[propget] HRESULT firstChild([out, retval] ISimpleDOMNode **node);
[propget] HRESULT lastChild([out, retval] ISimpleDOMNode **node);
[propget] HRESULT previousSibling([out, retval] ISimpleDOMNode **node);
[propget] HRESULT nextSibling([out, retval] ISimpleDOMNode **node);
}

View File

@ -0,0 +1,84 @@
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = accessibility
LIBRARY_NAME = ISimpleDOMNodeMarshal
DEFFILE = $(srcdir)/ISimpleDOMNode.def
DEFINES += -DREGISTER_PROXY_DLL -D_WIN32_WINNT=0x400
CSRCS = \
dlldata.c \
ISimpleDOMNode_p.c \
ISimpleDOMNode_i.c \
$(NULL)
OS_LIBS += \
kernel32.lib \
rpcndr.lib \
rpcns4.lib \
rpcrt4.lib \
oleaut32.lib \
$(NULL)
MIDL_GENERATED_FILES = \
ISimpleDOMNode.h \
ISimpleDOMNode_p.c \
ISimpleDOMNode_i.c \
dlldata.c \
$(NULL)
SRCDIR_CSRCS = $(addprefix $(srcdir)/,$(CSRCS))
GARBAGE += $(MIDL_GENERATED_FILES) done_gen $(CSRCS) $(SRCDIR_CSRCS)
FORCE_SHARED_LIB = 1
LOCAL_INCLUDES = -I.
SRCS_IN_OBJDIR = 1
EXPORTS = \
ISimpleDOMNode.h \
ISimpleDOMNode_i.c \
$(NULL)
include $(topsrcdir)/config/rules.mk
$(MIDL_GENERATED_FILES): done_gen
done_gen: ISimpleDOMNode.idl
$(RM) $(SRCDIR_CSRCS)
"$(MIDL)" $(srcdir)/ISimpleDOMNode.idl
touch $@
export:: done_gen
# This marshall dll is also registered in the installer
register::
regsvr32 /s $(DIST)/bin/$(SHARED_LIBRARY)