~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to src/dom/work/traversal.idl

  • Committer: JazzyNico
  • Date: 2011-08-29 20:25:30 UTC
  • Revision ID: nicoduf@yahoo.fr-20110829202530-6deuoz11q90usldv
Code refactoring and merging with trunk (revision 10599).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (c) 2000 World Wide Web Consortium,
3
 
 * (Massachusetts Institute of Technology, Institut National de
4
 
 * Recherche en Informatique et en Automatique, Keio University). All
5
 
 * Rights Reserved. This program is distributed under the W3C's Software
6
 
 * Intellectual Property License. This program is distributed in the
7
 
 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8
 
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9
 
 * PURPOSE.
10
 
 * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11
 
 */
12
 
 
13
 
// File: http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113/traversal.idl
14
 
 
15
 
#ifndef _TRAVERSAL_IDL_
16
 
#define _TRAVERSAL_IDL_
17
 
 
18
 
#include "dom.idl"
19
 
 
20
 
#pragma prefix "dom.w3c.org"
21
 
module traversal
22
 
{
23
 
 
24
 
  typedef dom::Node Node;
25
 
 
26
 
  interface NodeFilter;
27
 
 
28
 
  // Introduced in DOM Level 2:
29
 
  interface NodeIterator {
30
 
    readonly attribute Node             root;
31
 
    readonly attribute unsigned long    whatToShow;
32
 
    readonly attribute NodeFilter       filter;
33
 
    readonly attribute boolean          expandEntityReferences;
34
 
    Node               nextNode()
35
 
                                        raises(dom::DOMException);
36
 
    Node               previousNode()
37
 
                                        raises(dom::DOMException);
38
 
    void               detach();
39
 
  };
40
 
 
41
 
  // Introduced in DOM Level 2:
42
 
  interface NodeFilter {
43
 
 
44
 
    // Constants returned by acceptNode
45
 
    const short               FILTER_ACCEPT                  = 1;
46
 
    const short               FILTER_REJECT                  = 2;
47
 
    const short               FILTER_SKIP                    = 3;
48
 
 
49
 
 
50
 
    // Constants for whatToShow
51
 
    const unsigned long       SHOW_ALL                       = 0xFFFFFFFF;
52
 
    const unsigned long       SHOW_ELEMENT                   = 0x00000001;
53
 
    const unsigned long       SHOW_ATTRIBUTE                 = 0x00000002;
54
 
    const unsigned long       SHOW_TEXT                      = 0x00000004;
55
 
    const unsigned long       SHOW_CDATA_SECTION             = 0x00000008;
56
 
    const unsigned long       SHOW_ENTITY_REFERENCE          = 0x00000010;
57
 
    const unsigned long       SHOW_ENTITY                    = 0x00000020;
58
 
    const unsigned long       SHOW_PROCESSING_INSTRUCTION    = 0x00000040;
59
 
    const unsigned long       SHOW_COMMENT                   = 0x00000080;
60
 
    const unsigned long       SHOW_DOCUMENT                  = 0x00000100;
61
 
    const unsigned long       SHOW_DOCUMENT_TYPE             = 0x00000200;
62
 
    const unsigned long       SHOW_DOCUMENT_FRAGMENT         = 0x00000400;
63
 
    const unsigned long       SHOW_NOTATION                  = 0x00000800;
64
 
 
65
 
    short              acceptNode(in Node n);
66
 
  };
67
 
 
68
 
  // Introduced in DOM Level 2:
69
 
  interface TreeWalker {
70
 
    readonly attribute Node             root;
71
 
    readonly attribute unsigned long    whatToShow;
72
 
    readonly attribute NodeFilter       filter;
73
 
    readonly attribute boolean          expandEntityReferences;
74
 
             attribute Node             currentNode;
75
 
                                        // raises(dom::DOMException) on setting
76
 
 
77
 
    Node               parentNode();
78
 
    Node               firstChild();
79
 
    Node               lastChild();
80
 
    Node               previousSibling();
81
 
    Node               nextSibling();
82
 
    Node               previousNode();
83
 
    Node               nextNode();
84
 
  };
85
 
 
86
 
  // Introduced in DOM Level 2:
87
 
  interface DocumentTraversal {
88
 
    NodeIterator       createNodeIterator(in Node root, 
89
 
                                          in unsigned long whatToShow, 
90
 
                                          in NodeFilter filter, 
91
 
                                          in boolean entityReferenceExpansion)
92
 
                                        raises(dom::DOMException);
93
 
    TreeWalker         createTreeWalker(in Node root, 
94
 
                                        in unsigned long whatToShow, 
95
 
                                        in NodeFilter filter, 
96
 
                                        in boolean entityReferenceExpansion)
97
 
                                        raises(dom::DOMException);
98
 
  };
99
 
};
100
 
 
101
 
#endif // _TRAVERSAL_IDL_
102