]> saetta.ns0.it Git - zakform/cgi/commitdiff
Removed g_type_class_add_private deprecations.
authorAndrea Zagli <azagli@libero.it>
Tue, 15 Dec 2020 15:12:48 +0000 (16:12 +0100)
committerAndrea Zagli <azagli@libero.it>
Tue, 15 Dec 2020 15:12:48 +0000 (16:12 +0100)
13 files changed:
src/form.c
src/formelement.c
src/formelementcheck.c
src/formelementemail.c
src/formelementfile.c
src/formelementhidden.c
src/formelementpassword.c
src/formelementradio.c
src/formelementselect.c
src/formelementstring.c
src/formelementsubmit.c
src/formelementtext.c
src/formelementtextarea.c

index 92b202552570619a03901f4f393765bc963a122b..a05f352331146bb343eff7f6128acb46b496c2ad 100644 (file)
@@ -42,8 +42,6 @@ static void zak_form_cgi_form_get_property (GObject *object,
 static void zak_form_cgi_form_dispose (GObject *gobject);
 static void zak_form_cgi_form_finalize (GObject *gobject);
 
-#define ZAK_FORM_CGI_FORM_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_FORM_CGI_TYPE_FORM, ZakFormCgiFormPrivate))
-
 typedef struct _ZakFormCgiFormPrivate ZakFormCgiFormPrivate;
 struct _ZakFormCgiFormPrivate
        {
@@ -53,7 +51,7 @@ struct _ZakFormCgiFormPrivate
                gchar *bootstrap_version;
        };
 
-G_DEFINE_TYPE (ZakFormCgiForm, zak_form_cgi_form, ZAK_FORM_TYPE_FORM)
+G_DEFINE_TYPE_WITH_PRIVATE (ZakFormCgiForm, zak_form_cgi_form, ZAK_FORM_TYPE_FORM)
 
 #ifdef G_OS_WIN32
 static HMODULE backend_dll = NULL;
@@ -88,14 +86,12 @@ zak_form_cgi_form_class_init (ZakFormCgiFormClass *class)
        object_class->get_property = zak_form_cgi_form_get_property;
        object_class->dispose = zak_form_cgi_form_dispose;
        object_class->finalize = zak_form_cgi_form_finalize;
-
-       g_type_class_add_private (object_class, sizeof (ZakFormCgiFormPrivate));
 }
 
 static void
 zak_form_cgi_form_init (ZakFormCgiForm *zak_form_cgi_form)
 {
-       ZakFormCgiFormPrivate *priv = ZAK_FORM_CGI_FORM_GET_PRIVATE (zak_form_cgi_form);
+       ZakFormCgiFormPrivate *priv = zak_form_cgi_form_get_instance_private (zak_form_cgi_form);
 
        priv->zakcgimain = NULL;
        priv->ht_attrs = NULL;
@@ -153,7 +149,7 @@ ZakFormCgiForm
 
        zak_form_cgi_form = ZAK_FORM_CGI_FORM (g_object_new (zak_form_cgi_form_get_type (), NULL));
 
-       priv = ZAK_FORM_CGI_FORM_GET_PRIVATE (zak_form_cgi_form);
+       priv = zak_form_cgi_form_get_instance_private (zak_form_cgi_form);
        priv->zakcgimain = zakcgimain;
 
        va_start (ap, zakcgimain);
@@ -170,7 +166,7 @@ get_idx (ZakFormCgiForm *zakcgiform, const gchar *id)
 
        ZakFormCgiFormPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_GET_PRIVATE (zakcgiform);
+       priv = zak_form_cgi_form_get_instance_private (zakcgiform);
 
        for (idx = 0; idx < priv->ar_elems->len; idx++)
                {
@@ -226,7 +222,7 @@ zak_form_cgi_form_bind (ZakFormCgiForm *zakcgiform)
 
        g_return_if_fail (ZAK_FORM_CGI_IS_FORM (zakcgiform));
 
-       priv = ZAK_FORM_CGI_FORM_GET_PRIVATE (zakcgiform);
+       priv = zak_form_cgi_form_get_instance_private (zakcgiform);
 
        for (i = 0; i < priv->ar_elems->len; i++)
                {
@@ -269,7 +265,7 @@ gchar
 
        g_return_val_if_fail (ZAK_FORM_CGI_IS_FORM (zakcgiform), g_strdup (""));
 
-       priv = ZAK_FORM_CGI_FORM_GET_PRIVATE (zakcgiform);
+       priv = zak_form_cgi_form_get_instance_private (zakcgiform);
 
        str = g_string_new ("<form");
 
@@ -299,7 +295,7 @@ gchar
 
        ZakFormCgiFormPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_GET_PRIVATE (zakcgiform);
+       priv = zak_form_cgi_form_get_instance_private (zakcgiform);
 
        str = g_string_new ("");
 
@@ -349,7 +345,7 @@ zak_form_cgi_form_set_bootstrap_version (ZakFormCgiForm *zakcgiform, const gchar
 
        ZakFormCgiFormElement *ar_element;
 
-       priv = ZAK_FORM_CGI_FORM_GET_PRIVATE (zakcgiform);
+       priv = zak_form_cgi_form_get_instance_private (zakcgiform);
 
        if (priv->bootstrap_version != NULL)
                {
@@ -384,7 +380,7 @@ gchar
 {
        ZakFormCgiFormPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_GET_PRIVATE (zakcgiform);
+       priv = zak_form_cgi_form_get_instance_private (zakcgiform);
 
        return g_strdup (priv->bootstrap_version);
 }
@@ -397,7 +393,7 @@ zak_form_cgi_form_set_property (GObject *object,
                    GParamSpec *pspec)
 {
        ZakFormCgiForm *zak_form_cgi_form = (ZakFormCgiForm *)object;
-       ZakFormCgiFormPrivate *priv = ZAK_FORM_CGI_FORM_GET_PRIVATE (zak_form_cgi_form);
+       ZakFormCgiFormPrivate *priv = zak_form_cgi_form_get_instance_private (zak_form_cgi_form);
 
        switch (property_id)
                {
@@ -414,7 +410,7 @@ zak_form_cgi_form_get_property (GObject *object,
                    GParamSpec *pspec)
 {
        ZakFormCgiForm *zak_form_cgi_form = (ZakFormCgiForm *)object;
-       ZakFormCgiFormPrivate *priv = ZAK_FORM_CGI_FORM_GET_PRIVATE (zak_form_cgi_form);
+       ZakFormCgiFormPrivate *priv = zak_form_cgi_form_get_instance_private (zak_form_cgi_form);
 
        switch (property_id)
                {
@@ -428,7 +424,7 @@ static void
 zak_form_cgi_form_dispose (GObject *gobject)
 {
        ZakFormCgiForm *zak_form_cgi_form = (ZakFormCgiForm *)gobject;
-       ZakFormCgiFormPrivate *priv = ZAK_FORM_CGI_FORM_GET_PRIVATE (zak_form_cgi_form);
+       ZakFormCgiFormPrivate *priv = zak_form_cgi_form_get_instance_private (zak_form_cgi_form);
 
 
        GObjectClass *parent_class = g_type_class_peek_parent (G_OBJECT_GET_CLASS (gobject));
@@ -439,7 +435,7 @@ static void
 zak_form_cgi_form_finalize (GObject *gobject)
 {
        ZakFormCgiForm *zak_form_cgi_form = (ZakFormCgiForm *)gobject;
-       ZakFormCgiFormPrivate *priv = ZAK_FORM_CGI_FORM_GET_PRIVATE (zak_form_cgi_form);
+       ZakFormCgiFormPrivate *priv = zak_form_cgi_form_get_instance_private (zak_form_cgi_form);
 
 
        GObjectClass *parent_class = g_type_class_peek_parent (G_OBJECT_GET_CLASS (gobject));
index 32a16b5314e22c1b7e65fe7ed30db2819be715ec..5618b62dd4b7328cdca5c5a9f01b236bc54e64ba 100644 (file)
@@ -56,8 +56,6 @@ static GValue *zak_form_cgi_form_element_get_value (ZakFormCgiFormElement *eleme
 static gboolean zak_form_cgi_form_element_set_value (ZakFormCgiFormElement *element, GValue *value);
 static void zak_form_cgi_form_element_xml_parsing (ZakFormElement *element, xmlNode *xmlnode);
 
-#define ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_FORM_CGI_TYPE_FORM_ELEMENT, ZakFormCgiFormElementPrivate))
-
 typedef struct _ZakFormCgiFormElementPrivate ZakFormCgiFormElementPrivate;
 struct _ZakFormCgiFormElementPrivate
        {
@@ -68,7 +66,7 @@ struct _ZakFormCgiFormElementPrivate
                gchar *bootstrap_version;
        };
 
-G_DEFINE_TYPE (ZakFormCgiFormElement, zak_form_cgi_form_element, ZAK_FORM_TYPE_ELEMENT)
+G_DEFINE_TYPE_WITH_PRIVATE (ZakFormCgiFormElement, zak_form_cgi_form_element, ZAK_FORM_TYPE_ELEMENT)
 
 static void
 zak_form_cgi_form_element_class_init (ZakFormCgiFormElementClass *class)
@@ -86,8 +84,6 @@ zak_form_cgi_form_element_class_init (ZakFormCgiFormElementClass *class)
        elem_class->get_value = zak_form_cgi_form_element_get_value;
        elem_class->set_value = zak_form_cgi_form_element_set_value;
 
-       g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementPrivate));
-
        class->construct = zak_form_cgi_form_element_construct;
        class->get_ht_attrs = zak_form_cgi_form_element_get_ht_attrs;
        class->get_ht_label_attrs = zak_form_cgi_form_element_get_ht_label_attrs;
@@ -96,7 +92,7 @@ zak_form_cgi_form_element_class_init (ZakFormCgiFormElementClass *class)
 static void
 zak_form_cgi_form_element_init (ZakFormCgiFormElement *zak_form_cgi_form_element)
 {
-       ZakFormCgiFormElementPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (zak_form_cgi_form_element);
+       ZakFormCgiFormElementPrivate *priv = zak_form_cgi_form_element_get_instance_private (zak_form_cgi_form_element);
 
        priv->ht_attrs = NULL;
        priv->ht_label_attrs = NULL;
@@ -108,7 +104,7 @@ gchar
 {
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        return g_strdup (priv->id);
 }
@@ -127,7 +123,7 @@ zak_form_cgi_form_element_set_label (ZakFormCgiFormElement *element, const gchar
 
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        if (priv->ht_label_attrs != NULL)
                {
@@ -162,7 +158,7 @@ zak_form_cgi_form_element_bind (ZakFormCgiFormElement *element, GValue *value)
 {
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        priv->value = value;
 }
@@ -185,7 +181,7 @@ gchar
 
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        str = g_string_new ("<div class=\"form-group");
 
@@ -274,7 +270,7 @@ gchar
 
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        str = NULL;
 
@@ -310,7 +306,7 @@ gchar
 {
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        if (priv->ht_attrs == NULL)
                {
@@ -327,7 +323,7 @@ zak_form_cgi_form_element_set_attr (ZakFormCgiFormElement *element, const gchar
 {
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        if (priv->ht_attrs == NULL)
                {
@@ -354,7 +350,7 @@ zak_form_cgi_form_element_has_class (ZakFormCgiFormElement *element, const gchar
 
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        if (priv->ht_attrs == NULL)
                {
@@ -384,7 +380,7 @@ zak_form_cgi_form_element_add_class (ZakFormCgiFormElement *element, const gchar
 
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        if (!zak_form_cgi_form_element_has_class (element, class))
                {
@@ -412,7 +408,7 @@ zak_form_cgi_form_element_remove_class (ZakFormCgiFormElement *element, const gc
 
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        if (zak_form_cgi_form_element_has_class (element, class))
                {
@@ -442,7 +438,7 @@ zak_form_cgi_form_element_set_bootstrap_version (ZakFormCgiFormElement *element,
 
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        if (priv->bootstrap_version != NULL)
                {
@@ -456,7 +452,7 @@ gchar
 {
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        return g_strdup (priv->bootstrap_version);
 }
@@ -471,7 +467,7 @@ zak_form_cgi_form_element_construct (ZakFormCgiFormElement *element,
 
        g_return_if_fail (id != NULL);
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        priv->id = g_strdup (id);
 
@@ -491,7 +487,7 @@ static GHashTable
 {
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        return priv->ht_attrs;
 }
@@ -501,7 +497,7 @@ static GHashTable
 {
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        return priv->ht_label_attrs;
 }
@@ -513,7 +509,7 @@ static GValue
 
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        ret = priv->value;
 
@@ -525,7 +521,7 @@ zak_form_cgi_form_element_set_value (ZakFormCgiFormElement *element, GValue *val
 {
        ZakFormCgiFormElementPrivate *priv;
 
-       priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+       priv = zak_form_cgi_form_element_get_instance_private (element);
 
        priv->value = value;
 
@@ -539,7 +535,7 @@ zak_form_cgi_form_element_set_property (GObject *object,
                                         GParamSpec *pspec)
 {
        ZakFormCgiFormElement *zak_form_cgi_form_element = (ZakFormCgiFormElement *)object;
-       ZakFormCgiFormElementPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (zak_form_cgi_form_element);
+       ZakFormCgiFormElementPrivate *priv = zak_form_cgi_form_element_get_instance_private (zak_form_cgi_form_element);
 
        switch (property_id)
                {
@@ -556,7 +552,7 @@ zak_form_cgi_form_element_get_property (GObject *object,
                                         GParamSpec *pspec)
 {
        ZakFormCgiFormElement *zak_form_cgi_form_element = (ZakFormCgiFormElement *)object;
-       ZakFormCgiFormElementPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (zak_form_cgi_form_element);
+       ZakFormCgiFormElementPrivate *priv = zak_form_cgi_form_element_get_instance_private (zak_form_cgi_form_element);
 
        switch (property_id)
                {
@@ -570,7 +566,7 @@ static void
 zak_form_cgi_form_element_dispose (GObject *gobject)
 {
        ZakFormCgiFormElement *zak_form_cgi_form_element = (ZakFormCgiFormElement *)gobject;
-       ZakFormCgiFormElementPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (zak_form_cgi_form_element);
+       ZakFormCgiFormElementPrivate *priv = zak_form_cgi_form_element_get_instance_private (zak_form_cgi_form_element);
 
 
 
@@ -582,7 +578,7 @@ static void
 zak_form_cgi_form_element_finalize (GObject *gobject)
 {
        ZakFormCgiFormElement *zak_form_cgi_form_element = (ZakFormCgiFormElement *)gobject;
-       ZakFormCgiFormElementPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (zak_form_cgi_form_element);
+       ZakFormCgiFormElementPrivate *priv = zak_form_cgi_form_element_get_instance_private (zak_form_cgi_form_element);
 
 
 
index 944f829d193ee44dcba9def7e467824fd53acbc6..fda20a04396d59f2dfc317f6536466ffe7d10ac5 100644 (file)
@@ -42,8 +42,6 @@ static void zak_form_cgi_form_element_check_get_property (GObject *object,
 static void zak_form_cgi_form_element_check_dispose (GObject *gobject);
 static void zak_form_cgi_form_element_check_finalize (GObject *gobject);
 
-#define ZAK_FORM_CGI_FORM_ELEMENT_CHECK_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_FORM_CGI_TYPE_FORM_ELEMENT_CHECK, ZakFormCgiFormElementCheckPrivate))
-
 typedef struct _ZakFormCgiFormElementCheckPrivate ZakFormCgiFormElementCheckPrivate;
 struct _ZakFormCgiFormElementCheckPrivate
        {
@@ -51,7 +49,7 @@ struct _ZakFormCgiFormElementCheckPrivate
                gboolean in_line;
        };
 
-G_DEFINE_TYPE (ZakFormCgiFormElementCheck, zak_form_cgi_form_element_check, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
+G_DEFINE_TYPE_WITH_PRIVATE (ZakFormCgiFormElementCheck, zak_form_cgi_form_element_check, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
 
 static void
 zak_form_cgi_form_element_check_class_init (ZakFormCgiFormElementCheckClass *klass)
@@ -68,14 +66,12 @@ zak_form_cgi_form_element_check_class_init (ZakFormCgiFormElementCheckClass *kla
        form_elem_class->xml_parsing = zak_form_cgi_form_element_check_xml_parsing;
 
        elem_class->render = zak_form_cgi_form_element_check_render;
-
-       g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementCheckPrivate));
 }
 
 static void
 zak_form_cgi_form_element_check_init (ZakFormCgiFormElementCheck *zak_form_cgi_form_element_check)
 {
-       ZakFormCgiFormElementCheckPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_CHECK_GET_PRIVATE (zak_form_cgi_form_element_check);
+       ZakFormCgiFormElementCheckPrivate *priv = zak_form_cgi_form_element_check_get_instance_private (zak_form_cgi_form_element_check);
 
        priv->text = g_strdup ("");
        priv->in_line = TRUE;
@@ -130,7 +126,7 @@ ZakFormCgiFormElement
 gchar
 *zak_form_cgi_form_element_check_get_text (ZakFormCgiFormElementCheck *element)
 {
-       ZakFormCgiFormElementCheckPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_CHECK_GET_PRIVATE (element);
+       ZakFormCgiFormElementCheckPrivate *priv = zak_form_cgi_form_element_check_get_instance_private (element);
 
        return g_strdup (priv->text);
 }
@@ -138,7 +134,7 @@ gchar
 void
 zak_form_cgi_form_element_check_set_text (ZakFormCgiFormElementCheck *element, const gchar *text)
 {
-       ZakFormCgiFormElementCheckPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_CHECK_GET_PRIVATE (element);
+       ZakFormCgiFormElementCheckPrivate *priv = zak_form_cgi_form_element_check_get_instance_private (element);
 
        g_free (priv->text);
 
@@ -155,7 +151,7 @@ zak_form_cgi_form_element_check_set_text (ZakFormCgiFormElementCheck *element, c
 gboolean
 zak_form_cgi_form_element_check_get_in_line (ZakFormCgiFormElementCheck *element)
 {
-       ZakFormCgiFormElementCheckPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_CHECK_GET_PRIVATE (element);
+       ZakFormCgiFormElementCheckPrivate *priv = zak_form_cgi_form_element_check_get_instance_private (element);
 
        return priv->in_line;
 }
@@ -163,7 +159,7 @@ zak_form_cgi_form_element_check_get_in_line (ZakFormCgiFormElementCheck *element
 void
 zak_form_cgi_form_element_check_set_in_line (ZakFormCgiFormElementCheck *element, gboolean in_line)
 {
-       ZakFormCgiFormElementCheckPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_CHECK_GET_PRIVATE (element);
+       ZakFormCgiFormElementCheckPrivate *priv = zak_form_cgi_form_element_check_get_instance_private (element);
 
        priv->in_line = in_line;
 }
@@ -236,7 +232,7 @@ static gchar
 
        ZakFormCgiFormElementClass *klass;
 
-       ZakFormCgiFormElementCheckPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_CHECK_GET_PRIVATE (element);
+       ZakFormCgiFormElementCheckPrivate *priv = zak_form_cgi_form_element_check_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_CHECK (element));
 
        klass = (ZakFormCgiFormElementClass *)g_type_class_peek_parent (ZAK_FORM_CGI_FORM_ELEMENT_CHECK_GET_CLASS (ZAK_FORM_CGI_FORM_ELEMENT_CHECK (element)));
 
@@ -305,7 +301,7 @@ zak_form_cgi_form_element_check_set_property (GObject *object,
                                               GParamSpec *pspec)
 {
        ZakFormCgiFormElementCheck *zak_form_cgi_form_element_check = (ZakFormCgiFormElementCheck *)object;
-       ZakFormCgiFormElementCheckPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_CHECK_GET_PRIVATE (zak_form_cgi_form_element_check);
+       ZakFormCgiFormElementCheckPrivate *priv = zak_form_cgi_form_element_check_get_instance_private (zak_form_cgi_form_element_check);
 
        switch (property_id)
                {
@@ -322,7 +318,7 @@ zak_form_cgi_form_element_check_get_property (GObject *object,
                                               GParamSpec *pspec)
 {
        ZakFormCgiFormElementCheck *zak_form_cgi_form_element_check = (ZakFormCgiFormElementCheck *)object;
-       ZakFormCgiFormElementCheckPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_CHECK_GET_PRIVATE (zak_form_cgi_form_element_check);
+       ZakFormCgiFormElementCheckPrivate *priv = zak_form_cgi_form_element_check_get_instance_private (zak_form_cgi_form_element_check);
 
        switch (property_id)
                {
@@ -336,7 +332,7 @@ static void
 zak_form_cgi_form_element_check_dispose (GObject *gobject)
 {
        ZakFormCgiFormElementCheck *zak_form_cgi_form_element_check = (ZakFormCgiFormElementCheck *)gobject;
-       ZakFormCgiFormElementCheckPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_CHECK_GET_PRIVATE (zak_form_cgi_form_element_check);
+       ZakFormCgiFormElementCheckPrivate *priv = zak_form_cgi_form_element_check_get_instance_private (zak_form_cgi_form_element_check);
 
 
 
@@ -348,7 +344,7 @@ static void
 zak_form_cgi_form_element_check_finalize (GObject *gobject)
 {
        ZakFormCgiFormElementCheck *zak_form_cgi_form_element_check = (ZakFormCgiFormElementCheck *)gobject;
-       ZakFormCgiFormElementCheckPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_CHECK_GET_PRIVATE (zak_form_cgi_form_element_check);
+       ZakFormCgiFormElementCheckPrivate *priv = zak_form_cgi_form_element_check_get_instance_private (zak_form_cgi_form_element_check);
 
 
 
index 96160e08bc03183dff982c67c1048b1ab2862d8a..f94e1e51e90751ae5c2e12c1f3a3462ab193619e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2016-2020 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -40,15 +40,13 @@ static void zak_form_cgi_form_element_email_get_property (GObject *object,
 static void zak_form_cgi_form_element_email_dispose (GObject *gobject);
 static void zak_form_cgi_form_element_email_finalize (GObject *gobject);
 
-#define ZAK_FORM_CGI_FORM_ELEMENT_EMAIL_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_FORM_CGI_TYPE_FORM_ELEMENT_EMAIL, ZakFormCgiFormElementEmailPrivate))
-
 typedef struct _ZakFormCgiFormElementEmailPrivate ZakFormCgiFormElementEmailPrivate;
 struct _ZakFormCgiFormElementEmailPrivate
        {
                gpointer empty;
        };
 
-G_DEFINE_TYPE (ZakFormCgiFormElementEmail, zak_form_cgi_form_element_email, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
+G_DEFINE_TYPE_WITH_PRIVATE (ZakFormCgiFormElementEmail, zak_form_cgi_form_element_email, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
 
 static void
 zak_form_cgi_form_element_email_class_init (ZakFormCgiFormElementEmailClass *klass)
@@ -65,14 +63,12 @@ zak_form_cgi_form_element_email_class_init (ZakFormCgiFormElementEmailClass *kla
        form_elem_class->xml_parsing = zak_form_cgi_form_element_email_xml_parsing;
 
        elem_class->render = zak_form_cgi_form_element_email_render;
-
-       g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementEmailPrivate));
 }
 
 static void
 zak_form_cgi_form_element_email_init (ZakFormCgiFormElementEmail *zak_form_cgi_form_element_email)
 {
-       ZakFormCgiFormElementEmailPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_EMAIL_GET_PRIVATE (zak_form_cgi_form_element_email);
+       ZakFormCgiFormElementEmailPrivate *priv = zak_form_cgi_form_element_email_get_instance_private (zak_form_cgi_form_element_email);
 
 }
 
@@ -116,8 +112,8 @@ ZakFormCgiFormElement
        g_hash_table_replace (ht_attrs, "type", "email");
 
        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_email_parent_class)->construct (zak_form_cgi_form_element_email,
-                                                                                                                                                                               id,
-                                                                                                                                                                               ht_attrs);
+                                    id,
+                                    ht_attrs);
 
        return zak_form_cgi_form_element_email;
 }
@@ -161,8 +157,8 @@ zak_form_cgi_form_element_email_xml_parsing (ZakFormElement *element, xmlNodePtr
        if (id != NULL)
                {
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_email_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
-                                                                                                                                                                                               id,
-                                                                                                                                                                                               ht_attrs);
+                                                    id,
+                                                    ht_attrs);
                }
 }
 
@@ -200,7 +196,7 @@ zak_form_cgi_form_element_email_set_property (GObject *object,
                    GParamSpec *pspec)
 {
        ZakFormCgiFormElementEmail *zak_form_cgi_form_element_email = (ZakFormCgiFormElementEmail *)object;
-       ZakFormCgiFormElementEmailPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_EMAIL_GET_PRIVATE (zak_form_cgi_form_element_email);
+       ZakFormCgiFormElementEmailPrivate *priv = zak_form_cgi_form_element_email_get_instance_private (zak_form_cgi_form_element_email);
 
        switch (property_id)
                {
@@ -217,7 +213,7 @@ zak_form_cgi_form_element_email_get_property (GObject *object,
                    GParamSpec *pspec)
 {
        ZakFormCgiFormElementEmail *zak_form_cgi_form_element_email = (ZakFormCgiFormElementEmail *)object;
-       ZakFormCgiFormElementEmailPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_EMAIL_GET_PRIVATE (zak_form_cgi_form_element_email);
+       ZakFormCgiFormElementEmailPrivate *priv = zak_form_cgi_form_element_email_get_instance_private (zak_form_cgi_form_element_email);
 
        switch (property_id)
                {
@@ -231,7 +227,7 @@ static void
 zak_form_cgi_form_element_email_dispose (GObject *gobject)
 {
        ZakFormCgiFormElementEmail *zak_form_cgi_form_element_email = (ZakFormCgiFormElementEmail *)gobject;
-       ZakFormCgiFormElementEmailPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_EMAIL_GET_PRIVATE (zak_form_cgi_form_element_email);
+       ZakFormCgiFormElementEmailPrivate *priv = zak_form_cgi_form_element_email_get_instance_private (zak_form_cgi_form_element_email);
 
 
 
@@ -243,7 +239,7 @@ static void
 zak_form_cgi_form_element_email_finalize (GObject *gobject)
 {
        ZakFormCgiFormElementEmail *zak_form_cgi_form_element_email = (ZakFormCgiFormElementEmail *)gobject;
-       ZakFormCgiFormElementEmailPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_EMAIL_GET_PRIVATE (zak_form_cgi_form_element_email);
+       ZakFormCgiFormElementEmailPrivate *priv = zak_form_cgi_form_element_email_get_instance_private (zak_form_cgi_form_element_email);
 
 
 
index caa1d4f0baf592253e10d1eb3e8d1b03a835c28e..4fa89aa6f277b2c3adb5b82a84caf413b79cbe28 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2017-2020 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -44,8 +44,6 @@ static void zak_form_cgi_form_element_file_finalize (GObject *gobject);
 
 static gboolean zak_form_cgi_form_element_file_after_validating (ZakFormElement *element, GPtrArray *ar_messages);
 
-#define ZAK_FORM_CGI_FORM_ELEMENT_FILE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_FORM_CGI_TYPE_FORM_ELEMENT_FILE, ZakFormCgiFormElementFilePrivate))
-
 typedef struct _ZakFormCgiFormElementFilePrivate ZakFormCgiFormElementFilePrivate;
 struct _ZakFormCgiFormElementFilePrivate
        {
@@ -55,7 +53,7 @@ struct _ZakFormCgiFormElementFilePrivate
                gchar *mime_type_message;
        };
 
-G_DEFINE_TYPE (ZakFormCgiFormElementFile, zak_form_cgi_form_element_file, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
+G_DEFINE_TYPE_WITH_PRIVATE (ZakFormCgiFormElementFile, zak_form_cgi_form_element_file, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
 
 static void
 zak_form_cgi_form_element_file_class_init (ZakFormCgiFormElementFileClass *klass)
@@ -72,14 +70,12 @@ zak_form_cgi_form_element_file_class_init (ZakFormCgiFormElementFileClass *klass
        elem_class->xml_parsing = zak_form_cgi_form_element_file_xml_parsing;
 
        cgi_elem_class->render = zak_form_cgi_form_element_file_render;
-
-       g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementFilePrivate));
 }
 
 static void
 zak_form_cgi_form_element_file_init (ZakFormCgiFormElementFile *zak_form_cgi_form_element_file)
 {
-       ZakFormCgiFormElementFilePrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_FILE_GET_PRIVATE (zak_form_cgi_form_element_file);
+       ZakFormCgiFormElementFilePrivate *priv = zak_form_cgi_form_element_file_get_instance_private (zak_form_cgi_form_element_file);
 
        priv->size_min = 0;
        priv->size_max = 0;
@@ -190,7 +186,7 @@ zak_form_cgi_form_element_file_xml_parsing (ZakFormElement *element, xmlNodePtr
 void
 zak_form_cgi_form_element_file_set_size_min (ZakFormElement *element, guint min)
 {
-       ZakFormCgiFormElementFilePrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_FILE_GET_PRIVATE (element);
+       ZakFormCgiFormElementFilePrivate *priv = zak_form_cgi_form_element_file_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_FILE (element));
 
        priv->size_min = min;
 }
@@ -198,7 +194,7 @@ zak_form_cgi_form_element_file_set_size_min (ZakFormElement *element, guint min)
 guint
 zak_form_cgi_form_element_file_get_size_min (ZakFormElement *element)
 {
-       ZakFormCgiFormElementFilePrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_FILE_GET_PRIVATE (element);
+       ZakFormCgiFormElementFilePrivate *priv = zak_form_cgi_form_element_file_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_FILE (element));
 
        return priv->size_min;
 }
@@ -206,7 +202,7 @@ zak_form_cgi_form_element_file_get_size_min (ZakFormElement *element)
 void
 zak_form_cgi_form_element_file_set_size_max (ZakFormElement *element, guint max)
 {
-       ZakFormCgiFormElementFilePrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_FILE_GET_PRIVATE (element);
+       ZakFormCgiFormElementFilePrivate *priv = zak_form_cgi_form_element_file_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_FILE (element));
 
        priv->size_max = max;
 }
@@ -214,7 +210,7 @@ zak_form_cgi_form_element_file_set_size_max (ZakFormElement *element, guint max)
 guint
 zak_form_cgi_form_element_file_get_size_max (ZakFormElement *element)
 {
-       ZakFormCgiFormElementFilePrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_FILE_GET_PRIVATE (element);
+       ZakFormCgiFormElementFilePrivate *priv = zak_form_cgi_form_element_file_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_FILE (element));
 
        return priv->size_max;
 }
@@ -229,7 +225,7 @@ zak_form_cgi_form_element_file_set_size_range (ZakFormElement *element, guint mi
 void
 zak_form_cgi_form_element_file_set_mime_type (ZakFormElement *element, const gchar *mime_type)
 {
-       ZakFormCgiFormElementFilePrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_FILE_GET_PRIVATE (element);
+       ZakFormCgiFormElementFilePrivate *priv = zak_form_cgi_form_element_file_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_FILE (element));
 
        if (priv->mime_type != NULL)
                {
@@ -246,7 +242,7 @@ zak_form_cgi_form_element_file_set_mime_type (ZakFormElement *element, const gch
 gchar
 *zak_form_cgi_form_element_file_get_mime_type (ZakFormElement *element)
 {
-       ZakFormCgiFormElementFilePrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_FILE_GET_PRIVATE (element);
+       ZakFormCgiFormElementFilePrivate *priv = zak_form_cgi_form_element_file_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_FILE (element));
 
        if (priv->mime_type == NULL)
                {
@@ -261,7 +257,7 @@ gchar
 void
 zak_form_cgi_form_element_file_set_mime_type_message (ZakFormElement *element, const gchar *mime_type_message)
 {
-       ZakFormCgiFormElementFilePrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_FILE_GET_PRIVATE (element);
+       ZakFormCgiFormElementFilePrivate *priv = zak_form_cgi_form_element_file_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_FILE (element));
 
        if (priv->mime_type_message != NULL)
                {
@@ -278,7 +274,7 @@ zak_form_cgi_form_element_file_set_mime_type_message (ZakFormElement *element, c
 gchar
 *zak_form_cgi_form_element_file_get_mime_type_message (ZakFormElement *element)
 {
-       ZakFormCgiFormElementFilePrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_FILE_GET_PRIVATE (element);
+       ZakFormCgiFormElementFilePrivate *priv = zak_form_cgi_form_element_file_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_FILE (element));
 
        if (priv->mime_type_message == NULL)
                {
@@ -324,7 +320,7 @@ zak_form_cgi_form_element_file_set_property (GObject *object,
                                              GParamSpec *pspec)
 {
        ZakFormCgiFormElementFile *zak_form_cgi_form_element_file = (ZakFormCgiFormElementFile *)object;
-       ZakFormCgiFormElementFilePrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_FILE_GET_PRIVATE (zak_form_cgi_form_element_file);
+       ZakFormCgiFormElementFilePrivate *priv = zak_form_cgi_form_element_file_get_instance_private (zak_form_cgi_form_element_file);
 
        switch (property_id)
                {
@@ -341,7 +337,7 @@ zak_form_cgi_form_element_file_get_property (GObject *object,
                                              GParamSpec *pspec)
 {
        ZakFormCgiFormElementFile *zak_form_cgi_form_element_file = (ZakFormCgiFormElementFile *)object;
-       ZakFormCgiFormElementFilePrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_FILE_GET_PRIVATE (zak_form_cgi_form_element_file);
+       ZakFormCgiFormElementFilePrivate *priv = zak_form_cgi_form_element_file_get_instance_private (zak_form_cgi_form_element_file);
 
        switch (property_id)
                {
@@ -355,7 +351,7 @@ static void
 zak_form_cgi_form_element_file_dispose (GObject *gobject)
 {
        ZakFormCgiFormElementFile *zak_form_cgi_form_element_file = (ZakFormCgiFormElementFile *)gobject;
-       ZakFormCgiFormElementFilePrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_FILE_GET_PRIVATE (zak_form_cgi_form_element_file);
+       ZakFormCgiFormElementFilePrivate *priv = zak_form_cgi_form_element_file_get_instance_private (zak_form_cgi_form_element_file);
 
 
 
@@ -367,7 +363,7 @@ static void
 zak_form_cgi_form_element_file_finalize (GObject *gobject)
 {
        ZakFormCgiFormElementFile *zak_form_cgi_form_element_file = (ZakFormCgiFormElementFile *)gobject;
-       ZakFormCgiFormElementFilePrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_FILE_GET_PRIVATE (zak_form_cgi_form_element_file);
+       ZakFormCgiFormElementFilePrivate *priv = zak_form_cgi_form_element_file_get_instance_private (zak_form_cgi_form_element_file);
 
 
 
@@ -382,7 +378,7 @@ zak_form_cgi_form_element_file_after_validating (ZakFormElement *element, GPtrAr
 
        ZakCgiFile *cgi_file;
 
-       ZakFormCgiFormElementFilePrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_FILE_GET_PRIVATE (element);
+       ZakFormCgiFormElementFilePrivate *priv = zak_form_cgi_form_element_file_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_FILE (element));
 
        ret = FALSE;
 
index 1e1b7285b3d28404d943488d23a9c9f44421d85c..e0355c34dbc6caf1af32fe9dc41c32ec3204c998 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2017 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-2020 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -40,15 +40,13 @@ static void zak_form_cgi_form_element_hidden_get_property (GObject *object,
 static void zak_form_cgi_form_element_hidden_dispose (GObject *gobject);
 static void zak_form_cgi_form_element_hidden_finalize (GObject *gobject);
 
-#define ZAK_FORM_CGI_FORM_ELEMENT_HIDDEN_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_FORM_CGI_TYPE_FORM_ELEMENT_HIDDEN, ZakFormCgiFormElementHiddenPrivate))
-
 typedef struct _ZakFormCgiFormElementHiddenPrivate ZakFormCgiFormElementHiddenPrivate;
 struct _ZakFormCgiFormElementHiddenPrivate
        {
                gpointer empty;
        };
 
-G_DEFINE_TYPE (ZakFormCgiFormElementHidden, zak_form_cgi_form_element_hidden, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
+G_DEFINE_TYPE_WITH_PRIVATE (ZakFormCgiFormElementHidden, zak_form_cgi_form_element_hidden, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
 
 static void
 zak_form_cgi_form_element_hidden_class_init (ZakFormCgiFormElementHiddenClass *klass)
@@ -65,14 +63,12 @@ zak_form_cgi_form_element_hidden_class_init (ZakFormCgiFormElementHiddenClass *k
        form_elem_class->xml_parsing = zak_form_cgi_form_element_hidden_xml_parsing;
 
        elem_class->render = zak_form_cgi_form_element_hidden_render;
-
-       g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementHiddenPrivate));
 }
 
 static void
 zak_form_cgi_form_element_hidden_init (ZakFormCgiFormElementHidden *zak_form_cgi_form_element_hidden)
 {
-       ZakFormCgiFormElementHiddenPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_HIDDEN_GET_PRIVATE (zak_form_cgi_form_element_hidden);
+       ZakFormCgiFormElementHiddenPrivate *priv = zak_form_cgi_form_element_hidden_get_instance_private (zak_form_cgi_form_element_hidden);
 
 }
 
@@ -116,8 +112,8 @@ ZakFormCgiFormElement
        g_hash_table_replace (ht_attrs, "type", "hidden");
 
        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_hidden_parent_class)->construct (zak_form_cgi_form_element_hidden,
-                                                                                                                                                                         id,
-                                                                                                                                                                         ht_attrs);
+                                     id,
+                                     ht_attrs);
 
        return zak_form_cgi_form_element_hidden;
 }
@@ -157,8 +153,8 @@ zak_form_cgi_form_element_hidden_xml_parsing (ZakFormElement *element, xmlNodePt
        if (id != NULL)
                {
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_hidden_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
-                                                                                                                                                                                         id,
-                                                                                                                                                                                         ht_attrs);
+                                                     id,
+                                                     ht_attrs);
                }
 }
 
@@ -196,7 +192,7 @@ zak_form_cgi_form_element_hidden_set_property (GObject *object,
                    GParamSpec *pspec)
 {
        ZakFormCgiFormElementHidden *zak_form_cgi_form_element_hidden = (ZakFormCgiFormElementHidden *)object;
-       ZakFormCgiFormElementHiddenPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_HIDDEN_GET_PRIVATE (zak_form_cgi_form_element_hidden);
+       ZakFormCgiFormElementHiddenPrivate *priv = zak_form_cgi_form_element_hidden_get_instance_private (zak_form_cgi_form_element_hidden);
 
        switch (property_id)
                {
@@ -213,7 +209,7 @@ zak_form_cgi_form_element_hidden_get_property (GObject *object,
                    GParamSpec *pspec)
 {
        ZakFormCgiFormElementHidden *zak_form_cgi_form_element_hidden = (ZakFormCgiFormElementHidden *)object;
-       ZakFormCgiFormElementHiddenPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_HIDDEN_GET_PRIVATE (zak_form_cgi_form_element_hidden);
+       ZakFormCgiFormElementHiddenPrivate *priv = zak_form_cgi_form_element_hidden_get_instance_private (zak_form_cgi_form_element_hidden);
 
        switch (property_id)
                {
@@ -227,7 +223,7 @@ static void
 zak_form_cgi_form_element_hidden_dispose (GObject *gobject)
 {
        ZakFormCgiFormElementHidden *zak_form_cgi_form_element_hidden = (ZakFormCgiFormElementHidden *)gobject;
-       ZakFormCgiFormElementHiddenPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_HIDDEN_GET_PRIVATE (zak_form_cgi_form_element_hidden);
+       ZakFormCgiFormElementHiddenPrivate *priv = zak_form_cgi_form_element_hidden_get_instance_private (zak_form_cgi_form_element_hidden);
 
 
 
@@ -239,7 +235,7 @@ static void
 zak_form_cgi_form_element_hidden_finalize (GObject *gobject)
 {
        ZakFormCgiFormElementHidden *zak_form_cgi_form_element_hidden = (ZakFormCgiFormElementHidden *)gobject;
-       ZakFormCgiFormElementHiddenPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_HIDDEN_GET_PRIVATE (zak_form_cgi_form_element_hidden);
+       ZakFormCgiFormElementHiddenPrivate *priv = zak_form_cgi_form_element_hidden_get_instance_private (zak_form_cgi_form_element_hidden);
 
 
 
index 8a21d2dfc38b6d66441bdf902fe24c8958760496..e843d65f9292efe6033cde01b5a88c31de52d07e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2017 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-2020 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -40,15 +40,13 @@ static void zak_form_cgi_form_element_password_get_property (GObject *object,
 static void zak_form_cgi_form_element_password_dispose (GObject *gobject);
 static void zak_form_cgi_form_element_password_finalize (GObject *gobject);
 
-#define ZAK_FORM_CGI_FORM_ELEMENT_PASSWORD_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_FORM_CGI_TYPE_FORM_ELEMENT_PASSWORD, ZakFormCgiFormElementPasswordPrivate))
-
 typedef struct _ZakFormCgiFormElementPasswordPrivate ZakFormCgiFormElementPasswordPrivate;
 struct _ZakFormCgiFormElementPasswordPrivate
        {
                gpointer empty;
        };
 
-G_DEFINE_TYPE (ZakFormCgiFormElementPassword, zak_form_cgi_form_element_password, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
+G_DEFINE_TYPE_WITH_PRIVATE (ZakFormCgiFormElementPassword, zak_form_cgi_form_element_password, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
 
 static void
 zak_form_cgi_form_element_password_class_init (ZakFormCgiFormElementPasswordClass *klass)
@@ -65,14 +63,12 @@ zak_form_cgi_form_element_password_class_init (ZakFormCgiFormElementPasswordClas
        form_elem_class->xml_parsing = zak_form_cgi_form_element_password_xml_parsing;
 
        elem_class->render = zak_form_cgi_form_element_password_render;
-
-       g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementPasswordPrivate));
 }
 
 static void
 zak_form_cgi_form_element_password_init (ZakFormCgiFormElementPassword *zak_form_cgi_form_element_password)
 {
-       ZakFormCgiFormElementPasswordPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_PASSWORD_GET_PRIVATE (zak_form_cgi_form_element_password);
+       ZakFormCgiFormElementPasswordPrivate *priv = zak_form_cgi_form_element_password_get_instance_private (zak_form_cgi_form_element_password);
 
 }
 
@@ -100,7 +96,7 @@ ZakFormCgiFormElement
  */
 ZakFormCgiFormElement
 *zak_form_cgi_form_element_password_new_attrs (const gchar *id,
-                                                                                 ...)
+                                               ...)
 {
        va_list ap;
 
@@ -116,8 +112,8 @@ ZakFormCgiFormElement
        g_hash_table_replace (ht_attrs, "type", "password");
 
        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_password_parent_class)->construct (zak_form_cgi_form_element_password,
-                                                                                                                                                                               id,
-                                                                                                                                                                               ht_attrs);
+                                       id,
+                                       ht_attrs);
 
        return zak_form_cgi_form_element_password;
 }
@@ -161,8 +157,8 @@ zak_form_cgi_form_element_password_xml_parsing (ZakFormElement *element, xmlNode
        if (id != NULL)
                {
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_password_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
-                                                                                                                                                                                               id,
-                                                                                                                                                                                               ht_attrs);
+                                                       id,
+                                                       ht_attrs);
                }
 }
 
@@ -200,7 +196,7 @@ zak_form_cgi_form_element_password_set_property (GObject *object,
                    GParamSpec *pspec)
 {
        ZakFormCgiFormElementPassword *zak_form_cgi_form_element_password = (ZakFormCgiFormElementPassword *)object;
-       ZakFormCgiFormElementPasswordPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_PASSWORD_GET_PRIVATE (zak_form_cgi_form_element_password);
+       ZakFormCgiFormElementPasswordPrivate *priv = zak_form_cgi_form_element_password_get_instance_private (zak_form_cgi_form_element_password);
 
        switch (property_id)
                {
@@ -217,7 +213,7 @@ zak_form_cgi_form_element_password_get_property (GObject *object,
                    GParamSpec *pspec)
 {
        ZakFormCgiFormElementPassword *zak_form_cgi_form_element_password = (ZakFormCgiFormElementPassword *)object;
-       ZakFormCgiFormElementPasswordPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_PASSWORD_GET_PRIVATE (zak_form_cgi_form_element_password);
+       ZakFormCgiFormElementPasswordPrivate *priv = zak_form_cgi_form_element_password_get_instance_private (zak_form_cgi_form_element_password);
 
        switch (property_id)
                {
@@ -231,7 +227,7 @@ static void
 zak_form_cgi_form_element_password_dispose (GObject *gobject)
 {
        ZakFormCgiFormElementPassword *zak_form_cgi_form_element_password = (ZakFormCgiFormElementPassword *)gobject;
-       ZakFormCgiFormElementPasswordPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_PASSWORD_GET_PRIVATE (zak_form_cgi_form_element_password);
+       ZakFormCgiFormElementPasswordPrivate *priv = zak_form_cgi_form_element_password_get_instance_private (zak_form_cgi_form_element_password);
 
 
 
@@ -243,7 +239,7 @@ static void
 zak_form_cgi_form_element_password_finalize (GObject *gobject)
 {
        ZakFormCgiFormElementPassword *zak_form_cgi_form_element_password = (ZakFormCgiFormElementPassword *)gobject;
-       ZakFormCgiFormElementPasswordPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_PASSWORD_GET_PRIVATE (zak_form_cgi_form_element_password);
+       ZakFormCgiFormElementPasswordPrivate *priv = zak_form_cgi_form_element_password_get_instance_private (zak_form_cgi_form_element_password);
 
 
 
index a2812581b5cc42677d90a1210fe727533a054ab2..8e7935150e40508c583b45e3d2673201b23092f8 100644 (file)
@@ -42,8 +42,6 @@ static void zak_form_cgi_form_element_radio_get_property (GObject *object,
 static void zak_form_cgi_form_element_radio_dispose (GObject *gobject);
 static void zak_form_cgi_form_element_radio_finalize (GObject *gobject);
 
-#define ZAK_FORM_CGI_FORM_ELEMENT_RADIO_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_FORM_CGI_TYPE_FORM_ELEMENT_RADIO, ZakFormCgiFormElementRadioPrivate))
-
 typedef struct _ZakFormCgiFormElementRadioPrivate ZakFormCgiFormElementRadioPrivate;
 struct _ZakFormCgiFormElementRadioPrivate
        {
@@ -51,7 +49,7 @@ struct _ZakFormCgiFormElementRadioPrivate
                GPtrArray *ar_options;
        };
 
-G_DEFINE_TYPE (ZakFormCgiFormElementRadio, zak_form_cgi_form_element_radio, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
+G_DEFINE_TYPE_WITH_PRIVATE (ZakFormCgiFormElementRadio, zak_form_cgi_form_element_radio, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
 
 typedef struct
        {
@@ -74,14 +72,12 @@ zak_form_cgi_form_element_radio_class_init (ZakFormCgiFormElementRadioClass *kla
        form_elem_class->xml_parsing = zak_form_cgi_form_element_radio_xml_parsing;
 
        elem_class->render = zak_form_cgi_form_element_radio_render;
-
-       g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementRadioPrivate));
 }
 
 static void
 zak_form_cgi_form_element_radio_init (ZakFormCgiFormElementRadio *zak_form_cgi_form_element_radio)
 {
-       ZakFormCgiFormElementRadioPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_RADIO_GET_PRIVATE (zak_form_cgi_form_element_radio);
+       ZakFormCgiFormElementRadioPrivate *priv = zak_form_cgi_form_element_radio_get_instance_private (zak_form_cgi_form_element_radio);
 
        priv->in_line = TRUE;
        priv->ar_options = g_ptr_array_new ();
@@ -136,7 +132,7 @@ ZakFormCgiFormElement
 gboolean
 zak_form_cgi_form_element_radio_get_in_line (ZakFormCgiFormElementRadio *element)
 {
-       ZakFormCgiFormElementRadioPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_RADIO_GET_PRIVATE (element);
+       ZakFormCgiFormElementRadioPrivate *priv = zak_form_cgi_form_element_radio_get_instance_private (element);
 
        return priv->in_line;
 }
@@ -144,7 +140,7 @@ zak_form_cgi_form_element_radio_get_in_line (ZakFormCgiFormElementRadio *element
 void
 zak_form_cgi_form_element_radio_set_in_line (ZakFormCgiFormElementRadio *element, gboolean in_line)
 {
-       ZakFormCgiFormElementRadioPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_RADIO_GET_PRIVATE (element);
+       ZakFormCgiFormElementRadioPrivate *priv = zak_form_cgi_form_element_radio_get_instance_private (element);
 
        priv->in_line = in_line;
 }
@@ -158,7 +154,7 @@ zak_form_cgi_form_element_radio_xml_parsing (ZakFormElement *element, xmlNodePtr
 
        xmlNode *cur;
 
-       ZakFormCgiFormElementRadioPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_RADIO_GET_PRIVATE (element);
+       ZakFormCgiFormElementRadioPrivate *priv = zak_form_cgi_form_element_radio_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_RADIO (element));
 
        id = NULL;
 
@@ -237,7 +233,7 @@ gchar
 
        ZakFormCgiFormElementClass *klass;
 
-       ZakFormCgiFormElementRadioPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_RADIO_GET_PRIVATE (element);
+       ZakFormCgiFormElementRadioPrivate *priv = zak_form_cgi_form_element_radio_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_RADIO (element));
 
        klass = (ZakFormCgiFormElementClass *)g_type_class_peek_parent (ZAK_FORM_CGI_FORM_ELEMENT_RADIO_GET_CLASS (ZAK_FORM_CGI_FORM_ELEMENT_RADIO (element)));
 
@@ -325,7 +321,7 @@ static gchar
 
        ZakFormCgiFormElementClass *klass;
 
-       ZakFormCgiFormElementRadioPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_RADIO_GET_PRIVATE (element);
+       ZakFormCgiFormElementRadioPrivate *priv = zak_form_cgi_form_element_radio_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_RADIO (element));
 
        klass = (ZakFormCgiFormElementClass *)g_type_class_peek_parent (ZAK_FORM_CGI_FORM_ELEMENT_RADIO_GET_CLASS (ZAK_FORM_CGI_FORM_ELEMENT_RADIO (element)));
        ht_label_attrs = klass->get_ht_label_attrs (element);
@@ -359,7 +355,7 @@ zak_form_cgi_form_element_radio_set_property (GObject *object,
                                               GParamSpec *pspec)
 {
        ZakFormCgiFormElementRadio *zak_form_cgi_form_element_radio = (ZakFormCgiFormElementRadio *)object;
-       ZakFormCgiFormElementRadioPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_RADIO_GET_PRIVATE (zak_form_cgi_form_element_radio);
+       ZakFormCgiFormElementRadioPrivate *priv = zak_form_cgi_form_element_radio_get_instance_private (zak_form_cgi_form_element_radio);
 
        switch (property_id)
                {
@@ -376,7 +372,7 @@ zak_form_cgi_form_element_radio_get_property (GObject *object,
                                               GParamSpec *pspec)
 {
        ZakFormCgiFormElementRadio *zak_form_cgi_form_element_radio = (ZakFormCgiFormElementRadio *)object;
-       ZakFormCgiFormElementRadioPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_RADIO_GET_PRIVATE (zak_form_cgi_form_element_radio);
+       ZakFormCgiFormElementRadioPrivate *priv = zak_form_cgi_form_element_radio_get_instance_private (zak_form_cgi_form_element_radio);
 
        switch (property_id)
                {
@@ -390,7 +386,7 @@ static void
 zak_form_cgi_form_element_radio_dispose (GObject *gobject)
 {
        ZakFormCgiFormElementRadio *zak_form_cgi_form_element_radio = (ZakFormCgiFormElementRadio *)gobject;
-       ZakFormCgiFormElementRadioPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_RADIO_GET_PRIVATE (zak_form_cgi_form_element_radio);
+       ZakFormCgiFormElementRadioPrivate *priv = zak_form_cgi_form_element_radio_get_instance_private (zak_form_cgi_form_element_radio);
 
 
 
@@ -402,7 +398,7 @@ static void
 zak_form_cgi_form_element_radio_finalize (GObject *gobject)
 {
        ZakFormCgiFormElementRadio *zak_form_cgi_form_element_radio = (ZakFormCgiFormElementRadio *)gobject;
-       ZakFormCgiFormElementRadioPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_RADIO_GET_PRIVATE (zak_form_cgi_form_element_radio);
+       ZakFormCgiFormElementRadioPrivate *priv = zak_form_cgi_form_element_radio_get_instance_private (zak_form_cgi_form_element_radio);
 
 
 
index 3cb9d0e7400ee550813e255b5008943e2eb820ae..58b82dda940dc5cd836aa51e38fe48fe55080bd0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2019 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-2020 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -40,15 +40,13 @@ static void zak_form_cgi_form_element_select_get_property (GObject *object,
 static void zak_form_cgi_form_element_select_dispose (GObject *gobject);
 static void zak_form_cgi_form_element_select_finalize (GObject *gobject);
 
-#define ZAK_FORM_CGI_FORM_ELEMENT_SELECT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_FORM_CGI_TYPE_FORM_ELEMENT_SELECT, ZakFormCgiFormElementSelectPrivate))
-
 typedef struct _ZakFormCgiFormElementSelectPrivate ZakFormCgiFormElementSelectPrivate;
 struct _ZakFormCgiFormElementSelectPrivate
        {
                GPtrArray *ar_options;
        };
 
-G_DEFINE_TYPE (ZakFormCgiFormElementSelect, zak_form_cgi_form_element_select, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
+G_DEFINE_TYPE_WITH_PRIVATE (ZakFormCgiFormElementSelect, zak_form_cgi_form_element_select, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
 
 static void
 zak_form_cgi_form_element_select_class_init (ZakFormCgiFormElementSelectClass *klass)
@@ -65,14 +63,12 @@ zak_form_cgi_form_element_select_class_init (ZakFormCgiFormElementSelectClass *k
        form_elem_class->xml_parsing = zak_form_cgi_form_element_select_xml_parsing;
 
        elem_class->render = zak_form_cgi_form_element_select_render;
-
-       g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementSelectPrivate));
 }
 
 static void
 zak_form_cgi_form_element_select_init (ZakFormCgiFormElementSelect *zak_form_cgi_form_element_select)
 {
-       ZakFormCgiFormElementSelectPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_SELECT_GET_PRIVATE (zak_form_cgi_form_element_select);
+       ZakFormCgiFormElementSelectPrivate *priv = zak_form_cgi_form_element_select_get_instance_private (zak_form_cgi_form_element_select);
 
        priv->ar_options = g_ptr_array_new ();
 }
@@ -135,7 +131,7 @@ zak_form_cgi_form_element_select_add_option (ZakFormCgiFormElementSelect *elemen
        va_list ap;
        GHashTable *ht_attrs;
 
-       ZakFormCgiFormElementSelectPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_SELECT_GET_PRIVATE (element);
+       ZakFormCgiFormElementSelectPrivate *priv = zak_form_cgi_form_element_select_get_instance_private (element);
 
        va_start (ap, content);
        ht_attrs = zak_cgi_commons_valist_to_ghashtable (ap);
@@ -212,7 +208,7 @@ static gchar
 
        ZakFormCgiFormElementClass *klass;
 
-       ZakFormCgiFormElementSelectPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_SELECT_GET_PRIVATE (element);
+       ZakFormCgiFormElementSelectPrivate *priv = zak_form_cgi_form_element_select_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_SELECT (element));
 
        klass = (ZakFormCgiFormElementClass *)g_type_class_peek_parent (ZAK_FORM_CGI_FORM_ELEMENT_SELECT_GET_CLASS (ZAK_FORM_CGI_FORM_ELEMENT_SELECT (element)));
 
@@ -261,7 +257,7 @@ zak_form_cgi_form_element_select_set_property (GObject *object,
                                                GParamSpec *pspec)
 {
        ZakFormCgiFormElementSelect *zak_form_cgi_form_element_select = (ZakFormCgiFormElementSelect *)object;
-       ZakFormCgiFormElementSelectPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_SELECT_GET_PRIVATE (zak_form_cgi_form_element_select);
+       ZakFormCgiFormElementSelectPrivate *priv = zak_form_cgi_form_element_select_get_instance_private (zak_form_cgi_form_element_select);
 
        switch (property_id)
                {
@@ -278,7 +274,7 @@ zak_form_cgi_form_element_select_get_property (GObject *object,
                                                GParamSpec *pspec)
 {
        ZakFormCgiFormElementSelect *zak_form_cgi_form_element_select = (ZakFormCgiFormElementSelect *)object;
-       ZakFormCgiFormElementSelectPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_SELECT_GET_PRIVATE (zak_form_cgi_form_element_select);
+       ZakFormCgiFormElementSelectPrivate *priv = zak_form_cgi_form_element_select_get_instance_private (zak_form_cgi_form_element_select);
 
        switch (property_id)
                {
@@ -292,7 +288,7 @@ static void
 zak_form_cgi_form_element_select_dispose (GObject *gobject)
 {
        ZakFormCgiFormElementSelect *zak_form_cgi_form_element_select = (ZakFormCgiFormElementSelect *)gobject;
-       ZakFormCgiFormElementSelectPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_SELECT_GET_PRIVATE (zak_form_cgi_form_element_select);
+       ZakFormCgiFormElementSelectPrivate *priv = zak_form_cgi_form_element_select_get_instance_private (zak_form_cgi_form_element_select);
 
 
 
@@ -304,7 +300,7 @@ static void
 zak_form_cgi_form_element_select_finalize (GObject *gobject)
 {
        ZakFormCgiFormElementSelect *zak_form_cgi_form_element_select = (ZakFormCgiFormElementSelect *)gobject;
-       ZakFormCgiFormElementSelectPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_SELECT_GET_PRIVATE (zak_form_cgi_form_element_select);
+       ZakFormCgiFormElementSelectPrivate *priv = zak_form_cgi_form_element_select_get_instance_private (zak_form_cgi_form_element_select);
 
 
 
index 26732ee6be236ced89f5a1646246fa696ed57d51..dba1baa6151155b4ac4d9f63f05c6f04c02d2b60 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2017 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-2020 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -42,15 +42,13 @@ static void zak_form_cgi_form_element_string_get_property (GObject *object,
 static void zak_form_cgi_form_element_string_dispose (GObject *gobject);
 static void zak_form_cgi_form_element_string_finalize (GObject *gobject);
 
-#define ZAK_FORM_CGI_FORM_ELEMENT_STRING_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_FORM_CGI_TYPE_FORM_ELEMENT_STRING, ZakFormCgiFormElementStringPrivate))
-
 typedef struct _ZakFormCgiFormElementStringPrivate ZakFormCgiFormElementStringPrivate;
 struct _ZakFormCgiFormElementStringPrivate
        {
                gchar *str;
        };
 
-G_DEFINE_TYPE (ZakFormCgiFormElementString, zak_form_cgi_form_element_string, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
+G_DEFINE_TYPE_WITH_PRIVATE (ZakFormCgiFormElementString, zak_form_cgi_form_element_string, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
 
 static void
 zak_form_cgi_form_element_string_class_init (ZakFormCgiFormElementStringClass *klass)
@@ -68,14 +66,12 @@ zak_form_cgi_form_element_string_class_init (ZakFormCgiFormElementStringClass *k
 
        elem_class->render = zak_form_cgi_form_element_string_render;
        //elem_class->is_valid = zak_form_cgi_form_element_string_is_valid;
-
-       g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementStringPrivate));
 }
 
 static void
 zak_form_cgi_form_element_string_init (ZakFormCgiFormElementString *zak_form_cgi_form_element_string)
 {
-       ZakFormCgiFormElementStringPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_STRING_GET_PRIVATE (zak_form_cgi_form_element_string);
+       ZakFormCgiFormElementStringPrivate *priv = zak_form_cgi_form_element_string_get_instance_private (zak_form_cgi_form_element_string);
 
        priv->str = NULL;
 }
@@ -108,7 +104,7 @@ ZakFormCgiFormElement
 
        zak_form_cgi_form_element_string = zak_form_cgi_form_element_string_new ();
 
-       ZakFormCgiFormElementStringPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_STRING_GET_PRIVATE (zak_form_cgi_form_element_string);
+       ZakFormCgiFormElementStringPrivate *priv = zak_form_cgi_form_element_string_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_STRING (zak_form_cgi_form_element_string));
 
        priv->str = g_strdup (str);
 
@@ -127,7 +123,7 @@ zak_form_cgi_form_element_string_xml_parsing (ZakFormElement *element, xmlNodePt
                {
                        if (xmlStrcmp (cur->name, (const xmlChar *)"string") == 0)
                                {
-                                       priv = ZAK_FORM_CGI_FORM_ELEMENT_STRING_GET_PRIVATE (ZAK_FORM_CGI_FORM_ELEMENT_STRING (element));
+                                       priv = zak_form_cgi_form_element_string_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_STRING (element));
                                        priv->str = g_strdup ((gchar *)xmlNodeGetContent (cur));
                                        break;
                                }
@@ -141,7 +137,7 @@ static gchar
 {
        gchar *ret;
 
-       ZakFormCgiFormElementStringPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_STRING_GET_PRIVATE (element);
+       ZakFormCgiFormElementStringPrivate *priv = zak_form_cgi_form_element_string_get_instance_private (ZAK_FORM_CGI_FORM_ELEMENT_STRING (element));
 
        ret = g_strdup (priv->str);
 
@@ -168,7 +164,7 @@ zak_form_cgi_form_element_string_set_property (GObject *object,
                    GParamSpec *pspec)
 {
        ZakFormCgiFormElementString *zak_form_cgi_form_element_string = (ZakFormCgiFormElementString *)object;
-       ZakFormCgiFormElementStringPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_STRING_GET_PRIVATE (zak_form_cgi_form_element_string);
+       ZakFormCgiFormElementStringPrivate *priv = zak_form_cgi_form_element_string_get_instance_private (zak_form_cgi_form_element_string);
 
        switch (property_id)
                {
@@ -185,7 +181,7 @@ zak_form_cgi_form_element_string_get_property (GObject *object,
                    GParamSpec *pspec)
 {
        ZakFormCgiFormElementString *zak_form_cgi_form_element_string = (ZakFormCgiFormElementString *)object;
-       ZakFormCgiFormElementStringPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_STRING_GET_PRIVATE (zak_form_cgi_form_element_string);
+       ZakFormCgiFormElementStringPrivate *priv = zak_form_cgi_form_element_string_get_instance_private (zak_form_cgi_form_element_string);
 
        switch (property_id)
                {
@@ -199,7 +195,7 @@ static void
 zak_form_cgi_form_element_string_dispose (GObject *gobject)
 {
        ZakFormCgiFormElementString *zak_form_cgi_form_element_string = (ZakFormCgiFormElementString *)gobject;
-       ZakFormCgiFormElementStringPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_STRING_GET_PRIVATE (zak_form_cgi_form_element_string);
+       ZakFormCgiFormElementStringPrivate *priv = zak_form_cgi_form_element_string_get_instance_private (zak_form_cgi_form_element_string);
 
 
 
@@ -211,7 +207,7 @@ static void
 zak_form_cgi_form_element_string_finalize (GObject *gobject)
 {
        ZakFormCgiFormElementString *zak_form_cgi_form_element_string = (ZakFormCgiFormElementString *)gobject;
-       ZakFormCgiFormElementStringPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_STRING_GET_PRIVATE (zak_form_cgi_form_element_string);
+       ZakFormCgiFormElementStringPrivate *priv = zak_form_cgi_form_element_string_get_instance_private (zak_form_cgi_form_element_string);
 
 
 
index 349333937756ba9cad35231d2fe48fa739a87399..99720cb98f3125ff683314900457a73b2d7d1d8f 100644 (file)
@@ -40,15 +40,13 @@ static void zak_form_cgi_form_element_submit_get_property (GObject *object,
 static void zak_form_cgi_form_element_submit_dispose (GObject *gobject);
 static void zak_form_cgi_form_element_submit_finalize (GObject *gobject);
 
-#define ZAK_FORM_CGI_FORM_ELEMENT_SUBMIT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_FORM_CGI_TYPE_FORM_ELEMENT_SUBMIT, ZakFormCgiFormElementSubmitPrivate))
-
 typedef struct _ZakFormCgiFormElementSubmitPrivate ZakFormCgiFormElementSubmitPrivate;
 struct _ZakFormCgiFormElementSubmitPrivate
        {
                gpointer empty;
        };
 
-G_DEFINE_TYPE (ZakFormCgiFormElementSubmit, zak_form_cgi_form_element_submit, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
+G_DEFINE_TYPE_WITH_PRIVATE (ZakFormCgiFormElementSubmit, zak_form_cgi_form_element_submit, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
 
 static void
 zak_form_cgi_form_element_submit_class_init (ZakFormCgiFormElementSubmitClass *klass)
@@ -65,14 +63,12 @@ zak_form_cgi_form_element_submit_class_init (ZakFormCgiFormElementSubmitClass *k
        form_elem_class->xml_parsing = zak_form_cgi_form_element_submit_xml_parsing;
 
        elem_class->render = zak_form_cgi_form_element_submit_render;
-
-       g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementSubmitPrivate));
 }
 
 static void
 zak_form_cgi_form_element_submit_init (ZakFormCgiFormElementSubmit *zak_form_cgi_form_element_submit)
 {
-       ZakFormCgiFormElementSubmitPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_SUBMIT_GET_PRIVATE (zak_form_cgi_form_element_submit);
+       ZakFormCgiFormElementSubmitPrivate *priv = zak_form_cgi_form_element_submit_get_instance_private (zak_form_cgi_form_element_submit);
 
 }
 
@@ -111,8 +107,8 @@ ZakFormCgiFormElement
        va_start (ap, id);
 
        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_submit_parent_class)->construct (zak_form_cgi_form_element_submit,
-                                                                                                                                                                         id,
-                                                                                                                                                                         zak_cgi_commons_valist_to_ghashtable (ap));
+                                     id,
+                                     zak_cgi_commons_valist_to_ghashtable (ap));
 
        return zak_form_cgi_form_element_submit;
 }
@@ -155,8 +151,8 @@ zak_form_cgi_form_element_submit_xml_parsing (ZakFormElement *element, xmlNodePt
        if (id != NULL)
                {
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_submit_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
-                                                                                                                                                                                         id,
-                                                                                                                                                                                         ht_attrs);
+                                                     id,
+                                                     ht_attrs);
                }
 }
 
@@ -222,7 +218,7 @@ zak_form_cgi_form_element_submit_set_property (GObject *object,
                    GParamSpec *pspec)
 {
        ZakFormCgiFormElementSubmit *zak_form_cgi_form_element_submit = (ZakFormCgiFormElementSubmit *)object;
-       ZakFormCgiFormElementSubmitPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_SUBMIT_GET_PRIVATE (zak_form_cgi_form_element_submit);
+       ZakFormCgiFormElementSubmitPrivate *priv = zak_form_cgi_form_element_submit_get_instance_private (zak_form_cgi_form_element_submit);
 
        switch (property_id)
                {
@@ -239,7 +235,7 @@ zak_form_cgi_form_element_submit_get_property (GObject *object,
                    GParamSpec *pspec)
 {
        ZakFormCgiFormElementSubmit *zak_form_cgi_form_element_submit = (ZakFormCgiFormElementSubmit *)object;
-       ZakFormCgiFormElementSubmitPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_SUBMIT_GET_PRIVATE (zak_form_cgi_form_element_submit);
+       ZakFormCgiFormElementSubmitPrivate *priv = zak_form_cgi_form_element_submit_get_instance_private (zak_form_cgi_form_element_submit);
 
        switch (property_id)
                {
@@ -253,7 +249,7 @@ static void
 zak_form_cgi_form_element_submit_dispose (GObject *gobject)
 {
        ZakFormCgiFormElementSubmit *zak_form_cgi_form_element_submit = (ZakFormCgiFormElementSubmit *)gobject;
-       ZakFormCgiFormElementSubmitPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_SUBMIT_GET_PRIVATE (zak_form_cgi_form_element_submit);
+       ZakFormCgiFormElementSubmitPrivate *priv = zak_form_cgi_form_element_submit_get_instance_private (zak_form_cgi_form_element_submit);
 
 
 
@@ -265,7 +261,7 @@ static void
 zak_form_cgi_form_element_submit_finalize (GObject *gobject)
 {
        ZakFormCgiFormElementSubmit *zak_form_cgi_form_element_submit = (ZakFormCgiFormElementSubmit *)gobject;
-       ZakFormCgiFormElementSubmitPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_SUBMIT_GET_PRIVATE (zak_form_cgi_form_element_submit);
+       ZakFormCgiFormElementSubmitPrivate *priv = zak_form_cgi_form_element_submit_get_instance_private (zak_form_cgi_form_element_submit);
 
 
 
index abb771286d288b33ccd4e48d8b2aea211e676f79..abdcf3f8b8a840077b04eb2a5d24fbdfc143cb07 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2017 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-2020 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -29,26 +29,24 @@ static void zak_form_cgi_form_element_text_init (ZakFormCgiFormElementText *zak_
 static gchar *zak_form_cgi_form_element_text_render (ZakFormCgiFormElement *element);
 
 static void zak_form_cgi_form_element_text_set_property (GObject *object,
-                               guint property_id,
-                               const GValue *value,
-                               GParamSpec *pspec);
+                                                         guint property_id,
+                                                         const GValue *value,
+                                                         GParamSpec *pspec);
 static void zak_form_cgi_form_element_text_get_property (GObject *object,
-                               guint property_id,
-                               GValue *value,
-                               GParamSpec *pspec);
+                                                         guint property_id,
+                                                         GValue *value,
+                                                         GParamSpec *pspec);
 
 static void zak_form_cgi_form_element_text_dispose (GObject *gobject);
 static void zak_form_cgi_form_element_text_finalize (GObject *gobject);
 
-#define ZAK_FORM_CGI_FORM_ELEMENT_TEXT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_FORM_CGI_TYPE_FORM_ELEMENT_TEXT, ZakFormCgiFormElementTextPrivate))
-
 typedef struct _ZakFormCgiFormElementTextPrivate ZakFormCgiFormElementTextPrivate;
 struct _ZakFormCgiFormElementTextPrivate
        {
                gpointer empty;
        };
 
-G_DEFINE_TYPE (ZakFormCgiFormElementText, zak_form_cgi_form_element_text, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
+G_DEFINE_TYPE_WITH_PRIVATE (ZakFormCgiFormElementText, zak_form_cgi_form_element_text, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
 
 static void
 zak_form_cgi_form_element_text_class_init (ZakFormCgiFormElementTextClass *klass)
@@ -65,14 +63,12 @@ zak_form_cgi_form_element_text_class_init (ZakFormCgiFormElementTextClass *klass
        form_elem_class->xml_parsing = zak_form_cgi_form_element_text_xml_parsing;
 
        elem_class->render = zak_form_cgi_form_element_text_render;
-
-       g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementTextPrivate));
 }
 
 static void
 zak_form_cgi_form_element_text_init (ZakFormCgiFormElementText *zak_form_cgi_form_element_text)
 {
-       ZakFormCgiFormElementTextPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_TEXT_GET_PRIVATE (zak_form_cgi_form_element_text);
+       ZakFormCgiFormElementTextPrivate *priv = zak_form_cgi_form_element_text_get_instance_private (zak_form_cgi_form_element_text);
 
 }
 
@@ -111,8 +107,8 @@ ZakFormCgiFormElement
        va_start (ap, id);
 
        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_text_parent_class)->construct (zak_form_cgi_form_element_text,
-                                                                                                                                                                       id,
-                                                                                                                                                                       zak_cgi_commons_valist_to_ghashtable (ap));
+                                   id,
+                                   zak_cgi_commons_valist_to_ghashtable (ap));
 
        return zak_form_cgi_form_element_text;
 }
@@ -155,8 +151,8 @@ zak_form_cgi_form_element_text_xml_parsing (ZakFormElement *element, xmlNodePtr
        if (id != NULL)
                {
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_text_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
-                                                                                                                                                                                       id,
-                                                                                                                                                                                       ht_attrs);
+                                                   id,
+                                                   ht_attrs);
                }
 }
 
@@ -189,33 +185,33 @@ static gchar
 /* PRIVATE */
 static void
 zak_form_cgi_form_element_text_set_property (GObject *object,
-                   guint property_id,
-                   const GValue *value,
-                   GParamSpec *pspec)
+                                             guint property_id,
+                                             const GValue *value,
+                                             GParamSpec *pspec)
 {
        ZakFormCgiFormElementText *zak_form_cgi_form_element_text = (ZakFormCgiFormElementText *)object;
-       ZakFormCgiFormElementTextPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_TEXT_GET_PRIVATE (zak_form_cgi_form_element_text);
+       ZakFormCgiFormElementTextPrivate *priv = zak_form_cgi_form_element_text_get_instance_private (zak_form_cgi_form_element_text);
 
        switch (property_id)
                {
-                       default:
-                               G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-                               break;
+               default:
+                       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+                       break;
                }
 }
 
 static void
 zak_form_cgi_form_element_text_get_property (GObject *object,
-                   guint property_id,
-                   GValue *value,
-                   GParamSpec *pspec)
+                                             guint property_id,
+                                             GValue *value,
+                                             GParamSpec *pspec)
 {
        ZakFormCgiFormElementText *zak_form_cgi_form_element_text = (ZakFormCgiFormElementText *)object;
-       ZakFormCgiFormElementTextPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_TEXT_GET_PRIVATE (zak_form_cgi_form_element_text);
+       ZakFormCgiFormElementTextPrivate *priv = zak_form_cgi_form_element_text_get_instance_private (zak_form_cgi_form_element_text);
 
        switch (property_id)
                {
-                       default:
+               default:
                                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
                                break;
                }
@@ -225,7 +221,7 @@ static void
 zak_form_cgi_form_element_text_dispose (GObject *gobject)
 {
        ZakFormCgiFormElementText *zak_form_cgi_form_element_text = (ZakFormCgiFormElementText *)gobject;
-       ZakFormCgiFormElementTextPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_TEXT_GET_PRIVATE (zak_form_cgi_form_element_text);
+       ZakFormCgiFormElementTextPrivate *priv = zak_form_cgi_form_element_text_get_instance_private (zak_form_cgi_form_element_text);
 
 
 
@@ -237,7 +233,7 @@ static void
 zak_form_cgi_form_element_text_finalize (GObject *gobject)
 {
        ZakFormCgiFormElementText *zak_form_cgi_form_element_text = (ZakFormCgiFormElementText *)gobject;
-       ZakFormCgiFormElementTextPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_TEXT_GET_PRIVATE (zak_form_cgi_form_element_text);
+       ZakFormCgiFormElementTextPrivate *priv = zak_form_cgi_form_element_text_get_instance_private (zak_form_cgi_form_element_text);
 
 
 
index a41efcdd379f78ded825c826e0a040b852b0a304..556cfd9b0367c839164d14ccadfd244b1b25cfb9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2017 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-2020 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -29,26 +29,24 @@ static void zak_form_cgi_form_element_text_area_init (ZakFormCgiFormElementTextA
 static gchar *zak_form_cgi_form_element_text_area_render (ZakFormCgiFormElement *element);
 
 static void zak_form_cgi_form_element_text_area_set_property (GObject *object,
-                               guint property_id,
-                               const GValue *value,
-                               GParamSpec *pspec);
+                                                              guint property_id,
+                                                              const GValue *value,
+                                                              GParamSpec *pspec);
 static void zak_form_cgi_form_element_text_area_get_property (GObject *object,
-                               guint property_id,
-                               GValue *value,
-                               GParamSpec *pspec);
+                                                              guint property_id,
+                                                              GValue *value,
+                                                              GParamSpec *pspec);
 
 static void zak_form_cgi_form_element_text_area_dispose (GObject *gobject);
 static void zak_form_cgi_form_element_text_area_finalize (GObject *gobject);
 
-#define ZAK_FORM_CGI_FORM_ELEMENT_TEXT_AREA_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_FORM_CGI_TYPE_FORM_ELEMENT_TEXT_AREA, ZakFormCgiFormElementTextAreaPrivate))
-
 typedef struct _ZakFormCgiFormElementTextAreaPrivate ZakFormCgiFormElementTextAreaPrivate;
 struct _ZakFormCgiFormElementTextAreaPrivate
        {
                gpointer empty;
        };
 
-G_DEFINE_TYPE (ZakFormCgiFormElementTextArea, zak_form_cgi_form_element_text_area, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
+G_DEFINE_TYPE_WITH_PRIVATE (ZakFormCgiFormElementTextArea, zak_form_cgi_form_element_text_area, ZAK_FORM_CGI_TYPE_FORM_ELEMENT)
 
 static void
 zak_form_cgi_form_element_text_area_class_init (ZakFormCgiFormElementTextAreaClass *klass)
@@ -65,14 +63,12 @@ zak_form_cgi_form_element_text_area_class_init (ZakFormCgiFormElementTextAreaCla
        form_elem_class->xml_parsing = zak_form_cgi_form_element_text_area_xml_parsing;
 
        elem_class->render = zak_form_cgi_form_element_text_area_render;
-
-       g_type_class_add_private (object_class, sizeof (ZakFormCgiFormElementTextAreaPrivate));
 }
 
 static void
 zak_form_cgi_form_element_text_area_init (ZakFormCgiFormElementTextArea *zak_form_cgi_form_element_text_area)
 {
-       ZakFormCgiFormElementTextAreaPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_TEXT_AREA_GET_PRIVATE (zak_form_cgi_form_element_text_area);
+       ZakFormCgiFormElementTextAreaPrivate *priv = zak_form_cgi_form_element_text_area_get_instance_private (zak_form_cgi_form_element_text_area);
 
 }
 
@@ -111,8 +107,8 @@ ZakFormCgiFormElement
        va_start (ap, id);
 
        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_text_area_parent_class)->construct (zak_form_cgi_form_element_text_area,
-                                                                                                                                                                                id,
-                                                                                                                                                                                zak_cgi_commons_valist_to_ghashtable (ap));
+                                        id,
+                                        zak_cgi_commons_valist_to_ghashtable (ap));
 
        return zak_form_cgi_form_element_text_area;
 }
@@ -155,8 +151,8 @@ zak_form_cgi_form_element_text_area_xml_parsing (ZakFormElement *element, xmlNod
        if (id != NULL)
                {
                        ZAK_FORM_CGI_FORM_ELEMENT_CLASS (zak_form_cgi_form_element_text_area_parent_class)->construct (ZAK_FORM_CGI_FORM_ELEMENT (element),
-                                                                                                                                                                                                id,
-                                                                                                                                                                                                ht_attrs);
+                                                        id,
+                                                        ht_attrs);
                }
 }
 
@@ -194,7 +190,7 @@ zak_form_cgi_form_element_text_area_set_property (GObject *object,
                    GParamSpec *pspec)
 {
        ZakFormCgiFormElementTextArea *zak_form_cgi_form_element_text_area = (ZakFormCgiFormElementTextArea *)object;
-       ZakFormCgiFormElementTextAreaPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_TEXT_AREA_GET_PRIVATE (zak_form_cgi_form_element_text_area);
+       ZakFormCgiFormElementTextAreaPrivate *priv = zak_form_cgi_form_element_text_area_get_instance_private (zak_form_cgi_form_element_text_area);
 
        switch (property_id)
                {
@@ -211,7 +207,7 @@ zak_form_cgi_form_element_text_area_get_property (GObject *object,
                    GParamSpec *pspec)
 {
        ZakFormCgiFormElementTextArea *zak_form_cgi_form_element_text_area = (ZakFormCgiFormElementTextArea *)object;
-       ZakFormCgiFormElementTextAreaPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_TEXT_AREA_GET_PRIVATE (zak_form_cgi_form_element_text_area);
+       ZakFormCgiFormElementTextAreaPrivate *priv = zak_form_cgi_form_element_text_area_get_instance_private (zak_form_cgi_form_element_text_area);
 
        switch (property_id)
                {
@@ -225,7 +221,7 @@ static void
 zak_form_cgi_form_element_text_area_dispose (GObject *gobject)
 {
        ZakFormCgiFormElementTextArea *zak_form_cgi_form_element_text_area = (ZakFormCgiFormElementTextArea *)gobject;
-       ZakFormCgiFormElementTextAreaPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_TEXT_AREA_GET_PRIVATE (zak_form_cgi_form_element_text_area);
+       ZakFormCgiFormElementTextAreaPrivate *priv = zak_form_cgi_form_element_text_area_get_instance_private (zak_form_cgi_form_element_text_area);
 
 
 
@@ -237,7 +233,7 @@ static void
 zak_form_cgi_form_element_text_area_finalize (GObject *gobject)
 {
        ZakFormCgiFormElementTextArea *zak_form_cgi_form_element_text_area = (ZakFormCgiFormElementTextArea *)gobject;
-       ZakFormCgiFormElementTextAreaPrivate *priv = ZAK_FORM_CGI_FORM_ELEMENT_TEXT_AREA_GET_PRIVATE (zak_form_cgi_form_element_text_area);
+       ZakFormCgiFormElementTextAreaPrivate *priv = zak_form_cgi_form_element_text_area_get_instance_private (zak_form_cgi_form_element_text_area);