1 | /* |
2 | * This file is part of the WebKit open source project. |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Library General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2 of the License, or (at your option) any later version. |
8 | * |
9 | * This library is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * Library General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Library General Public License |
15 | * along with this library; see the file COPYING.LIB. If not, write to |
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
17 | * Boston, MA 02110-1301, USA. |
18 | */ |
19 | |
20 | #if !defined(__WEBKITDOM_H_INSIDE__) && !defined(BUILDING_WEBKIT) |
21 | #error "Only <webkitdom/webkitdom.h> can be included directly." |
22 | #endif |
23 | |
24 | #ifndef WebKitDOMRange_h |
25 | #define WebKitDOMRange_h |
26 | |
27 | #include <glib-object.h> |
28 | #include <webkitdom/WebKitDOMObject.h> |
29 | #include <webkitdom/webkitdomdefines.h> |
30 | |
31 | G_BEGIN_DECLS |
32 | |
33 | #define WEBKIT_DOM_TYPE_RANGE (webkit_dom_range_get_type()) |
34 | #define WEBKIT_DOM_RANGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_DOM_TYPE_RANGE, WebKitDOMRange)) |
35 | #define WEBKIT_DOM_RANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_DOM_TYPE_RANGE, WebKitDOMRangeClass) |
36 | #define WEBKIT_DOM_IS_RANGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_DOM_TYPE_RANGE)) |
37 | #define WEBKIT_DOM_IS_RANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_DOM_TYPE_RANGE)) |
38 | #define WEBKIT_DOM_RANGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_DOM_TYPE_RANGE, WebKitDOMRangeClass)) |
39 | |
40 | #ifndef WEBKIT_DISABLE_DEPRECATED |
41 | |
42 | /** |
43 | * WEBKIT_DOM_RANGE_START_TO_START: |
44 | * |
45 | * Deprecated: 2.22: Use JavaScriptCore API instead |
46 | */ |
47 | #define WEBKIT_DOM_RANGE_START_TO_START 0 |
48 | |
49 | /** |
50 | * WEBKIT_DOM_RANGE_START_TO_END: |
51 | * |
52 | * Deprecated: 2.22: Use JavaScriptCore API instead |
53 | */ |
54 | #define WEBKIT_DOM_RANGE_START_TO_END 1 |
55 | |
56 | /** |
57 | * WEBKIT_DOM_RANGE_END_TO_END: |
58 | * |
59 | * Deprecated: 2.22: Use JavaScriptCore API instead |
60 | */ |
61 | #define WEBKIT_DOM_RANGE_END_TO_END 2 |
62 | |
63 | /** |
64 | * WEBKIT_DOM_RANGE_END_TO_START: |
65 | * |
66 | * Deprecated: 2.22: Use JavaScriptCore API instead |
67 | */ |
68 | #define WEBKIT_DOM_RANGE_END_TO_START 3 |
69 | |
70 | /** |
71 | * WEBKIT_DOM_RANGE_NODE_BEFORE: |
72 | * |
73 | * Deprecated: 2.22: Use JavaScriptCore API instead |
74 | */ |
75 | #define WEBKIT_DOM_RANGE_NODE_BEFORE 0 |
76 | |
77 | /** |
78 | * WEBKIT_DOM_RANGE_NODE_AFTER: |
79 | * |
80 | * Deprecated: 2.22: Use JavaScriptCore API instead |
81 | */ |
82 | #define WEBKIT_DOM_RANGE_NODE_AFTER 1 |
83 | |
84 | /** |
85 | * WEBKIT_DOM_RANGE_NODE_BEFORE_AND_AFTER: |
86 | * |
87 | * Deprecated: 2.22: Use JavaScriptCore API instead |
88 | */ |
89 | #define WEBKIT_DOM_RANGE_NODE_BEFORE_AND_AFTER 2 |
90 | |
91 | /** |
92 | * WEBKIT_DOM_RANGE_NODE_INSIDE: |
93 | * |
94 | * Deprecated: 2.22: Use JavaScriptCore API instead |
95 | */ |
96 | #define WEBKIT_DOM_RANGE_NODE_INSIDE 3 |
97 | |
98 | #endif /* WEBKIT_DISABLE_DEPRECATED */ |
99 | |
100 | struct _WebKitDOMRange { |
101 | WebKitDOMObject parent_instance; |
102 | }; |
103 | |
104 | struct _WebKitDOMRangeClass { |
105 | WebKitDOMObjectClass parent_class; |
106 | }; |
107 | |
108 | WEBKIT_DEPRECATED GType |
109 | webkit_dom_range_get_type(void); |
110 | |
111 | /** |
112 | * webkit_dom_range_set_start: |
113 | * @self: A #WebKitDOMRange |
114 | * @refNode: A #WebKitDOMNode |
115 | * @offset: A #glong |
116 | * @error: #GError |
117 | * |
118 | * |
119 | * Deprecated: 2.22: Use JavaScriptCore API instead |
120 | **/ |
121 | WEBKIT_DEPRECATED void |
122 | webkit_dom_range_set_start(WebKitDOMRange* self, WebKitDOMNode* refNode, glong offset, GError** error); |
123 | |
124 | /** |
125 | * webkit_dom_range_set_end: |
126 | * @self: A #WebKitDOMRange |
127 | * @refNode: A #WebKitDOMNode |
128 | * @offset: A #glong |
129 | * @error: #GError |
130 | * |
131 | * |
132 | * Deprecated: 2.22: Use JavaScriptCore API instead |
133 | **/ |
134 | WEBKIT_DEPRECATED void |
135 | webkit_dom_range_set_end(WebKitDOMRange* self, WebKitDOMNode* refNode, glong offset, GError** error); |
136 | |
137 | /** |
138 | * webkit_dom_range_set_start_before: |
139 | * @self: A #WebKitDOMRange |
140 | * @refNode: A #WebKitDOMNode |
141 | * @error: #GError |
142 | * |
143 | * |
144 | * Deprecated: 2.22: Use JavaScriptCore API instead |
145 | **/ |
146 | WEBKIT_DEPRECATED void |
147 | webkit_dom_range_set_start_before(WebKitDOMRange* self, WebKitDOMNode* refNode, GError** error); |
148 | |
149 | /** |
150 | * webkit_dom_range_set_start_after: |
151 | * @self: A #WebKitDOMRange |
152 | * @refNode: A #WebKitDOMNode |
153 | * @error: #GError |
154 | * |
155 | * |
156 | * Deprecated: 2.22: Use JavaScriptCore API instead |
157 | **/ |
158 | WEBKIT_DEPRECATED void |
159 | webkit_dom_range_set_start_after(WebKitDOMRange* self, WebKitDOMNode* refNode, GError** error); |
160 | |
161 | /** |
162 | * webkit_dom_range_set_end_before: |
163 | * @self: A #WebKitDOMRange |
164 | * @refNode: A #WebKitDOMNode |
165 | * @error: #GError |
166 | * |
167 | * |
168 | * Deprecated: 2.22: Use JavaScriptCore API instead |
169 | **/ |
170 | WEBKIT_DEPRECATED void |
171 | webkit_dom_range_set_end_before(WebKitDOMRange* self, WebKitDOMNode* refNode, GError** error); |
172 | |
173 | /** |
174 | * webkit_dom_range_set_end_after: |
175 | * @self: A #WebKitDOMRange |
176 | * @refNode: A #WebKitDOMNode |
177 | * @error: #GError |
178 | * |
179 | * |
180 | * Deprecated: 2.22: Use JavaScriptCore API instead |
181 | **/ |
182 | WEBKIT_DEPRECATED void |
183 | webkit_dom_range_set_end_after(WebKitDOMRange* self, WebKitDOMNode* refNode, GError** error); |
184 | |
185 | /** |
186 | * webkit_dom_range_collapse: |
187 | * @self: A #WebKitDOMRange |
188 | * @toStart: A #gboolean |
189 | * @error: #GError |
190 | * |
191 | * |
192 | * Deprecated: 2.22: Use JavaScriptCore API instead |
193 | **/ |
194 | WEBKIT_DEPRECATED void |
195 | webkit_dom_range_collapse(WebKitDOMRange* self, gboolean toStart, GError** error); |
196 | |
197 | /** |
198 | * webkit_dom_range_select_node: |
199 | * @self: A #WebKitDOMRange |
200 | * @refNode: A #WebKitDOMNode |
201 | * @error: #GError |
202 | * |
203 | * |
204 | * Deprecated: 2.22: Use JavaScriptCore API instead |
205 | **/ |
206 | WEBKIT_DEPRECATED void |
207 | webkit_dom_range_select_node(WebKitDOMRange* self, WebKitDOMNode* refNode, GError** error); |
208 | |
209 | /** |
210 | * webkit_dom_range_select_node_contents: |
211 | * @self: A #WebKitDOMRange |
212 | * @refNode: A #WebKitDOMNode |
213 | * @error: #GError |
214 | * |
215 | * |
216 | * Deprecated: 2.22: Use JavaScriptCore API instead |
217 | **/ |
218 | WEBKIT_DEPRECATED void |
219 | webkit_dom_range_select_node_contents(WebKitDOMRange* self, WebKitDOMNode* refNode, GError** error); |
220 | |
221 | /** |
222 | * webkit_dom_range_compare_boundary_points: |
223 | * @self: A #WebKitDOMRange |
224 | * @how: A #gushort |
225 | * @sourceRange: A #WebKitDOMRange |
226 | * @error: #GError |
227 | * |
228 | * Returns: A #gshort |
229 | * |
230 | * Deprecated: 2.22: Use JavaScriptCore API instead |
231 | **/ |
232 | WEBKIT_DEPRECATED gshort |
233 | webkit_dom_range_compare_boundary_points(WebKitDOMRange* self, gushort how, WebKitDOMRange* sourceRange, GError** error); |
234 | |
235 | /** |
236 | * webkit_dom_range_delete_contents: |
237 | * @self: A #WebKitDOMRange |
238 | * @error: #GError |
239 | * |
240 | * |
241 | * Deprecated: 2.22: Use JavaScriptCore API instead |
242 | **/ |
243 | WEBKIT_DEPRECATED void |
244 | webkit_dom_range_delete_contents(WebKitDOMRange* self, GError** error); |
245 | |
246 | /** |
247 | * webkit_dom_range_extract_contents: |
248 | * @self: A #WebKitDOMRange |
249 | * @error: #GError |
250 | * |
251 | * Returns: (transfer none): A #WebKitDOMDocumentFragment |
252 | * |
253 | * Deprecated: 2.22: Use JavaScriptCore API instead |
254 | **/ |
255 | WEBKIT_DEPRECATED WebKitDOMDocumentFragment* |
256 | (WebKitDOMRange* self, GError** error); |
257 | |
258 | /** |
259 | * webkit_dom_range_clone_contents: |
260 | * @self: A #WebKitDOMRange |
261 | * @error: #GError |
262 | * |
263 | * Returns: (transfer none): A #WebKitDOMDocumentFragment |
264 | * |
265 | * Deprecated: 2.22: Use JavaScriptCore API instead |
266 | **/ |
267 | WEBKIT_DEPRECATED WebKitDOMDocumentFragment* |
268 | webkit_dom_range_clone_contents(WebKitDOMRange* self, GError** error); |
269 | |
270 | /** |
271 | * webkit_dom_range_insert_node: |
272 | * @self: A #WebKitDOMRange |
273 | * @newNode: A #WebKitDOMNode |
274 | * @error: #GError |
275 | * |
276 | * |
277 | * Deprecated: 2.22: Use JavaScriptCore API instead |
278 | **/ |
279 | WEBKIT_DEPRECATED void |
280 | webkit_dom_range_insert_node(WebKitDOMRange* self, WebKitDOMNode* newNode, GError** error); |
281 | |
282 | /** |
283 | * webkit_dom_range_surround_contents: |
284 | * @self: A #WebKitDOMRange |
285 | * @newParent: A #WebKitDOMNode |
286 | * @error: #GError |
287 | * |
288 | * |
289 | * Deprecated: 2.22: Use JavaScriptCore API instead |
290 | **/ |
291 | WEBKIT_DEPRECATED void |
292 | webkit_dom_range_surround_contents(WebKitDOMRange* self, WebKitDOMNode* newParent, GError** error); |
293 | |
294 | /** |
295 | * webkit_dom_range_clone_range: |
296 | * @self: A #WebKitDOMRange |
297 | * @error: #GError |
298 | * |
299 | * Returns: (transfer full): A #WebKitDOMRange |
300 | * |
301 | * Deprecated: 2.22: Use JavaScriptCore API instead |
302 | **/ |
303 | WEBKIT_DEPRECATED WebKitDOMRange* |
304 | webkit_dom_range_clone_range(WebKitDOMRange* self, GError** error); |
305 | |
306 | /** |
307 | * webkit_dom_range_to_string: |
308 | * @self: A #WebKitDOMRange |
309 | * @error: #GError |
310 | * |
311 | * Returns: A #gchar |
312 | * |
313 | * Deprecated: 2.22: Use JavaScriptCore API instead |
314 | **/ |
315 | WEBKIT_DEPRECATED gchar* |
316 | webkit_dom_range_to_string(WebKitDOMRange* self, GError** error); |
317 | |
318 | /** |
319 | * webkit_dom_range_detach: |
320 | * @self: A #WebKitDOMRange |
321 | * @error: #GError |
322 | * |
323 | * |
324 | * Deprecated: 2.22: Use JavaScriptCore API instead |
325 | **/ |
326 | WEBKIT_DEPRECATED void |
327 | webkit_dom_range_detach(WebKitDOMRange* self, GError** error); |
328 | |
329 | /** |
330 | * webkit_dom_range_create_contextual_fragment: |
331 | * @self: A #WebKitDOMRange |
332 | * @html: A #gchar |
333 | * @error: #GError |
334 | * |
335 | * Returns: (transfer none): A #WebKitDOMDocumentFragment |
336 | * |
337 | * Deprecated: 2.22: Use JavaScriptCore API instead |
338 | **/ |
339 | WEBKIT_DEPRECATED WebKitDOMDocumentFragment* |
340 | webkit_dom_range_create_contextual_fragment(WebKitDOMRange* self, const gchar* html, GError** error); |
341 | |
342 | /** |
343 | * webkit_dom_range_compare_node: |
344 | * @self: A #WebKitDOMRange |
345 | * @refNode: A #WebKitDOMNode |
346 | * @error: #GError |
347 | * |
348 | * Returns: A #gshort |
349 | * |
350 | * Deprecated: 2.22: Use JavaScriptCore API instead |
351 | **/ |
352 | WEBKIT_DEPRECATED gshort |
353 | webkit_dom_range_compare_node(WebKitDOMRange* self, WebKitDOMNode* refNode, GError** error); |
354 | |
355 | /** |
356 | * webkit_dom_range_intersects_node: |
357 | * @self: A #WebKitDOMRange |
358 | * @refNode: A #WebKitDOMNode |
359 | * @error: #GError |
360 | * |
361 | * Returns: A #gboolean |
362 | * |
363 | * Deprecated: 2.22: Use JavaScriptCore API instead |
364 | **/ |
365 | WEBKIT_DEPRECATED gboolean |
366 | webkit_dom_range_intersects_node(WebKitDOMRange* self, WebKitDOMNode* refNode, GError** error); |
367 | |
368 | /** |
369 | * webkit_dom_range_compare_point: |
370 | * @self: A #WebKitDOMRange |
371 | * @refNode: A #WebKitDOMNode |
372 | * @offset: A #glong |
373 | * @error: #GError |
374 | * |
375 | * Returns: A #gshort |
376 | * |
377 | * Deprecated: 2.22: Use JavaScriptCore API instead |
378 | **/ |
379 | WEBKIT_DEPRECATED gshort |
380 | webkit_dom_range_compare_point(WebKitDOMRange* self, WebKitDOMNode* refNode, glong offset, GError** error); |
381 | |
382 | /** |
383 | * webkit_dom_range_is_point_in_range: |
384 | * @self: A #WebKitDOMRange |
385 | * @refNode: A #WebKitDOMNode |
386 | * @offset: A #glong |
387 | * @error: #GError |
388 | * |
389 | * Returns: A #gboolean |
390 | * |
391 | * Deprecated: 2.22: Use JavaScriptCore API instead |
392 | **/ |
393 | WEBKIT_DEPRECATED gboolean |
394 | webkit_dom_range_is_point_in_range(WebKitDOMRange* self, WebKitDOMNode* refNode, glong offset, GError** error); |
395 | |
396 | /** |
397 | * webkit_dom_range_get_start_container: |
398 | * @self: A #WebKitDOMRange |
399 | * @error: #GError |
400 | * |
401 | * Returns: (transfer none): A #WebKitDOMNode |
402 | * |
403 | * Deprecated: 2.22: Use JavaScriptCore API instead |
404 | **/ |
405 | WEBKIT_DEPRECATED WebKitDOMNode* |
406 | webkit_dom_range_get_start_container(WebKitDOMRange* self, GError** error); |
407 | |
408 | /** |
409 | * webkit_dom_range_get_start_offset: |
410 | * @self: A #WebKitDOMRange |
411 | * @error: #GError |
412 | * |
413 | * Returns: A #glong |
414 | * |
415 | * Deprecated: 2.22: Use JavaScriptCore API instead |
416 | **/ |
417 | WEBKIT_DEPRECATED glong |
418 | webkit_dom_range_get_start_offset(WebKitDOMRange* self, GError** error); |
419 | |
420 | /** |
421 | * webkit_dom_range_get_end_container: |
422 | * @self: A #WebKitDOMRange |
423 | * @error: #GError |
424 | * |
425 | * Returns: (transfer none): A #WebKitDOMNode |
426 | * |
427 | * Deprecated: 2.22: Use JavaScriptCore API instead |
428 | **/ |
429 | WEBKIT_DEPRECATED WebKitDOMNode* |
430 | webkit_dom_range_get_end_container(WebKitDOMRange* self, GError** error); |
431 | |
432 | /** |
433 | * webkit_dom_range_get_end_offset: |
434 | * @self: A #WebKitDOMRange |
435 | * @error: #GError |
436 | * |
437 | * Returns: A #glong |
438 | * |
439 | * Deprecated: 2.22: Use JavaScriptCore API instead |
440 | **/ |
441 | WEBKIT_DEPRECATED glong |
442 | webkit_dom_range_get_end_offset(WebKitDOMRange* self, GError** error); |
443 | |
444 | /** |
445 | * webkit_dom_range_get_collapsed: |
446 | * @self: A #WebKitDOMRange |
447 | * @error: #GError |
448 | * |
449 | * Returns: A #gboolean |
450 | * |
451 | * Deprecated: 2.22: Use JavaScriptCore API instead |
452 | **/ |
453 | WEBKIT_DEPRECATED gboolean |
454 | webkit_dom_range_get_collapsed(WebKitDOMRange* self, GError** error); |
455 | |
456 | /** |
457 | * webkit_dom_range_get_common_ancestor_container: |
458 | * @self: A #WebKitDOMRange |
459 | * @error: #GError |
460 | * |
461 | * Returns: (transfer none): A #WebKitDOMNode |
462 | * |
463 | * Deprecated: 2.22: Use JavaScriptCore API instead |
464 | **/ |
465 | WEBKIT_DEPRECATED WebKitDOMNode* |
466 | webkit_dom_range_get_common_ancestor_container(WebKitDOMRange* self, GError** error); |
467 | |
468 | /** |
469 | * webkit_dom_range_get_text: |
470 | * @self: A #WebKitDOMRange |
471 | * |
472 | * Returns: A #gchar |
473 | * |
474 | * Deprecated: 2.22: Use JavaScriptCore API instead |
475 | **/ |
476 | WEBKIT_DEPRECATED gchar* |
477 | webkit_dom_range_get_text(WebKitDOMRange* self); |
478 | |
479 | /** |
480 | * webkit_dom_range_expand: |
481 | * @self: A #WebKitDOMRange |
482 | * @unit: A #gchar |
483 | * @error: #GError |
484 | * |
485 | * Since: 2.16 |
486 | * |
487 | * Deprecated: 2.22: Use JavaScriptCore API instead |
488 | **/ |
489 | WEBKIT_DEPRECATED void |
490 | webkit_dom_range_expand(WebKitDOMRange* self, const gchar* unit, GError** error); |
491 | |
492 | G_END_DECLS |
493 | |
494 | #endif /* WebKitDOMRange_h */ |
495 | |