1 /* paragraph.c generated by valac, the Vala compiler
2 * generated from paragraph.vala, do not modify */
3
4 /* paragraph.vala
5 *
6 * Copyright (C) 2008-2009 Didier Villevalois
7 * Copyright (C) 2008-2012 Florian Brosch
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 *
23 * Author:
24 * Didier 'Ptitjes Villevalois <ptitjes@free.fr>
25 */
26
27 #include "valadoc.h"
28 #include <stdlib.h>
29 #include <string.h>
30 #include <glib.h>
31 #include <valagee.h>
32 #include <glib-object.h>
33
34 enum {
35 VALADOC_CONTENT_PARAGRAPH_0_PROPERTY,
36 VALADOC_CONTENT_PARAGRAPH_HORIZONTAL_ALIGN_PROPERTY,
37 VALADOC_CONTENT_PARAGRAPH_VERTICAL_ALIGN_PROPERTY,
38 VALADOC_CONTENT_PARAGRAPH_STYLE_PROPERTY,
39 VALADOC_CONTENT_PARAGRAPH_NUM_PROPERTIES
40 };
41 static GParamSpec* valadoc_content_paragraph_properties[VALADOC_CONTENT_PARAGRAPH_NUM_PROPERTIES];
42 #define _g_free0(var) (var = (g_free (var), NULL))
43 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
44 #define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
45
46 struct _ValadocContentParagraphPrivate {
47 ValadocContentHorizontalAlign _horizontal_align;
48 ValadocContentVerticalAlign _vertical_align;
49 gchar* _style;
50 };
51
52 static gint ValadocContentParagraph_private_offset;
53 static gpointer valadoc_content_paragraph_parent_class = NULL;
54 static ValadocContentBlockIface * valadoc_content_paragraph_valadoc_content_block_parent_iface = NULL;
55 static ValadocContentStyleAttributesIface * valadoc_content_paragraph_valadoc_content_style_attributes_parent_iface = NULL;
56
57 G_GNUC_INTERNAL ValadocContentParagraph* valadoc_content_paragraph_new (void);
58 G_GNUC_INTERNAL ValadocContentParagraph* valadoc_content_paragraph_construct (GType object_type);
59 G_GNUC_INTERNAL ValadocContentInlineContent* valadoc_content_inline_content_construct (GType object_type);
60 static void valadoc_content_paragraph_real_check (ValadocContentContentElement* base,
61 ValadocApiTree* api_root,
62 ValadocApiNode* container,
63 const gchar* file_path,
64 ValadocErrorReporter* reporter,
65 ValadocSettings* settings);
66 static void valadoc_content_paragraph_real_accept (ValadocContentContentElement* base,
67 ValadocContentContentVisitor* visitor);
68 static ValadocContentContentElement* valadoc_content_paragraph_real_copy (ValadocContentContentElement* base,
69 ValadocContentContentElement* new_parent);
70 G_GNUC_INTERNAL void valadoc_content_content_element_set_parent (ValadocContentContentElement* self,
71 ValadocContentContentElement* value);
72 static void valadoc_content_paragraph_finalize (GObject * obj);
73 static GType valadoc_content_paragraph_get_type_once (void);
74 static void _vala_valadoc_content_paragraph_get_property (GObject * object,
75 guint property_id,
76 GValue * value,
77 GParamSpec * pspec);
78 static void _vala_valadoc_content_paragraph_set_property (GObject * object,
79 guint property_id,
80 const GValue * value,
81 GParamSpec * pspec);
82
83 static inline gpointer
valadoc_content_paragraph_get_instance_private(ValadocContentParagraph * self)84 valadoc_content_paragraph_get_instance_private (ValadocContentParagraph* self)
85 {
86 return G_STRUCT_MEMBER_P (self, ValadocContentParagraph_private_offset);
87 }
88
89 static ValadocContentHorizontalAlign
valadoc_content_paragraph_real_get_horizontal_align(ValadocContentStyleAttributes * base)90 valadoc_content_paragraph_real_get_horizontal_align (ValadocContentStyleAttributes* base)
91 {
92 ValadocContentHorizontalAlign result;
93 ValadocContentParagraph* self;
94 ValadocContentHorizontalAlign _tmp0_;
95 self = (ValadocContentParagraph*) base;
96 _tmp0_ = self->priv->_horizontal_align;
97 result = _tmp0_;
98 return result;
99 }
100
101 static void
valadoc_content_paragraph_real_set_horizontal_align(ValadocContentStyleAttributes * base,ValadocContentHorizontalAlign value)102 valadoc_content_paragraph_real_set_horizontal_align (ValadocContentStyleAttributes* base,
103 ValadocContentHorizontalAlign value)
104 {
105 ValadocContentParagraph* self;
106 ValadocContentHorizontalAlign old_value;
107 self = (ValadocContentParagraph*) base;
108 old_value = valadoc_content_paragraph_real_get_horizontal_align (base);
109 if (old_value != value) {
110 self->priv->_horizontal_align = value;
111 g_object_notify_by_pspec ((GObject *) self, valadoc_content_paragraph_properties[VALADOC_CONTENT_PARAGRAPH_HORIZONTAL_ALIGN_PROPERTY]);
112 }
113 }
114
115 static ValadocContentVerticalAlign
valadoc_content_paragraph_real_get_vertical_align(ValadocContentStyleAttributes * base)116 valadoc_content_paragraph_real_get_vertical_align (ValadocContentStyleAttributes* base)
117 {
118 ValadocContentVerticalAlign result;
119 ValadocContentParagraph* self;
120 ValadocContentVerticalAlign _tmp0_;
121 self = (ValadocContentParagraph*) base;
122 _tmp0_ = self->priv->_vertical_align;
123 result = _tmp0_;
124 return result;
125 }
126
127 static void
valadoc_content_paragraph_real_set_vertical_align(ValadocContentStyleAttributes * base,ValadocContentVerticalAlign value)128 valadoc_content_paragraph_real_set_vertical_align (ValadocContentStyleAttributes* base,
129 ValadocContentVerticalAlign value)
130 {
131 ValadocContentParagraph* self;
132 ValadocContentVerticalAlign old_value;
133 self = (ValadocContentParagraph*) base;
134 old_value = valadoc_content_paragraph_real_get_vertical_align (base);
135 if (old_value != value) {
136 self->priv->_vertical_align = value;
137 g_object_notify_by_pspec ((GObject *) self, valadoc_content_paragraph_properties[VALADOC_CONTENT_PARAGRAPH_VERTICAL_ALIGN_PROPERTY]);
138 }
139 }
140
141 static const gchar*
valadoc_content_paragraph_real_get_style(ValadocContentStyleAttributes * base)142 valadoc_content_paragraph_real_get_style (ValadocContentStyleAttributes* base)
143 {
144 const gchar* result;
145 ValadocContentParagraph* self;
146 const gchar* _tmp0_;
147 self = (ValadocContentParagraph*) base;
148 _tmp0_ = self->priv->_style;
149 result = _tmp0_;
150 return result;
151 }
152
153 static void
valadoc_content_paragraph_real_set_style(ValadocContentStyleAttributes * base,const gchar * value)154 valadoc_content_paragraph_real_set_style (ValadocContentStyleAttributes* base,
155 const gchar* value)
156 {
157 ValadocContentParagraph* self;
158 gchar* old_value;
159 self = (ValadocContentParagraph*) base;
160 old_value = valadoc_content_paragraph_real_get_style (base);
161 if (g_strcmp0 (value, old_value) != 0) {
162 gchar* _tmp0_;
163 _tmp0_ = g_strdup (value);
164 _g_free0 (self->priv->_style);
165 self->priv->_style = _tmp0_;
166 g_object_notify_by_pspec ((GObject *) self, valadoc_content_paragraph_properties[VALADOC_CONTENT_PARAGRAPH_STYLE_PROPERTY]);
167 }
168 }
169
170 G_GNUC_INTERNAL ValadocContentParagraph*
valadoc_content_paragraph_construct(GType object_type)171 valadoc_content_paragraph_construct (GType object_type)
172 {
173 ValadocContentParagraph * self = NULL;
174 self = (ValadocContentParagraph*) valadoc_content_inline_content_construct (object_type);
175 return self;
176 }
177
178 G_GNUC_INTERNAL ValadocContentParagraph*
valadoc_content_paragraph_new(void)179 valadoc_content_paragraph_new (void)
180 {
181 return valadoc_content_paragraph_construct (VALADOC_CONTENT_TYPE_PARAGRAPH);
182 }
183
184 static void
valadoc_content_paragraph_real_check(ValadocContentContentElement * base,ValadocApiTree * api_root,ValadocApiNode * container,const gchar * file_path,ValadocErrorReporter * reporter,ValadocSettings * settings)185 valadoc_content_paragraph_real_check (ValadocContentContentElement* base,
186 ValadocApiTree* api_root,
187 ValadocApiNode* container,
188 const gchar* file_path,
189 ValadocErrorReporter* reporter,
190 ValadocSettings* settings)
191 {
192 ValadocContentParagraph * self;
193 self = (ValadocContentParagraph*) base;
194 g_return_if_fail (api_root != NULL);
195 g_return_if_fail (container != NULL);
196 g_return_if_fail (file_path != NULL);
197 g_return_if_fail (reporter != NULL);
198 g_return_if_fail (settings != NULL);
199 VALADOC_CONTENT_CONTENT_ELEMENT_CLASS (valadoc_content_paragraph_parent_class)->check ((ValadocContentContentElement*) G_TYPE_CHECK_INSTANCE_CAST (self, VALADOC_CONTENT_TYPE_INLINE_CONTENT, ValadocContentInlineContent), api_root, container, file_path, reporter, settings);
200 }
201
202 static void
valadoc_content_paragraph_real_accept(ValadocContentContentElement * base,ValadocContentContentVisitor * visitor)203 valadoc_content_paragraph_real_accept (ValadocContentContentElement* base,
204 ValadocContentContentVisitor* visitor)
205 {
206 ValadocContentParagraph * self;
207 self = (ValadocContentParagraph*) base;
208 g_return_if_fail (visitor != NULL);
209 valadoc_content_content_visitor_visit_paragraph (visitor, self);
210 }
211
212 static gpointer
_vala_iterable_ref0(gpointer self)213 _vala_iterable_ref0 (gpointer self)
214 {
215 return self ? vala_iterable_ref (self) : NULL;
216 }
217
218 static ValadocContentContentElement*
valadoc_content_paragraph_real_copy(ValadocContentContentElement * base,ValadocContentContentElement * new_parent)219 valadoc_content_paragraph_real_copy (ValadocContentContentElement* base,
220 ValadocContentContentElement* new_parent)
221 {
222 ValadocContentParagraph * self;
223 ValadocContentParagraph* p = NULL;
224 ValadocContentParagraph* _tmp0_;
225 ValadocContentParagraph* _tmp1_;
226 ValadocContentParagraph* _tmp2_;
227 ValadocContentHorizontalAlign _tmp3_;
228 ValadocContentHorizontalAlign _tmp4_;
229 ValadocContentParagraph* _tmp5_;
230 ValadocContentVerticalAlign _tmp6_;
231 ValadocContentVerticalAlign _tmp7_;
232 ValadocContentParagraph* _tmp8_;
233 const gchar* _tmp9_;
234 const gchar* _tmp10_;
235 ValadocContentContentElement* result = NULL;
236 self = (ValadocContentParagraph*) base;
237 _tmp0_ = valadoc_content_paragraph_new ();
238 p = _tmp0_;
239 _tmp1_ = p;
240 valadoc_content_content_element_set_parent ((ValadocContentContentElement*) _tmp1_, new_parent);
241 _tmp2_ = p;
242 _tmp3_ = valadoc_content_style_attributes_get_horizontal_align ((ValadocContentStyleAttributes*) self);
243 _tmp4_ = _tmp3_;
244 valadoc_content_style_attributes_set_horizontal_align ((ValadocContentStyleAttributes*) _tmp2_, _tmp4_);
245 _tmp5_ = p;
246 _tmp6_ = valadoc_content_style_attributes_get_vertical_align ((ValadocContentStyleAttributes*) self);
247 _tmp7_ = _tmp6_;
248 valadoc_content_style_attributes_set_vertical_align ((ValadocContentStyleAttributes*) _tmp5_, _tmp7_);
249 _tmp8_ = p;
250 _tmp9_ = valadoc_content_style_attributes_get_style ((ValadocContentStyleAttributes*) self);
251 _tmp10_ = _tmp9_;
252 valadoc_content_style_attributes_set_style ((ValadocContentStyleAttributes*) _tmp8_, _tmp10_);
253 {
254 ValaList* _element_list = NULL;
255 ValaList* _tmp11_;
256 ValaList* _tmp12_;
257 ValaList* _tmp13_;
258 gint _element_size = 0;
259 ValaList* _tmp14_;
260 gint _tmp15_;
261 gint _tmp16_;
262 gint _element_index = 0;
263 _tmp11_ = valadoc_content_inline_content_get_content ((ValadocContentInlineContent*) self);
264 _tmp12_ = _tmp11_;
265 _tmp13_ = _vala_iterable_ref0 (_tmp12_);
266 _element_list = _tmp13_;
267 _tmp14_ = _element_list;
268 _tmp15_ = vala_collection_get_size ((ValaCollection*) _tmp14_);
269 _tmp16_ = _tmp15_;
270 _element_size = _tmp16_;
271 _element_index = -1;
272 while (TRUE) {
273 gint _tmp17_;
274 gint _tmp18_;
275 ValadocContentInline* element = NULL;
276 ValaList* _tmp19_;
277 gpointer _tmp20_;
278 ValadocContentInline* copy = NULL;
279 ValadocContentInline* _tmp21_;
280 ValadocContentParagraph* _tmp22_;
281 ValadocContentContentElement* _tmp23_;
282 ValadocContentInline* _tmp24_;
283 ValadocContentParagraph* _tmp25_;
284 ValaList* _tmp26_;
285 ValaList* _tmp27_;
286 ValadocContentInline* _tmp28_;
287 _element_index = _element_index + 1;
288 _tmp17_ = _element_index;
289 _tmp18_ = _element_size;
290 if (!(_tmp17_ < _tmp18_)) {
291 break;
292 }
293 _tmp19_ = _element_list;
294 _tmp20_ = vala_list_get (_tmp19_, _element_index);
295 element = (ValadocContentInline*) _tmp20_;
296 _tmp21_ = element;
297 _tmp22_ = p;
298 _tmp23_ = valadoc_content_content_element_copy ((ValadocContentContentElement*) _tmp21_, (ValadocContentContentElement*) _tmp22_);
299 _tmp24_ = VALADOC_CONTENT_IS_INLINE (_tmp23_) ? ((ValadocContentInline*) _tmp23_) : NULL;
300 if (_tmp24_ == NULL) {
301 _g_object_unref0 (_tmp23_);
302 }
303 copy = _tmp24_;
304 _tmp25_ = p;
305 _tmp26_ = valadoc_content_inline_content_get_content ((ValadocContentInlineContent*) _tmp25_);
306 _tmp27_ = _tmp26_;
307 _tmp28_ = copy;
308 vala_collection_add ((ValaCollection*) _tmp27_, _tmp28_);
309 _g_object_unref0 (copy);
310 _g_object_unref0 (element);
311 }
312 _vala_iterable_unref0 (_element_list);
313 }
314 result = (ValadocContentContentElement*) p;
315 return result;
316 }
317
318 static void
valadoc_content_paragraph_class_init(ValadocContentParagraphClass * klass,gpointer klass_data)319 valadoc_content_paragraph_class_init (ValadocContentParagraphClass * klass,
320 gpointer klass_data)
321 {
322 valadoc_content_paragraph_parent_class = g_type_class_peek_parent (klass);
323 g_type_class_adjust_private_offset (klass, &ValadocContentParagraph_private_offset);
324 ((ValadocContentContentElementClass *) klass)->check = (void (*) (ValadocContentContentElement*, ValadocApiTree*, ValadocApiNode*, const gchar*, ValadocErrorReporter*, ValadocSettings*)) valadoc_content_paragraph_real_check;
325 ((ValadocContentContentElementClass *) klass)->accept = (void (*) (ValadocContentContentElement*, ValadocContentContentVisitor*)) valadoc_content_paragraph_real_accept;
326 ((ValadocContentContentElementClass *) klass)->copy = (ValadocContentContentElement* (*) (ValadocContentContentElement*, ValadocContentContentElement*)) valadoc_content_paragraph_real_copy;
327 G_OBJECT_CLASS (klass)->get_property = _vala_valadoc_content_paragraph_get_property;
328 G_OBJECT_CLASS (klass)->set_property = _vala_valadoc_content_paragraph_set_property;
329 G_OBJECT_CLASS (klass)->finalize = valadoc_content_paragraph_finalize;
330 g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_CONTENT_PARAGRAPH_HORIZONTAL_ALIGN_PROPERTY, valadoc_content_paragraph_properties[VALADOC_CONTENT_PARAGRAPH_HORIZONTAL_ALIGN_PROPERTY] = g_param_spec_enum ("horizontal-align", "horizontal-align", "horizontal-align", VALADOC_CONTENT_TYPE_HORIZONTAL_ALIGN, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
331 g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_CONTENT_PARAGRAPH_VERTICAL_ALIGN_PROPERTY, valadoc_content_paragraph_properties[VALADOC_CONTENT_PARAGRAPH_VERTICAL_ALIGN_PROPERTY] = g_param_spec_enum ("vertical-align", "vertical-align", "vertical-align", VALADOC_CONTENT_TYPE_VERTICAL_ALIGN, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
332 g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_CONTENT_PARAGRAPH_STYLE_PROPERTY, valadoc_content_paragraph_properties[VALADOC_CONTENT_PARAGRAPH_STYLE_PROPERTY] = g_param_spec_string ("style", "style", "style", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
333 }
334
335 static void
valadoc_content_paragraph_valadoc_content_block_interface_init(ValadocContentBlockIface * iface,gpointer iface_data)336 valadoc_content_paragraph_valadoc_content_block_interface_init (ValadocContentBlockIface * iface,
337 gpointer iface_data)
338 {
339 valadoc_content_paragraph_valadoc_content_block_parent_iface = g_type_interface_peek_parent (iface);
340 }
341
342 static void
valadoc_content_paragraph_valadoc_content_style_attributes_interface_init(ValadocContentStyleAttributesIface * iface,gpointer iface_data)343 valadoc_content_paragraph_valadoc_content_style_attributes_interface_init (ValadocContentStyleAttributesIface * iface,
344 gpointer iface_data)
345 {
346 valadoc_content_paragraph_valadoc_content_style_attributes_parent_iface = g_type_interface_peek_parent (iface);
347 iface->get_horizontal_align = valadoc_content_paragraph_real_get_horizontal_align;
348 iface->set_horizontal_align = valadoc_content_paragraph_real_set_horizontal_align;
349 iface->get_vertical_align = valadoc_content_paragraph_real_get_vertical_align;
350 iface->set_vertical_align = valadoc_content_paragraph_real_set_vertical_align;
351 iface->get_style = valadoc_content_paragraph_real_get_style;
352 iface->set_style = valadoc_content_paragraph_real_set_style;
353 }
354
355 static void
valadoc_content_paragraph_instance_init(ValadocContentParagraph * self,gpointer klass)356 valadoc_content_paragraph_instance_init (ValadocContentParagraph * self,
357 gpointer klass)
358 {
359 self->priv = valadoc_content_paragraph_get_instance_private (self);
360 }
361
362 static void
valadoc_content_paragraph_finalize(GObject * obj)363 valadoc_content_paragraph_finalize (GObject * obj)
364 {
365 ValadocContentParagraph * self;
366 self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALADOC_CONTENT_TYPE_PARAGRAPH, ValadocContentParagraph);
367 _g_free0 (self->priv->_style);
368 G_OBJECT_CLASS (valadoc_content_paragraph_parent_class)->finalize (obj);
369 }
370
371 static GType
valadoc_content_paragraph_get_type_once(void)372 valadoc_content_paragraph_get_type_once (void)
373 {
374 static const GTypeInfo g_define_type_info = { sizeof (ValadocContentParagraphClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_content_paragraph_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValadocContentParagraph), 0, (GInstanceInitFunc) valadoc_content_paragraph_instance_init, NULL };
375 static const GInterfaceInfo valadoc_content_block_info = { (GInterfaceInitFunc) valadoc_content_paragraph_valadoc_content_block_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
376 static const GInterfaceInfo valadoc_content_style_attributes_info = { (GInterfaceInitFunc) valadoc_content_paragraph_valadoc_content_style_attributes_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
377 GType valadoc_content_paragraph_type_id;
378 valadoc_content_paragraph_type_id = g_type_register_static (VALADOC_CONTENT_TYPE_INLINE_CONTENT, "ValadocContentParagraph", &g_define_type_info, 0);
379 g_type_add_interface_static (valadoc_content_paragraph_type_id, VALADOC_CONTENT_TYPE_BLOCK, &valadoc_content_block_info);
380 g_type_add_interface_static (valadoc_content_paragraph_type_id, VALADOC_CONTENT_TYPE_STYLE_ATTRIBUTES, &valadoc_content_style_attributes_info);
381 ValadocContentParagraph_private_offset = g_type_add_instance_private (valadoc_content_paragraph_type_id, sizeof (ValadocContentParagraphPrivate));
382 return valadoc_content_paragraph_type_id;
383 }
384
385 GType
valadoc_content_paragraph_get_type(void)386 valadoc_content_paragraph_get_type (void)
387 {
388 static volatile gsize valadoc_content_paragraph_type_id__volatile = 0;
389 if (g_once_init_enter (&valadoc_content_paragraph_type_id__volatile)) {
390 GType valadoc_content_paragraph_type_id;
391 valadoc_content_paragraph_type_id = valadoc_content_paragraph_get_type_once ();
392 g_once_init_leave (&valadoc_content_paragraph_type_id__volatile, valadoc_content_paragraph_type_id);
393 }
394 return valadoc_content_paragraph_type_id__volatile;
395 }
396
397 static void
_vala_valadoc_content_paragraph_get_property(GObject * object,guint property_id,GValue * value,GParamSpec * pspec)398 _vala_valadoc_content_paragraph_get_property (GObject * object,
399 guint property_id,
400 GValue * value,
401 GParamSpec * pspec)
402 {
403 ValadocContentParagraph * self;
404 self = G_TYPE_CHECK_INSTANCE_CAST (object, VALADOC_CONTENT_TYPE_PARAGRAPH, ValadocContentParagraph);
405 switch (property_id) {
406 case VALADOC_CONTENT_PARAGRAPH_HORIZONTAL_ALIGN_PROPERTY:
407 g_value_set_enum (value, valadoc_content_style_attributes_get_horizontal_align ((ValadocContentStyleAttributes*) self));
408 break;
409 case VALADOC_CONTENT_PARAGRAPH_VERTICAL_ALIGN_PROPERTY:
410 g_value_set_enum (value, valadoc_content_style_attributes_get_vertical_align ((ValadocContentStyleAttributes*) self));
411 break;
412 case VALADOC_CONTENT_PARAGRAPH_STYLE_PROPERTY:
413 g_value_set_string (value, valadoc_content_style_attributes_get_style ((ValadocContentStyleAttributes*) self));
414 break;
415 default:
416 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
417 break;
418 }
419 }
420
421 static void
_vala_valadoc_content_paragraph_set_property(GObject * object,guint property_id,const GValue * value,GParamSpec * pspec)422 _vala_valadoc_content_paragraph_set_property (GObject * object,
423 guint property_id,
424 const GValue * value,
425 GParamSpec * pspec)
426 {
427 ValadocContentParagraph * self;
428 self = G_TYPE_CHECK_INSTANCE_CAST (object, VALADOC_CONTENT_TYPE_PARAGRAPH, ValadocContentParagraph);
429 switch (property_id) {
430 case VALADOC_CONTENT_PARAGRAPH_HORIZONTAL_ALIGN_PROPERTY:
431 valadoc_content_style_attributes_set_horizontal_align ((ValadocContentStyleAttributes*) self, g_value_get_enum (value));
432 break;
433 case VALADOC_CONTENT_PARAGRAPH_VERTICAL_ALIGN_PROPERTY:
434 valadoc_content_style_attributes_set_vertical_align ((ValadocContentStyleAttributes*) self, g_value_get_enum (value));
435 break;
436 case VALADOC_CONTENT_PARAGRAPH_STYLE_PROPERTY:
437 valadoc_content_style_attributes_set_style ((ValadocContentStyleAttributes*) self, g_value_get_string (value));
438 break;
439 default:
440 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
441 break;
442 }
443 }
444
445