1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
/*
* Copyright (c) 2000 World Wide Web Consortium,
* (Massachusetts Institute of Technology, Institut National de
* Recherche en Informatique et en Automatique, Keio University). All
* Rights Reserved. This program is distributed under the W3C's Software
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE.
* See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
// File: http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113/ranges.idl
#ifndef _RANGES_IDL_
#define _RANGES_IDL_
#include "dom.idl"
#pragma prefix "dom.w3c.org"
module ranges
{
typedef dom::Node Node;
typedef dom::DocumentFragment DocumentFragment;
typedef dom::DOMString DOMString;
// Introduced in DOM Level 2:
exception RangeException {
unsigned short code;
};
// RangeExceptionCode
const unsigned short BAD_BOUNDARYPOINTS_ERR = 1;
const unsigned short INVALID_NODE_TYPE_ERR = 2;
// Introduced in DOM Level 2:
interface Range {
readonly attribute Node startContainer;
// raises(dom::DOMException) on retrieval
readonly attribute long startOffset;
// raises(dom::DOMException) on retrieval
readonly attribute Node endContainer;
// raises(dom::DOMException) on retrieval
readonly attribute long endOffset;
// raises(dom::DOMException) on retrieval
readonly attribute boolean collapsed;
// raises(dom::DOMException) on retrieval
readonly attribute Node commonAncestorContainer;
// raises(dom::DOMException) on retrieval
void setStart(in Node refNode,
in long offset)
raises(RangeException,
dom::DOMException);
void setEnd(in Node refNode,
in long offset)
raises(RangeException,
dom::DOMException);
void setStartBefore(in Node refNode)
raises(RangeException,
dom::DOMException);
void setStartAfter(in Node refNode)
raises(RangeException,
dom::DOMException);
void setEndBefore(in Node refNode)
raises(RangeException,
dom::DOMException);
void setEndAfter(in Node refNode)
raises(RangeException,
dom::DOMException);
void collapse(in boolean toStart)
raises(dom::DOMException);
void selectNode(in Node refNode)
raises(RangeException,
dom::DOMException);
void selectNodeContents(in Node refNode)
raises(RangeException,
dom::DOMException);
// CompareHow
const unsigned short START_TO_START = 0;
const unsigned short START_TO_END = 1;
const unsigned short END_TO_END = 2;
const unsigned short END_TO_START = 3;
short compareBoundaryPoints(in unsigned short how,
in Range sourceRange)
raises(dom::DOMException);
void deleteContents()
raises(dom::DOMException);
DocumentFragment extractContents()
raises(dom::DOMException);
DocumentFragment cloneContents()
raises(dom::DOMException);
void insertNode(in Node newNode)
raises(dom::DOMException,
RangeException);
void surroundContents(in Node newParent)
raises(dom::DOMException,
RangeException);
Range cloneRange()
raises(dom::DOMException);
DOMString toString()
raises(dom::DOMException);
void detach()
raises(dom::DOMException);
};
// Introduced in DOM Level 2:
interface DocumentRange {
Range createRange();
};
};
#endif // _RANGES_IDL_
|