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
{
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;
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;
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);
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++)
{
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++)
{
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");
ZakFormCgiFormPrivate *priv;
- priv = ZAK_FORM_CGI_FORM_GET_PRIVATE (zakcgiform);
+ priv = zak_form_cgi_form_get_instance_private (zakcgiform);
str = g_string_new ("");
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)
{
{
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);
}
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)
{
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)
{
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));
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));
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
{
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)
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;
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;
{
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);
}
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)
{
{
ZakFormCgiFormElementPrivate *priv;
- priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+ priv = zak_form_cgi_form_element_get_instance_private (element);
priv->value = value;
}
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");
ZakFormCgiFormElementPrivate *priv;
- priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+ priv = zak_form_cgi_form_element_get_instance_private (element);
str = NULL;
{
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)
{
{
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)
{
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)
{
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))
{
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))
{
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)
{
{
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);
}
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);
{
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;
}
{
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;
}
ZakFormCgiFormElementPrivate *priv;
- priv = ZAK_FORM_CGI_FORM_ELEMENT_GET_PRIVATE (element);
+ priv = zak_form_cgi_form_element_get_instance_private (element);
ret = priv->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;
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)
{
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)
{
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);
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);
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
{
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)
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;
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);
}
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);
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;
}
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;
}
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)));
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)
{
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)
{
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);
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);
/*
- * 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
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)
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);
}
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;
}
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);
}
}
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)
{
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)
{
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);
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);
/*
- * 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
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
{
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)
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;
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;
}
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;
}
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;
}
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;
}
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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);
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);
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;
/*
- * 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
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)
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);
}
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;
}
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);
}
}
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)
{
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)
{
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);
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);
/*
- * 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
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)
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);
}
*/
ZakFormCgiFormElement
*zak_form_cgi_form_element_password_new_attrs (const gchar *id,
- ...)
+ ...)
{
va_list ap;
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;
}
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);
}
}
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)
{
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)
{
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);
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);
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
{
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
{
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 ();
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;
}
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;
}
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;
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)));
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);
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)
{
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)
{
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);
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);
/*
- * 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
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)
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 ();
}
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);
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)));
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)
{
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)
{
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);
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);
/*
- * 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
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)
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;
}
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);
{
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;
}
{
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);
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)
{
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)
{
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);
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);
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)
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);
}
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;
}
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);
}
}
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)
{
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)
{
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);
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);
/*
- * 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
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)
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);
}
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;
}
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);
}
}
/* 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;
}
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);
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);
/*
- * 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
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)
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);
}
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;
}
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);
}
}
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)
{
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)
{
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);
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);