{
PROP_0,
PROP_IS_KEY,
+ PROP_TYPE,
PROP_VALUE,
PROP_DEFAULT_VALUE,
PROP_ORIGINAL_VALUE,
typedef struct
{
gboolean is_key;
+ gchar *type;
gchar *value;
gchar *default_value;
gchar *original_value;
TRUE,
G_PARAM_READWRITE));
+ g_object_class_install_property (object_class, PROP_TYPE,
+ g_param_spec_string ("type",
+ "Type",
+ "Type",
+ "",
+ G_PARAM_READWRITE));
+
g_object_class_install_property (object_class, PROP_VALUE,
g_param_spec_string ("value",
"Value",
ZakFormElementPrivate *priv = zak_form_element_get_instance_private (zak_form_element);
priv->is_key = TRUE;
+ priv->type = g_strdup ("");
priv->value = g_strdup ("");
priv->visible = TRUE;
priv->editable = TRUE;
return priv->is_key;
}
+/**
+ * zak_form_element_set_provider_type:
+ * @element:
+ * @type:
+ *
+ */
+void
+zak_form_element_set_provider_type (ZakFormElement *element, const gchar *type)
+{
+ ZakFormElementPrivate *priv;
+
+ priv = zak_form_element_get_instance_private (element);
+
+ if (priv->type != NULL)
+ {
+ g_free (priv->type);
+ }
+
+ priv->type = g_strdup (type);
+}
+
+/**
+ * zak_form_element_get_type:
+ * @element:
+ *
+ */
+gchar
+*zak_form_element_get_provider_type (ZakFormElement *element)
+{
+ ZakFormElementPrivate *priv;
+
+ gchar *ret;
+
+ priv = zak_form_element_get_instance_private (element);
+
+ ret = g_strdup (priv->type);
+
+ return ret;
+}
+
/**
* zak_form_element_set_value:
* @element:
zak_form_element_set_is_key (zak_form_element, g_value_get_boolean (value));
break;
+ case PROP_TYPE:
+ zak_form_element_set_provider_type (zak_form_element, g_value_dup_string (value));
+ break;
+
case PROP_VALUE:
zak_form_element_set_value (zak_form_element, g_value_dup_string (value));
break;
g_value_set_boolean (value, zak_form_element_get_is_key (zak_form_element));
break;
+ case PROP_TYPE:
+ g_value_set_string (value, zak_form_element_get_provider_type (zak_form_element));
+ break;
+
case PROP_VALUE:
g_value_set_string (value, zak_form_element_get_value (zak_form_element));
break;
void zak_form_element_set_to_is_key (ZakFormElement *element, gboolean is_key);
gboolean zak_form_element_get_is_key (ZakFormElement *element);
+void zak_form_element_set_provider_type (ZakFormElement *element, const gchar *type);
+gchar *zak_form_element_get_provider_type (ZakFormElement *element);
+
gboolean zak_form_element_set_value (ZakFormElement *element, const gchar *value);
gchar *zak_form_element_get_value (ZakFormElement *element);