~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

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

  • Committer: ishmal
  • Date: 2006-04-12 13:25:21 UTC
  • Revision ID: ishmal@users.sourceforge.net-20060412132521-5ynoezpwbzq4d1c3
Add new rearranged /dom directory

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/ranges.idl
 
14
 
 
15
#ifndef _RANGES_IDL_
 
16
#define _RANGES_IDL_
 
17
 
 
18
#include "dom.idl"
 
19
 
 
20
#pragma prefix "dom.w3c.org"
 
21
module ranges
 
22
{
 
23
 
 
24
  typedef dom::Node Node;
 
25
  typedef dom::DocumentFragment DocumentFragment;
 
26
  typedef dom::DOMString DOMString;
 
27
 
 
28
  // Introduced in DOM Level 2:
 
29
  exception RangeException {
 
30
    unsigned short   code;
 
31
  };
 
32
  // RangeExceptionCode
 
33
  const unsigned short      BAD_BOUNDARYPOINTS_ERR         = 1;
 
34
  const unsigned short      INVALID_NODE_TYPE_ERR          = 2;
 
35
 
 
36
 
 
37
  // Introduced in DOM Level 2:
 
38
  interface Range {
 
39
    readonly attribute Node             startContainer;
 
40
                                        // raises(dom::DOMException) on retrieval
 
41
 
 
42
    readonly attribute long             startOffset;
 
43
                                        // raises(dom::DOMException) on retrieval
 
44
 
 
45
    readonly attribute Node             endContainer;
 
46
                                        // raises(dom::DOMException) on retrieval
 
47
 
 
48
    readonly attribute long             endOffset;
 
49
                                        // raises(dom::DOMException) on retrieval
 
50
 
 
51
    readonly attribute boolean          collapsed;
 
52
                                        // raises(dom::DOMException) on retrieval
 
53
 
 
54
    readonly attribute Node             commonAncestorContainer;
 
55
                                        // raises(dom::DOMException) on retrieval
 
56
 
 
57
    void               setStart(in Node refNode, 
 
58
                                in long offset)
 
59
                                        raises(RangeException, 
 
60
                                               dom::DOMException);
 
61
    void               setEnd(in Node refNode, 
 
62
                              in long offset)
 
63
                                        raises(RangeException, 
 
64
                                               dom::DOMException);
 
65
    void               setStartBefore(in Node refNode)
 
66
                                        raises(RangeException, 
 
67
                                               dom::DOMException);
 
68
    void               setStartAfter(in Node refNode)
 
69
                                        raises(RangeException, 
 
70
                                               dom::DOMException);
 
71
    void               setEndBefore(in Node refNode)
 
72
                                        raises(RangeException, 
 
73
                                               dom::DOMException);
 
74
    void               setEndAfter(in Node refNode)
 
75
                                        raises(RangeException, 
 
76
                                               dom::DOMException);
 
77
    void               collapse(in boolean toStart)
 
78
                                        raises(dom::DOMException);
 
79
    void               selectNode(in Node refNode)
 
80
                                        raises(RangeException, 
 
81
                                               dom::DOMException);
 
82
    void               selectNodeContents(in Node refNode)
 
83
                                        raises(RangeException, 
 
84
                                               dom::DOMException);
 
85
 
 
86
    // CompareHow
 
87
    const unsigned short      START_TO_START                 = 0;
 
88
    const unsigned short      START_TO_END                   = 1;
 
89
    const unsigned short      END_TO_END                     = 2;
 
90
    const unsigned short      END_TO_START                   = 3;
 
91
 
 
92
    short              compareBoundaryPoints(in unsigned short how, 
 
93
                                             in Range sourceRange)
 
94
                                        raises(dom::DOMException);
 
95
    void               deleteContents()
 
96
                                        raises(dom::DOMException);
 
97
    DocumentFragment   extractContents()
 
98
                                        raises(dom::DOMException);
 
99
    DocumentFragment   cloneContents()
 
100
                                        raises(dom::DOMException);
 
101
    void               insertNode(in Node newNode)
 
102
                                        raises(dom::DOMException, 
 
103
                                               RangeException);
 
104
    void               surroundContents(in Node newParent)
 
105
                                        raises(dom::DOMException, 
 
106
                                               RangeException);
 
107
    Range              cloneRange()
 
108
                                        raises(dom::DOMException);
 
109
    DOMString          toString()
 
110
                                        raises(dom::DOMException);
 
111
    void               detach()
 
112
                                        raises(dom::DOMException);
 
113
  };
 
114
 
 
115
  // Introduced in DOM Level 2:
 
116
  interface DocumentRange {
 
117
    Range              createRange();
 
118
  };
 
119
};
 
120
 
 
121
#endif // _RANGES_IDL_
 
122