]> saetta.ns0.it Git - zakform/gdaex/commitdiff
Added class ZakFormElementExtension.
authorAndrea Zagli <azagli@libero.it>
Mon, 12 Jun 2017 19:35:31 +0000 (21:35 +0200)
committerAndrea Zagli <azagli@libero.it>
Mon, 12 Jun 2017 19:35:31 +0000 (21:35 +0200)
src/formelementextension.c
src/formelementextension.h

index 9d2c1624c21037cfc0e14e41c2142a83849a8b99..d75bd8b3f28c8faf9fbb197c60d98fd3704ab63a 100644 (file)
@@ -54,17 +54,20 @@ typedef struct
                gint like_type;
        } ZakFormGdaExElementExtensionPrivate;
 
-G_DEFINE_TYPE_WITH_PRIVATE (ZakFormGdaExElementExtension, zak_form_gdaex_element_extension, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (ZakFormGdaExElementExtension, zak_form_gdaex_element_extension, ZAK_FORM_TYPE_ELEMENT_EXTENSION)
 
 static void
 zak_form_gdaex_element_extension_class_init (ZakFormGdaExElementExtensionClass *class)
 {
        GObjectClass *object_class = G_OBJECT_CLASS (class);
+       ZakFormElementExtensionClass *parent_class = ZAK_FORM_ELEMENT_EXTENSION_CLASS (class);
 
        object_class->set_property = zak_form_gdaex_element_extension_set_property;
        object_class->get_property = zak_form_gdaex_element_extension_get_property;
        object_class->dispose = zak_form_gdaex_element_extension_dispose;
        object_class->finalize = zak_form_gdaex_element_extension_finalize;
+
+       parent_class->xml_parsing = zak_form_gdaex_element_extension_xml_parsing;
 }
 
 static void
@@ -80,10 +83,10 @@ zak_form_gdaex_element_extension_init (ZakFormGdaExElementExtension *zak_form_gd
        priv->like_type = 0;
 }
 
-GObject
+ZakFormElementExtension
 *zak_form_gdaex_element_extension_new (void)
 {
-       GObject *ret = g_object_new (zak_form_gdaex_element_extension_get_type (), NULL);
+       ZakFormElementExtension *ret = (ZakFormElementExtension *)g_object_new (zak_form_gdaex_element_extension_get_type (), NULL);
 
        return ret;
 }
@@ -94,8 +97,8 @@ GObject
  * @xnode:
  *
  */
-gboolean
-zak_form_gdaex_element_extension_xml_parsing (GObject *extension, xmlNode *xnode)
+void
+zak_form_gdaex_element_extension_xml_parsing (ZakFormElementExtension *extension, xmlNode *xnode)
 {
        xmlNode *xnodetmp;
        gchar *prop;
@@ -192,8 +195,6 @@ zak_form_gdaex_element_extension_xml_parsing (GObject *extension, xmlNode *xnode
 
                        xnodetmp = xnodetmp->next;
                }
-
-       return TRUE;
 }
 
 /**
index 32ab23f5ff3dbe33f550947ca6d9820eaa75db32..dcc827e15fd40896ec614332cde806f11f719aec 100644 (file)
 
 #include <libgda/sql-parser/gda-sql-statement.h>
 
+#include <libzakform/libzakform.h>
+
 
 G_BEGIN_DECLS
 
 
 #define ZAK_FORM_GDAEX_TYPE_ELEMENT_EXTENSION zak_form_gdaex_element_extension_get_type ()
-G_DECLARE_DERIVABLE_TYPE (ZakFormGdaExElementExtension, zak_form_gdaex_element_extension, ZAK_FORM_GDAEX, ELEMENT_EXTENSION, GObject)
+G_DECLARE_DERIVABLE_TYPE (ZakFormGdaExElementExtension, zak_form_gdaex_element_extension, ZAK_FORM_GDAEX, ELEMENT_EXTENSION, ZakFormElementExtension)
 
 struct _ZakFormGdaExElementExtensionClass
 {
-       GObjectClass parent_cleass;
+       ZakFormElementExtensionClass parent_cleass;
 };
 
-GObject *zak_form_gdaex_element_extension_new (void);
+ZakFormElementExtension *zak_form_gdaex_element_extension_new (void);
+
+void zak_form_gdaex_element_extension_xml_parsing (ZakFormElementExtension *extension, xmlNode *xnode);
 
 gchar *zak_form_gdaex_element_extension_get_where_table (ZakFormGdaExElementExtension *extension);
 void zak_form_gdaex_element_extension_set_where_table (ZakFormGdaExElementExtension *extension, const gchar *table);