gchar * properties



Hi

Widgets have some properties of type gchar*. For example GtkLabel has the "label" property. What happens when I use
g_object_set(lable_widget, "label", some_gchar_ptr, NULL);? Does the class just assign 'some_gchar_ptr' to the 'label'
member or does it allocate memory and copy the content pointed to by 'some_gchar_ptr'?

GtkWidget has the 'name' property (of type gchar*) which default value is NULL. May I use this property to give a name
to widgets arbitrarily? Is this property used internally by GTK, is it safe to use it? And what happens with
g_object_set(widget, "name", ... ? Is this just a copy of the pointer? Is there anywhere a policy for this kind of
assignments?

regards
Pablo


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]