Why is only the GObject type allowed to be passed?
Because the XML does not know anything about random memory in your C application.
You can only pass an object as an argument because it can reference the buildable id that GtkBuilder can then retrieve and use as the argument for g_signal_connect()
.
I use gtk_builder_list_item_factory_new_from_resource
Build GtklistItem, each item has a button, and the release event needs to accept a parameter.
The second parameter of my callback function is GtkListItem, which occupies the userdata position.
And GtkListItem I found out how to customize the way of data.
I know it is possible to add custom data to GObject, can it be implemented in XML?
So how do I get my data in the callback function?
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.