зеркало из https://github.com/mozilla/gecko-dev.git
Moved core DOM interfaces to coreDom directory
This commit is contained in:
Родитель
26651ac87d
Коммит
df7e36611d
|
@ -0,0 +1,9 @@
|
|||
interface AttributeList {
|
||||
Attribute getAttribute(in wstring attrName);
|
||||
void setAttribute(in Attribute attr);
|
||||
Attribute remove(in wstring attrName) interface NoSuchAttributeException {};
|
||||
|
||||
Attribute item(in unsigned long index) interface NoSuchAttributeException {};
|
||||
|
||||
unsigned long getLength();
|
||||
};
|
|
@ -0,0 +1,4 @@
|
|||
interface Comment : Node {
|
||||
attribute wstring data;
|
||||
};
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
interface DOM {
|
||||
Document createDocument(in wstring type);
|
||||
boolean hasFeature(in wstring feature);
|
||||
};
|
|
@ -0,0 +1,17 @@
|
|||
interface Document : DocumentFragment {
|
||||
attribute Node documentType;
|
||||
attribute Element documentElement;
|
||||
attribute DocumentContext documentContext;
|
||||
DocumentContext createDocumentContext();
|
||||
Element createElement(in wstring tagName,
|
||||
in AttributeList attributes);
|
||||
Text createTextNode(in wstring data);
|
||||
Comment createComment(in wstring data);
|
||||
PI createPI(in wstring name,
|
||||
in wstring data);
|
||||
Attribute createAttribute(in wstring name,
|
||||
in Node value);
|
||||
AttributeList createAttributeList();
|
||||
TreeIterator createTreeIterator(in Node node);
|
||||
NodeIterator getElementsByTagName(in wstring tagname);
|
||||
};
|
|
@ -0,0 +1,3 @@
|
|||
interface DocumentContext {
|
||||
attribute Document document;
|
||||
};
|
|
@ -0,0 +1,3 @@
|
|||
interface DocumentFragment : Node {
|
||||
attribute Document masterDoc;
|
||||
};
|
|
@ -0,0 +1,14 @@
|
|||
interface Element : Node {
|
||||
wstring getTagName();
|
||||
AttributeList getAttributes();
|
||||
wstring getDOMAttribute(in wstring name);
|
||||
void setDOMAttribute(in string name,
|
||||
in string value);
|
||||
void removeAttribute(in wstring name);
|
||||
Attribute getAttributeNode(in wstring name);
|
||||
void setAttributeNode(in Attribute newAttr);
|
||||
void removeAttributeNode(in Attribute oldAttr);
|
||||
NodeIterator getElementsByTagName(in wstring tagname);
|
||||
void normalize();
|
||||
};
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
interface Node {
|
||||
// NodeType
|
||||
const int DOCUMENT = 1;
|
||||
const int ELEMENT = 2;
|
||||
const int ATTRIBUTE = 3;
|
||||
const int PI = 4;
|
||||
const int COMMENT = 5;
|
||||
const int TEXT = 6;
|
||||
|
||||
int getNodeType();
|
||||
Node getParentNode();
|
||||
NodeIterator getChildNodes();
|
||||
boolean hasChildNodes();
|
||||
Node getFirstChild();
|
||||
Node getPreviousSibling();
|
||||
Node getNextSibling();
|
||||
void insertBefore(in Node newChild,
|
||||
in Node refChild) interface NotMyChildException {};
|
||||
|
||||
void replaceChild(in Node newChild,
|
||||
in Node oldChild) interface NotMyChildException {};
|
||||
|
||||
void removeChild(in Node oldChild) interface NotMyChildException {};
|
||||
|
||||
};
|
|
@ -0,0 +1,9 @@
|
|||
interface NodeIterator {
|
||||
unsigned long getLength();
|
||||
Node getCurrentNode();
|
||||
Node getNextNode();
|
||||
Node getPreviousNode();
|
||||
Node toFirst();
|
||||
Node toLast();
|
||||
Node moveTo(in int n);
|
||||
};
|
|
@ -0,0 +1,4 @@
|
|||
interface PI : Node {
|
||||
attribute wstring name;
|
||||
attribute wstring data;
|
||||
};
|
|
@ -0,0 +1,14 @@
|
|||
interface Text : Node {
|
||||
attribute wstring data;
|
||||
void append(in wstring data);
|
||||
void insert(in int offset,
|
||||
in wstring data);
|
||||
void delete(in int offset,
|
||||
in int count);
|
||||
void replace(in int offset,
|
||||
in int count,
|
||||
in wstring data);
|
||||
void splice(in Element element,
|
||||
in int offset,
|
||||
in int count);
|
||||
};
|
|
@ -0,0 +1,11 @@
|
|||
interface TreeIterator : NodeIterator {
|
||||
unsigned long numChildren();
|
||||
unsigned long numPreviousSiblings();
|
||||
unsigned long numNextSiblings();
|
||||
Node toParent();
|
||||
Node toPreviousSibling();
|
||||
Node toNextSibling();
|
||||
Node toFirstChild();
|
||||
Node toLastChild();
|
||||
Node toNthChild(in int n) interface NoSuchNodeException {};
|
||||
};
|
|
@ -0,0 +1,61 @@
|
|||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..\..\..
|
||||
IGNORE_MANIFEST=1
|
||||
|
||||
MODULE=raptor
|
||||
|
||||
IDLSRCS = \
|
||||
Attribute.idl \
|
||||
AttributeList.idl \
|
||||
Comment.idl \
|
||||
DOM.idl \
|
||||
Document.idl \
|
||||
DocumentContext.idl \
|
||||
DocumentFragment.idl \
|
||||
Element.idl \
|
||||
Node.idl \
|
||||
NodeIterator.idl \
|
||||
PI.idl \
|
||||
Text.idl \
|
||||
TreeIterator.idl
|
||||
|
||||
JSSTUB_DESTDIR=$(DEPTH)\dom\src
|
||||
|
||||
GENXDIR=genx
|
||||
GENJSDIR=genjs
|
||||
|
||||
!include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
$(GENXDIR):
|
||||
-mkdir $(GENXDIR)
|
||||
|
||||
$(GENJSDIR):
|
||||
-mkdir $(GENJSDIR)
|
||||
|
||||
IDLC=$(DIST)\bin\idlc.exe
|
||||
GENIID=$(DIST)\bin\geniid.pl
|
||||
|
||||
export:: $(GENXDIR) $(GENJSDIR) $(IDLSRCS)
|
||||
@echo +++ make: generating xpcom headers
|
||||
$(IDLC) -d $(GENXDIR) -x $(IDLSRCS)
|
||||
@echo +++ make: generating JavaScript stubs
|
||||
$(IDLC) -d $(GENJSDIR) -j $(IDLSRCS)
|
||||
|
||||
install::
|
||||
for %g in ($(IDLSRCS:.idl=.cpp)) do $(MAKE_INSTALL:/=\) $(GENJSDIR)\nsJS%g $(JSSTUB_DESTDIR)
|
|
@ -28,11 +28,11 @@ GLOBAL_IDLSRC = Window.idl
|
|||
|
||||
XPCOM_DESTDIR=$(DEPTH)\dom\public
|
||||
JSSTUB_DESTDIR=$(DEPTH)\dom\src
|
||||
IIDDIRS=$(DIRS: =/genx )/$(GENXDIR) $(GENXDIR)
|
||||
|
||||
GENXDIR=genx
|
||||
GENJSDIR=genjs
|
||||
|
||||
IIDDIRS=$(DIRS: =/genx )/$(GENXDIR) $(GENXDIR)
|
||||
|
||||
!include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
$(GENXDIR):
|
||||
|
|
Загрузка…
Ссылка в новой задаче