GladePropertyDef: Glade User Interface Designer Reference Manual

## GladePropertyDef GladePropertyDef — Property Definition metadata. |

## Functions

GladePropertyDef * | glade_property_def_new ()
GladePropertyDef * | glade_property_def_new_from_spec ()
GladePropertyDef * | glade_property_def_clone ()
void | glade_property_def_free ()
gboolean | glade_property_def_is_visible ()
gboolean | glade_property_def_is_object ()
guint | glade_property_def_make_flags_from_string ()
GValue * | glade_property_def_make_gvalue_from_string ()
gchar * | glade_property_def_make_string_from_gvalue ()
GValue * | glade_property_def_make_gvalue_from_vl ()
void | glade_property_def_set_vl_from_gvalue ()
GValue * | glade_property_def_make_gvalue ()
void | glade_property_def_get_from_gvalue ()
gboolean | glade_property_def_update_from_node ()
GtkAdjustment * | glade_property_def_make_adjustment ()
gboolean | glade_property_def_match ()
gboolean | glade_property_def_void_value ()
gboolean | glade_property_def_atk ()
gboolean | glade_property_def_common ()
gint | glade_property_def_compare ()
const gchar * | glade_property_def_create_type ()
gboolean | glade_property_def_custom_layout ()
gboolean | glade_property_def_deprecated ()
GladeWidgetAdaptor * | glade_property_def_get_adaptor ()
gboolean | glade_property_def_get_construct_only ()
const GValue * | glade_property_def_get_default ()
GValue * | glade_property_def_get_default_from_spec ()
gboolean | glade_property_def_get_ignore ()
gboolean | glade_property_def_get_is_packing ()
const gchar * | glade_property_def_get_name ()
const GValue * | glade_property_def_get_original_default ()
GParamSpec * | glade_property_def_get_pspec ()
const gchar * | glade_property_def_get_tooltip ()
gboolean | glade_property_def_get_virtual ()
const gchar * | glade_property_def_id ()
void | glade_property_def_load_defaults_from_spec ()
gboolean | glade_property_def_multiline ()
gboolean | glade_property_def_needs_sync ()
GladePropertyDef * | glade_property_def_new_from_spec_full ()
gboolean | glade_property_def_optional ()
gboolean | glade_property_def_optional_default ()
gboolean | glade_property_def_parentless_widget ()
gboolean | glade_property_def_query ()
gboolean | glade_property_def_save ()
gboolean | glade_property_def_save_always ()
void | glade_property_def_set_adaptor ()
void | glade_property_def_set_construct_only ()
void | glade_property_def_set_ignore ()
void | glade_property_def_set_is_packing ()
void | glade_property_def_set_name ()
void | glade_property_def_set_pspec ()
void | glade_property_def_set_tooltip ()
void | glade_property_def_set_virtual ()
void | glade_property_def_set_weights ()
guint16 | glade_property_def_since_major ()
guint16 | glade_property_def_since_minor ()
gboolean | glade_property_def_stock ()
gboolean | glade_property_def_stock_icon ()
gboolean | glade_property_def_themed_icon ()
gboolean | glade_property_def_transfer_on_paste ()
gboolean | glade_property_def_translatable ()
gdouble | glade_property_def_weight ()

## Types and Values

| GladePropertyDef
#define | GLADE_PROPERTY_DEF_OBJECT_DELIMITER

## Description

GladePropertyDef is a structure based on a GParamSpec and parameters from the Glade catalog files and describes how properties are to be handled in Glade; it also provides an interface to convert GValue to strings and va_lists etc (back and forth).

## Functions

### glade_property_def_new ()

    GladePropertyDef *
    glade_property_def_new (GladeWidgetAdaptor *adaptor,
                            const gchar *id);

#### Parameters

adaptor | The GladeWidgetAdaptor to create this property for |
id | the id for the new property class |

#### Returns

a new GladePropertyDef

### glade_property_def_new_from_spec ()

    GladePropertyDef *
    glade_property_def_new_from_spec (GladeWidgetAdaptor *adaptor,
                                      GParamSpec *spec);

#### Parameters

