Function

GObjectObjectinterface_install_property

since: 2.4

Declaration [src]

void
g_object_interface_install_property (
  GObjectTypeInterface* g_iface,
  GParamSpec* pspec
)

Description [src]

Add a property to an interface; this is only useful for interfaces that are added to GObject-derived types. Adding a property to an interface forces all objects classes with that interface to have a compatible property. The compatible property could be a newly created GParamSpec, but normally g_object_class_override_property() will be used so that the object class only needs to provide an implementation and inherits the property description, default value, bounds, and so forth from the interface property.

This function is meant to be called from the interface’s default vtable initialization function (the class_init member of GTypeInfo.) It must not be called after after class_init has been called for any object types implementing this interface.

If pspec is a floating reference, it will be consumed.

Available since: 2.4

Parameters

g_iface

Type: GTypeInterface

Any interface vtable for the interface, or the default vtable for the interface.

The data is owned by the caller of the function.
pspec

Type: GParamSpec

The GParamSpec for the new property.

The data is owned by the caller of the function.