summaryrefslogtreecommitdiff
path: root/src/xwidget.h
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2021-12-31 10:07:30 +0800
committerPo Lu <luangruo@yahoo.com>2021-12-31 10:07:30 +0800
commit337005af0bf21244cabdc0b2a2c11d0095ecd0fa (patch)
tree3d0036ea1abdcc26546f7e284533978cff80206d /src/xwidget.h
parent77f17649d81b2fbe8917264e6b253a95a3f2eea1 (diff)
downloademacs-337005af0bf21244cabdc0b2a2c11d0095ecd0fa.tar.gz
emacs-337005af0bf21244cabdc0b2a2c11d0095ecd0fa.tar.bz2
emacs-337005af0bf21244cabdc0b2a2c11d0095ecd0fa.zip
Add pinch event support to xwidgets
* src/xterm.c (handle_one_xevent): Pass through pinch events to xwidgets and provide root coordinates when translating motion events. * src/xwidget.c (xwidget_motion_notify): Use provided root window coordinates. (xwidget_pinch): New function. * src/xwidget.h (xwidget_motion_notify): Update prototype. (xwidget_pinch): New function prototype.
Diffstat (limited to 'src/xwidget.h')
-rw-r--r--src/xwidget.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/xwidget.h b/src/xwidget.h
index ab60b9ed34f..0c6ed1a3813 100644
--- a/src/xwidget.h
+++ b/src/xwidget.h
@@ -43,6 +43,10 @@ struct window;
#import "nsxwidget.h"
#endif
+#ifdef HAVE_XINPUT2
+#include <X11/extensions/XInput2.h>
+#endif
+
struct xwidget
{
union vectorlike_header header;
@@ -210,9 +214,12 @@ extern void xwidget_motion_or_crossing (struct xwidget_view *,
const XEvent *);
#ifdef HAVE_XINPUT2
extern void xwidget_motion_notify (struct xwidget_view *, double,
- double, uint, Time);
+ double, double, double, uint, Time);
extern void xwidget_scroll (struct xwidget_view *, double, double,
double, double, uint, Time, bool);
+#ifdef HAVE_USABLE_XI_GESTURE_PINCH_EVENT
+extern void xwidget_pinch (struct xwidget_view *, XIGesturePinchEvent *);
+#endif
#endif
#endif
#else