1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
---|
2 | /* This file is part of the GtkHTML library |
---|
3 | |
---|
4 | Copyright (C) 1997 Martin Jones (mjones@kde.org) |
---|
5 | Copyright (C) 1997 Torben Weis (weis@kde.org) |
---|
6 | Copyright (C) 1999, 2000 Helix Code, Inc. |
---|
7 | |
---|
8 | This library is free software; you can redistribute it and/or |
---|
9 | modify it under the terms of the GNU Library General Public |
---|
10 | License as published by the Free Software Foundation; either |
---|
11 | version 2 of the License, or (at your option) any later version. |
---|
12 | |
---|
13 | This library is distributed in the hope that it will be useful, |
---|
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | MERCHcANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
16 | Library General Public License for more details. |
---|
17 | |
---|
18 | You should have received a copy of the GNU Library General Public License |
---|
19 | along with this library; see the file COPYING.LIB. If not, write to |
---|
20 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
21 | Boston, MA 02111-1307, USA. |
---|
22 | */ |
---|
23 | |
---|
24 | #ifndef _HTMLOBJECT_H_ |
---|
25 | #define _HTMLOBJECT_H_ |
---|
26 | |
---|
27 | #include <libart_lgpl/art_rect.h> |
---|
28 | #include <gdk/gdktypes.h> |
---|
29 | #include "htmltypes.h" |
---|
30 | #include "htmlenums.h" |
---|
31 | |
---|
32 | |
---|
33 | #define HTML_OBJECT(x) ((HTMLObject *) (x)) |
---|
34 | #define HTML_OBJECT_CLASS(x) ((HTMLObjectClass *) (x)) |
---|
35 | #define HTML_OBJECT_TYPE(x) (HTML_OBJECT (x)->klass->type) |
---|
36 | |
---|
37 | struct _HTMLObject { |
---|
38 | HTMLObjectClass *klass; |
---|
39 | |
---|
40 | /* Pointer to the parent object. */ |
---|
41 | HTMLObject *parent; |
---|
42 | |
---|
43 | HTMLObject *prev; |
---|
44 | HTMLObject *next; |
---|
45 | |
---|
46 | HTMLChangeFlags change; |
---|
47 | |
---|
48 | gint x, y; |
---|
49 | |
---|
50 | gint ascent, descent; |
---|
51 | |
---|
52 | gint min_width; |
---|
53 | gint width; |
---|
54 | gint pref_width; |
---|
55 | gint max_width; |
---|
56 | |
---|
57 | gint percent; |
---|
58 | |
---|
59 | guchar flags; |
---|
60 | |
---|
61 | /* FIXME maybe unify with `flags'? */ |
---|
62 | guint redraw_pending : 1; |
---|
63 | guint selected : 1; |
---|
64 | |
---|
65 | /* If an object has a redraw pending and is being destroyed, this flag |
---|
66 | is set to TRUE instead of g_free()ing the object. When the draw |
---|
67 | queue is flushed, the g_free() is performed. */ |
---|
68 | guint free_pending : 1; |
---|
69 | |
---|
70 | GData *object_data; |
---|
71 | }; |
---|
72 | |
---|
73 | struct _HTMLObjectClearRectangle { |
---|
74 | HTMLObject *object; |
---|
75 | gint x; |
---|
76 | gint y; |
---|
77 | gint width; |
---|
78 | gint height; |
---|
79 | }; |
---|
80 | |
---|
81 | struct _HTMLObjectClass { |
---|
82 | HTMLType type; |
---|
83 | |
---|
84 | guint object_size; |
---|
85 | |
---|
86 | /* Destroy the object. */ |
---|
87 | void (* destroy) (HTMLObject *o); |
---|
88 | |
---|
89 | /* Copy an object into another one. @dest can just point to a |
---|
90 | memory area of the proper size. */ |
---|
91 | void (* copy) (HTMLObject *self, HTMLObject *dest); |
---|
92 | |
---|
93 | /* copy/cut/paste operations */ |
---|
94 | HTMLObject * (* op_copy) (HTMLObject *self, |
---|
95 | HTMLObject *parent, |
---|
96 | HTMLEngine *e, |
---|
97 | GList *from, |
---|
98 | GList *to, |
---|
99 | guint *len); |
---|
100 | HTMLObject * (* op_cut) (HTMLObject *self, |
---|
101 | HTMLEngine *e, |
---|
102 | GList *from, |
---|
103 | GList *to, |
---|
104 | GList *left, |
---|
105 | GList *right, |
---|
106 | guint *len); |
---|
107 | gboolean (* merge) (HTMLObject *self, |
---|
108 | HTMLObject *o, |
---|
109 | HTMLEngine *e, |
---|
110 | GList **left, |
---|
111 | GList **right, |
---|
112 | HTMLCursor *cursor); |
---|
113 | void (* remove_child) (HTMLObject *self, |
---|
114 | HTMLObject *child); |
---|
115 | void (* split) (HTMLObject *self, |
---|
116 | HTMLEngine *e, |
---|
117 | HTMLObject *child, |
---|
118 | gint offset, |
---|
119 | gint level, |
---|
120 | GList **left, |
---|
121 | GList **right); |
---|
122 | |
---|
123 | /* Layout management and geometry handling. */ |
---|
124 | |
---|
125 | HTMLFitType (* fit_line) (HTMLObject *o, HTMLPainter *painter, |
---|
126 | gboolean start_of_line, gboolean first_run, gboolean next_to_floating, |
---|
127 | gint width_left); |
---|
128 | gboolean (* calc_size) (HTMLObject *o, HTMLPainter *painter, GList **changed_objs); |
---|
129 | gint (* calc_min_width) (HTMLObject *o, HTMLPainter *painter); |
---|
130 | gint (* calc_preferred_width) (HTMLObject *o, HTMLPainter *painter); |
---|
131 | void (* set_max_width) (HTMLObject *o, HTMLPainter *painter, gint max_width); |
---|
132 | void (* set_max_height) (HTMLObject *o, HTMLPainter *painter, gint max_height); |
---|
133 | |
---|
134 | /* Relayout object `o' starting from child `child'. This |
---|
135 | method can be called by the child when it changes any of |
---|
136 | its layout properties. */ |
---|
137 | |
---|
138 | gboolean (* layout) (HTMLObject *o, HTMLObject *child); |
---|
139 | |
---|
140 | /* This method is used to draw the object. @x & @y are in |
---|
141 | object coordinates (e.g. the same coordinate system as o->x |
---|
142 | and o->y). @tx & @ty are used to translate the object |
---|
143 | coordinates into painter coordinates. */ |
---|
144 | |
---|
145 | void (* draw) (HTMLObject *o, |
---|
146 | HTMLPainter *painter, |
---|
147 | gint x, gint y, |
---|
148 | gint width, gint height, |
---|
149 | gint tx, gint ty); |
---|
150 | |
---|
151 | /* "Transparent" objects (i.e. objects that don't draw all the |
---|
152 | area they occupy, such as text) should return `TRUE' here. */ |
---|
153 | |
---|
154 | gboolean (* is_transparent) (HTMLObject *self); |
---|
155 | |
---|
156 | /* This draws the background only. If the object is |
---|
157 | transparent, it should simply forward the method to the |
---|
158 | parent. */ |
---|
159 | |
---|
160 | void (* draw_background) (HTMLObject *o, |
---|
161 | HTMLPainter *painter, |
---|
162 | gint x, gint y, |
---|
163 | gint width, gint height, |
---|
164 | gint tx, gint ty); |
---|
165 | void (* set_bg_color) (HTMLObject *o, GdkColor *color); |
---|
166 | GdkColor * (* get_bg_color) (HTMLObject *o, HTMLPainter *p); |
---|
167 | |
---|
168 | /* Margins. This should actually be used only by objects that |
---|
169 | contain other objects, so it should be in HTMLClue. But |
---|
170 | HTMLTable does not derive from HTMLClue and we don't want |
---|
171 | to spend time reorganizing the hierarchy now. */ |
---|
172 | |
---|
173 | gint (* get_left_margin) (HTMLObject *self, HTMLPainter *painter, gint y, gboolean with_aligned); |
---|
174 | gint (* get_right_margin) (HTMLObject *self, HTMLPainter *painter, gint y, gboolean with_aligned); |
---|
175 | |
---|
176 | void (* set_painter) (HTMLObject *o, HTMLPainter *painter); |
---|
177 | |
---|
178 | /* Resetting the object. Do this before using a different |
---|
179 | HTMLPainter. */ |
---|
180 | |
---|
181 | void (* reset) (HTMLObject *o); |
---|
182 | |
---|
183 | const gchar * (* get_url) (HTMLObject *o); |
---|
184 | const gchar * (* get_target) (HTMLObject *o); |
---|
185 | const gchar * (* get_src) (HTMLObject *o); |
---|
186 | |
---|
187 | HTMLAnchor * (* find_anchor) (HTMLObject *o, const gchar *name, gint *x, gint *y); |
---|
188 | |
---|
189 | HTMLObject * (* check_point) (HTMLObject *self, HTMLPainter *painter, |
---|
190 | gint x, gint y, guint *offset_return, |
---|
191 | gboolean for_cursor); |
---|
192 | |
---|
193 | /* Relayout this object. The object will relayout all the children |
---|
194 | starting from `child'. Children before `child' are not affected. |
---|
195 | The return value is FALSE if nothing has changed during relayout, |
---|
196 | TRUE otherwise. */ |
---|
197 | gboolean (* relayout) (HTMLObject *self, HTMLEngine *engine, HTMLObject *child); |
---|
198 | |
---|
199 | /* Return the vertical alignment for the object in an HTMLClueFlow. If |
---|
200 | the returned value is `HTML_VALIGN_BOTTOM', the bottom of the object |
---|
201 | is aligned to the base line; if the value is `HTML_VALIGN_TOP', the |
---|
202 | top of the object is aligned to the top of the line; if the value is |
---|
203 | `HTML_VALIGN_MIDDLE', the center of the object is aligned to the |
---|
204 | baseline. */ |
---|
205 | HTMLVAlignType (* get_valign) (HTMLObject *self); |
---|
206 | |
---|
207 | /* Cursor handling. */ |
---|
208 | |
---|
209 | gboolean (* accepts_cursor) (HTMLObject *self); |
---|
210 | void (* get_cursor) (HTMLObject *self, HTMLPainter *painter, guint offset, |
---|
211 | gint *x1, gint *y1, gint *x2, gint *y2); |
---|
212 | void (* get_cursor_base) (HTMLObject *self, HTMLPainter *painter, guint offset, |
---|
213 | gint *x, gint *y); |
---|
214 | |
---|
215 | /* Container operations. */ |
---|
216 | HTMLEngine * (* get_engine) (HTMLObject *o, HTMLEngine *e); |
---|
217 | void (* forall) (HTMLObject *self, HTMLEngine *e, HTMLObjectForallFunc func, gpointer data); |
---|
218 | gboolean (* is_container) (HTMLObject *self); |
---|
219 | |
---|
220 | /* Saving. */ |
---|
221 | |
---|
222 | gboolean (* save) (HTMLObject *self, HTMLEngineSaveState *state); |
---|
223 | gboolean (* save_plain) (HTMLObject *self, HTMLEngineSaveState *state, gint requested_width); |
---|
224 | |
---|
225 | /* Page splitting (for printing). */ |
---|
226 | |
---|
227 | gint (* check_page_split) (HTMLObject *self, gint y); |
---|
228 | |
---|
229 | /* Selection. */ |
---|
230 | gboolean (* select_range) (HTMLObject *self, HTMLEngine *engine, guint start, gint length, |
---|
231 | gboolean queue_draw); |
---|
232 | void (* append_selection_string) (HTMLObject *self, GString *buffer); |
---|
233 | |
---|
234 | /* Search & Replace */ |
---|
235 | gboolean (* search) (HTMLObject *self, HTMLSearch *info); |
---|
236 | gboolean (* search_next) (HTMLObject *self, HTMLSearch *info); |
---|
237 | |
---|
238 | /* links */ |
---|
239 | HTMLObject * (* set_link) (HTMLObject *self, HTMLColor *color, const gchar *url, const gchar *target); |
---|
240 | |
---|
241 | /* length */ |
---|
242 | guint (* get_length) (HTMLObject *self); |
---|
243 | guint (* get_line_length) (HTMLObject *self, HTMLPainter *p, gint line_offset); |
---|
244 | guint (* get_recursive_length) (HTMLObject *self); |
---|
245 | |
---|
246 | /* movement */ |
---|
247 | HTMLObject * (* next) (HTMLObject *self, HTMLObject *child); |
---|
248 | HTMLObject * (* prev) (HTMLObject *self, HTMLObject *child); |
---|
249 | HTMLObject * (* head) (HTMLObject *self); |
---|
250 | HTMLObject * (* tail) (HTMLObject *self); |
---|
251 | |
---|
252 | HTMLClearType (* get_clear) (HTMLObject *self); |
---|
253 | }; |
---|
254 | |
---|
255 | |
---|
256 | extern HTMLObjectClass html_object_class; |
---|
257 | |
---|
258 | |
---|
259 | /* Basics. */ |
---|
260 | void html_object_type_init (void); |
---|
261 | void html_object_init (HTMLObject *self, |
---|
262 | HTMLObjectClass *klass); |
---|
263 | void html_object_class_init (HTMLObjectClass *klass, |
---|
264 | HTMLType type, |
---|
265 | guint object_size); |
---|
266 | HTMLObject *html_object_new (HTMLObject *parent); |
---|
267 | void html_object_destroy (HTMLObject *self); |
---|
268 | void html_object_copy (HTMLObject *self, |
---|
269 | HTMLObject *dest); |
---|
270 | HTMLObject *html_object_dup (HTMLObject *self); |
---|
271 | |
---|
272 | /* copy/cut/paste operations */ |
---|
273 | HTMLObject *html_object_op_copy (HTMLObject *self, |
---|
274 | HTMLObject *parent, |
---|
275 | HTMLEngine *e, |
---|
276 | GList *from, |
---|
277 | GList *to, |
---|
278 | guint *len); |
---|
279 | HTMLObject *html_object_op_cut (HTMLObject *self, |
---|
280 | HTMLEngine *e, |
---|
281 | GList *from, |
---|
282 | GList *to, |
---|
283 | GList *left, |
---|
284 | GList *right, |
---|
285 | guint *len); |
---|
286 | gboolean html_object_merge (HTMLObject *self, |
---|
287 | HTMLObject *with, |
---|
288 | HTMLEngine *e, |
---|
289 | GList **left, |
---|
290 | GList **right, |
---|
291 | HTMLCursor *cursor); |
---|
292 | void html_object_remove_child (HTMLObject *self, |
---|
293 | HTMLObject *child); |
---|
294 | void html_object_split (HTMLObject *self, |
---|
295 | HTMLEngine *e, |
---|
296 | HTMLObject *child, |
---|
297 | gint offset, |
---|
298 | gint level, |
---|
299 | GList **left, |
---|
300 | GList **right); |
---|
301 | void html_object_set_parent (HTMLObject *self, |
---|
302 | HTMLObject *parent); |
---|
303 | gint html_object_get_left_margin (HTMLObject *self, |
---|
304 | HTMLPainter *painter, |
---|
305 | gint y, |
---|
306 | gboolean with_aligned); |
---|
307 | gint html_object_get_right_margin (HTMLObject *self, |
---|
308 | HTMLPainter *painter, |
---|
309 | gint y, |
---|
310 | gboolean with_aligned); |
---|
311 | void html_object_set_painter (HTMLObject *o, |
---|
312 | HTMLPainter *p); |
---|
313 | void html_object_clear_word_width (HTMLObject *o); |
---|
314 | void html_object_reset (HTMLObject *o); |
---|
315 | gboolean html_object_is_text (HTMLObject *object); |
---|
316 | gboolean html_object_is_clue (HTMLObject *object); |
---|
317 | HTMLEngine *html_object_get_engine (HTMLObject *self, |
---|
318 | HTMLEngine *e); |
---|
319 | HTMLEngine *html_object_engine (HTMLObject *o, |
---|
320 | HTMLEngine *e); |
---|
321 | void html_object_forall (HTMLObject *self, |
---|
322 | HTMLEngine *e, |
---|
323 | HTMLObjectForallFunc func, |
---|
324 | gpointer data); |
---|
325 | gboolean html_object_is_container (HTMLObject *self); |
---|
326 | HTMLObject *html_object_next_not_type (HTMLObject *self, |
---|
327 | HTMLType t); |
---|
328 | HTMLObject *html_object_prev_not_type (HTMLObject *self, |
---|
329 | HTMLType t); |
---|
330 | HTMLObject *html_object_next_not_slave (HTMLObject *self); |
---|
331 | HTMLObject *html_object_prev_not_slave (HTMLObject *self); |
---|
332 | HTMLObject *html_object_next_by_type (HTMLObject *self, |
---|
333 | HTMLType t); |
---|
334 | HTMLObject *html_object_prev_by_type (HTMLObject *self, |
---|
335 | HTMLType t); |
---|
336 | HTMLObject *html_object_nth_parent (HTMLObject *self, |
---|
337 | gint n); |
---|
338 | gint html_object_get_parent_level (HTMLObject *self); |
---|
339 | /* do search request on object using info */ |
---|
340 | gboolean html_object_search (HTMLObject *self, |
---|
341 | HTMLSearch *info); |
---|
342 | gboolean html_object_search_next (HTMLObject *self, |
---|
343 | HTMLSearch *info); |
---|
344 | |
---|
345 | /* Drawing-related stuff. */ |
---|
346 | void html_object_draw (HTMLObject *o, |
---|
347 | HTMLPainter *p, |
---|
348 | gint x, |
---|
349 | gint y, |
---|
350 | gint width, |
---|
351 | gint height, |
---|
352 | gint tx, |
---|
353 | gint ty); |
---|
354 | void html_object_draw_background (HTMLObject *o, |
---|
355 | HTMLPainter *p, |
---|
356 | gint x, |
---|
357 | gint y, |
---|
358 | gint width, |
---|
359 | gint height, |
---|
360 | gint tx, |
---|
361 | gint ty); |
---|
362 | void html_object_set_bg_color (HTMLObject *o, |
---|
363 | GdkColor *color); |
---|
364 | GdkColor *html_object_get_bg_color (HTMLObject *o, |
---|
365 | HTMLPainter *p); |
---|
366 | gboolean html_object_is_transparent (HTMLObject *self); |
---|
367 | |
---|
368 | /* Layout. */ |
---|
369 | HTMLFitType html_object_fit_line (HTMLObject *o, |
---|
370 | HTMLPainter *painter, |
---|
371 | gboolean start_of_line, |
---|
372 | gboolean first_run, |
---|
373 | gboolean next_to_floating, |
---|
374 | gint width_left); |
---|
375 | gboolean html_object_calc_size (HTMLObject *o, |
---|
376 | HTMLPainter *painter, |
---|
377 | GList **changed_objs); |
---|
378 | void html_object_set_max_width (HTMLObject *o, |
---|
379 | HTMLPainter *painter, |
---|
380 | gint max_width); |
---|
381 | void html_object_set_max_height (HTMLObject *o, |
---|
382 | HTMLPainter *painter, |
---|
383 | gint max_height); |
---|
384 | gint html_object_calc_min_width (HTMLObject *o, |
---|
385 | HTMLPainter *painter); |
---|
386 | gint html_object_calc_preferred_width (HTMLObject *o, |
---|
387 | HTMLPainter *painter); |
---|
388 | void html_object_calc_abs_position (HTMLObject *o, |
---|
389 | gint *x_return, |
---|
390 | gint *y_return); |
---|
391 | void html_object_calc_intersection (HTMLObject *o, |
---|
392 | ArtIRect *intersection, |
---|
393 | gint x, |
---|
394 | gint y, |
---|
395 | gint width, |
---|
396 | gint height); |
---|
397 | gboolean html_object_relayout (HTMLObject *obj, |
---|
398 | HTMLEngine *engine, |
---|
399 | HTMLObject *child); |
---|
400 | HTMLVAlignType html_object_get_valign (HTMLObject *self); |
---|
401 | |
---|
402 | /* Links. */ |
---|
403 | const gchar *html_object_get_url (HTMLObject *o); |
---|
404 | const gchar *html_object_get_target (HTMLObject *o); |
---|
405 | gchar *html_object_get_complete_url (HTMLObject *o); |
---|
406 | const gchar *html_object_get_src (HTMLObject *o); |
---|
407 | HTMLAnchor *html_object_find_anchor (HTMLObject *o, |
---|
408 | const gchar *name, |
---|
409 | gint *x, |
---|
410 | gint *y); |
---|
411 | HTMLObject *html_object_set_link (HTMLObject *self, |
---|
412 | HTMLColor *color, |
---|
413 | const gchar *url, |
---|
414 | const gchar *target); |
---|
415 | HTMLObject *html_object_remove_link (HTMLObject *self, |
---|
416 | HTMLColor *color); |
---|
417 | |
---|
418 | /* Cursor. */ |
---|
419 | gboolean html_object_accepts_cursor (HTMLObject *obj); |
---|
420 | void html_object_get_cursor (HTMLObject *obj, |
---|
421 | HTMLPainter *painter, |
---|
422 | guint offset, |
---|
423 | gint *x1, |
---|
424 | gint *y1, |
---|
425 | gint *x2, |
---|
426 | gint *y2); |
---|
427 | void html_object_get_cursor_base (HTMLObject *obj, |
---|
428 | HTMLPainter *painter, |
---|
429 | guint offset, |
---|
430 | gint *x, |
---|
431 | gint *y); |
---|
432 | guint html_object_get_length (HTMLObject *self); |
---|
433 | guint html_object_get_line_length (HTMLObject *self, |
---|
434 | HTMLPainter *p, |
---|
435 | gint line_offset); |
---|
436 | guint html_object_get_recursive_length (HTMLObject *self); |
---|
437 | guint html_object_get_bytes (HTMLObject *self); |
---|
438 | guint html_object_get_index (HTMLObject *self, |
---|
439 | guint offset); |
---|
440 | HTMLObject *html_object_check_point (HTMLObject *clue, |
---|
441 | HTMLPainter *painter, |
---|
442 | gint x, |
---|
443 | gint y, |
---|
444 | guint *offset_return, |
---|
445 | gboolean for_cursor); |
---|
446 | |
---|
447 | /* Movement functions */ |
---|
448 | /* move cursor in scope of object */ |
---|
449 | gboolean html_object_cursor_forward (HTMLObject *self, |
---|
450 | HTMLCursor *cursor); |
---|
451 | gboolean html_object_cursor_backward (HTMLObject *self, |
---|
452 | HTMLCursor *cursor); |
---|
453 | |
---|
454 | /* get prev/next object in scope of parent */ |
---|
455 | HTMLObject *html_object_next (HTMLObject *self, |
---|
456 | HTMLObject *child); |
---|
457 | HTMLObject *html_object_prev (HTMLObject *self, |
---|
458 | HTMLObject *child); |
---|
459 | /* get head/tail object of this (parent) object */ |
---|
460 | HTMLObject *html_object_head (HTMLObject *self); |
---|
461 | HTMLObject *html_object_tail (HTMLObject *self); |
---|
462 | HTMLObject *html_object_tail_not_slave (HTMLObject *self); |
---|
463 | |
---|
464 | /* get prev/next leaf object in scope of whole tree */ |
---|
465 | HTMLObject *html_object_next_leaf (HTMLObject *self); |
---|
466 | HTMLObject *html_object_prev_leaf (HTMLObject *self); |
---|
467 | HTMLObject *html_object_next_leaf_not_type (HTMLObject *self, |
---|
468 | HTMLType t); |
---|
469 | HTMLObject *html_object_prev_leaf_not_type (HTMLObject *self, |
---|
470 | HTMLType t); |
---|
471 | HTMLObject *html_object_get_head_leaf (HTMLObject *o); |
---|
472 | HTMLObject *html_object_get_tail_leaf (HTMLObject *o); |
---|
473 | HTMLObject *html_object_next_cursor (HTMLObject *self, |
---|
474 | gint *offset); |
---|
475 | HTMLObject *html_object_prev_cursor (HTMLObject *self, |
---|
476 | gint *offset); |
---|
477 | |
---|
478 | /* Page splitting. */ |
---|
479 | gint html_object_check_page_split (HTMLObject *self, |
---|
480 | gint y); |
---|
481 | |
---|
482 | /* Selection. */ |
---|
483 | gboolean html_object_select_range (HTMLObject *self, |
---|
484 | HTMLEngine *engine, |
---|
485 | guint start, |
---|
486 | gint length, |
---|
487 | gboolean queue_draw); |
---|
488 | void html_object_append_selection_string (HTMLObject *self, |
---|
489 | GString *buffer); |
---|
490 | gchar *html_object_get_selection_string (HTMLObject *o, |
---|
491 | HTMLEngine *e); |
---|
492 | |
---|
493 | /* Saving. */ |
---|
494 | gboolean html_object_save (HTMLObject *self, |
---|
495 | HTMLEngineSaveState *state); |
---|
496 | |
---|
497 | gboolean html_object_save_plain (HTMLObject *self, |
---|
498 | HTMLEngineSaveState *state, |
---|
499 | gint requested_width); |
---|
500 | |
---|
501 | /* set change flag f of this object and of all its parents */ |
---|
502 | void html_object_change_set (HTMLObject *self, |
---|
503 | HTMLChangeFlags f); |
---|
504 | |
---|
505 | /* set change flag f for this object and all childern */ |
---|
506 | void html_object_change_set_down (HTMLObject *self, |
---|
507 | HTMLChangeFlags f); |
---|
508 | |
---|
509 | /* object data */ |
---|
510 | |
---|
511 | void html_object_set_data (HTMLObject *object, |
---|
512 | const gchar *key, |
---|
513 | const gchar *value); |
---|
514 | gpointer html_object_get_data (HTMLObject *object, |
---|
515 | const gchar *key); |
---|
516 | void html_object_copy_data_from_object (HTMLObject *dst, |
---|
517 | HTMLObject *src); |
---|
518 | gboolean html_object_save_data (HTMLObject *self, |
---|
519 | HTMLEngineSaveState *state); |
---|
520 | /* |
---|
521 | * editing |
---|
522 | */ |
---|
523 | GList *html_object_get_bound_list (HTMLObject *obj, |
---|
524 | GList *list); |
---|
525 | void html_object_move_cursor_before_remove (HTMLObject *o, |
---|
526 | HTMLEngine *e); |
---|
527 | gboolean html_object_could_remove_whole (HTMLObject *o, |
---|
528 | GList *from, |
---|
529 | GList *to, |
---|
530 | GList *left, |
---|
531 | GList *right); |
---|
532 | void html_object_check_cut_lists (HTMLObject *self, |
---|
533 | HTMLObject *replacement, |
---|
534 | GList *left, |
---|
535 | GList *right); |
---|
536 | GList *html_object_heads_list (HTMLObject *o); |
---|
537 | GList *html_object_tails_list (HTMLObject *o); |
---|
538 | void html_object_merge_down (HTMLObject *o, |
---|
539 | HTMLObject *w, |
---|
540 | HTMLEngine *e); |
---|
541 | gboolean html_object_is_parent (HTMLObject *parent, |
---|
542 | HTMLObject *child); |
---|
543 | gint html_object_get_insert_level (HTMLObject *o); |
---|
544 | |
---|
545 | void html_object_engine_translation (HTMLObject *o, |
---|
546 | HTMLEngine *e, |
---|
547 | gint *tx, |
---|
548 | gint *ty); |
---|
549 | gboolean html_object_engine_intersection (HTMLObject *o, |
---|
550 | HTMLEngine *e, |
---|
551 | gint tx, |
---|
552 | gint ty, |
---|
553 | gint *x1, |
---|
554 | gint *y1, |
---|
555 | gint *x2, |
---|
556 | gint *y2); |
---|
557 | |
---|
558 | void html_object_add_to_changed (GList **changed_objs, |
---|
559 | HTMLObject *o); |
---|
560 | |
---|
561 | HTMLClearType html_object_get_clear (HTMLObject *self); |
---|
562 | |
---|
563 | HTMLObject *html_object_next_cursor_object (HTMLObject *o, |
---|
564 | HTMLEngine *e, |
---|
565 | gint *offset); |
---|
566 | HTMLObject *html_object_prev_cursor_object (HTMLObject *o, |
---|
567 | HTMLEngine *e, |
---|
568 | gint *offset); |
---|
569 | HTMLObject *html_object_next_cursor_leaf (HTMLObject *o, |
---|
570 | HTMLEngine *e); |
---|
571 | HTMLObject *html_object_prev_cursor_leaf (HTMLObject *o, |
---|
572 | HTMLEngine *e); |
---|
573 | #endif /* _HTMLOBJECT_H_ */ |
---|