summaryrefslogtreecommitdiff
path: root/gdk/gdkevents.h
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2018-03-04 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2018-03-04 17:55:44 +0100
commit5d258bf31464eb6af5f0ee2f051b7ea2df41033f (patch)
treeb8de5c8bd7793c8a4944f5d09d1f1fa35b8a605f /gdk/gdkevents.h
parent464888a2da567c9c0c21eca1164ebcc0add16bd3 (diff)
downloadgtk+-5d258bf31464eb6af5f0ee2f051b7ea2df41033f.tar.gz
Fix introspection for GdkEventTouchpadPinch and GdkEventTouchpadSwipe.
When using type annotations, the ABI of type being annotated and a new type introduced from annotation should match. In case of enumerations, the most common ABI, and probably the only one currently used in practice with gtk, corresponds to -fno-short-enums compiler option. It uses int as the underlying type of enum, bumping it up to unsigned int, long int or unsigned long int, in that order, when necessary. Thus, when annotating a field of integer type with an enum type, it is never correct to annotate field smaller than int, because it changes the ABI from perspective on introspection. The gint8 phase field in GdkEventTouchpadSwipe and GdkEventTouchpadPinch structures have been previously annotated in such a way, and this change removes this annotation to restore ABI compatibility. Size of structures before (which does not match C): ``` >>> Gdk.EventTouchpadPinch.__info__.get_size() 104 >>> Gdk.EventTouchpadSwipe.__info__.get_size() 88 ``` Size of structures after (which does match C): ``` >>> Gdk.EventTouchpadPinch.__info__.get_size() 96 >>> Gdk.EventTouchpadSwipe.__info__.get_size() 80 ``` Fixes issue #57.
Diffstat (limited to 'gdk/gdkevents.h')
-rw-r--r--gdk/gdkevents.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h
index f32e29a48c..904e2baf25 100644
--- a/gdk/gdkevents.h
+++ b/gdk/gdkevents.h
@@ -1200,7 +1200,7 @@ struct _GdkEventDND {
* @type: the type of the event (%GDK_TOUCHPAD_SWIPE)
* @window: the window which received the event
* @send_event: %TRUE if the event was sent explicitly
- * @phase: (type GdkTouchpadGesturePhase): the current phase of the gesture
+ * @phase: the current phase of the gesture
* @n_fingers: The number of fingers triggering the swipe
* @time: the time of the event in milliseconds
* @x: The X coordinate of the pointer
@@ -1237,7 +1237,7 @@ struct _GdkEventTouchpadSwipe {
* @type: the type of the event (%GDK_TOUCHPAD_PINCH)
* @window: the window which received the event
* @send_event: %TRUE if the event was sent explicitly
- * @phase: (type GdkTouchpadGesturePhase): the current phase of the gesture
+ * @phase: the current phase of the gesture
* @n_fingers: The number of fingers triggering the pinch
* @time: the time of the event in milliseconds
* @x: The X coordinate of the pointer