Re: Getting all data from a GObject



Try

g_datalist_foreach( &object->qdata, my_function , user_data);

void        my_function (GQuark <http://developer.gnome.org/doc/API/2.0/glib/glib-Quarks.html#GQuark> key_id,
                        gpointer <http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gpointer> 
data,
                        gpointer <http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gpointer> 
user_data)
{
        printf("Key: %s\n",g_quark_to_string (key_id));

}



myaconis nycap rr com wrote:

Is there a way to get all the data assigned to a GObject by g_object_set_data? Basically what I would like to do is grab a list of keys for a particular GObject that I have no prior knowledge of so that I can iterate through them. Thanks
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





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