Class method

GObjectObjectClassinstall_property

Declaration

void
g_object_class_install_property (
  GObjectClass* oclass,
  guint property_id,
  GParamSpec* pspec
)

Description

Installs a new property.

All properties should be installed during the class initializer. It is possible to install properties after that, but doing so is not recommend, and specifically, is not guaranteed to be thread-safe vs. use of properties on the same type on other threads.

Note that it is possible to redefine a property in a derived class, by installing a property with the same name. This can be useful at times, e.g. to change the range of allowed values or the default value.

Parameters

property_id guint
 

The id for the new property.

pspec GParamSpec
 

The GParamSpec for the new property.

 The data is owned by the caller of the function.