adaptor | A generic pointer (i.e. a GladeWidgetAdaptor) |
spec | A GParamSpec |

#### Returns

a newly created GladePropertyDef based on `spec` or `NULL` if its unsupported.

### glade_property_def_clone ()

    GladePropertyDef *
    glade_property_def_clone (GladePropertyDef *property_def);

#### Parameters

property_def | a GladePropertyDef |

#### Returns

a new GladePropertyDef cloned from `property_def` .

[transfer full]

### glade_property_def_free ()

    void
    glade_property_def_free (GladePropertyDef *property_def);

Frees `property_def` and its associated memory.

#### Parameters

property_def | a GladePropertyDef |

### glade_property_def_is_visible ()

    gboolean
    glade_property_def_is_visible (GladePropertyDef *property_def);

#### Parameters

property_def | A GladePropertyDef |

#### Returns

whether or not to show this property in the editor

### glade_property_def_is_object ()

    gboolean
    glade_property_def_is_object (GladePropertyDef *property_def);

#### Parameters

property_def | A GladePropertyDef |

#### Returns

whether or not this is an object property that refers to another object in this project.

### glade_property_def_make_flags_from_string ()

    guint
    glade_property_def_make_flags_from_string
                                   (GType type,
                                    const char *string);

### glade_property_def_make_gvalue_from_string ()

    GValue *
    glade_property_def_make_gvalue_from_string
                                   (GladePropertyDef *property_def,
                                    const gchar *string,
                                    GladeProject *project);

#### Parameters

property_def | A GladePropertyDef |
string | a string representation of this property |
project | the GladeProject that the property should be resolved for |

#### Returns

A GValue created based on the `property_def` and `string` criteria.

### glade_property_def_make_string_from_gvalue ()

    gchar *
    glade_property_def_make_string_from_gvalue
                                   (GladePropertyDef *property_def,
                                    const GValue *value);

#### Parameters

property_def | A GladePropertyDef |
value | A GValue |

#### Returns

A newly allocated string representation of `value`

### glade_property_def_make_gvalue_from_vl ()

    GValue *
    glade_property_def_make_gvalue_from_vl
                                   (GladePropertyDef *property_def,
                                    va_list vl);

#### Parameters

property_def | A GladePropertyDef |
vl | a va_list holding one argument of the correct type specified by `property_def` |

#### Returns

A GValue created based on the `property_def` and a `vl` arg of the correct type.

### glade_property_def_set_vl_from_gvalue ()

    void
    glade_property_def_set_vl_from_gvalue (GladePropertyDef *property_def,
                                           GValue *value,
                                           va_list vl);

Sets `vl` from `value` based on `property_def` criteria.

#### Parameters

property_def | A GladePropertyDef |
value | A GValue to set |
vl | a va_list holding one argument of the correct type specified by `property_def` |

### glade_property_def_make_gvalue ()

    GValue *
    glade_property_def_make_gvalue (GladePropertyDef *property_def,
                                    ...);

#### Parameters

property_def | A GladePropertyDef |
... | an argument of the correct type specified by `property_def` |

#### Returns

A GValue created based on the `property_def` and the provided argument.

### glade_property_def_get_from_gvalue ()

    void
    glade_property_def_get_from_gvalue (GladePropertyDef *property_def,
                                        GValue *value,
                                        ...);

Assignes the provided return location to `value`

#### Parameters

property_def | A GladePropertyDef |
value | A GValue to set |
... | a return location of the correct type |

### glade_property_def_update_from_node ()

    gboolean
    glade_property_def_update_from_node (GladeXmlNode *node,
                                         GType object_type,
                                         GladePropertyDef **property_def_ref,
                                         const gchar *domain);

Updates the `property_def_ref` with the contents of the node in the xml file. Only the values found in the xml file are overridden.

#### Parameters

node | the property node |
object_type | the GType of the owning object |
property_def_ref | a pointer to the property class. | [inout][nullable]
domain | the domain to translate catalog strings from |

#### Returns

`TRUE` on success. `property_def_ref` is set to NULL if the property has Disabled="TRUE".

### glade_property_def_make_adjustment ()

    GtkAdjustment *
    glade_property_def_make_adjustment (GladePropertyDef *property_def);

