1 /* Fo
2 * fo-area-table-footer.c: Area object for 'table-footer' formatting objects
3 *
4 * Copyright (C) 2001 Sun Microsystems
5 * Copyright (C) 2007 Menteith Consulting Ltd
6 *
7 * See COPYING for the status of this software.
8 */
9
10 #include "fo-utils.h"
11 #include "fo-area.h"
12 #include "fo-area-private.h"
13 #include "fo-area-table-part.h"
14 #include "fo-area-table-part-private.h"
15 #include "fo-area-table-footer.h"
16 #include "fo-area-table-cell.h"
17 #include "fo/fo-table.h"
18 #include "property/fo-property-block-progression-dimension.h"
19
20 struct _FoAreaTableFooter
21 {
22 FoAreaTablePart parent_instance;
23 };
24
25 struct _FoAreaTableFooterClass
26 {
27 FoAreaTablePartClass parent_class;
28 };
29
30 static void fo_area_table_footer_class_init (FoAreaTableFooterClass *klass);
31 static void fo_area_table_footer_finalize (GObject *object);
32
33 static gpointer parent_class;
34
35 /**
36 * fo_area_table_footer_get_type:
37 * @void:
38 *
39 * Register the FoTableFooter object type.
40 *
41 * Return value: GType value of the FoTableFooter object type.
42 **/
43 GType
fo_area_table_footer_get_type(void)44 fo_area_table_footer_get_type (void)
45 {
46 static GType object_type = 0;
47
48 if (!object_type)
49 {
50 static const GTypeInfo object_info =
51 {
52 sizeof (FoAreaTableFooterClass),
53 (GBaseInitFunc) NULL,
54 (GBaseFinalizeFunc) NULL,
55 (GClassInitFunc) fo_area_table_footer_class_init,
56 NULL, /* class_finalize */
57 NULL, /* class_data */
58 sizeof (FoAreaTableFooter),
59 0, /* n_preallocs */
60 NULL, /* instance_init */
61 NULL /* value_table */
62 };
63
64 object_type = g_type_register_static (FO_TYPE_AREA_TABLE_PART,
65 "FoAreaTableFooter",
66 &object_info, 0);
67 }
68
69 return object_type;
70 }
71
72 /**
73 * fo_area_table_footer_class_init:
74 * @klass: FoTableFooterClass object to initialise
75 *
76 * Implements GClassInitFunc for FoTableFooterClass
77 **/
78 void
fo_area_table_footer_class_init(FoAreaTableFooterClass * klass)79 fo_area_table_footer_class_init (FoAreaTableFooterClass *klass)
80 {
81 GObjectClass *object_class = G_OBJECT_CLASS (klass);
82
83 parent_class = g_type_class_peek_parent (klass);
84
85 object_class->finalize = fo_area_table_footer_finalize;
86 }
87
88 /**
89 * fo_area_table_footer_finalize:
90 * @object: FoTableFooter object to finalize
91 *
92 * Implements GObjectFinalizeFunc for FoTableFooter
93 **/
94 void
fo_area_table_footer_finalize(GObject * object)95 fo_area_table_footer_finalize (GObject *object)
96 {
97 FoAreaTableFooter *fo_area_table_footer;
98
99 fo_area_table_footer = FO_AREA_TABLE_FOOTER (object);
100
101 G_OBJECT_CLASS (parent_class)->finalize (object);
102 }
103
104
105 /**
106 * fo_area_table_footer_new:
107 *
108 * Creates a new #FoAreaTableFooter initialized to default value.
109 *
110 * Return value: the new #FoAreaTableFooter
111 **/
112 FoArea*
fo_area_table_footer_new(void)113 fo_area_table_footer_new (void)
114 {
115 return FO_AREA (g_object_new (fo_area_table_footer_get_type (), NULL));
116 }
117