Code

remove warnings
[inkscape.git] / src / dom / work / views.idl
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  */
13 // File: http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226/views.idl
15 #ifndef _VIEWS_IDL_
16 #define _VIEWS_IDL_
18 #include "dom.idl"
20 #pragma prefix "dom.w3c.org"
21 module views
22 {
24   typedef dom::Node Node;
25   typedef dom::DOMString DOMString;
27   interface Segment;
28   interface VisualResource;
29   interface VisualCharacter;
30   interface VisualCharacterRun;
31   interface VisualFrame;
32   interface VisualImage;
33   interface VisualFormButton;
34   interface VisualFormField;
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   };
57   // Introduced in DOM Level 3:
58   interface Match {
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;
75     readonly attribute unsigned short  test;
76   };
78   // Introduced in DOM level 3:
79   interface MatchString : Match {
80     readonly attribute DOMString       name;
81     readonly attribute DOMString       value;
82   };
84   // Introduced in DOM level 3:
85   interface MatchInteger : Match {
86     readonly attribute DOMString       name;
87     readonly attribute long            value;
88   };
90   // Introduced in DOM level 3:
91   interface MatchBoolean : Match {
92     readonly attribute DOMString       name;
93     readonly attribute boolean         value;
94   };
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   };
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   };
110   // Introduced in DOM Level 3:
111   interface Item {
112     readonly attribute boolean         exists;
113     readonly attribute DOMString       name;
114   };
116   // Introduced in DOM Level 3:
117   interface StringItem : Item {
118     readonly attribute DOMString       value;
119   };
121   // Introduced in DOM Level 3:
122   interface IntegerItem : Item {
123     readonly attribute long            value;
124   };
126   // Introduced in DOM Level 3:
127   interface BooleanItem : Item {
128              attribute boolean         value;
129   };
131   // Introduced in DOM Level 3:
132   interface ContentItem : Item {
133              attribute Node            nodeArg;
134              attribute unsigned long   offset;
135   };
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   };
156   interface VisualResource {
157   };
159   interface VisualFont : VisualResource {
160              attribute DOMString       matchFontName;
161     readonly attribute boolean         exists;
162     readonly attribute DOMString       fontName;
163     boolean            getNext();
164   };
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   };
202   interface VisualCharacter : VisualSegment {
203   };
205   interface VisualCharacterRun : VisualSegment {
206   };
208   interface VisualFrame : VisualSegment {
209     readonly attribute VisualSegment   embedded;
210   };
212   interface VisualImage : VisualSegment {
213     readonly attribute DOMString       imageURL;
214     readonly attribute boolean         isLoaded;
215   };
217   interface VisualFormButton : VisualSegment {
218     readonly attribute boolean         isPressed;
219   };
221   interface VisualFormField : VisualSegment {
222     readonly attribute DOMString       formValue;
223   };
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 };
253 #endif // _VIEWS_IDL_