Join GitHub today
GtkD Event Handling #170
This PR addresses #167 by switching the GtkD event handling mechanism to map every delegate to a unique GTK handler on a 1:1 basis. There are a few benefits to this change as follows:
In general this PR is API compatible with the existing GtkD API with the following exceptions:
I have tested these changes with terminix which is a fairly large GTK program. Obviously however there are many areas of GTK it does not use and my testing with terminix is limited. I would recommend care introducing this change with a relatively long gestation period before using it in a public release.
Note I could not test this with building APILookupGLt.txt and APILookupGLd.txt as I don't have those gir files.
Feedback welcome, if you require any changes prior to accepting this PR just let me know.
I need some advice here, if you compile the code on 32 bit Linux you get the following errors:
In glibtypes.d I can see that gulong is aliased as a uint for anything other then X86_64, so I presume that Windows would have the same issue.
Should I change this back to ulong instead of gulong?
The wrapper class should also use
gulong or the return from the addOn function will be a ulong to uint conversion.
I've recently been working on a D implementation of gobject.Closure + a marshaler, which means that now it's possible to pass a D delegate/function directly to Signals.connect.
Since that is now possible i've switched over the addOn* functions over to using this new connect function instead of the wrapper classes. While testing these changes with tilix i've fixed a few bugs that popped up and things seem to be working properly now. Tough a change like this might warrant some more rigorous testing.