summaryrefslogtreecommitdiff
path: root/gi/overrides
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:43:21 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:43:25 +0900
commitc66ed6095a42f079ed08431d14c06cdb987fea1e (patch)
tree11aabbe50fa29631b282086b03888578b5a4e1aa /gi/overrides
parentae174fe677e67b0faf8ab51f3c6786a4b066cfc8 (diff)
downloadpygobject2-c66ed6095a42f079ed08431d14c06cdb987fea1e.tar.gz
pygobject2-c66ed6095a42f079ed08431d14c06cdb987fea1e.tar.bz2
pygobject2-c66ed6095a42f079ed08431d14c06cdb987fea1e.zip
Imported Upstream version 3.16.1
Change-Id: Iac77ef45a49ba77e5eedc9ab7bf9cf22348694c2 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'gi/overrides')
-rw-r--r--gi/overrides/Gdk.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/gi/overrides/Gdk.py b/gi/overrides/Gdk.py
index c127550..15f2a0a 100644
--- a/gi/overrides/Gdk.py
+++ b/gi/overrides/Gdk.py
@@ -190,15 +190,20 @@ class Event(Gdk.Event):
Gdk.EventType.DROP_FINISHED: 'dnd',
Gdk.EventType.CLIENT_EVENT: 'client',
Gdk.EventType.VISIBILITY_NOTIFY: 'visibility',
- Gdk.EventType.TOUCH_BEGIN: 'touch',
- Gdk.EventType.TOUCH_UPDATE: 'touch',
- Gdk.EventType.TOUCH_END: 'touch',
- Gdk.EventType.TOUCH_CANCEL: 'touch',
}
if Gdk._version == '2.0':
_UNION_MEMBERS[Gdk.EventType.NO_EXPOSE] = 'no_expose'
+ if hasattr(Gdk.EventType, 'TOUCH_BEGIN'):
+ _UNION_MEMBERS.update(
+ {
+ Gdk.EventType.TOUCH_BEGIN: 'touch',
+ Gdk.EventType.TOUCH_UPDATE: 'touch',
+ Gdk.EventType.TOUCH_END: 'touch',
+ Gdk.EventType.TOUCH_CANCEL: 'touch',
+ })
+
def __getattr__(self, name):
real_event = getattr(self, '_UNION_MEMBERS').get(self.type)
if real_event:
@@ -232,7 +237,6 @@ event_member_classes = ['EventAny',
'EventVisibility',
'EventMotion',
'EventButton',
- 'EventTouch',
'EventScroll',
'EventKey',
'EventCrossing',
@@ -250,6 +254,10 @@ event_member_classes = ['EventAny',
if Gdk._version == '2.0':
event_member_classes.append('EventNoExpose')
+if hasattr(Gdk, 'EventTouch'):
+ event_member_classes.append('EventTouch')
+
+
# whitelist all methods that have a success return we want to mask
gsuccess_mask_funcs = ['get_state',
'get_axis',