Creates and appropriate GtkAdjustment for use in the editor

#### Parameters

property_def | a pointer to the property class |

#### Returns

An appropriate GtkAdjustment for use in the Property editor.

[transfer full]

### glade_property_def_match ()

    gboolean
    glade_property_def_match (GladePropertyDef *property_def,
                              GladePropertyDef *comp);

#### Parameters

property_def | a GladePropertyDef |
comp | a GladePropertyDef |

#### Returns

whether `property_def` and `comp` are a match or not (properties in separate descendant hierarchies that have the same name are not matches).

### glade_property_def_void_value ()

    gboolean
    glade_property_def_void_value (GladePropertyDef *property_def,
                                   GValue *value);

#### Parameters

property_def | a GladePropertyDef |
value | a GValue of correct type for `property_def` |

#### Returns

Whether `value` for this `property_def` is voided; a voided value can be a `NULL` value for boxed or object type param specs.

### glade_property_def_atk ()

    gboolean
    glade_property_def_atk (GladePropertyDef *property_def);

### glade_property_def_common ()

    gboolean
    glade_property_def_common (GladePropertyDef *property_def);

### glade_property_def_compare ()

    gint
    glade_property_def_compare (GladePropertyDef *property_def,
                                const GValue *value1,
                                const GValue *value2);

Compares value1 with value2 according to `property_def` .

#### Parameters

property_def | a GladePropertyDef |
value1 | a GValue of correct type for `property_def` |
value2 | a GValue of correct type for `property_def` |

#### Returns

-1, 0 or +1, if value1 is found to be less than, equal to or greater than value2, respectively.

### glade_property_def_create_type ()

    const gchar *
    glade_property_def_create_type (GladePropertyDef *property_def);

### glade_property_def_custom_layout ()

    gboolean
    glade_property_def_custom_layout (GladePropertyDef *property_def);

### glade_property_def_deprecated ()

    gboolean
    glade_property_def_deprecated (GladePropertyDef *property_def);

### glade_property_def_get_adaptor ()

    GladeWidgetAdaptor *
    glade_property_def_get_adaptor (GladePropertyDef *property_def);

#### Parameters

property_def | A GladePropertyDef |

#### Returns

The GladeWidgetAdaptor associated with the `property_def` .

[transfer none]

### glade_property_def_get_construct_only ()

    gboolean
    glade_property_def_get_construct_only (GladePropertyDef *property_def);

### glade_property_def_get_default ()

    const GValue *
    glade_property_def_get_default (GladePropertyDef *property_def);

### glade_property_def_get_default_from_spec ()

    GValue *
    glade_property_def_get_default_from_spec
                                   (GParamSpec *spec);

### glade_property_def_get_ignore ()

    gboolean
    glade_property_def_get_ignore (GladePropertyDef *property_def);

### glade_property_def_get_is_packing ()

    gboolean
    glade_property_def_get_is_packing (GladePropertyDef *property_def);

### glade_property_def_get_name ()

    const gchar *
    glade_property_def_get_name (GladePropertyDef *property_def);

### glade_property_def_get_original_default ()

    const GValue *
    glade_property_def_get_original_default
                                   (GladePropertyDef *property_def);

### glade_property_def_get_pspec ()

    GParamSpec *
    glade_property_def_get_pspec (GladePropertyDef *property_def);

#### Parameters

property_def | A GladePropertyDef |

#### Returns

The GParamSpec associated with the `property_def` .

[transfer none]

### glade_property_def_get_tooltip ()

    const gchar *
    glade_property_def_get_tooltip (GladePropertyDef *property_def);

### glade_property_def_get_virtual ()

    gboolean
    glade_property_def_get_virtual (GladePropertyDef *property_def);

### glade_property_def_id ()

    const gchar *
    glade_property_def_id (GladePropertyDef *property_def);

### glade_property_def_load_defaults_from_spec ()

    void
    glade_property_def_load_defaults_from_spec
                                   (GladePropertyDef *property_def);

### glade_property_def_multiline ()

    gboolean
    glade_property_def_multiline (GladePropertyDef *property_def);

