~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to src/dom/work/views.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) 2004 World Wide Web Consortium,
 
3
 *
 
4
 * (Massachusetts Institute of Technology, European Research Consortium for
 
5
 * Informatics and Mathematics, Keio University). All Rights Reserved. This
 
6
 * work is distributed under the W3C(r) Software License [1] in the hope that
 
7
 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
 
8
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
9
 *
 
10
 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
 
11
 */
 
12
 
 
13
// File: http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226/views.idl
 
14
 
 
15
#ifndef _VIEWS_IDL_
 
16
#define _VIEWS_IDL_
 
17
 
 
18
#include "dom.idl"
 
19
 
 
20
#pragma prefix "dom.w3c.org"
 
21
module views
 
22
{
 
23
 
 
24
  typedef dom::Node Node;
 
25
  typedef dom::DOMString DOMString;
 
26
 
 
27
  interface Segment;
 
28
  interface VisualResource;
 
29
  interface VisualCharacter;
 
30
  interface VisualCharacterRun;
 
31
  interface VisualFrame;
 
32
  interface VisualImage;
 
33
  interface VisualFormButton;
 
34
  interface VisualFormField;
 
35
 
 
36
  // Introduced in DOM Level 3:
 
37
  interface View {
 
38
    void               select(in Node boundary, 
 
39
                              in unsigned long offset, 
 
40
                              in boolean extend, 
 
41
                              in boolean add);
 
42
    Segment            createSegment();
 
43
    boolean            matchFirstSegment(inout Segment todo)
 
44
                                        raises(dom::DOMException);
 
45
    long               getIntegerProperty(in DOMString name)
 
46
                                        raises(dom::DOMException);
 
47
    DOMString          getStringProperty(in DOMString name)
 
48
                                        raises(dom::DOMException);
 
49
    boolean            getBooleanProperty(in boolean name)
 
50
                                        raises(dom::DOMException);
 
51
    Node               getContentPropertyNode(in DOMString name)
 
52
                                        raises(dom::DOMException);
 
53
    unsigned long      getContentPropertyOffset(in DOMString name)
 
54
                                        raises(dom::DOMException);
 
55
  };
 
56
 
 
57
  // Introduced in DOM Level 3:
 
58
  interface Match {
 
59
 
 
60
    // MatchTestGroup
 
61
    const unsigned short      IS_EQUAL                       = 0;
 
62
    const unsigned short      IS_NOT_EQUAL                   = 1;
 
63
    const unsigned short      INT_PRECEDES                   = 2;
 
64
    const unsigned short      INT_PRECEDES_OR_EQUALS         = 3;
 
65
    const unsigned short      INT_FOLLOWS                    = 4;
 
66
    const unsigned short      INT_FOLLOWS_OR_EQUALS          = 5;
 
67
    const unsigned short      STR_STARTS_WITH                = 6;
 
68
    const unsigned short      STR_ENDS_WITH                  = 7;
 
69
    const unsigned short      STR_CONTAINS                   = 8;
 
70
    const unsigned short      SET_ANY                        = 9;
 
71
    const unsigned short      SET_ALL                        = 10;
 
72
    const unsigned short      SET_NOT_ANY                    = 11;
 
73
    const unsigned short      SET_NOT_ALL                    = 12;
 
74
 
 
75
    readonly attribute unsigned short  test;
 
76
  };
 
77
 
 
78
  // Introduced in DOM level 3:
 
79
  interface MatchString : Match {
 
80
    readonly attribute DOMString       name;
 
81
    readonly attribute DOMString       value;
 
82
  };
 
83
 
 
84
  // Introduced in DOM level 3:
 
85
  interface MatchInteger : Match {
 
86
    readonly attribute DOMString       name;
 
87
    readonly attribute long            value;
 
88
  };
 
89
 
 
90
  // Introduced in DOM level 3:
 
91
  interface MatchBoolean : Match {
 
92
    readonly attribute DOMString       name;
 
93
    readonly attribute boolean         value;
 
94
  };
 
95
 
 
96
  // Introduced in DOM level 3:
 
97
  interface MatchContent : Match {
 
98
    readonly attribute DOMString       name;
 
99
    readonly attribute Node            nodeArg;
 
100
    readonly attribute unsigned long   offset;
 
101
  };
 
102
 
 
103
  // Introduced in DOM level 3:
 
104
  interface MatchSet : Match {
 
105
    readonly attribute Node            nodeArg;
 
106
    void               addMatch(in Match add);
 
107
    Match              getMatch(in unsigned long index);
 
108
  };
 
109
 
 
110
  // Introduced in DOM Level 3:
 
111
  interface Item {
 
112
    readonly attribute boolean         exists;
 
113
    readonly attribute DOMString       name;
 
114
  };
 
115
 
 
116
  // Introduced in DOM Level 3:
 
117
  interface StringItem : Item {
 
118
    readonly attribute DOMString       value;
 
119
  };
 
120
 
 
121
  // Introduced in DOM Level 3:
 
122
  interface IntegerItem : Item {
 
123
    readonly attribute long            value;
 
124
  };
 
125
 
 
126
  // Introduced in DOM Level 3:
 
127
  interface BooleanItem : Item {
 
128
             attribute boolean         value;
 
129
  };
 
130
 
 
131
  // Introduced in DOM Level 3:
 
132
  interface ContentItem : Item {
 
133
             attribute Node            nodeArg;
 
134
             attribute unsigned long   offset;
 
135
  };
 
136
 
 
137
  interface VisualView {
 
138
    readonly attribute DOMString       fontScheme;
 
139
    readonly attribute unsigned long   width;
 
140
    readonly attribute unsigned long   height;
 
141
    readonly attribute unsigned long   horizontalDPI;
 
142
    readonly attribute unsigned long   verticalDPI;
 
143
    VisualCharacter    createVisualCharacter();
 
144
    VisualCharacterRun createVisualCharacterRun();
 
145
    VisualFrame        createVisualFrame();
 
146
    VisualImage        createVisualImage();
 
147
    VisualFormButton   createVisualFormButton();
 
148
    VisualFormField    createVisualFormField();
 
149
    void               select(in Node boundary, 
 
150
                              in unsigned long offset, 
 
151
                              in boolean extend, 
 
152
                              in boolean add);
 
153
    void               matchSegment(in VisualResource segment);
 
154
  };
 
155
 
 
156
  interface VisualResource {
 
157
  };
 
158
 
 
159
  interface VisualFont : VisualResource {
 
160
             attribute DOMString       matchFontName;
 
161
    readonly attribute boolean         exists;
 
162
    readonly attribute DOMString       fontName;
 
163
    boolean            getNext();
 
164
  };
 
165
 
 
166
  interface VisualSegment : VisualResource {
 
167
             attribute boolean         matchPosition;
 
168
             attribute boolean         matchInside;
 
169
             attribute boolean         matchContaining;
 
170
             attribute long            matchX;
 
171
             attribute long            matchY;
 
172
             attribute long            matchXR;
 
173
             attribute long            matchYR;
 
174
             attribute boolean         matchContent;
 
175
             attribute boolean         matchRange;
 
176
             attribute Node            matchNode;
 
177
             attribute unsigned long   matchOffset;
 
178
             attribute Node            matchNodeR;
 
179
             attribute unsigned long   matchOffsetR;
 
180
             attribute boolean         matchContainsSelected;
 
181
             attribute boolean         matchContainsVisible;
 
182
    readonly attribute boolean         exists;
 
183
    readonly attribute Node            startNode;
 
184
    readonly attribute unsigned long   startOffset;
 
185
    readonly attribute Node            endNode;
 
186
    readonly attribute unsigned long   endOffset;
 
187
    readonly attribute long            topOffset;
 
188
    readonly attribute long            bottomOffset;
 
189
    readonly attribute long            leftOffset;
 
190
    readonly attribute long            rightOffset;
 
191
    readonly attribute unsigned long   width;
 
192
    readonly attribute unsigned long   height;
 
193
    readonly attribute boolean         selected;
 
194
    readonly attribute boolean         visible;
 
195
    readonly attribute unsigned long   foregroundColor;
 
196
    readonly attribute unsigned long   backgroundColor;
 
197
    readonly attribute DOMString       fontName;
 
198
    readonly attribute DOMString       fontHeight;
 
199
    boolean            getNext();
 
200
  };
 
201
 
 
202
  interface VisualCharacter : VisualSegment {
 
203
  };
 
204
 
 
205
  interface VisualCharacterRun : VisualSegment {
 
206
  };
 
207
 
 
208
  interface VisualFrame : VisualSegment {
 
209
    readonly attribute VisualSegment   embedded;
 
210
  };
 
211
 
 
212
  interface VisualImage : VisualSegment {
 
213
    readonly attribute DOMString       imageURL;
 
214
    readonly attribute boolean         isLoaded;
 
215
  };
 
216
 
 
217
  interface VisualFormButton : VisualSegment {
 
218
    readonly attribute boolean         isPressed;
 
219
  };
 
220
 
 
221
  interface VisualFormField : VisualSegment {
 
222
    readonly attribute DOMString       formValue;
 
223
  };
 
224
 
 
225
  // Introduced in DOM Level 3:
 
226
  interface Segment : Match {
 
227
             attribute Match           criteria;
 
228
             attribute DOMString       order;
 
229
    void               addItem(in Item add);
 
230
    MatchString        createMatchString(in unsigned short test, 
 
231
                                         in DOMString name, 
 
232
                                         in DOMString value);
 
233
    MatchInteger       createMatchInteger(in unsigned short test, 
 
234
                                          in DOMString name, 
 
235
                                          in long value);
 
236
    MatchBoolean       createMatchBoolean(in unsigned short test, 
 
237
                                          in DOMString name, 
 
238
                                          in boolean value);
 
239
    MatchContent       createMatchContent(in unsigned short test, 
 
240
                                          in DOMString name, 
 
241
                                          in unsigned long offset, 
 
242
                                          in Node nodeArg);
 
243
    MatchSet           createMatchSet(in unsigned short test);
 
244
    StringItem         createStringItem(in DOMString name);
 
245
    IntegerItem        createIntegerItem(in DOMString name);
 
246
    BooleanItem        createBooleanItem(in DOMString name);
 
247
    ContentItem        createContentItem(in DOMString name);
 
248
    void               getItem(in unsigned long index);
 
249
    boolean            getNext();
 
250
  };
 
251
};
 
252
 
 
253
#endif // _VIEWS_IDL_
 
254