[java-gnome-hackers] Arrays in signal handlers
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2012-02-02 05:19:31
|
Guillaume has hit an interesting engineering problem. There is a signal which returns an array of GFile. That doesn't seem like a problem, except that on the C side of the signal marshaling code we don't have anything to handle arrays. The situation is complicated by the fact that the actual signature in the signal is "gpointer files". Last I checked that was a typedef for void*, but that doesn't help us because we need to detect it and turn it into an [] of org.gnome.glib.File. We can't even special case it, because all we have to work from in the signal marshaling code is the GType and it is G_TYPE_POINTER. So I'm at a bit of a loss. The primary engineering question is "how do we get arrays as arguments in signals. The secondary problem is "how can we figure out what to do when all we have is G_TYPE_POINTER as a type." My best guess is to write a custom handler C side that takes the gpointer and turns it into a GList* of GFile. But we would still need code to handle that in the signal marshaller. Guillaume could give more detail, I'm sure. AfC Sydney |