### glade_property_def_needs_sync ()

    gboolean
    glade_property_def_needs_sync (GladePropertyDef *property_def);

### glade_property_def_new_from_spec_full ()

    GladePropertyDef *
    glade_property_def_new_from_spec_full (GladeWidgetAdaptor *adaptor,
                                           GParamSpec *spec,
                                           gboolean need_handle);

### glade_property_def_optional ()

    gboolean
    glade_property_def_optional (GladePropertyDef *property_def);

### glade_property_def_optional_default ()

    gboolean
    glade_property_def_optional_default (GladePropertyDef *property_def);

### glade_property_def_parentless_widget ()

    gboolean
    glade_property_def_parentless_widget (GladePropertyDef *property_def);

### glade_property_def_query ()

    gboolean
    glade_property_def_query (GladePropertyDef *property_def);

### glade_property_def_save ()

    gboolean
    glade_property_def_save (GladePropertyDef *property_def);

### glade_property_def_save_always ()

    gboolean
    glade_property_def_save_always (GladePropertyDef *property_def);

### glade_property_def_set_adaptor ()

    void
    glade_property_def_set_adaptor (GladePropertyDef *property_def,
                                    GladeWidgetAdaptor *adaptor);

#### Parameters

property_def | A GladePropertyDef |
adaptor | A GladeWidgetAdaptor. | [transfer full]

### glade_property_def_set_construct_only ()

    void
    glade_property_def_set_construct_only (GladePropertyDef *property_def,
                                           gboolean construct_only);

### glade_property_def_set_ignore ()

    void
    glade_property_def_set_ignore (GladePropertyDef *property_def,
                                   gboolean ignore);

### glade_property_def_set_is_packing ()

    void
    glade_property_def_set_is_packing (GladePropertyDef *property_def,
                                       gboolean is_packing);

### glade_property_def_set_name ()

    void
    glade_property_def_set_name (GladePropertyDef *property_def,
                                 const gchar *name);

### glade_property_def_set_pspec ()

    void
    glade_property_def_set_pspec (GladePropertyDef *property_def,
                                  GParamSpec *pspec);

#### Parameters

property_def | A GladePropertyDef |
pspec | A GParamSpec. | [transfer full]

### glade_property_def_set_tooltip ()

    void
    glade_property_def_set_tooltip (GladePropertyDef *property_def,
                                    const gchar *tooltip);

### glade_property_def_set_virtual ()

    void
    glade_property_def_set_virtual (GladePropertyDef *property_def,
                                    gboolean value);

### glade_property_def_set_weights ()

    void
    glade_property_def_set_weights (GList **properties,
                                    GType parent);

This function assigns "weight" to each property in its natural order staring from 1. If parent is 0 weight will be set for every GladePropertyDef in the list. This function will not override weight if it is already set (weight >= 0.0)

#### Parameters

properties | a list of GladePropertyDef. | [element-type GladePropertyDef]
parent | the GType of the parent |

### glade_property_def_since_major ()

    guint16
    glade_property_def_since_major (GladePropertyDef *property_def);

### glade_property_def_since_minor ()

    guint16
    glade_property_def_since_minor (GladePropertyDef *property_def);

### glade_property_def_stock ()

    gboolean
    glade_property_def_stock (GladePropertyDef *property_def);

### glade_property_def_stock_icon ()

    gboolean
    glade_property_def_stock_icon (GladePropertyDef *property_def);

### glade_property_def_themed_icon ()

    gboolean
    glade_property_def_themed_icon (GladePropertyDef *property_def);

### glade_property_def_transfer_on_paste ()

    gboolean
    glade_property_def_transfer_on_paste (GladePropertyDef *property_def);

### glade_property_def_translatable ()

    gboolean
    glade_property_def_translatable (GladePropertyDef *property_def);

### glade_property_def_weight ()

    gdouble
    glade_property_def_weight (GladePropertyDef *property_def);

## Types and Values

### GladePropertyDef

    typedef struct _GladePropertyDef GladePropertyDef;

### GLADE_PROPERTY_DEF_OBJECT_DELIMITER

    #define GLADE_PROPERTY_DEF_OBJECT_DELIMITER ", "