1 /* Fo
2 * fo-basic-link.c: 'basic-link' formatting object
3 *
4 * Copyright (C) 2001-2006 Sun Microsystems
5 * Copyright (C) 2007-2009 Menteith Consulting Ltd
6 *
7 * See COPYING for the status of this software.
8 */
9
10 #include "fo/fo-inline-fo.h"
11 #include "fo/fo-cbpbp-fo-private.h"
12 #include "fo/fo-basic-link-private.h"
13 #include "fo-context-util.h"
14 #include "property/fo-property-text-property.h"
15 #include "property/fo-property-alignment-adjust.h"
16 #include "property/fo-property-alignment-baseline.h"
17 #include "property/fo-property-background-color.h"
18 #include "property/fo-property-background-image.h"
19 #include "property/fo-property-baseline-shift.h"
20 #include "property/fo-property-border-after-color.h"
21 #include "property/fo-property-border-after-style.h"
22 #include "property/fo-property-border-after-width.h"
23 #include "property/fo-property-border-before-color.h"
24 #include "property/fo-property-border-before-style.h"
25 #include "property/fo-property-border-before-width.h"
26 #include "property/fo-property-border-bottom-color.h"
27 #include "property/fo-property-border-bottom-style.h"
28 #include "property/fo-property-border-bottom-width.h"
29 #include "property/fo-property-border-end-color.h"
30 #include "property/fo-property-border-end-style.h"
31 #include "property/fo-property-border-end-width.h"
32 #include "property/fo-property-border-left-color.h"
33 #include "property/fo-property-border-left-style.h"
34 #include "property/fo-property-border-left-width.h"
35 #include "property/fo-property-border-right-color.h"
36 #include "property/fo-property-border-right-style.h"
37 #include "property/fo-property-border-right-width.h"
38 #include "property/fo-property-border-start-color.h"
39 #include "property/fo-property-border-start-style.h"
40 #include "property/fo-property-border-start-width.h"
41 #include "property/fo-property-border-top-color.h"
42 #include "property/fo-property-border-top-style.h"
43 #include "property/fo-property-border-top-width.h"
44 #include "property/fo-property-dominant-baseline.h"
45 #include "property/fo-property-id.h"
46 #include "property/fo-property-keep-together.h"
47 #include "property/fo-property-keep-together-within-column.h"
48 #include "property/fo-property-keep-together-within-line.h"
49 #include "property/fo-property-keep-together-within-page.h"
50 #include "property/fo-property-keep-with-next.h"
51 #include "property/fo-property-keep-with-next-within-column.h"
52 #include "property/fo-property-keep-with-next-within-line.h"
53 #include "property/fo-property-keep-with-next-within-page.h"
54 #include "property/fo-property-keep-with-previous.h"
55 #include "property/fo-property-keep-with-previous-within-column.h"
56 #include "property/fo-property-keep-with-previous-within-line.h"
57 #include "property/fo-property-keep-with-previous-within-page.h"
58 #include "property/fo-property-line-height.h"
59 #include "property/fo-property-padding-after.h"
60 #include "property/fo-property-padding-before.h"
61 #include "property/fo-property-padding-bottom.h"
62 #include "property/fo-property-padding-end.h"
63 #include "property/fo-property-padding-left.h"
64 #include "property/fo-property-padding-right.h"
65 #include "property/fo-property-padding-start.h"
66 #include "property/fo-property-padding-top.h"
67 #include "property/fo-property-role.h"
68 #include "property/fo-property-source-document.h"
69 #include "property/fo-property-space-end.h"
70 #include "property/fo-property-space-start.h"
71
72 enum {
73 PROP_0,
74 PROP_ALIGNMENT_ADJUST,
75 PROP_ALIGNMENT_BASELINE,
76 PROP_BACKGROUND_COLOR,
77 PROP_BACKGROUND_IMAGE,
78 PROP_BASELINE_SHIFT,
79 PROP_BORDER_AFTER_COLOR,
80 PROP_BORDER_AFTER_STYLE,
81 PROP_BORDER_AFTER_WIDTH,
82 PROP_BORDER_BEFORE_COLOR,
83 PROP_BORDER_BEFORE_STYLE,
84 PROP_BORDER_BEFORE_WIDTH,
85 PROP_BORDER_BOTTOM_COLOR,
86 PROP_BORDER_BOTTOM_STYLE,
87 PROP_BORDER_BOTTOM_WIDTH,
88 PROP_BORDER_END_COLOR,
89 PROP_BORDER_END_STYLE,
90 PROP_BORDER_END_WIDTH,
91 PROP_BORDER_LEFT_COLOR,
92 PROP_BORDER_LEFT_STYLE,
93 PROP_BORDER_LEFT_WIDTH,
94 PROP_BORDER_RIGHT_COLOR,
95 PROP_BORDER_RIGHT_STYLE,
96 PROP_BORDER_RIGHT_WIDTH,
97 PROP_BORDER_START_COLOR,
98 PROP_BORDER_START_STYLE,
99 PROP_BORDER_START_WIDTH,
100 PROP_BORDER_TOP_COLOR,
101 PROP_BORDER_TOP_STYLE,
102 PROP_BORDER_TOP_WIDTH,
103 PROP_DOMINANT_BASELINE,
104 PROP_ID,
105 PROP_KEEP_TOGETHER,
106 PROP_KEEP_TOGETHER_WITHIN_COLUMN,
107 PROP_KEEP_TOGETHER_WITHIN_LINE,
108 PROP_KEEP_TOGETHER_WITHIN_PAGE,
109 PROP_KEEP_WITH_NEXT,
110 PROP_KEEP_WITH_NEXT_WITHIN_COLUMN,
111 PROP_KEEP_WITH_NEXT_WITHIN_LINE,
112 PROP_KEEP_WITH_NEXT_WITHIN_PAGE,
113 PROP_KEEP_WITH_PREVIOUS,
114 PROP_KEEP_WITH_PREVIOUS_WITHIN_COLUMN,
115 PROP_KEEP_WITH_PREVIOUS_WITHIN_LINE,
116 PROP_KEEP_WITH_PREVIOUS_WITHIN_PAGE,
117 PROP_LINE_HEIGHT,
118 PROP_PADDING_AFTER,
119 PROP_PADDING_BEFORE,
120 PROP_PADDING_BOTTOM,
121 PROP_PADDING_END,
122 PROP_PADDING_LEFT,
123 PROP_PADDING_RIGHT,
124 PROP_PADDING_START,
125 PROP_PADDING_TOP,
126 PROP_ROLE,
127 PROP_SOURCE_DOCUMENT,
128 PROP_SPACE_END,
129 PROP_SPACE_START
130 };
131
132 static void fo_basic_link_class_init (FoBasicLinkClass *klass);
133 static void fo_basic_link_cbpbp_fo_init (FoCBPBPFoIface *iface);
134 static void fo_basic_link_inline_fo_init (FoInlineFoIface *iface);
135 static void fo_basic_link_get_property (GObject *object,
136 guint prop_id,
137 GValue *value,
138 GParamSpec *pspec);
139 static void fo_basic_link_set_property (GObject *object,
140 guint prop_id,
141 const GValue *value,
142 GParamSpec *pspec);
143 static void fo_basic_link_finalize (GObject *object);
144 static gboolean fo_basic_link_validate_content (FoFo *fo,
145 GError **error);
146 static void fo_basic_link_validate (FoFo *fo,
147 FoContext *current_context,
148 FoContext *parent_context,
149 GError **error);
150 static void fo_basic_link_update_from_context (FoFo *fo,
151 FoContext *context);
152 static void fo_basic_link_debug_dump_properties (FoFo *fo,
153 gint depth);
154 static void fo_basic_link_get_text_attr_list (FoFo *fo_inline_fo,
155 FoDoc *fo_doc,
156 GString *text,
157 GList **attr_glist,
158 guint debug_level);
159
160 static gpointer parent_class;
161
162 /**
163 * fo_basic_link_get_type:
164 *
165 * Register the #FoBasicLink object type.
166 *
167 * Return value: #GType value of the #FoBasicLink object type.
168 **/
169 GType
fo_basic_link_get_type(void)170 fo_basic_link_get_type (void)
171 {
172 static GType object_type = 0;
173
174 if (!object_type)
175 {
176 static const GTypeInfo object_info =
177 {
178 sizeof (FoBasicLinkClass),
179 NULL, /* base_init */
180 NULL, /* base_finalize */
181 (GClassInitFunc) fo_basic_link_class_init,
182 NULL, /* class_finalize */
183 NULL, /* class_data */
184 sizeof (FoBasicLink),
185 0, /* n_preallocs */
186 NULL, /* instance_init */
187 NULL /* value_table */
188 };
189
190 static const GInterfaceInfo fo_inline_fo_info =
191 {
192 (GInterfaceInitFunc) fo_basic_link_inline_fo_init, /* interface_init */
193 NULL,
194 NULL
195 };
196
197 static const GInterfaceInfo fo_cbpbp_fo_info =
198 {
199 (GInterfaceInitFunc) fo_basic_link_cbpbp_fo_init, /* interface_init */
200 NULL,
201 NULL
202 };
203
204 object_type = g_type_register_static (FO_TYPE_MARKER_PARENT,
205 "FoBasicLink",
206 &object_info, 0);
207 g_type_add_interface_static (object_type,
208 FO_TYPE_INLINE_FO,
209 &fo_inline_fo_info);
210 g_type_add_interface_static (object_type,
211 FO_TYPE_CBPBP_FO,
212 &fo_cbpbp_fo_info);
213 }
214
215 return object_type;
216 }
217
218 /**
219 * fo_basic_link_class_init:
220 * @klass: #FoBasicLinkClass object to initialise.
221 *
222 * Implements #GClassInitFunc for #FoBasicLinkClass.
223 **/
224 void
fo_basic_link_class_init(FoBasicLinkClass * klass)225 fo_basic_link_class_init (FoBasicLinkClass *klass)
226 {
227 GObjectClass *object_class = G_OBJECT_CLASS (klass);
228 FoFoClass *fofo_class = FO_FO_CLASS (klass);
229
230 parent_class = g_type_class_peek_parent (klass);
231
232 object_class->finalize = fo_basic_link_finalize;
233
234 object_class->get_property = fo_basic_link_get_property;
235 object_class->set_property = fo_basic_link_set_property;
236
237 fofo_class->validate_content =
238 fo_basic_link_validate_content;
239 fofo_class->validate2 =
240 fo_basic_link_validate;
241 fofo_class->update_from_context = fo_basic_link_update_from_context;
242 fofo_class->debug_dump_properties = fo_basic_link_debug_dump_properties;
243 fofo_class->allow_mixed_content = TRUE;
244
245 g_object_class_install_property
246 (object_class,
247 PROP_ALIGNMENT_ADJUST,
248 g_param_spec_object ("alignment-adjust",
249 _("Alignment Adjust"),
250 _("Alignment Adjust property"),
251 FO_TYPE_PROPERTY,
252 G_PARAM_READABLE));
253 g_object_class_install_property
254 (object_class,
255 PROP_ALIGNMENT_BASELINE,
256 g_param_spec_object ("alignment-baseline",
257 _("Alignment Baseline"),
258 _("Alignment Baseline property"),
259 FO_TYPE_PROPERTY,
260 G_PARAM_READABLE));
261 g_object_class_install_property
262 (object_class,
263 PROP_BACKGROUND_COLOR,
264 g_param_spec_object ("background-color",
265 _("Background Color"),
266 _("Background Color property"),
267 FO_TYPE_PROPERTY,
268 G_PARAM_READABLE));
269 g_object_class_install_property
270 (object_class,
271 PROP_BACKGROUND_IMAGE,
272 g_param_spec_object ("background-image",
273 _("Background Image"),
274 _("Background Image property"),
275 FO_TYPE_PROPERTY,
276 G_PARAM_READABLE));
277 g_object_class_install_property
278 (object_class,
279 PROP_BASELINE_SHIFT,
280 g_param_spec_object ("baseline-shift",
281 _("Baseline Shift"),
282 _("Baseline Shift property"),
283 FO_TYPE_PROPERTY,
284 G_PARAM_READABLE));
285 g_object_class_install_property
286 (object_class,
287 PROP_BORDER_AFTER_COLOR,
288 g_param_spec_object ("border-after-color",
289 _("Border After Color"),
290 _("Border After Color property"),
291 FO_TYPE_PROPERTY,
292 G_PARAM_READABLE));
293 g_object_class_install_property
294 (object_class,
295 PROP_BORDER_AFTER_STYLE,
296 g_param_spec_object ("border-after-style",
297 _("Border After Style"),
298 _("Border After Style property"),
299 FO_TYPE_PROPERTY,
300 G_PARAM_READABLE));
301 g_object_class_install_property
302 (object_class,
303 PROP_BORDER_AFTER_WIDTH,
304 g_param_spec_object ("border-after-width",
305 _("Border After Width"),
306 _("Border After Width property"),
307 FO_TYPE_PROPERTY,
308 G_PARAM_READABLE));
309 g_object_class_install_property
310 (object_class,
311 PROP_BORDER_BEFORE_COLOR,
312 g_param_spec_object ("border-before-color",
313 _("Border Before Color"),
314 _("Border Before Color property"),
315 FO_TYPE_PROPERTY,
316 G_PARAM_READABLE));
317 g_object_class_install_property
318 (object_class,
319 PROP_BORDER_BEFORE_STYLE,
320 g_param_spec_object ("border-before-style",
321 _("Border Before Style"),
322 _("Border Before Style property"),
323 FO_TYPE_PROPERTY,
324 G_PARAM_READABLE));
325 g_object_class_install_property
326 (object_class,
327 PROP_BORDER_BEFORE_WIDTH,
328 g_param_spec_object ("border-before-width",
329 _("Border Before Width"),
330 _("Border Before Width property"),
331 FO_TYPE_PROPERTY,
332 G_PARAM_READABLE));
333 g_object_class_install_property
334 (object_class,
335 PROP_BORDER_BOTTOM_COLOR,
336 g_param_spec_object ("border-bottom-color",
337 _("Border Bottom Color"),
338 _("Border Bottom Color property"),
339 FO_TYPE_PROPERTY,
340 G_PARAM_READABLE));
341 g_object_class_install_property
342 (object_class,
343 PROP_BORDER_BOTTOM_STYLE,
344 g_param_spec_object ("border-bottom-style",
345 _("Border Bottom Style"),
346 _("Border Bottom Style property"),
347 FO_TYPE_PROPERTY,
348 G_PARAM_READABLE));
349 g_object_class_install_property
350 (object_class,
351 PROP_BORDER_BOTTOM_WIDTH,
352 g_param_spec_object ("border-bottom-width",
353 _("Border Bottom Width"),
354 _("Border Bottom Width property"),
355 FO_TYPE_PROPERTY,
356 G_PARAM_READABLE));
357 g_object_class_install_property
358 (object_class,
359 PROP_BORDER_END_COLOR,
360 g_param_spec_object ("border-end-color",
361 _("Border End Color"),
362 _("Border End Color property"),
363 FO_TYPE_PROPERTY,
364 G_PARAM_READABLE));
365 g_object_class_install_property
366 (object_class,
367 PROP_BORDER_END_STYLE,
368 g_param_spec_object ("border-end-style",
369 _("Border End Style"),
370 _("Border End Style property"),
371 FO_TYPE_PROPERTY,
372 G_PARAM_READABLE));
373 g_object_class_install_property
374 (object_class,
375 PROP_BORDER_END_WIDTH,
376 g_param_spec_object ("border-end-width",
377 _("Border End Width"),
378 _("Border End Width property"),
379 FO_TYPE_PROPERTY,
380 G_PARAM_READABLE));
381 g_object_class_install_property
382 (object_class,
383 PROP_BORDER_LEFT_COLOR,
384 g_param_spec_object ("border-left-color",
385 _("Border Left Color"),
386 _("Border Left Color property"),
387 FO_TYPE_PROPERTY,
388 G_PARAM_READABLE));
389 g_object_class_install_property
390 (object_class,
391 PROP_BORDER_LEFT_STYLE,
392 g_param_spec_object ("border-left-style",
393 _("Border Left Style"),
394 _("Border Left Style property"),
395 FO_TYPE_PROPERTY,
396 G_PARAM_READABLE));
397 g_object_class_install_property
398 (object_class,
399 PROP_BORDER_LEFT_WIDTH,
400 g_param_spec_object ("border-left-width",
401 _("Border Left Width"),
402 _("Border Left Width property"),
403 FO_TYPE_PROPERTY,
404 G_PARAM_READABLE));
405 g_object_class_install_property
406 (object_class,
407 PROP_BORDER_RIGHT_COLOR,
408 g_param_spec_object ("border-right-color",
409 _("Border Right Color"),
410 _("Border Right Color property"),
411 FO_TYPE_PROPERTY,
412 G_PARAM_READABLE));
413 g_object_class_install_property
414 (object_class,
415 PROP_BORDER_RIGHT_STYLE,
416 g_param_spec_object ("border-right-style",
417 _("Border Right Style"),
418 _("Border Right Style property"),
419 FO_TYPE_PROPERTY,
420 G_PARAM_READABLE));
421 g_object_class_install_property
422 (object_class,
423 PROP_BORDER_RIGHT_WIDTH,
424 g_param_spec_object ("border-right-width",
425 _("Border Right Width"),
426 _("Border Right Width property"),
427 FO_TYPE_PROPERTY,
428 G_PARAM_READABLE));
429 g_object_class_install_property
430 (object_class,
431 PROP_BORDER_START_COLOR,
432 g_param_spec_object ("border-start-color",
433 _("Border Start Color"),
434 _("Border Start Color property"),
435 FO_TYPE_PROPERTY,
436 G_PARAM_READABLE));
437 g_object_class_install_property
438 (object_class,
439 PROP_BORDER_START_STYLE,
440 g_param_spec_object ("border-start-style",
441 _("Border Start Style"),
442 _("Border Start Style property"),
443 FO_TYPE_PROPERTY,
444 G_PARAM_READABLE));
445 g_object_class_install_property
446 (object_class,
447 PROP_BORDER_START_WIDTH,
448 g_param_spec_object ("border-start-width",
449 _("Border Start Width"),
450 _("Border Start Width property"),
451 FO_TYPE_PROPERTY,
452 G_PARAM_READABLE));
453 g_object_class_install_property
454 (object_class,
455 PROP_BORDER_TOP_COLOR,
456 g_param_spec_object ("border-top-color",
457 _("Border Top Color"),
458 _("Border Top Color property"),
459 FO_TYPE_PROPERTY,
460 G_PARAM_READABLE));
461 g_object_class_install_property
462 (object_class,
463 PROP_BORDER_TOP_STYLE,
464 g_param_spec_object ("border-top-style",
465 _("Border Top Style"),
466 _("Border Top Style property"),
467 FO_TYPE_PROPERTY,
468 G_PARAM_READABLE));
469 g_object_class_install_property
470 (object_class,
471 PROP_BORDER_TOP_WIDTH,
472 g_param_spec_object ("border-top-width",
473 _("Border Top Width"),
474 _("Border Top Width property"),
475 FO_TYPE_PROPERTY,
476 G_PARAM_READABLE));
477 g_object_class_install_property
478 (object_class,
479 PROP_DOMINANT_BASELINE,
480 g_param_spec_object ("dominant-baseline",
481 _("Dominant Baseline"),
482 _("Dominant Baseline property"),
483 FO_TYPE_PROPERTY,
484 G_PARAM_READABLE));
485 g_object_class_install_property
486 (object_class,
487 PROP_ID,
488 g_param_spec_object ("id",
489 _("Id"),
490 _("Id property"),
491 FO_TYPE_PROPERTY,
492 G_PARAM_READABLE));
493 g_object_class_install_property
494 (object_class,
495 PROP_KEEP_TOGETHER,
496 g_param_spec_object ("keep-together",
497 _("Keep Together"),
498 _("Keep Together property"),
499 FO_TYPE_PROPERTY,
500 G_PARAM_READABLE));
501 g_object_class_install_property
502 (object_class,
503 PROP_KEEP_TOGETHER_WITHIN_COLUMN,
504 g_param_spec_object ("keep-together-within-column",
505 _("Keep Together Within Column"),
506 _("Keep Together Within Column property"),
507 FO_TYPE_PROPERTY,
508 G_PARAM_READABLE));
509 g_object_class_install_property
510 (object_class,
511 PROP_KEEP_TOGETHER_WITHIN_LINE,
512 g_param_spec_object ("keep-together-within-line",
513 _("Keep Together Within Line"),
514 _("Keep Together Within Line property"),
515 FO_TYPE_PROPERTY,
516 G_PARAM_READABLE));
517 g_object_class_install_property
518 (object_class,
519 PROP_KEEP_TOGETHER_WITHIN_PAGE,
520 g_param_spec_object ("keep-together-within-page",
521 _("Keep Together Within Page"),
522 _("Keep Together Within Page property"),
523 FO_TYPE_PROPERTY,
524 G_PARAM_READABLE));
525 g_object_class_install_property
526 (object_class,
527 PROP_KEEP_WITH_NEXT,
528 g_param_spec_object ("keep-with-next",
529 _("Keep With Next"),
530 _("Keep With Next property"),
531 FO_TYPE_PROPERTY,
532 G_PARAM_READABLE));
533 g_object_class_install_property
534 (object_class,
535 PROP_KEEP_WITH_NEXT_WITHIN_COLUMN,
536 g_param_spec_object ("keep-with-next-within-column",
537 _("Keep With Next Within Column"),
538 _("Keep With Next Within Column property"),
539 FO_TYPE_PROPERTY,
540 G_PARAM_READABLE));
541 g_object_class_install_property
542 (object_class,
543 PROP_KEEP_WITH_NEXT_WITHIN_LINE,
544 g_param_spec_object ("keep-with-next-within-line",
545 _("Keep With Next Within Line"),
546 _("Keep With Next Within Line property"),
547 FO_TYPE_PROPERTY,
548 G_PARAM_READABLE));
549 g_object_class_install_property
550 (object_class,
551 PROP_KEEP_WITH_NEXT_WITHIN_PAGE,
552 g_param_spec_object ("keep-with-next-within-page",
553 _("Keep With Next Within Page"),
554 _("Keep With Next Within Page property"),
555 FO_TYPE_PROPERTY,
556 G_PARAM_READABLE));
557 g_object_class_install_property
558 (object_class,
559 PROP_KEEP_WITH_PREVIOUS,
560 g_param_spec_object ("keep-with-previous",
561 _("Keep With Previous"),
562 _("Keep With Previous property"),
563 FO_TYPE_PROPERTY,
564 G_PARAM_READABLE));
565 g_object_class_install_property
566 (object_class,
567 PROP_KEEP_WITH_PREVIOUS_WITHIN_COLUMN,
568 g_param_spec_object ("keep-with-previous-within-column",
569 _("Keep With Previous Within Column"),
570 _("Keep With Previous Within Column property"),
571 FO_TYPE_PROPERTY,
572 G_PARAM_READABLE));
573 g_object_class_install_property
574 (object_class,
575 PROP_KEEP_WITH_PREVIOUS_WITHIN_LINE,
576 g_param_spec_object ("keep-with-previous-within-line",
577 _("Keep With Previous Within Line"),
578 _("Keep With Previous Within Line property"),
579 FO_TYPE_PROPERTY,
580 G_PARAM_READABLE));
581 g_object_class_install_property
582 (object_class,
583 PROP_KEEP_WITH_PREVIOUS_WITHIN_PAGE,
584 g_param_spec_object ("keep-with-previous-within-page",
585 _("Keep With Previous Within Page"),
586 _("Keep With Previous Within Page property"),
587 FO_TYPE_PROPERTY,
588 G_PARAM_READABLE));
589 g_object_class_install_property
590 (object_class,
591 PROP_LINE_HEIGHT,
592 g_param_spec_object ("line-height",
593 _("Line Height"),
594 _("Line Height property"),
595 FO_TYPE_PROPERTY,
596 G_PARAM_READABLE));
597 g_object_class_install_property
598 (object_class,
599 PROP_PADDING_AFTER,
600 g_param_spec_object ("padding-after",
601 _("Padding After"),
602 _("Padding After property"),
603 FO_TYPE_PROPERTY,
604 G_PARAM_READABLE));
605 g_object_class_install_property
606 (object_class,
607 PROP_PADDING_BEFORE,
608 g_param_spec_object ("padding-before",
609 _("Padding Before"),
610 _("Padding Before property"),
611 FO_TYPE_PROPERTY,
612 G_PARAM_READABLE));
613 g_object_class_install_property
614 (object_class,
615 PROP_PADDING_BOTTOM,
616 g_param_spec_object ("padding-bottom",
617 _("Padding Bottom"),
618 _("Padding Bottom property"),
619 FO_TYPE_PROPERTY,
620 G_PARAM_READABLE));
621 g_object_class_install_property
622 (object_class,
623 PROP_PADDING_END,
624 g_param_spec_object ("padding-end",
625 _("Padding End"),
626 _("Padding End property"),
627 FO_TYPE_PROPERTY,
628 G_PARAM_READABLE));
629 g_object_class_install_property
630 (object_class,
631 PROP_PADDING_LEFT,
632 g_param_spec_object ("padding-left",
633 _("Padding Left"),
634 _("Padding Left property"),
635 FO_TYPE_PROPERTY,
636 G_PARAM_READABLE));
637 g_object_class_install_property
638 (object_class,
639 PROP_PADDING_RIGHT,
640 g_param_spec_object ("padding-right",
641 _("Padding Right"),
642 _("Padding Right property"),
643 FO_TYPE_PROPERTY,
644 G_PARAM_READABLE));
645 g_object_class_install_property
646 (object_class,
647 PROP_PADDING_START,
648 g_param_spec_object ("padding-start",
649 _("Padding Start"),
650 _("Padding Start property"),
651 FO_TYPE_PROPERTY,
652 G_PARAM_READABLE));
653 g_object_class_install_property
654 (object_class,
655 PROP_PADDING_TOP,
656 g_param_spec_object ("padding-top",
657 _("Padding Top"),
658 _("Padding Top property"),
659 FO_TYPE_PROPERTY,
660 G_PARAM_READABLE));
661 g_object_class_install_property
662 (object_class,
663 PROP_ROLE,
664 g_param_spec_object ("role",
665 _("Role"),
666 _("Role property"),
667 FO_TYPE_PROPERTY,
668 G_PARAM_READABLE));
669 g_object_class_install_property
670 (object_class,
671 PROP_SOURCE_DOCUMENT,
672 g_param_spec_object ("source-document",
673 _("Source Document"),
674 _("Source Document property"),
675 FO_TYPE_PROPERTY,
676 G_PARAM_READABLE));
677 g_object_class_install_property
678 (object_class,
679 PROP_SPACE_END,
680 g_param_spec_object ("space-end",
681 _("Space End"),
682 _("Space End property"),
683 FO_TYPE_PROPERTY,
684 G_PARAM_READABLE));
685 g_object_class_install_property
686 (object_class,
687 PROP_SPACE_START,
688 g_param_spec_object ("space-start",
689 _("Space Start"),
690 _("Space Start property"),
691 FO_TYPE_PROPERTY,
692 G_PARAM_READABLE));
693 }
694
695 /**
696 * fo_basic_link_inline_fo_init:
697 * @iface: #FoInlineFoIFace structure for this class.
698 *
699 * Initialize #FoInlineFoIface interface for this class.
700 **/
701 void
fo_basic_link_inline_fo_init(FoInlineFoIface * iface)702 fo_basic_link_inline_fo_init (FoInlineFoIface *iface)
703 {
704 iface->get_text_attr_list = fo_basic_link_get_text_attr_list;
705 }
706
707 /**
708 * fo_basic_link_cbpbp_fo_init:
709 * @iface: #FoCBPBPFoIFace structure for this class.
710 *
711 * Initialize #FoCBPBPFoIface interface for this class.
712 **/
713 void
fo_basic_link_cbpbp_fo_init(FoCBPBPFoIface * iface)714 fo_basic_link_cbpbp_fo_init (FoCBPBPFoIface *iface)
715 {
716 iface->get_background_color = fo_basic_link_get_background_color;
717 iface->get_border_after_color = fo_basic_link_get_border_after_color;
718 iface->get_border_after_style = fo_basic_link_get_border_after_style;
719 iface->get_border_after_width = fo_basic_link_get_border_after_width;
720 iface->get_border_before_color = fo_basic_link_get_border_before_color;
721 iface->get_border_before_style = fo_basic_link_get_border_before_style;
722 iface->get_border_before_width = fo_basic_link_get_border_before_width;
723 iface->get_border_end_color = fo_basic_link_get_border_end_color;
724 iface->get_border_end_style = fo_basic_link_get_border_end_style;
725 iface->get_border_end_width = fo_basic_link_get_border_end_width;
726 iface->get_border_start_color = fo_basic_link_get_border_start_color;
727 iface->get_border_start_style = fo_basic_link_get_border_start_style;
728 iface->get_border_start_width = fo_basic_link_get_border_start_width;
729 iface->get_padding_after = fo_basic_link_get_padding_after;
730 iface->get_padding_before = fo_basic_link_get_padding_before;
731 iface->get_padding_end = fo_basic_link_get_padding_end;
732 iface->get_padding_start = fo_basic_link_get_padding_start;
733 }
734
735 /**
736 * fo_basic_link_finalize:
737 * @object: #FoBasicLink object to finalize.
738 *
739 * Implements #GObjectFinalizeFunc for #FoBasicLink.
740 **/
741 void
fo_basic_link_finalize(GObject * object)742 fo_basic_link_finalize (GObject *object)
743 {
744 FoFo *fo = FO_FO (object);
745
746 /* Release references to all property objects. */
747 fo_basic_link_set_alignment_adjust (fo, NULL);
748 fo_basic_link_set_alignment_baseline (fo, NULL);
749 fo_basic_link_set_background_color (fo, NULL);
750 fo_basic_link_set_background_image (fo, NULL);
751 fo_basic_link_set_baseline_shift (fo, NULL);
752 fo_basic_link_set_border_after_color (fo, NULL);
753 fo_basic_link_set_border_after_style (fo, NULL);
754 fo_basic_link_set_border_after_width (fo, NULL);
755 fo_basic_link_set_border_before_color (fo, NULL);
756 fo_basic_link_set_border_before_style (fo, NULL);
757 fo_basic_link_set_border_before_width (fo, NULL);
758 fo_basic_link_set_border_bottom_color (fo, NULL);
759 fo_basic_link_set_border_bottom_style (fo, NULL);
760 fo_basic_link_set_border_bottom_width (fo, NULL);
761 fo_basic_link_set_border_end_color (fo, NULL);
762 fo_basic_link_set_border_end_style (fo, NULL);
763 fo_basic_link_set_border_end_width (fo, NULL);
764 fo_basic_link_set_border_left_color (fo, NULL);
765 fo_basic_link_set_border_left_style (fo, NULL);
766 fo_basic_link_set_border_left_width (fo, NULL);
767 fo_basic_link_set_border_right_color (fo, NULL);
768 fo_basic_link_set_border_right_style (fo, NULL);
769 fo_basic_link_set_border_right_width (fo, NULL);
770 fo_basic_link_set_border_start_color (fo, NULL);
771 fo_basic_link_set_border_start_style (fo, NULL);
772 fo_basic_link_set_border_start_width (fo, NULL);
773 fo_basic_link_set_border_top_color (fo, NULL);
774 fo_basic_link_set_border_top_style (fo, NULL);
775 fo_basic_link_set_border_top_width (fo, NULL);
776 fo_basic_link_set_dominant_baseline (fo, NULL);
777 fo_basic_link_set_id (fo, NULL);
778 fo_basic_link_set_keep_together (fo, NULL);
779 fo_basic_link_set_keep_together_within_column (fo, NULL);
780 fo_basic_link_set_keep_together_within_line (fo, NULL);
781 fo_basic_link_set_keep_together_within_page (fo, NULL);
782 fo_basic_link_set_keep_with_next (fo, NULL);
783 fo_basic_link_set_keep_with_next_within_column (fo, NULL);
784 fo_basic_link_set_keep_with_next_within_line (fo, NULL);
785 fo_basic_link_set_keep_with_next_within_page (fo, NULL);
786 fo_basic_link_set_keep_with_previous (fo, NULL);
787 fo_basic_link_set_keep_with_previous_within_column (fo, NULL);
788 fo_basic_link_set_keep_with_previous_within_line (fo, NULL);
789 fo_basic_link_set_keep_with_previous_within_page (fo, NULL);
790 fo_basic_link_set_line_height (fo, NULL);
791 fo_basic_link_set_padding_after (fo, NULL);
792 fo_basic_link_set_padding_before (fo, NULL);
793 fo_basic_link_set_padding_bottom (fo, NULL);
794 fo_basic_link_set_padding_end (fo, NULL);
795 fo_basic_link_set_padding_left (fo, NULL);
796 fo_basic_link_set_padding_right (fo, NULL);
797 fo_basic_link_set_padding_start (fo, NULL);
798 fo_basic_link_set_padding_top (fo, NULL);
799 fo_basic_link_set_role (fo, NULL);
800 fo_basic_link_set_source_document (fo, NULL);
801 fo_basic_link_set_space_end (fo, NULL);
802 fo_basic_link_set_space_start (fo, NULL);
803
804 G_OBJECT_CLASS (parent_class)->finalize (object);
805 }
806
807 /**
808 * fo_basic_link_get_property:
809 * @object: #GObject whose property will be retrieved.
810 * @prop_id: Property ID assigned when property registered.
811 * @value: GValue to set with property value.
812 * @pspec: Parameter specification for this property type.
813 *
814 * Implements #GObjectGetPropertyFunc for #FoBasicLink.
815 **/
816 void
fo_basic_link_get_property(GObject * object,guint prop_id,GValue * value,GParamSpec * pspec)817 fo_basic_link_get_property (GObject *object,
818 guint prop_id,
819 GValue *value,
820 GParamSpec *pspec)
821 {
822 FoFo *fo_fo;
823
824 fo_fo = FO_FO (object);
825
826 switch (prop_id)
827 {
828 case PROP_ALIGNMENT_ADJUST:
829 g_value_set_object (value, G_OBJECT (fo_basic_link_get_alignment_adjust (fo_fo)));
830 break;
831 case PROP_ALIGNMENT_BASELINE:
832 g_value_set_object (value, G_OBJECT (fo_basic_link_get_alignment_baseline (fo_fo)));
833 break;
834 case PROP_BACKGROUND_COLOR:
835 g_value_set_object (value, G_OBJECT (fo_basic_link_get_background_color (fo_fo)));
836 break;
837 case PROP_BACKGROUND_IMAGE:
838 g_value_set_object (value, G_OBJECT (fo_basic_link_get_background_image (fo_fo)));
839 break;
840 case PROP_BASELINE_SHIFT:
841 g_value_set_object (value, G_OBJECT (fo_basic_link_get_baseline_shift (fo_fo)));
842 break;
843 case PROP_BORDER_AFTER_COLOR:
844 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_after_color (fo_fo)));
845 break;
846 case PROP_BORDER_AFTER_STYLE:
847 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_after_style (fo_fo)));
848 break;
849 case PROP_BORDER_AFTER_WIDTH:
850 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_after_width (fo_fo)));
851 break;
852 case PROP_BORDER_BEFORE_COLOR:
853 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_before_color (fo_fo)));
854 break;
855 case PROP_BORDER_BEFORE_STYLE:
856 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_before_style (fo_fo)));
857 break;
858 case PROP_BORDER_BEFORE_WIDTH:
859 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_before_width (fo_fo)));
860 break;
861 case PROP_BORDER_BOTTOM_COLOR:
862 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_bottom_color (fo_fo)));
863 break;
864 case PROP_BORDER_BOTTOM_STYLE:
865 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_bottom_style (fo_fo)));
866 break;
867 case PROP_BORDER_BOTTOM_WIDTH:
868 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_bottom_width (fo_fo)));
869 break;
870 case PROP_BORDER_END_COLOR:
871 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_end_color (fo_fo)));
872 break;
873 case PROP_BORDER_END_STYLE:
874 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_end_style (fo_fo)));
875 break;
876 case PROP_BORDER_END_WIDTH:
877 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_end_width (fo_fo)));
878 break;
879 case PROP_BORDER_LEFT_COLOR:
880 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_left_color (fo_fo)));
881 break;
882 case PROP_BORDER_LEFT_STYLE:
883 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_left_style (fo_fo)));
884 break;
885 case PROP_BORDER_LEFT_WIDTH:
886 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_left_width (fo_fo)));
887 break;
888 case PROP_BORDER_RIGHT_COLOR:
889 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_right_color (fo_fo)));
890 break;
891 case PROP_BORDER_RIGHT_STYLE:
892 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_right_style (fo_fo)));
893 break;
894 case PROP_BORDER_RIGHT_WIDTH:
895 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_right_width (fo_fo)));
896 break;
897 case PROP_BORDER_START_COLOR:
898 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_start_color (fo_fo)));
899 break;
900 case PROP_BORDER_START_STYLE:
901 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_start_style (fo_fo)));
902 break;
903 case PROP_BORDER_START_WIDTH:
904 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_start_width (fo_fo)));
905 break;
906 case PROP_BORDER_TOP_COLOR:
907 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_top_color (fo_fo)));
908 break;
909 case PROP_BORDER_TOP_STYLE:
910 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_top_style (fo_fo)));
911 break;
912 case PROP_BORDER_TOP_WIDTH:
913 g_value_set_object (value, G_OBJECT (fo_basic_link_get_border_top_width (fo_fo)));
914 break;
915 case PROP_DOMINANT_BASELINE:
916 g_value_set_object (value, G_OBJECT (fo_basic_link_get_dominant_baseline (fo_fo)));
917 break;
918 case PROP_ID:
919 g_value_set_object (value, G_OBJECT (fo_basic_link_get_id (fo_fo)));
920 break;
921 case PROP_KEEP_TOGETHER:
922 g_value_set_object (value, G_OBJECT (fo_basic_link_get_keep_together (fo_fo)));
923 break;
924 case PROP_KEEP_TOGETHER_WITHIN_COLUMN:
925 g_value_set_object (value, G_OBJECT (fo_basic_link_get_keep_together_within_column (fo_fo)));
926 break;
927 case PROP_KEEP_TOGETHER_WITHIN_LINE:
928 g_value_set_object (value, G_OBJECT (fo_basic_link_get_keep_together_within_line (fo_fo)));
929 break;
930 case PROP_KEEP_TOGETHER_WITHIN_PAGE:
931 g_value_set_object (value, G_OBJECT (fo_basic_link_get_keep_together_within_page (fo_fo)));
932 break;
933 case PROP_KEEP_WITH_NEXT:
934 g_value_set_object (value, G_OBJECT (fo_basic_link_get_keep_with_next (fo_fo)));
935 break;
936 case PROP_KEEP_WITH_NEXT_WITHIN_COLUMN:
937 g_value_set_object (value, G_OBJECT (fo_basic_link_get_keep_with_next_within_column (fo_fo)));
938 break;
939 case PROP_KEEP_WITH_NEXT_WITHIN_LINE:
940 g_value_set_object (value, G_OBJECT (fo_basic_link_get_keep_with_next_within_line (fo_fo)));
941 break;
942 case PROP_KEEP_WITH_NEXT_WITHIN_PAGE:
943 g_value_set_object (value, G_OBJECT (fo_basic_link_get_keep_with_next_within_page (fo_fo)));
944 break;
945 case PROP_KEEP_WITH_PREVIOUS:
946 g_value_set_object (value, G_OBJECT (fo_basic_link_get_keep_with_previous (fo_fo)));
947 break;
948 case PROP_KEEP_WITH_PREVIOUS_WITHIN_COLUMN:
949 g_value_set_object (value, G_OBJECT (fo_basic_link_get_keep_with_previous_within_column (fo_fo)));
950 break;
951 case PROP_KEEP_WITH_PREVIOUS_WITHIN_LINE:
952 g_value_set_object (value, G_OBJECT (fo_basic_link_get_keep_with_previous_within_line (fo_fo)));
953 break;
954 case PROP_KEEP_WITH_PREVIOUS_WITHIN_PAGE:
955 g_value_set_object (value, G_OBJECT (fo_basic_link_get_keep_with_previous_within_page (fo_fo)));
956 break;
957 case PROP_LINE_HEIGHT:
958 g_value_set_object (value, G_OBJECT (fo_basic_link_get_line_height (fo_fo)));
959 break;
960 case PROP_PADDING_AFTER:
961 g_value_set_object (value, G_OBJECT (fo_basic_link_get_padding_after (fo_fo)));
962 break;
963 case PROP_PADDING_BEFORE:
964 g_value_set_object (value, G_OBJECT (fo_basic_link_get_padding_before (fo_fo)));
965 break;
966 case PROP_PADDING_BOTTOM:
967 g_value_set_object (value, G_OBJECT (fo_basic_link_get_padding_bottom (fo_fo)));
968 break;
969 case PROP_PADDING_END:
970 g_value_set_object (value, G_OBJECT (fo_basic_link_get_padding_end (fo_fo)));
971 break;
972 case PROP_PADDING_LEFT:
973 g_value_set_object (value, G_OBJECT (fo_basic_link_get_padding_left (fo_fo)));
974 break;
975 case PROP_PADDING_RIGHT:
976 g_value_set_object (value, G_OBJECT (fo_basic_link_get_padding_right (fo_fo)));
977 break;
978 case PROP_PADDING_START:
979 g_value_set_object (value, G_OBJECT (fo_basic_link_get_padding_start (fo_fo)));
980 break;
981 case PROP_PADDING_TOP:
982 g_value_set_object (value, G_OBJECT (fo_basic_link_get_padding_top (fo_fo)));
983 break;
984 case PROP_ROLE:
985 g_value_set_object (value, G_OBJECT (fo_basic_link_get_role (fo_fo)));
986 break;
987 case PROP_SOURCE_DOCUMENT:
988 g_value_set_object (value, G_OBJECT (fo_basic_link_get_source_document (fo_fo)));
989 break;
990 case PROP_SPACE_END:
991 g_value_set_object (value, G_OBJECT (fo_basic_link_get_space_end (fo_fo)));
992 break;
993 case PROP_SPACE_START:
994 g_value_set_object (value, G_OBJECT (fo_basic_link_get_space_start (fo_fo)));
995 break;
996 default:
997 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
998 break;
999 }
1000 }
1001
1002 /**
1003 * fo_basic_link_set_property:
1004 * @object: #GObject whose property will be set.
1005 * @prop_id: Property ID assigned when property registered.
1006 * @value: New value for property.
1007 * @pspec: Parameter specification for this property type.
1008 *
1009 * Implements #GObjectSetPropertyFunc for #FoBasicLink.
1010 **/
1011 void
fo_basic_link_set_property(GObject * object,guint prop_id,const GValue * value,GParamSpec * pspec)1012 fo_basic_link_set_property (GObject *object,
1013 guint prop_id,
1014 const GValue *value,
1015 GParamSpec *pspec)
1016 {
1017 FoFo *fo_fo;
1018
1019 fo_fo = FO_FO (object);
1020
1021 switch (prop_id)
1022 {
1023 case PROP_ALIGNMENT_ADJUST:
1024 fo_basic_link_set_alignment_adjust (fo_fo, g_value_get_object (value));
1025 break;
1026 case PROP_ALIGNMENT_BASELINE:
1027 fo_basic_link_set_alignment_baseline (fo_fo, g_value_get_object (value));
1028 break;
1029 case PROP_BACKGROUND_COLOR:
1030 fo_basic_link_set_background_color (fo_fo, g_value_get_object (value));
1031 break;
1032 case PROP_BACKGROUND_IMAGE:
1033 fo_basic_link_set_background_image (fo_fo, g_value_get_object (value));
1034 break;
1035 case PROP_BASELINE_SHIFT:
1036 fo_basic_link_set_baseline_shift (fo_fo, g_value_get_object (value));
1037 break;
1038 case PROP_BORDER_AFTER_COLOR:
1039 fo_basic_link_set_border_after_color (fo_fo, g_value_get_object (value));
1040 break;
1041 case PROP_BORDER_AFTER_STYLE:
1042 fo_basic_link_set_border_after_style (fo_fo, g_value_get_object (value));
1043 break;
1044 case PROP_BORDER_AFTER_WIDTH:
1045 fo_basic_link_set_border_after_width (fo_fo, g_value_get_object (value));
1046 break;
1047 case PROP_BORDER_BEFORE_COLOR:
1048 fo_basic_link_set_border_before_color (fo_fo, g_value_get_object (value));
1049 break;
1050 case PROP_BORDER_BEFORE_STYLE:
1051 fo_basic_link_set_border_before_style (fo_fo, g_value_get_object (value));
1052 break;
1053 case PROP_BORDER_BEFORE_WIDTH:
1054 fo_basic_link_set_border_before_width (fo_fo, g_value_get_object (value));
1055 break;
1056 case PROP_BORDER_BOTTOM_COLOR:
1057 fo_basic_link_set_border_bottom_color (fo_fo, g_value_get_object (value));
1058 break;
1059 case PROP_BORDER_BOTTOM_STYLE:
1060 fo_basic_link_set_border_bottom_style (fo_fo, g_value_get_object (value));
1061 break;
1062 case PROP_BORDER_BOTTOM_WIDTH:
1063 fo_basic_link_set_border_bottom_width (fo_fo, g_value_get_object (value));
1064 break;
1065 case PROP_BORDER_END_COLOR:
1066 fo_basic_link_set_border_end_color (fo_fo, g_value_get_object (value));
1067 break;
1068 case PROP_BORDER_END_STYLE:
1069 fo_basic_link_set_border_end_style (fo_fo, g_value_get_object (value));
1070 break;
1071 case PROP_BORDER_END_WIDTH:
1072 fo_basic_link_set_border_end_width (fo_fo, g_value_get_object (value));
1073 break;
1074 case PROP_BORDER_LEFT_COLOR:
1075 fo_basic_link_set_border_left_color (fo_fo, g_value_get_object (value));
1076 break;
1077 case PROP_BORDER_LEFT_STYLE:
1078 fo_basic_link_set_border_left_style (fo_fo, g_value_get_object (value));
1079 break;
1080 case PROP_BORDER_LEFT_WIDTH:
1081 fo_basic_link_set_border_left_width (fo_fo, g_value_get_object (value));
1082 break;
1083 case PROP_BORDER_RIGHT_COLOR:
1084 fo_basic_link_set_border_right_color (fo_fo, g_value_get_object (value));
1085 break;
1086 case PROP_BORDER_RIGHT_STYLE:
1087 fo_basic_link_set_border_right_style (fo_fo, g_value_get_object (value));
1088 break;
1089 case PROP_BORDER_RIGHT_WIDTH:
1090 fo_basic_link_set_border_right_width (fo_fo, g_value_get_object (value));
1091 break;
1092 case PROP_BORDER_START_COLOR:
1093 fo_basic_link_set_border_start_color (fo_fo, g_value_get_object (value));
1094 break;
1095 case PROP_BORDER_START_STYLE:
1096 fo_basic_link_set_border_start_style (fo_fo, g_value_get_object (value));
1097 break;
1098 case PROP_BORDER_START_WIDTH:
1099 fo_basic_link_set_border_start_width (fo_fo, g_value_get_object (value));
1100 break;
1101 case PROP_BORDER_TOP_COLOR:
1102 fo_basic_link_set_border_top_color (fo_fo, g_value_get_object (value));
1103 break;
1104 case PROP_BORDER_TOP_STYLE:
1105 fo_basic_link_set_border_top_style (fo_fo, g_value_get_object (value));
1106 break;
1107 case PROP_BORDER_TOP_WIDTH:
1108 fo_basic_link_set_border_top_width (fo_fo, g_value_get_object (value));
1109 break;
1110 case PROP_DOMINANT_BASELINE:
1111 fo_basic_link_set_dominant_baseline (fo_fo, g_value_get_object (value));
1112 break;
1113 case PROP_ID:
1114 fo_basic_link_set_id (fo_fo, g_value_get_object (value));
1115 break;
1116 case PROP_KEEP_TOGETHER:
1117 fo_basic_link_set_keep_together (fo_fo, g_value_get_object (value));
1118 break;
1119 case PROP_KEEP_TOGETHER_WITHIN_COLUMN:
1120 fo_basic_link_set_keep_together_within_column (fo_fo, g_value_get_object (value));
1121 break;
1122 case PROP_KEEP_TOGETHER_WITHIN_LINE:
1123 fo_basic_link_set_keep_together_within_line (fo_fo, g_value_get_object (value));
1124 break;
1125 case PROP_KEEP_TOGETHER_WITHIN_PAGE:
1126 fo_basic_link_set_keep_together_within_page (fo_fo, g_value_get_object (value));
1127 break;
1128 case PROP_KEEP_WITH_NEXT:
1129 fo_basic_link_set_keep_with_next (fo_fo, g_value_get_object (value));
1130 break;
1131 case PROP_KEEP_WITH_NEXT_WITHIN_COLUMN:
1132 fo_basic_link_set_keep_with_next_within_column (fo_fo, g_value_get_object (value));
1133 break;
1134 case PROP_KEEP_WITH_NEXT_WITHIN_LINE:
1135 fo_basic_link_set_keep_with_next_within_line (fo_fo, g_value_get_object (value));
1136 break;
1137 case PROP_KEEP_WITH_NEXT_WITHIN_PAGE:
1138 fo_basic_link_set_keep_with_next_within_page (fo_fo, g_value_get_object (value));
1139 break;
1140 case PROP_KEEP_WITH_PREVIOUS:
1141 fo_basic_link_set_keep_with_previous (fo_fo, g_value_get_object (value));
1142 break;
1143 case PROP_KEEP_WITH_PREVIOUS_WITHIN_COLUMN:
1144 fo_basic_link_set_keep_with_previous_within_column (fo_fo, g_value_get_object (value));
1145 break;
1146 case PROP_KEEP_WITH_PREVIOUS_WITHIN_LINE:
1147 fo_basic_link_set_keep_with_previous_within_line (fo_fo, g_value_get_object (value));
1148 break;
1149 case PROP_KEEP_WITH_PREVIOUS_WITHIN_PAGE:
1150 fo_basic_link_set_keep_with_previous_within_page (fo_fo, g_value_get_object (value));
1151 break;
1152 case PROP_LINE_HEIGHT:
1153 fo_basic_link_set_line_height (fo_fo, g_value_get_object (value));
1154 break;
1155 case PROP_PADDING_AFTER:
1156 fo_basic_link_set_padding_after (fo_fo, g_value_get_object (value));
1157 break;
1158 case PROP_PADDING_BEFORE:
1159 fo_basic_link_set_padding_before (fo_fo, g_value_get_object (value));
1160 break;
1161 case PROP_PADDING_BOTTOM:
1162 fo_basic_link_set_padding_bottom (fo_fo, g_value_get_object (value));
1163 break;
1164 case PROP_PADDING_END:
1165 fo_basic_link_set_padding_end (fo_fo, g_value_get_object (value));
1166 break;
1167 case PROP_PADDING_LEFT:
1168 fo_basic_link_set_padding_left (fo_fo, g_value_get_object (value));
1169 break;
1170 case PROP_PADDING_RIGHT:
1171 fo_basic_link_set_padding_right (fo_fo, g_value_get_object (value));
1172 break;
1173 case PROP_PADDING_START:
1174 fo_basic_link_set_padding_start (fo_fo, g_value_get_object (value));
1175 break;
1176 case PROP_PADDING_TOP:
1177 fo_basic_link_set_padding_top (fo_fo, g_value_get_object (value));
1178 break;
1179 case PROP_ROLE:
1180 fo_basic_link_set_role (fo_fo, g_value_get_object (value));
1181 break;
1182 case PROP_SOURCE_DOCUMENT:
1183 fo_basic_link_set_source_document (fo_fo, g_value_get_object (value));
1184 break;
1185 case PROP_SPACE_END:
1186 fo_basic_link_set_space_end (fo_fo, g_value_get_object (value));
1187 break;
1188 case PROP_SPACE_START:
1189 fo_basic_link_set_space_start (fo_fo, g_value_get_object (value));
1190 break;
1191 default:
1192 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1193 break;
1194 }
1195 }
1196
1197 /**
1198 * fo_basic_link_new:
1199 *
1200 * Creates a new #FoBasicLink initialized to default value.
1201 *
1202 * Return value: the new #FoBasicLink.
1203 **/
1204 FoFo*
fo_basic_link_new(void)1205 fo_basic_link_new (void)
1206 {
1207 return FO_FO (g_object_new (fo_basic_link_get_type (),
1208 NULL));
1209 }
1210
1211 /**
1212 * fo_basic_link_validate_content:
1213 * @fo: #FoBasicLink object to validate.
1214 * @error: #GError indicating error condition, if any.
1215 *
1216 * Validate the content model, i.e., the structure, of the object.
1217 * Return value matches #GNodeTraverseFunc model: %FALSE indicates
1218 * content model is correct, or %TRUE indicates an error. When used
1219 * with fo_node_traverse(), returning %TRUE stops the traversal.
1220 *
1221 * Return value: %FALSE if content model okay, %TRUE if not.
1222 **/
1223 gboolean
fo_basic_link_validate_content(FoFo * fo,GError ** error)1224 fo_basic_link_validate_content (FoFo *fo,
1225 GError **error)
1226 {
1227 /*GError *tmp_error = NULL;*/
1228
1229 g_return_val_if_fail (fo != NULL, TRUE);
1230 g_return_val_if_fail (FO_IS_BASIC_LINK (fo), TRUE);
1231 g_return_val_if_fail (error == NULL || *error == NULL, TRUE);
1232
1233 return FALSE;
1234
1235 /*
1236 error:
1237 tmp_error = g_error_new (FO_FO_ERROR,
1238 FO_FO_ERROR_INVALID_CONTENT,
1239 _(fo_fo_error_messages[FO_FO_ERROR_INVALID_CONTENT]),
1240 fo_object_sprintf (fo));
1241
1242 return fo_object_log_or_propagate_error (FO_OBJECT (fo),
1243 error,
1244 tmp_error);
1245 */
1246 }
1247
1248 /**
1249 * fo_basic_link_validate:
1250 * @fo: #FoBasicLink object to validate.
1251 * @current_context: #FoContext associated with current object.
1252 * @parent_context: #FoContext associated with parent FO.
1253 * @error: Information about any error that has occurred.
1254 *
1255 * Validate and possibly update interrelated property values in
1256 * @current_context, then update @fo property values. Set @error if
1257 * an error occurred.
1258 **/
1259 void
fo_basic_link_validate(FoFo * fo,FoContext * current_context,FoContext * parent_context,GError ** error)1260 fo_basic_link_validate (FoFo *fo,
1261 FoContext *current_context,
1262 FoContext *parent_context,
1263 GError **error)
1264 {
1265 g_return_if_fail (fo != NULL);
1266 g_return_if_fail (FO_IS_BASIC_LINK (fo));
1267 g_return_if_fail (FO_IS_CONTEXT (current_context));
1268 g_return_if_fail (FO_IS_CONTEXT (parent_context));
1269 g_return_if_fail (error == NULL || *error == NULL);
1270
1271 FoBasicLink *fo_basic_link = FO_BASIC_LINK (fo);
1272
1273 fo_context_util_dominant_baseline_resolve (current_context, parent_context);
1274 fo_context_merge (current_context, parent_context);
1275 fo_fo_update_from_context (fo, current_context);
1276 fo_basic_link_set_line_height (fo,
1277 fo_property_line_height_resolve (fo_basic_link->line_height,
1278 fo_context_get_font_size (fo->context)));
1279 }
1280
1281 /**
1282 * fo_basic_link_update_from_context:
1283 * @fo: The #FoFo object.
1284 * @context: The #FoContext object from which to update the properties of @fo.
1285 *
1286 * Sets the properties of @fo to the corresponding property values in @context.
1287 **/
1288 void
fo_basic_link_update_from_context(FoFo * fo,FoContext * context)1289 fo_basic_link_update_from_context (FoFo *fo,
1290 FoContext *context)
1291 {
1292 g_return_if_fail (fo != NULL);
1293 g_return_if_fail (FO_IS_BASIC_LINK (fo));
1294 g_return_if_fail (context != NULL);
1295 g_return_if_fail (FO_IS_CONTEXT (context));
1296
1297 fo_basic_link_set_alignment_adjust (fo,
1298 fo_context_get_alignment_adjust (context));
1299 fo_basic_link_set_alignment_baseline (fo,
1300 fo_context_get_alignment_baseline (context));
1301 fo_basic_link_set_background_color (fo,
1302 fo_context_get_background_color (context));
1303 fo_basic_link_set_background_image (fo,
1304 fo_context_get_background_image (context));
1305 fo_basic_link_set_baseline_shift (fo,
1306 fo_context_get_baseline_shift (context));
1307 fo_basic_link_set_border_after_color (fo,
1308 fo_context_get_border_after_color (context));
1309 fo_basic_link_set_border_after_style (fo,
1310 fo_context_get_border_after_style (context));
1311 fo_basic_link_set_border_after_width (fo,
1312 fo_context_get_border_after_width (context));
1313 fo_basic_link_set_border_before_color (fo,
1314 fo_context_get_border_before_color (context));
1315 fo_basic_link_set_border_before_style (fo,
1316 fo_context_get_border_before_style (context));
1317 fo_basic_link_set_border_before_width (fo,
1318 fo_context_get_border_before_width (context));
1319 fo_basic_link_set_border_bottom_color (fo,
1320 fo_context_get_border_bottom_color (context));
1321 fo_basic_link_set_border_bottom_style (fo,
1322 fo_context_get_border_bottom_style (context));
1323 fo_basic_link_set_border_bottom_width (fo,
1324 fo_context_get_border_bottom_width (context));
1325 fo_basic_link_set_border_end_color (fo,
1326 fo_context_get_border_end_color (context));
1327 fo_basic_link_set_border_end_style (fo,
1328 fo_context_get_border_end_style (context));
1329 fo_basic_link_set_border_end_width (fo,
1330 fo_context_get_border_end_width (context));
1331 fo_basic_link_set_border_left_color (fo,
1332 fo_context_get_border_left_color (context));
1333 fo_basic_link_set_border_left_style (fo,
1334 fo_context_get_border_left_style (context));
1335 fo_basic_link_set_border_left_width (fo,
1336 fo_context_get_border_left_width (context));
1337 fo_basic_link_set_border_right_color (fo,
1338 fo_context_get_border_right_color (context));
1339 fo_basic_link_set_border_right_style (fo,
1340 fo_context_get_border_right_style (context));
1341 fo_basic_link_set_border_right_width (fo,
1342 fo_context_get_border_right_width (context));
1343 fo_basic_link_set_border_start_color (fo,
1344 fo_context_get_border_start_color (context));
1345 fo_basic_link_set_border_start_style (fo,
1346 fo_context_get_border_start_style (context));
1347 fo_basic_link_set_border_start_width (fo,
1348 fo_context_get_border_start_width (context));
1349 fo_basic_link_set_border_top_color (fo,
1350 fo_context_get_border_top_color (context));
1351 fo_basic_link_set_border_top_style (fo,
1352 fo_context_get_border_top_style (context));
1353 fo_basic_link_set_border_top_width (fo,
1354 fo_context_get_border_top_width (context));
1355 fo_basic_link_set_dominant_baseline (fo,
1356 fo_context_get_dominant_baseline (context));
1357 fo_basic_link_set_id (fo,
1358 fo_context_get_id (context));
1359 fo_basic_link_set_keep_together (fo,
1360 fo_context_get_keep_together (context));
1361 fo_basic_link_set_keep_together_within_column (fo,
1362 fo_context_get_keep_together_within_column (context));
1363 fo_basic_link_set_keep_together_within_line (fo,
1364 fo_context_get_keep_together_within_line (context));
1365 fo_basic_link_set_keep_together_within_page (fo,
1366 fo_context_get_keep_together_within_page (context));
1367 fo_basic_link_set_keep_with_next (fo,
1368 fo_context_get_keep_with_next (context));
1369 fo_basic_link_set_keep_with_next_within_column (fo,
1370 fo_context_get_keep_with_next_within_column (context));
1371 fo_basic_link_set_keep_with_next_within_line (fo,
1372 fo_context_get_keep_with_next_within_line (context));
1373 fo_basic_link_set_keep_with_next_within_page (fo,
1374 fo_context_get_keep_with_next_within_page (context));
1375 fo_basic_link_set_keep_with_previous (fo,
1376 fo_context_get_keep_with_previous (context));
1377 fo_basic_link_set_keep_with_previous_within_column (fo,
1378 fo_context_get_keep_with_previous_within_column (context));
1379 fo_basic_link_set_keep_with_previous_within_line (fo,
1380 fo_context_get_keep_with_previous_within_line (context));
1381 fo_basic_link_set_keep_with_previous_within_page (fo,
1382 fo_context_get_keep_with_previous_within_page (context));
1383 fo_basic_link_set_line_height (fo,
1384 fo_context_get_line_height (context));
1385 fo_basic_link_set_padding_after (fo,
1386 fo_context_get_padding_after (context));
1387 fo_basic_link_set_padding_before (fo,
1388 fo_context_get_padding_before (context));
1389 fo_basic_link_set_padding_bottom (fo,
1390 fo_context_get_padding_bottom (context));
1391 fo_basic_link_set_padding_end (fo,
1392 fo_context_get_padding_end (context));
1393 fo_basic_link_set_padding_left (fo,
1394 fo_context_get_padding_left (context));
1395 fo_basic_link_set_padding_right (fo,
1396 fo_context_get_padding_right (context));
1397 fo_basic_link_set_padding_start (fo,
1398 fo_context_get_padding_start (context));
1399 fo_basic_link_set_padding_top (fo,
1400 fo_context_get_padding_top (context));
1401 fo_basic_link_set_role (fo,
1402 fo_context_get_role (context));
1403 fo_basic_link_set_source_document (fo,
1404 fo_context_get_source_document (context));
1405 fo_basic_link_set_space_end (fo,
1406 fo_context_get_space_end (context));
1407 fo_basic_link_set_space_start (fo,
1408 fo_context_get_space_start (context));
1409 }
1410
1411 /**
1412 * fo_basic_link_debug_dump_properties:
1413 * @fo: The #FoFo object.
1414 * @depth: Indent level to add to the output.
1415 *
1416 * Calls #fo_object_debug_dump on each property of @fo then calls
1417 * debug_dump_properties method of parent class.
1418 **/
1419 void
fo_basic_link_debug_dump_properties(FoFo * fo,gint depth)1420 fo_basic_link_debug_dump_properties (FoFo *fo,
1421 gint depth)
1422 {
1423 FoBasicLink *fo_basic_link;
1424
1425 g_return_if_fail (fo != NULL);
1426 g_return_if_fail (FO_IS_BASIC_LINK (fo));
1427
1428 fo_basic_link = FO_BASIC_LINK (fo);
1429
1430 fo_object_debug_dump (fo_basic_link->alignment_adjust, depth);
1431 fo_object_debug_dump (fo_basic_link->alignment_baseline, depth);
1432 fo_object_debug_dump (fo_basic_link->background_color, depth);
1433 fo_object_debug_dump (fo_basic_link->background_image, depth);
1434 fo_object_debug_dump (fo_basic_link->baseline_shift, depth);
1435 fo_object_debug_dump (fo_basic_link->border_after_color, depth);
1436 fo_object_debug_dump (fo_basic_link->border_after_style, depth);
1437 fo_object_debug_dump (fo_basic_link->border_after_width, depth);
1438 fo_object_debug_dump (fo_basic_link->border_before_color, depth);
1439 fo_object_debug_dump (fo_basic_link->border_before_style, depth);
1440 fo_object_debug_dump (fo_basic_link->border_before_width, depth);
1441 fo_object_debug_dump (fo_basic_link->border_bottom_color, depth);
1442 fo_object_debug_dump (fo_basic_link->border_bottom_style, depth);
1443 fo_object_debug_dump (fo_basic_link->border_bottom_width, depth);
1444 fo_object_debug_dump (fo_basic_link->border_end_color, depth);
1445 fo_object_debug_dump (fo_basic_link->border_end_style, depth);
1446 fo_object_debug_dump (fo_basic_link->border_end_width, depth);
1447 fo_object_debug_dump (fo_basic_link->border_left_color, depth);
1448 fo_object_debug_dump (fo_basic_link->border_left_style, depth);
1449 fo_object_debug_dump (fo_basic_link->border_left_width, depth);
1450 fo_object_debug_dump (fo_basic_link->border_right_color, depth);
1451 fo_object_debug_dump (fo_basic_link->border_right_style, depth);
1452 fo_object_debug_dump (fo_basic_link->border_right_width, depth);
1453 fo_object_debug_dump (fo_basic_link->border_start_color, depth);
1454 fo_object_debug_dump (fo_basic_link->border_start_style, depth);
1455 fo_object_debug_dump (fo_basic_link->border_start_width, depth);
1456 fo_object_debug_dump (fo_basic_link->border_top_color, depth);
1457 fo_object_debug_dump (fo_basic_link->border_top_style, depth);
1458 fo_object_debug_dump (fo_basic_link->border_top_width, depth);
1459 fo_object_debug_dump (fo_basic_link->dominant_baseline, depth);
1460 fo_object_debug_dump (fo_basic_link->id, depth);
1461 fo_object_debug_dump (fo_basic_link->keep_together, depth);
1462 fo_object_debug_dump (fo_basic_link->keep_together_within_column, depth);
1463 fo_object_debug_dump (fo_basic_link->keep_together_within_line, depth);
1464 fo_object_debug_dump (fo_basic_link->keep_together_within_page, depth);
1465 fo_object_debug_dump (fo_basic_link->keep_with_next, depth);
1466 fo_object_debug_dump (fo_basic_link->keep_with_next_within_column, depth);
1467 fo_object_debug_dump (fo_basic_link->keep_with_next_within_line, depth);
1468 fo_object_debug_dump (fo_basic_link->keep_with_next_within_page, depth);
1469 fo_object_debug_dump (fo_basic_link->keep_with_previous, depth);
1470 fo_object_debug_dump (fo_basic_link->keep_with_previous_within_column, depth);
1471 fo_object_debug_dump (fo_basic_link->keep_with_previous_within_line, depth);
1472 fo_object_debug_dump (fo_basic_link->keep_with_previous_within_page, depth);
1473 fo_object_debug_dump (fo_basic_link->line_height, depth);
1474 fo_object_debug_dump (fo_basic_link->padding_after, depth);
1475 fo_object_debug_dump (fo_basic_link->padding_before, depth);
1476 fo_object_debug_dump (fo_basic_link->padding_bottom, depth);
1477 fo_object_debug_dump (fo_basic_link->padding_end, depth);
1478 fo_object_debug_dump (fo_basic_link->padding_left, depth);
1479 fo_object_debug_dump (fo_basic_link->padding_right, depth);
1480 fo_object_debug_dump (fo_basic_link->padding_start, depth);
1481 fo_object_debug_dump (fo_basic_link->padding_top, depth);
1482 fo_object_debug_dump (fo_basic_link->role, depth);
1483 fo_object_debug_dump (fo_basic_link->source_document, depth);
1484 fo_object_debug_dump (fo_basic_link->space_end, depth);
1485 fo_object_debug_dump (fo_basic_link->space_start, depth);
1486
1487 FO_FO_CLASS (parent_class)->debug_dump_properties (fo, depth + 1);
1488 }
1489
1490 /**
1491 * fo_basic_link_get_text_attr_list:
1492 * @fo_inline_fo: The #FoInlineFo object.
1493 * @fo_doc: The #FoDoc that will render @fo_inline_fo.
1494 * @text: The text of the inline FO.
1495 * @attr_glist: The list of #PangoAttribute for the inline FO.
1496 * @debug_level: Debug level.
1497 *
1498 * Gets the text of the inline FO and its associated list of #PangoAttribute.
1499 **/
1500 void
fo_basic_link_get_text_attr_list(FoFo * fo_inline_fo,FoDoc * fo_doc,GString * text,GList ** attr_glist,guint debug_level)1501 fo_basic_link_get_text_attr_list (FoFo *fo_inline_fo,
1502 FoDoc *fo_doc,
1503 GString *text,
1504 GList **attr_glist,
1505 guint debug_level)
1506 {
1507 FoNode *fo_child_node;
1508 FoBasicLink *fo_basic_link;
1509 GList *my_attr_glist = NULL;
1510 gint start_index, end_index;
1511
1512 g_return_if_fail (fo_inline_fo != NULL);
1513 g_return_if_fail (FO_IS_BASIC_LINK (fo_inline_fo));
1514
1515 fo_basic_link = FO_BASIC_LINK (fo_inline_fo);
1516
1517 start_index = text->len;
1518
1519 fo_child_node = fo_node_first_child (FO_NODE (fo_inline_fo));
1520
1521 while (fo_child_node)
1522 {
1523 fo_inline_fo_get_text_attr_list (FO_FO (fo_child_node),
1524 fo_doc,
1525 text,
1526 &my_attr_glist,
1527 debug_level);
1528 fo_child_node = fo_node_next_sibling (fo_child_node);
1529 }
1530
1531 end_index = text->len;
1532
1533 if (start_index != end_index)
1534 {
1535 /* FIXME: what is supposed to happen here? */
1536
1537 PangoAttribute *pango_attr G_GNUC_UNUSED;
1538
1539 }
1540
1541 *attr_glist = g_list_concat (my_attr_glist,
1542 *attr_glist);
1543 }
1544
1545 /*
1546 * These get/set functions are completely auto-generated.
1547 */
1548
1549 /**
1550 * fo_basic_link_get_alignment_adjust:
1551 * @fo_fo: The #FoFo object.
1552 *
1553 * Gets the "alignment-adjust" property of @fo_fo.
1554 *
1555 * Return value: The "alignment-adjust" property value.
1556 **/
1557 FoProperty *
fo_basic_link_get_alignment_adjust(FoFo * fo_fo)1558 fo_basic_link_get_alignment_adjust (FoFo *fo_fo)
1559 {
1560 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1561
1562 g_return_val_if_fail (fo_basic_link != NULL, NULL);
1563 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
1564
1565 return fo_basic_link->alignment_adjust;
1566 }
1567
1568 /**
1569 * fo_basic_link_set_alignment_adjust:
1570 * @fo_fo: The #FoFo object.
1571 * @new_alignment_adjust: The new "alignment-adjust" property value.
1572 *
1573 * Sets the "alignment-adjust" property of @fo_fo to @new_alignment_adjust.
1574 **/
1575 void
fo_basic_link_set_alignment_adjust(FoFo * fo_fo,FoProperty * new_alignment_adjust)1576 fo_basic_link_set_alignment_adjust (FoFo *fo_fo,
1577 FoProperty *new_alignment_adjust)
1578 {
1579 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1580
1581 g_return_if_fail (fo_basic_link != NULL);
1582 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
1583 g_return_if_fail ((new_alignment_adjust == NULL) ||
1584 FO_IS_PROPERTY_ALIGNMENT_ADJUST (new_alignment_adjust));
1585
1586 if (new_alignment_adjust != NULL)
1587 {
1588 g_object_ref (new_alignment_adjust);
1589 }
1590 if (fo_basic_link->alignment_adjust != NULL)
1591 {
1592 g_object_unref (fo_basic_link->alignment_adjust);
1593 }
1594 fo_basic_link->alignment_adjust = new_alignment_adjust;
1595 /*g_object_notify (G_OBJECT (fo_basic_link), "alignment-adjust");*/
1596 }
1597
1598 /**
1599 * fo_basic_link_get_alignment_baseline:
1600 * @fo_fo: The #FoFo object.
1601 *
1602 * Gets the "alignment-baseline" property of @fo_fo.
1603 *
1604 * Return value: The "alignment-baseline" property value.
1605 **/
1606 FoProperty *
fo_basic_link_get_alignment_baseline(FoFo * fo_fo)1607 fo_basic_link_get_alignment_baseline (FoFo *fo_fo)
1608 {
1609 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1610
1611 g_return_val_if_fail (fo_basic_link != NULL, NULL);
1612 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
1613
1614 return fo_basic_link->alignment_baseline;
1615 }
1616
1617 /**
1618 * fo_basic_link_set_alignment_baseline:
1619 * @fo_fo: The #FoFo object.
1620 * @new_alignment_baseline: The new "alignment-baseline" property value.
1621 *
1622 * Sets the "alignment-baseline" property of @fo_fo to @new_alignment_baseline.
1623 **/
1624 void
fo_basic_link_set_alignment_baseline(FoFo * fo_fo,FoProperty * new_alignment_baseline)1625 fo_basic_link_set_alignment_baseline (FoFo *fo_fo,
1626 FoProperty *new_alignment_baseline)
1627 {
1628 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1629
1630 g_return_if_fail (fo_basic_link != NULL);
1631 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
1632 g_return_if_fail ((new_alignment_baseline == NULL) ||
1633 FO_IS_PROPERTY_ALIGNMENT_BASELINE (new_alignment_baseline));
1634
1635 if (new_alignment_baseline != NULL)
1636 {
1637 g_object_ref (new_alignment_baseline);
1638 }
1639 if (fo_basic_link->alignment_baseline != NULL)
1640 {
1641 g_object_unref (fo_basic_link->alignment_baseline);
1642 }
1643 fo_basic_link->alignment_baseline = new_alignment_baseline;
1644 /*g_object_notify (G_OBJECT (fo_basic_link), "alignment-baseline");*/
1645 }
1646
1647 /**
1648 * fo_basic_link_get_background_color:
1649 * @fo_fo: The #FoFo object.
1650 *
1651 * Gets the "background-color" property of @fo_fo.
1652 *
1653 * Return value: The "background-color" property value.
1654 **/
1655 FoProperty *
fo_basic_link_get_background_color(FoFo * fo_fo)1656 fo_basic_link_get_background_color (FoFo *fo_fo)
1657 {
1658 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1659
1660 g_return_val_if_fail (fo_basic_link != NULL, NULL);
1661 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
1662
1663 return fo_basic_link->background_color;
1664 }
1665
1666 /**
1667 * fo_basic_link_set_background_color:
1668 * @fo_fo: The #FoFo object.
1669 * @new_background_color: The new "background-color" property value.
1670 *
1671 * Sets the "background-color" property of @fo_fo to @new_background_color.
1672 **/
1673 void
fo_basic_link_set_background_color(FoFo * fo_fo,FoProperty * new_background_color)1674 fo_basic_link_set_background_color (FoFo *fo_fo,
1675 FoProperty *new_background_color)
1676 {
1677 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1678
1679 g_return_if_fail (fo_basic_link != NULL);
1680 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
1681 g_return_if_fail ((new_background_color == NULL) ||
1682 FO_IS_PROPERTY_BACKGROUND_COLOR (new_background_color));
1683
1684 if (new_background_color != NULL)
1685 {
1686 g_object_ref (new_background_color);
1687 }
1688 if (fo_basic_link->background_color != NULL)
1689 {
1690 g_object_unref (fo_basic_link->background_color);
1691 }
1692 fo_basic_link->background_color = new_background_color;
1693 /*g_object_notify (G_OBJECT (fo_basic_link), "background-color");*/
1694 }
1695
1696 /**
1697 * fo_basic_link_get_background_image:
1698 * @fo_fo: The #FoFo object.
1699 *
1700 * Gets the "background-image" property of @fo_fo.
1701 *
1702 * Return value: The "background-image" property value.
1703 **/
1704 FoProperty *
fo_basic_link_get_background_image(FoFo * fo_fo)1705 fo_basic_link_get_background_image (FoFo *fo_fo)
1706 {
1707 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1708
1709 g_return_val_if_fail (fo_basic_link != NULL, NULL);
1710 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
1711
1712 return fo_basic_link->background_image;
1713 }
1714
1715 /**
1716 * fo_basic_link_set_background_image:
1717 * @fo_fo: The #FoFo object.
1718 * @new_background_image: The new "background-image" property value.
1719 *
1720 * Sets the "background-image" property of @fo_fo to @new_background_image.
1721 **/
1722 void
fo_basic_link_set_background_image(FoFo * fo_fo,FoProperty * new_background_image)1723 fo_basic_link_set_background_image (FoFo *fo_fo,
1724 FoProperty *new_background_image)
1725 {
1726 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1727
1728 g_return_if_fail (fo_basic_link != NULL);
1729 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
1730 g_return_if_fail ((new_background_image == NULL) ||
1731 FO_IS_PROPERTY_BACKGROUND_IMAGE (new_background_image));
1732
1733 if (new_background_image != NULL)
1734 {
1735 g_object_ref (new_background_image);
1736 }
1737 if (fo_basic_link->background_image != NULL)
1738 {
1739 g_object_unref (fo_basic_link->background_image);
1740 }
1741 fo_basic_link->background_image = new_background_image;
1742 /*g_object_notify (G_OBJECT (fo_basic_link), "background-image");*/
1743 }
1744
1745 /**
1746 * fo_basic_link_get_baseline_shift:
1747 * @fo_fo: The #FoFo object.
1748 *
1749 * Gets the "baseline-shift" property of @fo_fo.
1750 *
1751 * Return value: The "baseline-shift" property value.
1752 **/
1753 FoProperty *
fo_basic_link_get_baseline_shift(FoFo * fo_fo)1754 fo_basic_link_get_baseline_shift (FoFo *fo_fo)
1755 {
1756 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1757
1758 g_return_val_if_fail (fo_basic_link != NULL, NULL);
1759 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
1760
1761 return fo_basic_link->baseline_shift;
1762 }
1763
1764 /**
1765 * fo_basic_link_set_baseline_shift:
1766 * @fo_fo: The #FoFo object.
1767 * @new_baseline_shift: The new "baseline-shift" property value.
1768 *
1769 * Sets the "baseline-shift" property of @fo_fo to @new_baseline_shift.
1770 **/
1771 void
fo_basic_link_set_baseline_shift(FoFo * fo_fo,FoProperty * new_baseline_shift)1772 fo_basic_link_set_baseline_shift (FoFo *fo_fo,
1773 FoProperty *new_baseline_shift)
1774 {
1775 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1776
1777 g_return_if_fail (fo_basic_link != NULL);
1778 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
1779 g_return_if_fail ((new_baseline_shift == NULL) ||
1780 FO_IS_PROPERTY_BASELINE_SHIFT (new_baseline_shift));
1781
1782 if (new_baseline_shift != NULL)
1783 {
1784 g_object_ref (new_baseline_shift);
1785 }
1786 if (fo_basic_link->baseline_shift != NULL)
1787 {
1788 g_object_unref (fo_basic_link->baseline_shift);
1789 }
1790 fo_basic_link->baseline_shift = new_baseline_shift;
1791 /*g_object_notify (G_OBJECT (fo_basic_link), "baseline-shift");*/
1792 }
1793
1794 /**
1795 * fo_basic_link_get_border_after_color:
1796 * @fo_fo: The #FoFo object.
1797 *
1798 * Gets the "border-after-color" property of @fo_fo.
1799 *
1800 * Return value: The "border-after-color" property value.
1801 **/
1802 FoProperty *
fo_basic_link_get_border_after_color(FoFo * fo_fo)1803 fo_basic_link_get_border_after_color (FoFo *fo_fo)
1804 {
1805 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1806
1807 g_return_val_if_fail (fo_basic_link != NULL, NULL);
1808 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
1809
1810 return fo_basic_link->border_after_color;
1811 }
1812
1813 /**
1814 * fo_basic_link_set_border_after_color:
1815 * @fo_fo: The #FoFo object.
1816 * @new_border_after_color: The new "border-after-color" property value.
1817 *
1818 * Sets the "border-after-color" property of @fo_fo to @new_border_after_color.
1819 **/
1820 void
fo_basic_link_set_border_after_color(FoFo * fo_fo,FoProperty * new_border_after_color)1821 fo_basic_link_set_border_after_color (FoFo *fo_fo,
1822 FoProperty *new_border_after_color)
1823 {
1824 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1825
1826 g_return_if_fail (fo_basic_link != NULL);
1827 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
1828 g_return_if_fail ((new_border_after_color == NULL) ||
1829 FO_IS_PROPERTY_BORDER_AFTER_COLOR (new_border_after_color));
1830
1831 if (new_border_after_color != NULL)
1832 {
1833 g_object_ref (new_border_after_color);
1834 }
1835 if (fo_basic_link->border_after_color != NULL)
1836 {
1837 g_object_unref (fo_basic_link->border_after_color);
1838 }
1839 fo_basic_link->border_after_color = new_border_after_color;
1840 /*g_object_notify (G_OBJECT (fo_basic_link), "border-after-color");*/
1841 }
1842
1843 /**
1844 * fo_basic_link_get_border_after_style:
1845 * @fo_fo: The #FoFo object.
1846 *
1847 * Gets the "border-after-style" property of @fo_fo.
1848 *
1849 * Return value: The "border-after-style" property value.
1850 **/
1851 FoProperty *
fo_basic_link_get_border_after_style(FoFo * fo_fo)1852 fo_basic_link_get_border_after_style (FoFo *fo_fo)
1853 {
1854 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1855
1856 g_return_val_if_fail (fo_basic_link != NULL, NULL);
1857 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
1858
1859 return fo_basic_link->border_after_style;
1860 }
1861
1862 /**
1863 * fo_basic_link_set_border_after_style:
1864 * @fo_fo: The #FoFo object.
1865 * @new_border_after_style: The new "border-after-style" property value.
1866 *
1867 * Sets the "border-after-style" property of @fo_fo to @new_border_after_style.
1868 **/
1869 void
fo_basic_link_set_border_after_style(FoFo * fo_fo,FoProperty * new_border_after_style)1870 fo_basic_link_set_border_after_style (FoFo *fo_fo,
1871 FoProperty *new_border_after_style)
1872 {
1873 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1874
1875 g_return_if_fail (fo_basic_link != NULL);
1876 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
1877 g_return_if_fail ((new_border_after_style == NULL) ||
1878 FO_IS_PROPERTY_BORDER_AFTER_STYLE (new_border_after_style));
1879
1880 if (new_border_after_style != NULL)
1881 {
1882 g_object_ref (new_border_after_style);
1883 }
1884 if (fo_basic_link->border_after_style != NULL)
1885 {
1886 g_object_unref (fo_basic_link->border_after_style);
1887 }
1888 fo_basic_link->border_after_style = new_border_after_style;
1889 /*g_object_notify (G_OBJECT (fo_basic_link), "border-after-style");*/
1890 }
1891
1892 /**
1893 * fo_basic_link_get_border_after_width:
1894 * @fo_fo: The #FoFo object.
1895 *
1896 * Gets the "border-after-width" property of @fo_fo.
1897 *
1898 * Return value: The "border-after-width" property value.
1899 **/
1900 FoProperty *
fo_basic_link_get_border_after_width(FoFo * fo_fo)1901 fo_basic_link_get_border_after_width (FoFo *fo_fo)
1902 {
1903 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1904
1905 g_return_val_if_fail (fo_basic_link != NULL, NULL);
1906 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
1907
1908 return fo_basic_link->border_after_width;
1909 }
1910
1911 /**
1912 * fo_basic_link_set_border_after_width:
1913 * @fo_fo: The #FoFo object.
1914 * @new_border_after_width: The new "border-after-width" property value.
1915 *
1916 * Sets the "border-after-width" property of @fo_fo to @new_border_after_width.
1917 **/
1918 void
fo_basic_link_set_border_after_width(FoFo * fo_fo,FoProperty * new_border_after_width)1919 fo_basic_link_set_border_after_width (FoFo *fo_fo,
1920 FoProperty *new_border_after_width)
1921 {
1922 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1923
1924 g_return_if_fail (fo_basic_link != NULL);
1925 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
1926 g_return_if_fail ((new_border_after_width == NULL) ||
1927 FO_IS_PROPERTY_BORDER_AFTER_WIDTH (new_border_after_width));
1928
1929 if (new_border_after_width != NULL)
1930 {
1931 g_object_ref (new_border_after_width);
1932 }
1933 if (fo_basic_link->border_after_width != NULL)
1934 {
1935 g_object_unref (fo_basic_link->border_after_width);
1936 }
1937 fo_basic_link->border_after_width = new_border_after_width;
1938 /*g_object_notify (G_OBJECT (fo_basic_link), "border-after-width");*/
1939 }
1940
1941 /**
1942 * fo_basic_link_get_border_before_color:
1943 * @fo_fo: The #FoFo object.
1944 *
1945 * Gets the "border-before-color" property of @fo_fo.
1946 *
1947 * Return value: The "border-before-color" property value.
1948 **/
1949 FoProperty *
fo_basic_link_get_border_before_color(FoFo * fo_fo)1950 fo_basic_link_get_border_before_color (FoFo *fo_fo)
1951 {
1952 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1953
1954 g_return_val_if_fail (fo_basic_link != NULL, NULL);
1955 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
1956
1957 return fo_basic_link->border_before_color;
1958 }
1959
1960 /**
1961 * fo_basic_link_set_border_before_color:
1962 * @fo_fo: The #FoFo object.
1963 * @new_border_before_color: The new "border-before-color" property value.
1964 *
1965 * Sets the "border-before-color" property of @fo_fo to @new_border_before_color.
1966 **/
1967 void
fo_basic_link_set_border_before_color(FoFo * fo_fo,FoProperty * new_border_before_color)1968 fo_basic_link_set_border_before_color (FoFo *fo_fo,
1969 FoProperty *new_border_before_color)
1970 {
1971 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
1972
1973 g_return_if_fail (fo_basic_link != NULL);
1974 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
1975 g_return_if_fail ((new_border_before_color == NULL) ||
1976 FO_IS_PROPERTY_BORDER_BEFORE_COLOR (new_border_before_color));
1977
1978 if (new_border_before_color != NULL)
1979 {
1980 g_object_ref (new_border_before_color);
1981 }
1982 if (fo_basic_link->border_before_color != NULL)
1983 {
1984 g_object_unref (fo_basic_link->border_before_color);
1985 }
1986 fo_basic_link->border_before_color = new_border_before_color;
1987 /*g_object_notify (G_OBJECT (fo_basic_link), "border-before-color");*/
1988 }
1989
1990 /**
1991 * fo_basic_link_get_border_before_style:
1992 * @fo_fo: The #FoFo object.
1993 *
1994 * Gets the "border-before-style" property of @fo_fo.
1995 *
1996 * Return value: The "border-before-style" property value.
1997 **/
1998 FoProperty *
fo_basic_link_get_border_before_style(FoFo * fo_fo)1999 fo_basic_link_get_border_before_style (FoFo *fo_fo)
2000 {
2001 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2002
2003 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2004 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2005
2006 return fo_basic_link->border_before_style;
2007 }
2008
2009 /**
2010 * fo_basic_link_set_border_before_style:
2011 * @fo_fo: The #FoFo object.
2012 * @new_border_before_style: The new "border-before-style" property value.
2013 *
2014 * Sets the "border-before-style" property of @fo_fo to @new_border_before_style.
2015 **/
2016 void
fo_basic_link_set_border_before_style(FoFo * fo_fo,FoProperty * new_border_before_style)2017 fo_basic_link_set_border_before_style (FoFo *fo_fo,
2018 FoProperty *new_border_before_style)
2019 {
2020 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2021
2022 g_return_if_fail (fo_basic_link != NULL);
2023 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2024 g_return_if_fail ((new_border_before_style == NULL) ||
2025 FO_IS_PROPERTY_BORDER_BEFORE_STYLE (new_border_before_style));
2026
2027 if (new_border_before_style != NULL)
2028 {
2029 g_object_ref (new_border_before_style);
2030 }
2031 if (fo_basic_link->border_before_style != NULL)
2032 {
2033 g_object_unref (fo_basic_link->border_before_style);
2034 }
2035 fo_basic_link->border_before_style = new_border_before_style;
2036 /*g_object_notify (G_OBJECT (fo_basic_link), "border-before-style");*/
2037 }
2038
2039 /**
2040 * fo_basic_link_get_border_before_width:
2041 * @fo_fo: The #FoFo object.
2042 *
2043 * Gets the "border-before-width" property of @fo_fo.
2044 *
2045 * Return value: The "border-before-width" property value.
2046 **/
2047 FoProperty *
fo_basic_link_get_border_before_width(FoFo * fo_fo)2048 fo_basic_link_get_border_before_width (FoFo *fo_fo)
2049 {
2050 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2051
2052 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2053 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2054
2055 return fo_basic_link->border_before_width;
2056 }
2057
2058 /**
2059 * fo_basic_link_set_border_before_width:
2060 * @fo_fo: The #FoFo object.
2061 * @new_border_before_width: The new "border-before-width" property value.
2062 *
2063 * Sets the "border-before-width" property of @fo_fo to @new_border_before_width.
2064 **/
2065 void
fo_basic_link_set_border_before_width(FoFo * fo_fo,FoProperty * new_border_before_width)2066 fo_basic_link_set_border_before_width (FoFo *fo_fo,
2067 FoProperty *new_border_before_width)
2068 {
2069 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2070
2071 g_return_if_fail (fo_basic_link != NULL);
2072 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2073 g_return_if_fail ((new_border_before_width == NULL) ||
2074 FO_IS_PROPERTY_BORDER_BEFORE_WIDTH (new_border_before_width));
2075
2076 if (new_border_before_width != NULL)
2077 {
2078 g_object_ref (new_border_before_width);
2079 }
2080 if (fo_basic_link->border_before_width != NULL)
2081 {
2082 g_object_unref (fo_basic_link->border_before_width);
2083 }
2084 fo_basic_link->border_before_width = new_border_before_width;
2085 /*g_object_notify (G_OBJECT (fo_basic_link), "border-before-width");*/
2086 }
2087
2088 /**
2089 * fo_basic_link_get_border_bottom_color:
2090 * @fo_fo: The #FoFo object.
2091 *
2092 * Gets the "border-bottom-color" property of @fo_fo.
2093 *
2094 * Return value: The "border-bottom-color" property value.
2095 **/
2096 FoProperty *
fo_basic_link_get_border_bottom_color(FoFo * fo_fo)2097 fo_basic_link_get_border_bottom_color (FoFo *fo_fo)
2098 {
2099 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2100
2101 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2102 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2103
2104 return fo_basic_link->border_bottom_color;
2105 }
2106
2107 /**
2108 * fo_basic_link_set_border_bottom_color:
2109 * @fo_fo: The #FoFo object.
2110 * @new_border_bottom_color: The new "border-bottom-color" property value.
2111 *
2112 * Sets the "border-bottom-color" property of @fo_fo to @new_border_bottom_color.
2113 **/
2114 void
fo_basic_link_set_border_bottom_color(FoFo * fo_fo,FoProperty * new_border_bottom_color)2115 fo_basic_link_set_border_bottom_color (FoFo *fo_fo,
2116 FoProperty *new_border_bottom_color)
2117 {
2118 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2119
2120 g_return_if_fail (fo_basic_link != NULL);
2121 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2122 g_return_if_fail ((new_border_bottom_color == NULL) ||
2123 FO_IS_PROPERTY_BORDER_BOTTOM_COLOR (new_border_bottom_color));
2124
2125 if (new_border_bottom_color != NULL)
2126 {
2127 g_object_ref (new_border_bottom_color);
2128 }
2129 if (fo_basic_link->border_bottom_color != NULL)
2130 {
2131 g_object_unref (fo_basic_link->border_bottom_color);
2132 }
2133 fo_basic_link->border_bottom_color = new_border_bottom_color;
2134 /*g_object_notify (G_OBJECT (fo_basic_link), "border-bottom-color");*/
2135 }
2136
2137 /**
2138 * fo_basic_link_get_border_bottom_style:
2139 * @fo_fo: The #FoFo object.
2140 *
2141 * Gets the "border-bottom-style" property of @fo_fo.
2142 *
2143 * Return value: The "border-bottom-style" property value.
2144 **/
2145 FoProperty *
fo_basic_link_get_border_bottom_style(FoFo * fo_fo)2146 fo_basic_link_get_border_bottom_style (FoFo *fo_fo)
2147 {
2148 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2149
2150 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2151 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2152
2153 return fo_basic_link->border_bottom_style;
2154 }
2155
2156 /**
2157 * fo_basic_link_set_border_bottom_style:
2158 * @fo_fo: The #FoFo object.
2159 * @new_border_bottom_style: The new "border-bottom-style" property value.
2160 *
2161 * Sets the "border-bottom-style" property of @fo_fo to @new_border_bottom_style.
2162 **/
2163 void
fo_basic_link_set_border_bottom_style(FoFo * fo_fo,FoProperty * new_border_bottom_style)2164 fo_basic_link_set_border_bottom_style (FoFo *fo_fo,
2165 FoProperty *new_border_bottom_style)
2166 {
2167 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2168
2169 g_return_if_fail (fo_basic_link != NULL);
2170 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2171 g_return_if_fail ((new_border_bottom_style == NULL) ||
2172 FO_IS_PROPERTY_BORDER_BOTTOM_STYLE (new_border_bottom_style));
2173
2174 if (new_border_bottom_style != NULL)
2175 {
2176 g_object_ref (new_border_bottom_style);
2177 }
2178 if (fo_basic_link->border_bottom_style != NULL)
2179 {
2180 g_object_unref (fo_basic_link->border_bottom_style);
2181 }
2182 fo_basic_link->border_bottom_style = new_border_bottom_style;
2183 /*g_object_notify (G_OBJECT (fo_basic_link), "border-bottom-style");*/
2184 }
2185
2186 /**
2187 * fo_basic_link_get_border_bottom_width:
2188 * @fo_fo: The #FoFo object.
2189 *
2190 * Gets the "border-bottom-width" property of @fo_fo.
2191 *
2192 * Return value: The "border-bottom-width" property value.
2193 **/
2194 FoProperty *
fo_basic_link_get_border_bottom_width(FoFo * fo_fo)2195 fo_basic_link_get_border_bottom_width (FoFo *fo_fo)
2196 {
2197 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2198
2199 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2200 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2201
2202 return fo_basic_link->border_bottom_width;
2203 }
2204
2205 /**
2206 * fo_basic_link_set_border_bottom_width:
2207 * @fo_fo: The #FoFo object.
2208 * @new_border_bottom_width: The new "border-bottom-width" property value.
2209 *
2210 * Sets the "border-bottom-width" property of @fo_fo to @new_border_bottom_width.
2211 **/
2212 void
fo_basic_link_set_border_bottom_width(FoFo * fo_fo,FoProperty * new_border_bottom_width)2213 fo_basic_link_set_border_bottom_width (FoFo *fo_fo,
2214 FoProperty *new_border_bottom_width)
2215 {
2216 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2217
2218 g_return_if_fail (fo_basic_link != NULL);
2219 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2220 g_return_if_fail ((new_border_bottom_width == NULL) ||
2221 FO_IS_PROPERTY_BORDER_BOTTOM_WIDTH (new_border_bottom_width));
2222
2223 if (new_border_bottom_width != NULL)
2224 {
2225 g_object_ref (new_border_bottom_width);
2226 }
2227 if (fo_basic_link->border_bottom_width != NULL)
2228 {
2229 g_object_unref (fo_basic_link->border_bottom_width);
2230 }
2231 fo_basic_link->border_bottom_width = new_border_bottom_width;
2232 /*g_object_notify (G_OBJECT (fo_basic_link), "border-bottom-width");*/
2233 }
2234
2235 /**
2236 * fo_basic_link_get_border_end_color:
2237 * @fo_fo: The #FoFo object.
2238 *
2239 * Gets the "border-end-color" property of @fo_fo.
2240 *
2241 * Return value: The "border-end-color" property value.
2242 **/
2243 FoProperty *
fo_basic_link_get_border_end_color(FoFo * fo_fo)2244 fo_basic_link_get_border_end_color (FoFo *fo_fo)
2245 {
2246 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2247
2248 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2249 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2250
2251 return fo_basic_link->border_end_color;
2252 }
2253
2254 /**
2255 * fo_basic_link_set_border_end_color:
2256 * @fo_fo: The #FoFo object.
2257 * @new_border_end_color: The new "border-end-color" property value.
2258 *
2259 * Sets the "border-end-color" property of @fo_fo to @new_border_end_color.
2260 **/
2261 void
fo_basic_link_set_border_end_color(FoFo * fo_fo,FoProperty * new_border_end_color)2262 fo_basic_link_set_border_end_color (FoFo *fo_fo,
2263 FoProperty *new_border_end_color)
2264 {
2265 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2266
2267 g_return_if_fail (fo_basic_link != NULL);
2268 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2269 g_return_if_fail ((new_border_end_color == NULL) ||
2270 FO_IS_PROPERTY_BORDER_END_COLOR (new_border_end_color));
2271
2272 if (new_border_end_color != NULL)
2273 {
2274 g_object_ref (new_border_end_color);
2275 }
2276 if (fo_basic_link->border_end_color != NULL)
2277 {
2278 g_object_unref (fo_basic_link->border_end_color);
2279 }
2280 fo_basic_link->border_end_color = new_border_end_color;
2281 /*g_object_notify (G_OBJECT (fo_basic_link), "border-end-color");*/
2282 }
2283
2284 /**
2285 * fo_basic_link_get_border_end_style:
2286 * @fo_fo: The #FoFo object.
2287 *
2288 * Gets the "border-end-style" property of @fo_fo.
2289 *
2290 * Return value: The "border-end-style" property value.
2291 **/
2292 FoProperty *
fo_basic_link_get_border_end_style(FoFo * fo_fo)2293 fo_basic_link_get_border_end_style (FoFo *fo_fo)
2294 {
2295 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2296
2297 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2298 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2299
2300 return fo_basic_link->border_end_style;
2301 }
2302
2303 /**
2304 * fo_basic_link_set_border_end_style:
2305 * @fo_fo: The #FoFo object.
2306 * @new_border_end_style: The new "border-end-style" property value.
2307 *
2308 * Sets the "border-end-style" property of @fo_fo to @new_border_end_style.
2309 **/
2310 void
fo_basic_link_set_border_end_style(FoFo * fo_fo,FoProperty * new_border_end_style)2311 fo_basic_link_set_border_end_style (FoFo *fo_fo,
2312 FoProperty *new_border_end_style)
2313 {
2314 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2315
2316 g_return_if_fail (fo_basic_link != NULL);
2317 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2318 g_return_if_fail ((new_border_end_style == NULL) ||
2319 FO_IS_PROPERTY_BORDER_END_STYLE (new_border_end_style));
2320
2321 if (new_border_end_style != NULL)
2322 {
2323 g_object_ref (new_border_end_style);
2324 }
2325 if (fo_basic_link->border_end_style != NULL)
2326 {
2327 g_object_unref (fo_basic_link->border_end_style);
2328 }
2329 fo_basic_link->border_end_style = new_border_end_style;
2330 /*g_object_notify (G_OBJECT (fo_basic_link), "border-end-style");*/
2331 }
2332
2333 /**
2334 * fo_basic_link_get_border_end_width:
2335 * @fo_fo: The #FoFo object.
2336 *
2337 * Gets the "border-end-width" property of @fo_fo.
2338 *
2339 * Return value: The "border-end-width" property value.
2340 **/
2341 FoProperty *
fo_basic_link_get_border_end_width(FoFo * fo_fo)2342 fo_basic_link_get_border_end_width (FoFo *fo_fo)
2343 {
2344 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2345
2346 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2347 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2348
2349 return fo_basic_link->border_end_width;
2350 }
2351
2352 /**
2353 * fo_basic_link_set_border_end_width:
2354 * @fo_fo: The #FoFo object.
2355 * @new_border_end_width: The new "border-end-width" property value.
2356 *
2357 * Sets the "border-end-width" property of @fo_fo to @new_border_end_width.
2358 **/
2359 void
fo_basic_link_set_border_end_width(FoFo * fo_fo,FoProperty * new_border_end_width)2360 fo_basic_link_set_border_end_width (FoFo *fo_fo,
2361 FoProperty *new_border_end_width)
2362 {
2363 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2364
2365 g_return_if_fail (fo_basic_link != NULL);
2366 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2367 g_return_if_fail ((new_border_end_width == NULL) ||
2368 FO_IS_PROPERTY_BORDER_END_WIDTH (new_border_end_width));
2369
2370 if (new_border_end_width != NULL)
2371 {
2372 g_object_ref (new_border_end_width);
2373 }
2374 if (fo_basic_link->border_end_width != NULL)
2375 {
2376 g_object_unref (fo_basic_link->border_end_width);
2377 }
2378 fo_basic_link->border_end_width = new_border_end_width;
2379 /*g_object_notify (G_OBJECT (fo_basic_link), "border-end-width");*/
2380 }
2381
2382 /**
2383 * fo_basic_link_get_border_left_color:
2384 * @fo_fo: The #FoFo object.
2385 *
2386 * Gets the "border-left-color" property of @fo_fo.
2387 *
2388 * Return value: The "border-left-color" property value.
2389 **/
2390 FoProperty *
fo_basic_link_get_border_left_color(FoFo * fo_fo)2391 fo_basic_link_get_border_left_color (FoFo *fo_fo)
2392 {
2393 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2394
2395 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2396 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2397
2398 return fo_basic_link->border_left_color;
2399 }
2400
2401 /**
2402 * fo_basic_link_set_border_left_color:
2403 * @fo_fo: The #FoFo object.
2404 * @new_border_left_color: The new "border-left-color" property value.
2405 *
2406 * Sets the "border-left-color" property of @fo_fo to @new_border_left_color.
2407 **/
2408 void
fo_basic_link_set_border_left_color(FoFo * fo_fo,FoProperty * new_border_left_color)2409 fo_basic_link_set_border_left_color (FoFo *fo_fo,
2410 FoProperty *new_border_left_color)
2411 {
2412 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2413
2414 g_return_if_fail (fo_basic_link != NULL);
2415 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2416 g_return_if_fail ((new_border_left_color == NULL) ||
2417 FO_IS_PROPERTY_BORDER_LEFT_COLOR (new_border_left_color));
2418
2419 if (new_border_left_color != NULL)
2420 {
2421 g_object_ref (new_border_left_color);
2422 }
2423 if (fo_basic_link->border_left_color != NULL)
2424 {
2425 g_object_unref (fo_basic_link->border_left_color);
2426 }
2427 fo_basic_link->border_left_color = new_border_left_color;
2428 /*g_object_notify (G_OBJECT (fo_basic_link), "border-left-color");*/
2429 }
2430
2431 /**
2432 * fo_basic_link_get_border_left_style:
2433 * @fo_fo: The #FoFo object.
2434 *
2435 * Gets the "border-left-style" property of @fo_fo.
2436 *
2437 * Return value: The "border-left-style" property value.
2438 **/
2439 FoProperty *
fo_basic_link_get_border_left_style(FoFo * fo_fo)2440 fo_basic_link_get_border_left_style (FoFo *fo_fo)
2441 {
2442 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2443
2444 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2445 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2446
2447 return fo_basic_link->border_left_style;
2448 }
2449
2450 /**
2451 * fo_basic_link_set_border_left_style:
2452 * @fo_fo: The #FoFo object.
2453 * @new_border_left_style: The new "border-left-style" property value.
2454 *
2455 * Sets the "border-left-style" property of @fo_fo to @new_border_left_style.
2456 **/
2457 void
fo_basic_link_set_border_left_style(FoFo * fo_fo,FoProperty * new_border_left_style)2458 fo_basic_link_set_border_left_style (FoFo *fo_fo,
2459 FoProperty *new_border_left_style)
2460 {
2461 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2462
2463 g_return_if_fail (fo_basic_link != NULL);
2464 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2465 g_return_if_fail ((new_border_left_style == NULL) ||
2466 FO_IS_PROPERTY_BORDER_LEFT_STYLE (new_border_left_style));
2467
2468 if (new_border_left_style != NULL)
2469 {
2470 g_object_ref (new_border_left_style);
2471 }
2472 if (fo_basic_link->border_left_style != NULL)
2473 {
2474 g_object_unref (fo_basic_link->border_left_style);
2475 }
2476 fo_basic_link->border_left_style = new_border_left_style;
2477 /*g_object_notify (G_OBJECT (fo_basic_link), "border-left-style");*/
2478 }
2479
2480 /**
2481 * fo_basic_link_get_border_left_width:
2482 * @fo_fo: The #FoFo object.
2483 *
2484 * Gets the "border-left-width" property of @fo_fo.
2485 *
2486 * Return value: The "border-left-width" property value.
2487 **/
2488 FoProperty *
fo_basic_link_get_border_left_width(FoFo * fo_fo)2489 fo_basic_link_get_border_left_width (FoFo *fo_fo)
2490 {
2491 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2492
2493 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2494 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2495
2496 return fo_basic_link->border_left_width;
2497 }
2498
2499 /**
2500 * fo_basic_link_set_border_left_width:
2501 * @fo_fo: The #FoFo object.
2502 * @new_border_left_width: The new "border-left-width" property value.
2503 *
2504 * Sets the "border-left-width" property of @fo_fo to @new_border_left_width.
2505 **/
2506 void
fo_basic_link_set_border_left_width(FoFo * fo_fo,FoProperty * new_border_left_width)2507 fo_basic_link_set_border_left_width (FoFo *fo_fo,
2508 FoProperty *new_border_left_width)
2509 {
2510 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2511
2512 g_return_if_fail (fo_basic_link != NULL);
2513 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2514 g_return_if_fail ((new_border_left_width == NULL) ||
2515 FO_IS_PROPERTY_BORDER_LEFT_WIDTH (new_border_left_width));
2516
2517 if (new_border_left_width != NULL)
2518 {
2519 g_object_ref (new_border_left_width);
2520 }
2521 if (fo_basic_link->border_left_width != NULL)
2522 {
2523 g_object_unref (fo_basic_link->border_left_width);
2524 }
2525 fo_basic_link->border_left_width = new_border_left_width;
2526 /*g_object_notify (G_OBJECT (fo_basic_link), "border-left-width");*/
2527 }
2528
2529 /**
2530 * fo_basic_link_get_border_right_color:
2531 * @fo_fo: The #FoFo object.
2532 *
2533 * Gets the "border-right-color" property of @fo_fo.
2534 *
2535 * Return value: The "border-right-color" property value.
2536 **/
2537 FoProperty *
fo_basic_link_get_border_right_color(FoFo * fo_fo)2538 fo_basic_link_get_border_right_color (FoFo *fo_fo)
2539 {
2540 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2541
2542 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2543 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2544
2545 return fo_basic_link->border_right_color;
2546 }
2547
2548 /**
2549 * fo_basic_link_set_border_right_color:
2550 * @fo_fo: The #FoFo object.
2551 * @new_border_right_color: The new "border-right-color" property value.
2552 *
2553 * Sets the "border-right-color" property of @fo_fo to @new_border_right_color.
2554 **/
2555 void
fo_basic_link_set_border_right_color(FoFo * fo_fo,FoProperty * new_border_right_color)2556 fo_basic_link_set_border_right_color (FoFo *fo_fo,
2557 FoProperty *new_border_right_color)
2558 {
2559 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2560
2561 g_return_if_fail (fo_basic_link != NULL);
2562 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2563 g_return_if_fail ((new_border_right_color == NULL) ||
2564 FO_IS_PROPERTY_BORDER_RIGHT_COLOR (new_border_right_color));
2565
2566 if (new_border_right_color != NULL)
2567 {
2568 g_object_ref (new_border_right_color);
2569 }
2570 if (fo_basic_link->border_right_color != NULL)
2571 {
2572 g_object_unref (fo_basic_link->border_right_color);
2573 }
2574 fo_basic_link->border_right_color = new_border_right_color;
2575 /*g_object_notify (G_OBJECT (fo_basic_link), "border-right-color");*/
2576 }
2577
2578 /**
2579 * fo_basic_link_get_border_right_style:
2580 * @fo_fo: The #FoFo object.
2581 *
2582 * Gets the "border-right-style" property of @fo_fo.
2583 *
2584 * Return value: The "border-right-style" property value.
2585 **/
2586 FoProperty *
fo_basic_link_get_border_right_style(FoFo * fo_fo)2587 fo_basic_link_get_border_right_style (FoFo *fo_fo)
2588 {
2589 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2590
2591 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2592 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2593
2594 return fo_basic_link->border_right_style;
2595 }
2596
2597 /**
2598 * fo_basic_link_set_border_right_style:
2599 * @fo_fo: The #FoFo object.
2600 * @new_border_right_style: The new "border-right-style" property value.
2601 *
2602 * Sets the "border-right-style" property of @fo_fo to @new_border_right_style.
2603 **/
2604 void
fo_basic_link_set_border_right_style(FoFo * fo_fo,FoProperty * new_border_right_style)2605 fo_basic_link_set_border_right_style (FoFo *fo_fo,
2606 FoProperty *new_border_right_style)
2607 {
2608 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2609
2610 g_return_if_fail (fo_basic_link != NULL);
2611 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2612 g_return_if_fail ((new_border_right_style == NULL) ||
2613 FO_IS_PROPERTY_BORDER_RIGHT_STYLE (new_border_right_style));
2614
2615 if (new_border_right_style != NULL)
2616 {
2617 g_object_ref (new_border_right_style);
2618 }
2619 if (fo_basic_link->border_right_style != NULL)
2620 {
2621 g_object_unref (fo_basic_link->border_right_style);
2622 }
2623 fo_basic_link->border_right_style = new_border_right_style;
2624 /*g_object_notify (G_OBJECT (fo_basic_link), "border-right-style");*/
2625 }
2626
2627 /**
2628 * fo_basic_link_get_border_right_width:
2629 * @fo_fo: The #FoFo object.
2630 *
2631 * Gets the "border-right-width" property of @fo_fo.
2632 *
2633 * Return value: The "border-right-width" property value.
2634 **/
2635 FoProperty *
fo_basic_link_get_border_right_width(FoFo * fo_fo)2636 fo_basic_link_get_border_right_width (FoFo *fo_fo)
2637 {
2638 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2639
2640 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2641 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2642
2643 return fo_basic_link->border_right_width;
2644 }
2645
2646 /**
2647 * fo_basic_link_set_border_right_width:
2648 * @fo_fo: The #FoFo object.
2649 * @new_border_right_width: The new "border-right-width" property value.
2650 *
2651 * Sets the "border-right-width" property of @fo_fo to @new_border_right_width.
2652 **/
2653 void
fo_basic_link_set_border_right_width(FoFo * fo_fo,FoProperty * new_border_right_width)2654 fo_basic_link_set_border_right_width (FoFo *fo_fo,
2655 FoProperty *new_border_right_width)
2656 {
2657 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2658
2659 g_return_if_fail (fo_basic_link != NULL);
2660 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2661 g_return_if_fail ((new_border_right_width == NULL) ||
2662 FO_IS_PROPERTY_BORDER_RIGHT_WIDTH (new_border_right_width));
2663
2664 if (new_border_right_width != NULL)
2665 {
2666 g_object_ref (new_border_right_width);
2667 }
2668 if (fo_basic_link->border_right_width != NULL)
2669 {
2670 g_object_unref (fo_basic_link->border_right_width);
2671 }
2672 fo_basic_link->border_right_width = new_border_right_width;
2673 /*g_object_notify (G_OBJECT (fo_basic_link), "border-right-width");*/
2674 }
2675
2676 /**
2677 * fo_basic_link_get_border_start_color:
2678 * @fo_fo: The #FoFo object.
2679 *
2680 * Gets the "border-start-color" property of @fo_fo.
2681 *
2682 * Return value: The "border-start-color" property value.
2683 **/
2684 FoProperty *
fo_basic_link_get_border_start_color(FoFo * fo_fo)2685 fo_basic_link_get_border_start_color (FoFo *fo_fo)
2686 {
2687 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2688
2689 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2690 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2691
2692 return fo_basic_link->border_start_color;
2693 }
2694
2695 /**
2696 * fo_basic_link_set_border_start_color:
2697 * @fo_fo: The #FoFo object.
2698 * @new_border_start_color: The new "border-start-color" property value.
2699 *
2700 * Sets the "border-start-color" property of @fo_fo to @new_border_start_color.
2701 **/
2702 void
fo_basic_link_set_border_start_color(FoFo * fo_fo,FoProperty * new_border_start_color)2703 fo_basic_link_set_border_start_color (FoFo *fo_fo,
2704 FoProperty *new_border_start_color)
2705 {
2706 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2707
2708 g_return_if_fail (fo_basic_link != NULL);
2709 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2710 g_return_if_fail ((new_border_start_color == NULL) ||
2711 FO_IS_PROPERTY_BORDER_START_COLOR (new_border_start_color));
2712
2713 if (new_border_start_color != NULL)
2714 {
2715 g_object_ref (new_border_start_color);
2716 }
2717 if (fo_basic_link->border_start_color != NULL)
2718 {
2719 g_object_unref (fo_basic_link->border_start_color);
2720 }
2721 fo_basic_link->border_start_color = new_border_start_color;
2722 /*g_object_notify (G_OBJECT (fo_basic_link), "border-start-color");*/
2723 }
2724
2725 /**
2726 * fo_basic_link_get_border_start_style:
2727 * @fo_fo: The #FoFo object.
2728 *
2729 * Gets the "border-start-style" property of @fo_fo.
2730 *
2731 * Return value: The "border-start-style" property value.
2732 **/
2733 FoProperty *
fo_basic_link_get_border_start_style(FoFo * fo_fo)2734 fo_basic_link_get_border_start_style (FoFo *fo_fo)
2735 {
2736 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2737
2738 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2739 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2740
2741 return fo_basic_link->border_start_style;
2742 }
2743
2744 /**
2745 * fo_basic_link_set_border_start_style:
2746 * @fo_fo: The #FoFo object.
2747 * @new_border_start_style: The new "border-start-style" property value.
2748 *
2749 * Sets the "border-start-style" property of @fo_fo to @new_border_start_style.
2750 **/
2751 void
fo_basic_link_set_border_start_style(FoFo * fo_fo,FoProperty * new_border_start_style)2752 fo_basic_link_set_border_start_style (FoFo *fo_fo,
2753 FoProperty *new_border_start_style)
2754 {
2755 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2756
2757 g_return_if_fail (fo_basic_link != NULL);
2758 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2759 g_return_if_fail ((new_border_start_style == NULL) ||
2760 FO_IS_PROPERTY_BORDER_START_STYLE (new_border_start_style));
2761
2762 if (new_border_start_style != NULL)
2763 {
2764 g_object_ref (new_border_start_style);
2765 }
2766 if (fo_basic_link->border_start_style != NULL)
2767 {
2768 g_object_unref (fo_basic_link->border_start_style);
2769 }
2770 fo_basic_link->border_start_style = new_border_start_style;
2771 /*g_object_notify (G_OBJECT (fo_basic_link), "border-start-style");*/
2772 }
2773
2774 /**
2775 * fo_basic_link_get_border_start_width:
2776 * @fo_fo: The #FoFo object.
2777 *
2778 * Gets the "border-start-width" property of @fo_fo.
2779 *
2780 * Return value: The "border-start-width" property value.
2781 **/
2782 FoProperty *
fo_basic_link_get_border_start_width(FoFo * fo_fo)2783 fo_basic_link_get_border_start_width (FoFo *fo_fo)
2784 {
2785 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2786
2787 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2788 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2789
2790 return fo_basic_link->border_start_width;
2791 }
2792
2793 /**
2794 * fo_basic_link_set_border_start_width:
2795 * @fo_fo: The #FoFo object.
2796 * @new_border_start_width: The new "border-start-width" property value.
2797 *
2798 * Sets the "border-start-width" property of @fo_fo to @new_border_start_width.
2799 **/
2800 void
fo_basic_link_set_border_start_width(FoFo * fo_fo,FoProperty * new_border_start_width)2801 fo_basic_link_set_border_start_width (FoFo *fo_fo,
2802 FoProperty *new_border_start_width)
2803 {
2804 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2805
2806 g_return_if_fail (fo_basic_link != NULL);
2807 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2808 g_return_if_fail ((new_border_start_width == NULL) ||
2809 FO_IS_PROPERTY_BORDER_START_WIDTH (new_border_start_width));
2810
2811 if (new_border_start_width != NULL)
2812 {
2813 g_object_ref (new_border_start_width);
2814 }
2815 if (fo_basic_link->border_start_width != NULL)
2816 {
2817 g_object_unref (fo_basic_link->border_start_width);
2818 }
2819 fo_basic_link->border_start_width = new_border_start_width;
2820 /*g_object_notify (G_OBJECT (fo_basic_link), "border-start-width");*/
2821 }
2822
2823 /**
2824 * fo_basic_link_get_border_top_color:
2825 * @fo_fo: The #FoFo object.
2826 *
2827 * Gets the "border-top-color" property of @fo_fo.
2828 *
2829 * Return value: The "border-top-color" property value.
2830 **/
2831 FoProperty *
fo_basic_link_get_border_top_color(FoFo * fo_fo)2832 fo_basic_link_get_border_top_color (FoFo *fo_fo)
2833 {
2834 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2835
2836 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2837 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2838
2839 return fo_basic_link->border_top_color;
2840 }
2841
2842 /**
2843 * fo_basic_link_set_border_top_color:
2844 * @fo_fo: The #FoFo object.
2845 * @new_border_top_color: The new "border-top-color" property value.
2846 *
2847 * Sets the "border-top-color" property of @fo_fo to @new_border_top_color.
2848 **/
2849 void
fo_basic_link_set_border_top_color(FoFo * fo_fo,FoProperty * new_border_top_color)2850 fo_basic_link_set_border_top_color (FoFo *fo_fo,
2851 FoProperty *new_border_top_color)
2852 {
2853 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2854
2855 g_return_if_fail (fo_basic_link != NULL);
2856 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2857 g_return_if_fail ((new_border_top_color == NULL) ||
2858 FO_IS_PROPERTY_BORDER_TOP_COLOR (new_border_top_color));
2859
2860 if (new_border_top_color != NULL)
2861 {
2862 g_object_ref (new_border_top_color);
2863 }
2864 if (fo_basic_link->border_top_color != NULL)
2865 {
2866 g_object_unref (fo_basic_link->border_top_color);
2867 }
2868 fo_basic_link->border_top_color = new_border_top_color;
2869 /*g_object_notify (G_OBJECT (fo_basic_link), "border-top-color");*/
2870 }
2871
2872 /**
2873 * fo_basic_link_get_border_top_style:
2874 * @fo_fo: The #FoFo object.
2875 *
2876 * Gets the "border-top-style" property of @fo_fo.
2877 *
2878 * Return value: The "border-top-style" property value.
2879 **/
2880 FoProperty *
fo_basic_link_get_border_top_style(FoFo * fo_fo)2881 fo_basic_link_get_border_top_style (FoFo *fo_fo)
2882 {
2883 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2884
2885 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2886 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2887
2888 return fo_basic_link->border_top_style;
2889 }
2890
2891 /**
2892 * fo_basic_link_set_border_top_style:
2893 * @fo_fo: The #FoFo object.
2894 * @new_border_top_style: The new "border-top-style" property value.
2895 *
2896 * Sets the "border-top-style" property of @fo_fo to @new_border_top_style.
2897 **/
2898 void
fo_basic_link_set_border_top_style(FoFo * fo_fo,FoProperty * new_border_top_style)2899 fo_basic_link_set_border_top_style (FoFo *fo_fo,
2900 FoProperty *new_border_top_style)
2901 {
2902 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2903
2904 g_return_if_fail (fo_basic_link != NULL);
2905 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2906 g_return_if_fail ((new_border_top_style == NULL) ||
2907 FO_IS_PROPERTY_BORDER_TOP_STYLE (new_border_top_style));
2908
2909 if (new_border_top_style != NULL)
2910 {
2911 g_object_ref (new_border_top_style);
2912 }
2913 if (fo_basic_link->border_top_style != NULL)
2914 {
2915 g_object_unref (fo_basic_link->border_top_style);
2916 }
2917 fo_basic_link->border_top_style = new_border_top_style;
2918 /*g_object_notify (G_OBJECT (fo_basic_link), "border-top-style");*/
2919 }
2920
2921 /**
2922 * fo_basic_link_get_border_top_width:
2923 * @fo_fo: The #FoFo object.
2924 *
2925 * Gets the "border-top-width" property of @fo_fo.
2926 *
2927 * Return value: The "border-top-width" property value.
2928 **/
2929 FoProperty *
fo_basic_link_get_border_top_width(FoFo * fo_fo)2930 fo_basic_link_get_border_top_width (FoFo *fo_fo)
2931 {
2932 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2933
2934 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2935 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2936
2937 return fo_basic_link->border_top_width;
2938 }
2939
2940 /**
2941 * fo_basic_link_set_border_top_width:
2942 * @fo_fo: The #FoFo object.
2943 * @new_border_top_width: The new "border-top-width" property value.
2944 *
2945 * Sets the "border-top-width" property of @fo_fo to @new_border_top_width.
2946 **/
2947 void
fo_basic_link_set_border_top_width(FoFo * fo_fo,FoProperty * new_border_top_width)2948 fo_basic_link_set_border_top_width (FoFo *fo_fo,
2949 FoProperty *new_border_top_width)
2950 {
2951 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2952
2953 g_return_if_fail (fo_basic_link != NULL);
2954 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
2955 g_return_if_fail ((new_border_top_width == NULL) ||
2956 FO_IS_PROPERTY_BORDER_TOP_WIDTH (new_border_top_width));
2957
2958 if (new_border_top_width != NULL)
2959 {
2960 g_object_ref (new_border_top_width);
2961 }
2962 if (fo_basic_link->border_top_width != NULL)
2963 {
2964 g_object_unref (fo_basic_link->border_top_width);
2965 }
2966 fo_basic_link->border_top_width = new_border_top_width;
2967 /*g_object_notify (G_OBJECT (fo_basic_link), "border-top-width");*/
2968 }
2969
2970 /**
2971 * fo_basic_link_get_dominant_baseline:
2972 * @fo_fo: The #FoFo object.
2973 *
2974 * Gets the "dominant-baseline" property of @fo_fo.
2975 *
2976 * Return value: The "dominant-baseline" property value.
2977 **/
2978 FoProperty *
fo_basic_link_get_dominant_baseline(FoFo * fo_fo)2979 fo_basic_link_get_dominant_baseline (FoFo *fo_fo)
2980 {
2981 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
2982
2983 g_return_val_if_fail (fo_basic_link != NULL, NULL);
2984 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
2985
2986 return fo_basic_link->dominant_baseline;
2987 }
2988
2989 /**
2990 * fo_basic_link_set_dominant_baseline:
2991 * @fo_fo: The #FoFo object.
2992 * @new_dominant_baseline: The new "dominant-baseline" property value.
2993 *
2994 * Sets the "dominant-baseline" property of @fo_fo to @new_dominant_baseline.
2995 **/
2996 void
fo_basic_link_set_dominant_baseline(FoFo * fo_fo,FoProperty * new_dominant_baseline)2997 fo_basic_link_set_dominant_baseline (FoFo *fo_fo,
2998 FoProperty *new_dominant_baseline)
2999 {
3000 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3001
3002 g_return_if_fail (fo_basic_link != NULL);
3003 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3004 g_return_if_fail ((new_dominant_baseline == NULL) ||
3005 FO_IS_PROPERTY_DOMINANT_BASELINE (new_dominant_baseline));
3006
3007 if (new_dominant_baseline != NULL)
3008 {
3009 g_object_ref (new_dominant_baseline);
3010 }
3011 if (fo_basic_link->dominant_baseline != NULL)
3012 {
3013 g_object_unref (fo_basic_link->dominant_baseline);
3014 }
3015 fo_basic_link->dominant_baseline = new_dominant_baseline;
3016 /*g_object_notify (G_OBJECT (fo_basic_link), "dominant-baseline");*/
3017 }
3018
3019 /**
3020 * fo_basic_link_get_id:
3021 * @fo_fo: The #FoFo object.
3022 *
3023 * Gets the "id" property of @fo_fo.
3024 *
3025 * Return value: The "id" property value.
3026 **/
3027 FoProperty *
fo_basic_link_get_id(FoFo * fo_fo)3028 fo_basic_link_get_id (FoFo *fo_fo)
3029 {
3030 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3031
3032 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3033 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3034
3035 return fo_basic_link->id;
3036 }
3037
3038 /**
3039 * fo_basic_link_set_id:
3040 * @fo_fo: The #FoFo object.
3041 * @new_id: The new "id" property value.
3042 *
3043 * Sets the "id" property of @fo_fo to @new_id.
3044 **/
3045 void
fo_basic_link_set_id(FoFo * fo_fo,FoProperty * new_id)3046 fo_basic_link_set_id (FoFo *fo_fo,
3047 FoProperty *new_id)
3048 {
3049 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3050
3051 g_return_if_fail (fo_basic_link != NULL);
3052 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3053 g_return_if_fail ((new_id == NULL) ||
3054 FO_IS_PROPERTY_ID (new_id));
3055
3056 if (new_id != NULL)
3057 {
3058 g_object_ref (new_id);
3059 }
3060 if (fo_basic_link->id != NULL)
3061 {
3062 g_object_unref (fo_basic_link->id);
3063 }
3064 fo_basic_link->id = new_id;
3065 /*g_object_notify (G_OBJECT (fo_basic_link), "id");*/
3066 }
3067
3068 /**
3069 * fo_basic_link_get_keep_together:
3070 * @fo_fo: The #FoFo object.
3071 *
3072 * Gets the "keep-together" property of @fo_fo.
3073 *
3074 * Return value: The "keep-together" property value.
3075 **/
3076 FoProperty *
fo_basic_link_get_keep_together(FoFo * fo_fo)3077 fo_basic_link_get_keep_together (FoFo *fo_fo)
3078 {
3079 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3080
3081 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3082 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3083
3084 return fo_basic_link->keep_together;
3085 }
3086
3087 /**
3088 * fo_basic_link_set_keep_together:
3089 * @fo_fo: The #FoFo object.
3090 * @new_keep_together: The new "keep-together" property value.
3091 *
3092 * Sets the "keep-together" property of @fo_fo to @new_keep_together.
3093 **/
3094 void
fo_basic_link_set_keep_together(FoFo * fo_fo,FoProperty * new_keep_together)3095 fo_basic_link_set_keep_together (FoFo *fo_fo,
3096 FoProperty *new_keep_together)
3097 {
3098 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3099
3100 g_return_if_fail (fo_basic_link != NULL);
3101 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3102 g_return_if_fail ((new_keep_together == NULL) ||
3103 FO_IS_PROPERTY_KEEP_TOGETHER (new_keep_together));
3104
3105 if (new_keep_together != NULL)
3106 {
3107 g_object_ref (new_keep_together);
3108 }
3109 if (fo_basic_link->keep_together != NULL)
3110 {
3111 g_object_unref (fo_basic_link->keep_together);
3112 }
3113 fo_basic_link->keep_together = new_keep_together;
3114 /*g_object_notify (G_OBJECT (fo_basic_link), "keep-together");*/
3115 }
3116
3117 /**
3118 * fo_basic_link_get_keep_together_within_column:
3119 * @fo_fo: The #FoFo object.
3120 *
3121 * Gets the "keep-together-within-column" property of @fo_fo.
3122 *
3123 * Return value: The "keep-together-within-column" property value.
3124 **/
3125 FoProperty *
fo_basic_link_get_keep_together_within_column(FoFo * fo_fo)3126 fo_basic_link_get_keep_together_within_column (FoFo *fo_fo)
3127 {
3128 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3129
3130 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3131 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3132
3133 return fo_basic_link->keep_together_within_column;
3134 }
3135
3136 /**
3137 * fo_basic_link_set_keep_together_within_column:
3138 * @fo_fo: The #FoFo object.
3139 * @new_keep_together_within_column: The new "keep-together-within-column" property value.
3140 *
3141 * Sets the "keep-together-within-column" property of @fo_fo to @new_keep_together_within_column.
3142 **/
3143 void
fo_basic_link_set_keep_together_within_column(FoFo * fo_fo,FoProperty * new_keep_together_within_column)3144 fo_basic_link_set_keep_together_within_column (FoFo *fo_fo,
3145 FoProperty *new_keep_together_within_column)
3146 {
3147 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3148
3149 g_return_if_fail (fo_basic_link != NULL);
3150 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3151 g_return_if_fail ((new_keep_together_within_column == NULL) ||
3152 FO_IS_PROPERTY_KEEP_TOGETHER_WITHIN_COLUMN (new_keep_together_within_column));
3153
3154 if (new_keep_together_within_column != NULL)
3155 {
3156 g_object_ref (new_keep_together_within_column);
3157 }
3158 if (fo_basic_link->keep_together_within_column != NULL)
3159 {
3160 g_object_unref (fo_basic_link->keep_together_within_column);
3161 }
3162 fo_basic_link->keep_together_within_column = new_keep_together_within_column;
3163 /*g_object_notify (G_OBJECT (fo_basic_link), "keep-together-within-column");*/
3164 }
3165
3166 /**
3167 * fo_basic_link_get_keep_together_within_line:
3168 * @fo_fo: The #FoFo object.
3169 *
3170 * Gets the "keep-together-within-line" property of @fo_fo.
3171 *
3172 * Return value: The "keep-together-within-line" property value.
3173 **/
3174 FoProperty *
fo_basic_link_get_keep_together_within_line(FoFo * fo_fo)3175 fo_basic_link_get_keep_together_within_line (FoFo *fo_fo)
3176 {
3177 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3178
3179 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3180 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3181
3182 return fo_basic_link->keep_together_within_line;
3183 }
3184
3185 /**
3186 * fo_basic_link_set_keep_together_within_line:
3187 * @fo_fo: The #FoFo object.
3188 * @new_keep_together_within_line: The new "keep-together-within-line" property value.
3189 *
3190 * Sets the "keep-together-within-line" property of @fo_fo to @new_keep_together_within_line.
3191 **/
3192 void
fo_basic_link_set_keep_together_within_line(FoFo * fo_fo,FoProperty * new_keep_together_within_line)3193 fo_basic_link_set_keep_together_within_line (FoFo *fo_fo,
3194 FoProperty *new_keep_together_within_line)
3195 {
3196 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3197
3198 g_return_if_fail (fo_basic_link != NULL);
3199 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3200 g_return_if_fail ((new_keep_together_within_line == NULL) ||
3201 FO_IS_PROPERTY_KEEP_TOGETHER_WITHIN_LINE (new_keep_together_within_line));
3202
3203 if (new_keep_together_within_line != NULL)
3204 {
3205 g_object_ref (new_keep_together_within_line);
3206 }
3207 if (fo_basic_link->keep_together_within_line != NULL)
3208 {
3209 g_object_unref (fo_basic_link->keep_together_within_line);
3210 }
3211 fo_basic_link->keep_together_within_line = new_keep_together_within_line;
3212 /*g_object_notify (G_OBJECT (fo_basic_link), "keep-together-within-line");*/
3213 }
3214
3215 /**
3216 * fo_basic_link_get_keep_together_within_page:
3217 * @fo_fo: The #FoFo object.
3218 *
3219 * Gets the "keep-together-within-page" property of @fo_fo.
3220 *
3221 * Return value: The "keep-together-within-page" property value.
3222 **/
3223 FoProperty *
fo_basic_link_get_keep_together_within_page(FoFo * fo_fo)3224 fo_basic_link_get_keep_together_within_page (FoFo *fo_fo)
3225 {
3226 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3227
3228 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3229 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3230
3231 return fo_basic_link->keep_together_within_page;
3232 }
3233
3234 /**
3235 * fo_basic_link_set_keep_together_within_page:
3236 * @fo_fo: The #FoFo object.
3237 * @new_keep_together_within_page: The new "keep-together-within-page" property value.
3238 *
3239 * Sets the "keep-together-within-page" property of @fo_fo to @new_keep_together_within_page.
3240 **/
3241 void
fo_basic_link_set_keep_together_within_page(FoFo * fo_fo,FoProperty * new_keep_together_within_page)3242 fo_basic_link_set_keep_together_within_page (FoFo *fo_fo,
3243 FoProperty *new_keep_together_within_page)
3244 {
3245 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3246
3247 g_return_if_fail (fo_basic_link != NULL);
3248 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3249 g_return_if_fail ((new_keep_together_within_page == NULL) ||
3250 FO_IS_PROPERTY_KEEP_TOGETHER_WITHIN_PAGE (new_keep_together_within_page));
3251
3252 if (new_keep_together_within_page != NULL)
3253 {
3254 g_object_ref (new_keep_together_within_page);
3255 }
3256 if (fo_basic_link->keep_together_within_page != NULL)
3257 {
3258 g_object_unref (fo_basic_link->keep_together_within_page);
3259 }
3260 fo_basic_link->keep_together_within_page = new_keep_together_within_page;
3261 /*g_object_notify (G_OBJECT (fo_basic_link), "keep-together-within-page");*/
3262 }
3263
3264 /**
3265 * fo_basic_link_get_keep_with_next:
3266 * @fo_fo: The #FoFo object.
3267 *
3268 * Gets the "keep-with-next" property of @fo_fo.
3269 *
3270 * Return value: The "keep-with-next" property value.
3271 **/
3272 FoProperty *
fo_basic_link_get_keep_with_next(FoFo * fo_fo)3273 fo_basic_link_get_keep_with_next (FoFo *fo_fo)
3274 {
3275 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3276
3277 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3278 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3279
3280 return fo_basic_link->keep_with_next;
3281 }
3282
3283 /**
3284 * fo_basic_link_set_keep_with_next:
3285 * @fo_fo: The #FoFo object.
3286 * @new_keep_with_next: The new "keep-with-next" property value.
3287 *
3288 * Sets the "keep-with-next" property of @fo_fo to @new_keep_with_next.
3289 **/
3290 void
fo_basic_link_set_keep_with_next(FoFo * fo_fo,FoProperty * new_keep_with_next)3291 fo_basic_link_set_keep_with_next (FoFo *fo_fo,
3292 FoProperty *new_keep_with_next)
3293 {
3294 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3295
3296 g_return_if_fail (fo_basic_link != NULL);
3297 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3298 g_return_if_fail ((new_keep_with_next == NULL) ||
3299 FO_IS_PROPERTY_KEEP_WITH_NEXT (new_keep_with_next));
3300
3301 if (new_keep_with_next != NULL)
3302 {
3303 g_object_ref (new_keep_with_next);
3304 }
3305 if (fo_basic_link->keep_with_next != NULL)
3306 {
3307 g_object_unref (fo_basic_link->keep_with_next);
3308 }
3309 fo_basic_link->keep_with_next = new_keep_with_next;
3310 /*g_object_notify (G_OBJECT (fo_basic_link), "keep-with-next");*/
3311 }
3312
3313 /**
3314 * fo_basic_link_get_keep_with_next_within_column:
3315 * @fo_fo: The #FoFo object.
3316 *
3317 * Gets the "keep-with-next-within-column" property of @fo_fo.
3318 *
3319 * Return value: The "keep-with-next-within-column" property value.
3320 **/
3321 FoProperty *
fo_basic_link_get_keep_with_next_within_column(FoFo * fo_fo)3322 fo_basic_link_get_keep_with_next_within_column (FoFo *fo_fo)
3323 {
3324 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3325
3326 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3327 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3328
3329 return fo_basic_link->keep_with_next_within_column;
3330 }
3331
3332 /**
3333 * fo_basic_link_set_keep_with_next_within_column:
3334 * @fo_fo: The #FoFo object.
3335 * @new_keep_with_next_within_column: The new "keep-with-next-within-column" property value.
3336 *
3337 * Sets the "keep-with-next-within-column" property of @fo_fo to @new_keep_with_next_within_column.
3338 **/
3339 void
fo_basic_link_set_keep_with_next_within_column(FoFo * fo_fo,FoProperty * new_keep_with_next_within_column)3340 fo_basic_link_set_keep_with_next_within_column (FoFo *fo_fo,
3341 FoProperty *new_keep_with_next_within_column)
3342 {
3343 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3344
3345 g_return_if_fail (fo_basic_link != NULL);
3346 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3347 g_return_if_fail ((new_keep_with_next_within_column == NULL) ||
3348 FO_IS_PROPERTY_KEEP_WITH_NEXT_WITHIN_COLUMN (new_keep_with_next_within_column));
3349
3350 if (new_keep_with_next_within_column != NULL)
3351 {
3352 g_object_ref (new_keep_with_next_within_column);
3353 }
3354 if (fo_basic_link->keep_with_next_within_column != NULL)
3355 {
3356 g_object_unref (fo_basic_link->keep_with_next_within_column);
3357 }
3358 fo_basic_link->keep_with_next_within_column = new_keep_with_next_within_column;
3359 /*g_object_notify (G_OBJECT (fo_basic_link), "keep-with-next-within-column");*/
3360 }
3361
3362 /**
3363 * fo_basic_link_get_keep_with_next_within_line:
3364 * @fo_fo: The #FoFo object.
3365 *
3366 * Gets the "keep-with-next-within-line" property of @fo_fo.
3367 *
3368 * Return value: The "keep-with-next-within-line" property value.
3369 **/
3370 FoProperty *
fo_basic_link_get_keep_with_next_within_line(FoFo * fo_fo)3371 fo_basic_link_get_keep_with_next_within_line (FoFo *fo_fo)
3372 {
3373 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3374
3375 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3376 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3377
3378 return fo_basic_link->keep_with_next_within_line;
3379 }
3380
3381 /**
3382 * fo_basic_link_set_keep_with_next_within_line:
3383 * @fo_fo: The #FoFo object.
3384 * @new_keep_with_next_within_line: The new "keep-with-next-within-line" property value.
3385 *
3386 * Sets the "keep-with-next-within-line" property of @fo_fo to @new_keep_with_next_within_line.
3387 **/
3388 void
fo_basic_link_set_keep_with_next_within_line(FoFo * fo_fo,FoProperty * new_keep_with_next_within_line)3389 fo_basic_link_set_keep_with_next_within_line (FoFo *fo_fo,
3390 FoProperty *new_keep_with_next_within_line)
3391 {
3392 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3393
3394 g_return_if_fail (fo_basic_link != NULL);
3395 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3396 g_return_if_fail ((new_keep_with_next_within_line == NULL) ||
3397 FO_IS_PROPERTY_KEEP_WITH_NEXT_WITHIN_LINE (new_keep_with_next_within_line));
3398
3399 if (new_keep_with_next_within_line != NULL)
3400 {
3401 g_object_ref (new_keep_with_next_within_line);
3402 }
3403 if (fo_basic_link->keep_with_next_within_line != NULL)
3404 {
3405 g_object_unref (fo_basic_link->keep_with_next_within_line);
3406 }
3407 fo_basic_link->keep_with_next_within_line = new_keep_with_next_within_line;
3408 /*g_object_notify (G_OBJECT (fo_basic_link), "keep-with-next-within-line");*/
3409 }
3410
3411 /**
3412 * fo_basic_link_get_keep_with_next_within_page:
3413 * @fo_fo: The #FoFo object.
3414 *
3415 * Gets the "keep-with-next-within-page" property of @fo_fo.
3416 *
3417 * Return value: The "keep-with-next-within-page" property value.
3418 **/
3419 FoProperty *
fo_basic_link_get_keep_with_next_within_page(FoFo * fo_fo)3420 fo_basic_link_get_keep_with_next_within_page (FoFo *fo_fo)
3421 {
3422 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3423
3424 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3425 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3426
3427 return fo_basic_link->keep_with_next_within_page;
3428 }
3429
3430 /**
3431 * fo_basic_link_set_keep_with_next_within_page:
3432 * @fo_fo: The #FoFo object.
3433 * @new_keep_with_next_within_page: The new "keep-with-next-within-page" property value.
3434 *
3435 * Sets the "keep-with-next-within-page" property of @fo_fo to @new_keep_with_next_within_page.
3436 **/
3437 void
fo_basic_link_set_keep_with_next_within_page(FoFo * fo_fo,FoProperty * new_keep_with_next_within_page)3438 fo_basic_link_set_keep_with_next_within_page (FoFo *fo_fo,
3439 FoProperty *new_keep_with_next_within_page)
3440 {
3441 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3442
3443 g_return_if_fail (fo_basic_link != NULL);
3444 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3445 g_return_if_fail ((new_keep_with_next_within_page == NULL) ||
3446 FO_IS_PROPERTY_KEEP_WITH_NEXT_WITHIN_PAGE (new_keep_with_next_within_page));
3447
3448 if (new_keep_with_next_within_page != NULL)
3449 {
3450 g_object_ref (new_keep_with_next_within_page);
3451 }
3452 if (fo_basic_link->keep_with_next_within_page != NULL)
3453 {
3454 g_object_unref (fo_basic_link->keep_with_next_within_page);
3455 }
3456 fo_basic_link->keep_with_next_within_page = new_keep_with_next_within_page;
3457 /*g_object_notify (G_OBJECT (fo_basic_link), "keep-with-next-within-page");*/
3458 }
3459
3460 /**
3461 * fo_basic_link_get_keep_with_previous:
3462 * @fo_fo: The #FoFo object.
3463 *
3464 * Gets the "keep-with-previous" property of @fo_fo.
3465 *
3466 * Return value: The "keep-with-previous" property value.
3467 **/
3468 FoProperty *
fo_basic_link_get_keep_with_previous(FoFo * fo_fo)3469 fo_basic_link_get_keep_with_previous (FoFo *fo_fo)
3470 {
3471 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3472
3473 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3474 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3475
3476 return fo_basic_link->keep_with_previous;
3477 }
3478
3479 /**
3480 * fo_basic_link_set_keep_with_previous:
3481 * @fo_fo: The #FoFo object.
3482 * @new_keep_with_previous: The new "keep-with-previous" property value.
3483 *
3484 * Sets the "keep-with-previous" property of @fo_fo to @new_keep_with_previous.
3485 **/
3486 void
fo_basic_link_set_keep_with_previous(FoFo * fo_fo,FoProperty * new_keep_with_previous)3487 fo_basic_link_set_keep_with_previous (FoFo *fo_fo,
3488 FoProperty *new_keep_with_previous)
3489 {
3490 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3491
3492 g_return_if_fail (fo_basic_link != NULL);
3493 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3494 g_return_if_fail ((new_keep_with_previous == NULL) ||
3495 FO_IS_PROPERTY_KEEP_WITH_PREVIOUS (new_keep_with_previous));
3496
3497 if (new_keep_with_previous != NULL)
3498 {
3499 g_object_ref (new_keep_with_previous);
3500 }
3501 if (fo_basic_link->keep_with_previous != NULL)
3502 {
3503 g_object_unref (fo_basic_link->keep_with_previous);
3504 }
3505 fo_basic_link->keep_with_previous = new_keep_with_previous;
3506 /*g_object_notify (G_OBJECT (fo_basic_link), "keep-with-previous");*/
3507 }
3508
3509 /**
3510 * fo_basic_link_get_keep_with_previous_within_column:
3511 * @fo_fo: The #FoFo object.
3512 *
3513 * Gets the "keep-with-previous-within-column" property of @fo_fo.
3514 *
3515 * Return value: The "keep-with-previous-within-column" property value.
3516 **/
3517 FoProperty *
fo_basic_link_get_keep_with_previous_within_column(FoFo * fo_fo)3518 fo_basic_link_get_keep_with_previous_within_column (FoFo *fo_fo)
3519 {
3520 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3521
3522 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3523 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3524
3525 return fo_basic_link->keep_with_previous_within_column;
3526 }
3527
3528 /**
3529 * fo_basic_link_set_keep_with_previous_within_column:
3530 * @fo_fo: The #FoFo object.
3531 * @new_keep_with_previous_within_column: The new "keep-with-previous-within-column" property value.
3532 *
3533 * Sets the "keep-with-previous-within-column" property of @fo_fo to @new_keep_with_previous_within_column.
3534 **/
3535 void
fo_basic_link_set_keep_with_previous_within_column(FoFo * fo_fo,FoProperty * new_keep_with_previous_within_column)3536 fo_basic_link_set_keep_with_previous_within_column (FoFo *fo_fo,
3537 FoProperty *new_keep_with_previous_within_column)
3538 {
3539 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3540
3541 g_return_if_fail (fo_basic_link != NULL);
3542 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3543 g_return_if_fail ((new_keep_with_previous_within_column == NULL) ||
3544 FO_IS_PROPERTY_KEEP_WITH_PREVIOUS_WITHIN_COLUMN (new_keep_with_previous_within_column));
3545
3546 if (new_keep_with_previous_within_column != NULL)
3547 {
3548 g_object_ref (new_keep_with_previous_within_column);
3549 }
3550 if (fo_basic_link->keep_with_previous_within_column != NULL)
3551 {
3552 g_object_unref (fo_basic_link->keep_with_previous_within_column);
3553 }
3554 fo_basic_link->keep_with_previous_within_column = new_keep_with_previous_within_column;
3555 /*g_object_notify (G_OBJECT (fo_basic_link), "keep-with-previous-within-column");*/
3556 }
3557
3558 /**
3559 * fo_basic_link_get_keep_with_previous_within_line:
3560 * @fo_fo: The #FoFo object.
3561 *
3562 * Gets the "keep-with-previous-within-line" property of @fo_fo.
3563 *
3564 * Return value: The "keep-with-previous-within-line" property value.
3565 **/
3566 FoProperty *
fo_basic_link_get_keep_with_previous_within_line(FoFo * fo_fo)3567 fo_basic_link_get_keep_with_previous_within_line (FoFo *fo_fo)
3568 {
3569 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3570
3571 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3572 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3573
3574 return fo_basic_link->keep_with_previous_within_line;
3575 }
3576
3577 /**
3578 * fo_basic_link_set_keep_with_previous_within_line:
3579 * @fo_fo: The #FoFo object.
3580 * @new_keep_with_previous_within_line: The new "keep-with-previous-within-line" property value.
3581 *
3582 * Sets the "keep-with-previous-within-line" property of @fo_fo to @new_keep_with_previous_within_line.
3583 **/
3584 void
fo_basic_link_set_keep_with_previous_within_line(FoFo * fo_fo,FoProperty * new_keep_with_previous_within_line)3585 fo_basic_link_set_keep_with_previous_within_line (FoFo *fo_fo,
3586 FoProperty *new_keep_with_previous_within_line)
3587 {
3588 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3589
3590 g_return_if_fail (fo_basic_link != NULL);
3591 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3592 g_return_if_fail ((new_keep_with_previous_within_line == NULL) ||
3593 FO_IS_PROPERTY_KEEP_WITH_PREVIOUS_WITHIN_LINE (new_keep_with_previous_within_line));
3594
3595 if (new_keep_with_previous_within_line != NULL)
3596 {
3597 g_object_ref (new_keep_with_previous_within_line);
3598 }
3599 if (fo_basic_link->keep_with_previous_within_line != NULL)
3600 {
3601 g_object_unref (fo_basic_link->keep_with_previous_within_line);
3602 }
3603 fo_basic_link->keep_with_previous_within_line = new_keep_with_previous_within_line;
3604 /*g_object_notify (G_OBJECT (fo_basic_link), "keep-with-previous-within-line");*/
3605 }
3606
3607 /**
3608 * fo_basic_link_get_keep_with_previous_within_page:
3609 * @fo_fo: The #FoFo object.
3610 *
3611 * Gets the "keep-with-previous-within-page" property of @fo_fo.
3612 *
3613 * Return value: The "keep-with-previous-within-page" property value.
3614 **/
3615 FoProperty *
fo_basic_link_get_keep_with_previous_within_page(FoFo * fo_fo)3616 fo_basic_link_get_keep_with_previous_within_page (FoFo *fo_fo)
3617 {
3618 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3619
3620 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3621 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3622
3623 return fo_basic_link->keep_with_previous_within_page;
3624 }
3625
3626 /**
3627 * fo_basic_link_set_keep_with_previous_within_page:
3628 * @fo_fo: The #FoFo object.
3629 * @new_keep_with_previous_within_page: The new "keep-with-previous-within-page" property value.
3630 *
3631 * Sets the "keep-with-previous-within-page" property of @fo_fo to @new_keep_with_previous_within_page.
3632 **/
3633 void
fo_basic_link_set_keep_with_previous_within_page(FoFo * fo_fo,FoProperty * new_keep_with_previous_within_page)3634 fo_basic_link_set_keep_with_previous_within_page (FoFo *fo_fo,
3635 FoProperty *new_keep_with_previous_within_page)
3636 {
3637 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3638
3639 g_return_if_fail (fo_basic_link != NULL);
3640 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3641 g_return_if_fail ((new_keep_with_previous_within_page == NULL) ||
3642 FO_IS_PROPERTY_KEEP_WITH_PREVIOUS_WITHIN_PAGE (new_keep_with_previous_within_page));
3643
3644 if (new_keep_with_previous_within_page != NULL)
3645 {
3646 g_object_ref (new_keep_with_previous_within_page);
3647 }
3648 if (fo_basic_link->keep_with_previous_within_page != NULL)
3649 {
3650 g_object_unref (fo_basic_link->keep_with_previous_within_page);
3651 }
3652 fo_basic_link->keep_with_previous_within_page = new_keep_with_previous_within_page;
3653 /*g_object_notify (G_OBJECT (fo_basic_link), "keep-with-previous-within-page");*/
3654 }
3655
3656 /**
3657 * fo_basic_link_get_line_height:
3658 * @fo_fo: The #FoFo object.
3659 *
3660 * Gets the "line-height" property of @fo_fo.
3661 *
3662 * Return value: The "line-height" property value.
3663 **/
3664 FoProperty *
fo_basic_link_get_line_height(FoFo * fo_fo)3665 fo_basic_link_get_line_height (FoFo *fo_fo)
3666 {
3667 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3668
3669 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3670 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3671
3672 return fo_basic_link->line_height;
3673 }
3674
3675 /**
3676 * fo_basic_link_set_line_height:
3677 * @fo_fo: The #FoFo object.
3678 * @new_line_height: The new "line-height" property value.
3679 *
3680 * Sets the "line-height" property of @fo_fo to @new_line_height.
3681 **/
3682 void
fo_basic_link_set_line_height(FoFo * fo_fo,FoProperty * new_line_height)3683 fo_basic_link_set_line_height (FoFo *fo_fo,
3684 FoProperty *new_line_height)
3685 {
3686 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3687
3688 g_return_if_fail (fo_basic_link != NULL);
3689 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3690 g_return_if_fail ((new_line_height == NULL) ||
3691 FO_IS_PROPERTY_LINE_HEIGHT (new_line_height));
3692
3693 if (new_line_height != NULL)
3694 {
3695 g_object_ref (new_line_height);
3696 }
3697 if (fo_basic_link->line_height != NULL)
3698 {
3699 g_object_unref (fo_basic_link->line_height);
3700 }
3701 fo_basic_link->line_height = new_line_height;
3702 /*g_object_notify (G_OBJECT (fo_basic_link), "line-height");*/
3703 }
3704
3705 /**
3706 * fo_basic_link_get_padding_after:
3707 * @fo_fo: The #FoFo object.
3708 *
3709 * Gets the "padding-after" property of @fo_fo.
3710 *
3711 * Return value: The "padding-after" property value.
3712 **/
3713 FoProperty *
fo_basic_link_get_padding_after(FoFo * fo_fo)3714 fo_basic_link_get_padding_after (FoFo *fo_fo)
3715 {
3716 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3717
3718 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3719 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3720
3721 return fo_basic_link->padding_after;
3722 }
3723
3724 /**
3725 * fo_basic_link_set_padding_after:
3726 * @fo_fo: The #FoFo object.
3727 * @new_padding_after: The new "padding-after" property value.
3728 *
3729 * Sets the "padding-after" property of @fo_fo to @new_padding_after.
3730 **/
3731 void
fo_basic_link_set_padding_after(FoFo * fo_fo,FoProperty * new_padding_after)3732 fo_basic_link_set_padding_after (FoFo *fo_fo,
3733 FoProperty *new_padding_after)
3734 {
3735 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3736
3737 g_return_if_fail (fo_basic_link != NULL);
3738 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3739 g_return_if_fail ((new_padding_after == NULL) ||
3740 FO_IS_PROPERTY_PADDING_AFTER (new_padding_after));
3741
3742 if (new_padding_after != NULL)
3743 {
3744 g_object_ref (new_padding_after);
3745 }
3746 if (fo_basic_link->padding_after != NULL)
3747 {
3748 g_object_unref (fo_basic_link->padding_after);
3749 }
3750 fo_basic_link->padding_after = new_padding_after;
3751 /*g_object_notify (G_OBJECT (fo_basic_link), "padding-after");*/
3752 }
3753
3754 /**
3755 * fo_basic_link_get_padding_before:
3756 * @fo_fo: The #FoFo object.
3757 *
3758 * Gets the "padding-before" property of @fo_fo.
3759 *
3760 * Return value: The "padding-before" property value.
3761 **/
3762 FoProperty *
fo_basic_link_get_padding_before(FoFo * fo_fo)3763 fo_basic_link_get_padding_before (FoFo *fo_fo)
3764 {
3765 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3766
3767 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3768 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3769
3770 return fo_basic_link->padding_before;
3771 }
3772
3773 /**
3774 * fo_basic_link_set_padding_before:
3775 * @fo_fo: The #FoFo object.
3776 * @new_padding_before: The new "padding-before" property value.
3777 *
3778 * Sets the "padding-before" property of @fo_fo to @new_padding_before.
3779 **/
3780 void
fo_basic_link_set_padding_before(FoFo * fo_fo,FoProperty * new_padding_before)3781 fo_basic_link_set_padding_before (FoFo *fo_fo,
3782 FoProperty *new_padding_before)
3783 {
3784 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3785
3786 g_return_if_fail (fo_basic_link != NULL);
3787 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3788 g_return_if_fail ((new_padding_before == NULL) ||
3789 FO_IS_PROPERTY_PADDING_BEFORE (new_padding_before));
3790
3791 if (new_padding_before != NULL)
3792 {
3793 g_object_ref (new_padding_before);
3794 }
3795 if (fo_basic_link->padding_before != NULL)
3796 {
3797 g_object_unref (fo_basic_link->padding_before);
3798 }
3799 fo_basic_link->padding_before = new_padding_before;
3800 /*g_object_notify (G_OBJECT (fo_basic_link), "padding-before");*/
3801 }
3802
3803 /**
3804 * fo_basic_link_get_padding_bottom:
3805 * @fo_fo: The #FoFo object.
3806 *
3807 * Gets the "padding-bottom" property of @fo_fo.
3808 *
3809 * Return value: The "padding-bottom" property value.
3810 **/
3811 FoProperty *
fo_basic_link_get_padding_bottom(FoFo * fo_fo)3812 fo_basic_link_get_padding_bottom (FoFo *fo_fo)
3813 {
3814 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3815
3816 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3817 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3818
3819 return fo_basic_link->padding_bottom;
3820 }
3821
3822 /**
3823 * fo_basic_link_set_padding_bottom:
3824 * @fo_fo: The #FoFo object.
3825 * @new_padding_bottom: The new "padding-bottom" property value.
3826 *
3827 * Sets the "padding-bottom" property of @fo_fo to @new_padding_bottom.
3828 **/
3829 void
fo_basic_link_set_padding_bottom(FoFo * fo_fo,FoProperty * new_padding_bottom)3830 fo_basic_link_set_padding_bottom (FoFo *fo_fo,
3831 FoProperty *new_padding_bottom)
3832 {
3833 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3834
3835 g_return_if_fail (fo_basic_link != NULL);
3836 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3837 g_return_if_fail ((new_padding_bottom == NULL) ||
3838 FO_IS_PROPERTY_PADDING_BOTTOM (new_padding_bottom));
3839
3840 if (new_padding_bottom != NULL)
3841 {
3842 g_object_ref (new_padding_bottom);
3843 }
3844 if (fo_basic_link->padding_bottom != NULL)
3845 {
3846 g_object_unref (fo_basic_link->padding_bottom);
3847 }
3848 fo_basic_link->padding_bottom = new_padding_bottom;
3849 /*g_object_notify (G_OBJECT (fo_basic_link), "padding-bottom");*/
3850 }
3851
3852 /**
3853 * fo_basic_link_get_padding_end:
3854 * @fo_fo: The #FoFo object.
3855 *
3856 * Gets the "padding-end" property of @fo_fo.
3857 *
3858 * Return value: The "padding-end" property value.
3859 **/
3860 FoProperty *
fo_basic_link_get_padding_end(FoFo * fo_fo)3861 fo_basic_link_get_padding_end (FoFo *fo_fo)
3862 {
3863 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3864
3865 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3866 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3867
3868 return fo_basic_link->padding_end;
3869 }
3870
3871 /**
3872 * fo_basic_link_set_padding_end:
3873 * @fo_fo: The #FoFo object.
3874 * @new_padding_end: The new "padding-end" property value.
3875 *
3876 * Sets the "padding-end" property of @fo_fo to @new_padding_end.
3877 **/
3878 void
fo_basic_link_set_padding_end(FoFo * fo_fo,FoProperty * new_padding_end)3879 fo_basic_link_set_padding_end (FoFo *fo_fo,
3880 FoProperty *new_padding_end)
3881 {
3882 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3883
3884 g_return_if_fail (fo_basic_link != NULL);
3885 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3886 g_return_if_fail ((new_padding_end == NULL) ||
3887 FO_IS_PROPERTY_PADDING_END (new_padding_end));
3888
3889 if (new_padding_end != NULL)
3890 {
3891 g_object_ref (new_padding_end);
3892 }
3893 if (fo_basic_link->padding_end != NULL)
3894 {
3895 g_object_unref (fo_basic_link->padding_end);
3896 }
3897 fo_basic_link->padding_end = new_padding_end;
3898 /*g_object_notify (G_OBJECT (fo_basic_link), "padding-end");*/
3899 }
3900
3901 /**
3902 * fo_basic_link_get_padding_left:
3903 * @fo_fo: The #FoFo object.
3904 *
3905 * Gets the "padding-left" property of @fo_fo.
3906 *
3907 * Return value: The "padding-left" property value.
3908 **/
3909 FoProperty *
fo_basic_link_get_padding_left(FoFo * fo_fo)3910 fo_basic_link_get_padding_left (FoFo *fo_fo)
3911 {
3912 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3913
3914 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3915 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3916
3917 return fo_basic_link->padding_left;
3918 }
3919
3920 /**
3921 * fo_basic_link_set_padding_left:
3922 * @fo_fo: The #FoFo object.
3923 * @new_padding_left: The new "padding-left" property value.
3924 *
3925 * Sets the "padding-left" property of @fo_fo to @new_padding_left.
3926 **/
3927 void
fo_basic_link_set_padding_left(FoFo * fo_fo,FoProperty * new_padding_left)3928 fo_basic_link_set_padding_left (FoFo *fo_fo,
3929 FoProperty *new_padding_left)
3930 {
3931 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3932
3933 g_return_if_fail (fo_basic_link != NULL);
3934 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3935 g_return_if_fail ((new_padding_left == NULL) ||
3936 FO_IS_PROPERTY_PADDING_LEFT (new_padding_left));
3937
3938 if (new_padding_left != NULL)
3939 {
3940 g_object_ref (new_padding_left);
3941 }
3942 if (fo_basic_link->padding_left != NULL)
3943 {
3944 g_object_unref (fo_basic_link->padding_left);
3945 }
3946 fo_basic_link->padding_left = new_padding_left;
3947 /*g_object_notify (G_OBJECT (fo_basic_link), "padding-left");*/
3948 }
3949
3950 /**
3951 * fo_basic_link_get_padding_right:
3952 * @fo_fo: The #FoFo object.
3953 *
3954 * Gets the "padding-right" property of @fo_fo.
3955 *
3956 * Return value: The "padding-right" property value.
3957 **/
3958 FoProperty *
fo_basic_link_get_padding_right(FoFo * fo_fo)3959 fo_basic_link_get_padding_right (FoFo *fo_fo)
3960 {
3961 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3962
3963 g_return_val_if_fail (fo_basic_link != NULL, NULL);
3964 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
3965
3966 return fo_basic_link->padding_right;
3967 }
3968
3969 /**
3970 * fo_basic_link_set_padding_right:
3971 * @fo_fo: The #FoFo object.
3972 * @new_padding_right: The new "padding-right" property value.
3973 *
3974 * Sets the "padding-right" property of @fo_fo to @new_padding_right.
3975 **/
3976 void
fo_basic_link_set_padding_right(FoFo * fo_fo,FoProperty * new_padding_right)3977 fo_basic_link_set_padding_right (FoFo *fo_fo,
3978 FoProperty *new_padding_right)
3979 {
3980 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
3981
3982 g_return_if_fail (fo_basic_link != NULL);
3983 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
3984 g_return_if_fail ((new_padding_right == NULL) ||
3985 FO_IS_PROPERTY_PADDING_RIGHT (new_padding_right));
3986
3987 if (new_padding_right != NULL)
3988 {
3989 g_object_ref (new_padding_right);
3990 }
3991 if (fo_basic_link->padding_right != NULL)
3992 {
3993 g_object_unref (fo_basic_link->padding_right);
3994 }
3995 fo_basic_link->padding_right = new_padding_right;
3996 /*g_object_notify (G_OBJECT (fo_basic_link), "padding-right");*/
3997 }
3998
3999 /**
4000 * fo_basic_link_get_padding_start:
4001 * @fo_fo: The #FoFo object.
4002 *
4003 * Gets the "padding-start" property of @fo_fo.
4004 *
4005 * Return value: The "padding-start" property value.
4006 **/
4007 FoProperty *
fo_basic_link_get_padding_start(FoFo * fo_fo)4008 fo_basic_link_get_padding_start (FoFo *fo_fo)
4009 {
4010 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
4011
4012 g_return_val_if_fail (fo_basic_link != NULL, NULL);
4013 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
4014
4015 return fo_basic_link->padding_start;
4016 }
4017
4018 /**
4019 * fo_basic_link_set_padding_start:
4020 * @fo_fo: The #FoFo object.
4021 * @new_padding_start: The new "padding-start" property value.
4022 *
4023 * Sets the "padding-start" property of @fo_fo to @new_padding_start.
4024 **/
4025 void
fo_basic_link_set_padding_start(FoFo * fo_fo,FoProperty * new_padding_start)4026 fo_basic_link_set_padding_start (FoFo *fo_fo,
4027 FoProperty *new_padding_start)
4028 {
4029 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
4030
4031 g_return_if_fail (fo_basic_link != NULL);
4032 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
4033 g_return_if_fail ((new_padding_start == NULL) ||
4034 FO_IS_PROPERTY_PADDING_START (new_padding_start));
4035
4036 if (new_padding_start != NULL)
4037 {
4038 g_object_ref (new_padding_start);
4039 }
4040 if (fo_basic_link->padding_start != NULL)
4041 {
4042 g_object_unref (fo_basic_link->padding_start);
4043 }
4044 fo_basic_link->padding_start = new_padding_start;
4045 /*g_object_notify (G_OBJECT (fo_basic_link), "padding-start");*/
4046 }
4047
4048 /**
4049 * fo_basic_link_get_padding_top:
4050 * @fo_fo: The #FoFo object.
4051 *
4052 * Gets the "padding-top" property of @fo_fo.
4053 *
4054 * Return value: The "padding-top" property value.
4055 **/
4056 FoProperty *
fo_basic_link_get_padding_top(FoFo * fo_fo)4057 fo_basic_link_get_padding_top (FoFo *fo_fo)
4058 {
4059 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
4060
4061 g_return_val_if_fail (fo_basic_link != NULL, NULL);
4062 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
4063
4064 return fo_basic_link->padding_top;
4065 }
4066
4067 /**
4068 * fo_basic_link_set_padding_top:
4069 * @fo_fo: The #FoFo object.
4070 * @new_padding_top: The new "padding-top" property value.
4071 *
4072 * Sets the "padding-top" property of @fo_fo to @new_padding_top.
4073 **/
4074 void
fo_basic_link_set_padding_top(FoFo * fo_fo,FoProperty * new_padding_top)4075 fo_basic_link_set_padding_top (FoFo *fo_fo,
4076 FoProperty *new_padding_top)
4077 {
4078 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
4079
4080 g_return_if_fail (fo_basic_link != NULL);
4081 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
4082 g_return_if_fail ((new_padding_top == NULL) ||
4083 FO_IS_PROPERTY_PADDING_TOP (new_padding_top));
4084
4085 if (new_padding_top != NULL)
4086 {
4087 g_object_ref (new_padding_top);
4088 }
4089 if (fo_basic_link->padding_top != NULL)
4090 {
4091 g_object_unref (fo_basic_link->padding_top);
4092 }
4093 fo_basic_link->padding_top = new_padding_top;
4094 /*g_object_notify (G_OBJECT (fo_basic_link), "padding-top");*/
4095 }
4096
4097 /**
4098 * fo_basic_link_get_role:
4099 * @fo_fo: The #FoFo object.
4100 *
4101 * Gets the "role" property of @fo_fo.
4102 *
4103 * Return value: The "role" property value.
4104 **/
4105 FoProperty *
fo_basic_link_get_role(FoFo * fo_fo)4106 fo_basic_link_get_role (FoFo *fo_fo)
4107 {
4108 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
4109
4110 g_return_val_if_fail (fo_basic_link != NULL, NULL);
4111 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
4112
4113 return fo_basic_link->role;
4114 }
4115
4116 /**
4117 * fo_basic_link_set_role:
4118 * @fo_fo: The #FoFo object.
4119 * @new_role: The new "role" property value.
4120 *
4121 * Sets the "role" property of @fo_fo to @new_role.
4122 **/
4123 void
fo_basic_link_set_role(FoFo * fo_fo,FoProperty * new_role)4124 fo_basic_link_set_role (FoFo *fo_fo,
4125 FoProperty *new_role)
4126 {
4127 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
4128
4129 g_return_if_fail (fo_basic_link != NULL);
4130 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
4131 g_return_if_fail ((new_role == NULL) ||
4132 FO_IS_PROPERTY_ROLE (new_role));
4133
4134 if (new_role != NULL)
4135 {
4136 g_object_ref (new_role);
4137 }
4138 if (fo_basic_link->role != NULL)
4139 {
4140 g_object_unref (fo_basic_link->role);
4141 }
4142 fo_basic_link->role = new_role;
4143 /*g_object_notify (G_OBJECT (fo_basic_link), "role");*/
4144 }
4145
4146 /**
4147 * fo_basic_link_get_source_document:
4148 * @fo_fo: The #FoFo object.
4149 *
4150 * Gets the "source-document" property of @fo_fo.
4151 *
4152 * Return value: The "source-document" property value.
4153 **/
4154 FoProperty *
fo_basic_link_get_source_document(FoFo * fo_fo)4155 fo_basic_link_get_source_document (FoFo *fo_fo)
4156 {
4157 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
4158
4159 g_return_val_if_fail (fo_basic_link != NULL, NULL);
4160 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
4161
4162 return fo_basic_link->source_document;
4163 }
4164
4165 /**
4166 * fo_basic_link_set_source_document:
4167 * @fo_fo: The #FoFo object.
4168 * @new_source_document: The new "source-document" property value.
4169 *
4170 * Sets the "source-document" property of @fo_fo to @new_source_document.
4171 **/
4172 void
fo_basic_link_set_source_document(FoFo * fo_fo,FoProperty * new_source_document)4173 fo_basic_link_set_source_document (FoFo *fo_fo,
4174 FoProperty *new_source_document)
4175 {
4176 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
4177
4178 g_return_if_fail (fo_basic_link != NULL);
4179 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
4180 g_return_if_fail ((new_source_document == NULL) ||
4181 FO_IS_PROPERTY_SOURCE_DOCUMENT (new_source_document));
4182
4183 if (new_source_document != NULL)
4184 {
4185 g_object_ref (new_source_document);
4186 }
4187 if (fo_basic_link->source_document != NULL)
4188 {
4189 g_object_unref (fo_basic_link->source_document);
4190 }
4191 fo_basic_link->source_document = new_source_document;
4192 /*g_object_notify (G_OBJECT (fo_basic_link), "source-document");*/
4193 }
4194
4195 /**
4196 * fo_basic_link_get_space_end:
4197 * @fo_fo: The #FoFo object.
4198 *
4199 * Gets the "space-end" property of @fo_fo.
4200 *
4201 * Return value: The "space-end" property value.
4202 **/
4203 FoProperty *
fo_basic_link_get_space_end(FoFo * fo_fo)4204 fo_basic_link_get_space_end (FoFo *fo_fo)
4205 {
4206 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
4207
4208 g_return_val_if_fail (fo_basic_link != NULL, NULL);
4209 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
4210
4211 return fo_basic_link->space_end;
4212 }
4213
4214 /**
4215 * fo_basic_link_set_space_end:
4216 * @fo_fo: The #FoFo object.
4217 * @new_space_end: The new "space-end" property value.
4218 *
4219 * Sets the "space-end" property of @fo_fo to @new_space_end.
4220 **/
4221 void
fo_basic_link_set_space_end(FoFo * fo_fo,FoProperty * new_space_end)4222 fo_basic_link_set_space_end (FoFo *fo_fo,
4223 FoProperty *new_space_end)
4224 {
4225 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
4226
4227 g_return_if_fail (fo_basic_link != NULL);
4228 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
4229 g_return_if_fail ((new_space_end == NULL) ||
4230 FO_IS_PROPERTY_SPACE_END (new_space_end));
4231
4232 if (new_space_end != NULL)
4233 {
4234 g_object_ref (new_space_end);
4235 }
4236 if (fo_basic_link->space_end != NULL)
4237 {
4238 g_object_unref (fo_basic_link->space_end);
4239 }
4240 fo_basic_link->space_end = new_space_end;
4241 /*g_object_notify (G_OBJECT (fo_basic_link), "space-end");*/
4242 }
4243
4244 /**
4245 * fo_basic_link_get_space_start:
4246 * @fo_fo: The #FoFo object.
4247 *
4248 * Gets the "space-start" property of @fo_fo.
4249 *
4250 * Return value: The "space-start" property value.
4251 **/
4252 FoProperty *
fo_basic_link_get_space_start(FoFo * fo_fo)4253 fo_basic_link_get_space_start (FoFo *fo_fo)
4254 {
4255 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
4256
4257 g_return_val_if_fail (fo_basic_link != NULL, NULL);
4258 g_return_val_if_fail (FO_IS_BASIC_LINK (fo_basic_link), NULL);
4259
4260 return fo_basic_link->space_start;
4261 }
4262
4263 /**
4264 * fo_basic_link_set_space_start:
4265 * @fo_fo: The #FoFo object.
4266 * @new_space_start: The new "space-start" property value.
4267 *
4268 * Sets the "space-start" property of @fo_fo to @new_space_start.
4269 **/
4270 void
fo_basic_link_set_space_start(FoFo * fo_fo,FoProperty * new_space_start)4271 fo_basic_link_set_space_start (FoFo *fo_fo,
4272 FoProperty *new_space_start)
4273 {
4274 FoBasicLink *fo_basic_link = (FoBasicLink *) fo_fo;
4275
4276 g_return_if_fail (fo_basic_link != NULL);
4277 g_return_if_fail (FO_IS_BASIC_LINK (fo_basic_link));
4278 g_return_if_fail ((new_space_start == NULL) ||
4279 FO_IS_PROPERTY_SPACE_START (new_space_start));
4280
4281 if (new_space_start != NULL)
4282 {
4283 g_object_ref (new_space_start);
4284 }
4285 if (fo_basic_link->space_start != NULL)
4286 {
4287 g_object_unref (fo_basic_link->space_start);
4288 }
4289 fo_basic_link->space_start = new_space_start;
4290 /*g_object_notify (G_OBJECT (fo_basic_link), "space-start");*/
4291 }
4292