After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 642238 - [introspection] Type information not available in generated GIR files
[introspection] Type information not available in generated GIR files
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-02-13 17:20 UTC by Alan McGovern
Modified: 2018-05-02 15:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add GdkEventMask type annotations in GtkWidget (1.49 KB, patch)
2012-06-13 21:52 UTC, Phil Clayton
reviewed Details | Review

Description Alan McGovern 2011-02-13 17:20:23 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
Comment 1 Matthias Clasen 2011-02-19 13:51:44 UTC
Since we forgot to fix these types in type for 3.0, we'll have to add type annotations.
Comment 2 Phil Clayton 2012-06-10 19:10:48 UTC
Widget:
gtk_widget_add_events: parameter should be GdkEventMask
Comment 3 Phil Clayton 2012-06-13 21:52:30 UTC
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).
Comment 4 Emmanuele Bassi (:ebassi) 2017-05-01 16:47:50 UTC
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.
Comment 5 GNOME Infrastructure Team 2018-05-02 15:01:27 UTC
-- 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.