Method

GObjectObjectget_property

Declaration [src]

void
g_object_get_property (
  GObject* object,
  const gchar* property_name,
  GValue* value
)

Description [src]

Gets a property of an object.

The value can be:

  • an empty GValue initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
  • a GValue initialized with the expected type of the property
  • a GValue initialized with a type to which the expected type of the property can be transformed

In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset().

Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming.

Parameters

property_name

Type: const gchar*

The name of the property to get.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
value

Type: GValue

Return location for the property value.

The data is owned by the caller of the method.