gchar * properties
- From: Pablo Yanez Trujillo <yanezp informatik uni-freiburg de>
- To: gtk-list gnome org
- Subject: gchar * properties
- Date: Wed, 15 Oct 2008 20:55:10 +0200
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]