gdk: Add pad event structs, enum values, and event mask bit
GDK_PAD_BUTTON*,RING and STRIP will be emitted respectively when pad buttons, rings or strips are interacted with. Each of those pad components belong to a group (a pad can contain several of those), which may be in a given mode. All this information is contained in the event. GDK_PAD_GROUP_MODE is emitted when a group in the pad switches mode, which will generally result in a different set of actions being triggered from the same buttons/rings/strips in the group. https://bugzilla.gnome.org/show_bug.cgi?id=770026
This commit is contained in:
@ -920,6 +920,14 @@ gdk_event_get_time (const GdkEvent *event)
|
||||
case GDK_DROP_START:
|
||||
case GDK_DROP_FINISHED:
|
||||
return event->dnd.time;
|
||||
case GDK_PAD_BUTTON_PRESS:
|
||||
case GDK_PAD_BUTTON_RELEASE:
|
||||
return event->pad_button.time;
|
||||
case GDK_PAD_RING:
|
||||
case GDK_PAD_STRIP:
|
||||
return event->pad_axis.time;
|
||||
case GDK_PAD_GROUP_MODE:
|
||||
return event->pad_group_mode.time;
|
||||
case GDK_CLIENT_EVENT:
|
||||
case GDK_VISIBILITY_NOTIFY:
|
||||
case GDK_CONFIGURE:
|
||||
@ -1023,6 +1031,11 @@ gdk_event_get_state (const GdkEvent *event,
|
||||
case GDK_SETTING:
|
||||
case GDK_OWNER_CHANGE:
|
||||
case GDK_GRAB_BROKEN:
|
||||
case GDK_PAD_BUTTON_PRESS:
|
||||
case GDK_PAD_BUTTON_RELEASE:
|
||||
case GDK_PAD_RING:
|
||||
case GDK_PAD_STRIP:
|
||||
case GDK_PAD_GROUP_MODE:
|
||||
case GDK_EVENT_LAST:
|
||||
/* no state field */
|
||||
break;
|
||||
@ -1213,6 +1226,10 @@ gdk_event_get_button (const GdkEvent *event,
|
||||
case GDK_BUTTON_RELEASE:
|
||||
number = event->button.button;
|
||||
break;
|
||||
case GDK_PAD_BUTTON_PRESS:
|
||||
case GDK_PAD_BUTTON_RELEASE:
|
||||
number = event->pad_button.button;
|
||||
break;
|
||||
default:
|
||||
fetched = FALSE;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user