GNOME Bugzilla – Bug 642238
[introspection] Type information not available in generated GIR files
Last modified: 2018-05-02 15:01:27 UTC
There are a couple of places where type information for parameters is not available in the GIR files. Here's a list of all the places I've found: struct GtkAccelKey: accel_key: should be GdkKey not an int accel_flags: should be GtkAccelFlags not an int GtkDialog: set_default_response: the response_id parameter should be 'ResponseType' not int set_response_sensitive: as above response signal: as above Widget: gtk_widget_get_events: return type should be GdkEventMask gtk_widget_set_events: parameter should be GdkEventMask
Since we forgot to fix these types in type for 3.0, we'll have to add type annotations.
Widget: gtk_widget_add_events: parameter should be GdkEventMask
Created attachment 216350 [details] [review] Add GdkEventMask type annotations in GtkWidget Patch just for gtk_widget_[get|set|add]_events. I wasn't sure about GtkResponseType because it looks like an extensible enumerated type as per GtkIconSize. If so, introspection would want to see an int, as currently, and introduction of GtkResponseType in C would probably need the type annotation (type int). For GtkAccelKey, I couldn't find a gtk-doc comment to add annotations (nor any mention of the type GdkKey).
Review of attachment 216350 [details] [review]: I think this is correct, but of course this could have a knock-down effect on existing bindings. Looking at Python, it seems they are capable of accepting integers as well as GdkEventMask values, and they don't have specific overrides. I'd like to see what happens with Python's introspection bindings; if this change doesn't practically change the introspection ABI, then it should be merged.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/350.