Simulate mouse/button presses?
- From: Jim Norton <jimnorton jimnorton org>
- To: gtk-app-devel-list gnome org
- Subject: Simulate mouse/button presses?
- Date: Tue, 09 Jul 2013 16:25:18 -0500
Greetings,
I have some unique embedded hardware that has a touchscreen device
that doesn't have any Linux drivers to make it appear as a mouse etc.
The touchscreen communicates via USB using a proprietary protocol.
I have built a simple WebKitGTK 1.6 web-browser running on gtk+
2.24.14 that runs on the embedded hardware and receives the
touchscreen touch events.
Currently, when the user is interacting with the loaded web-page by
touching the screen my application sees them and generates mouse
button presses to be processed by GDK and sent to webkit using
gdk_test_simulate_button(). This appears to work fairly well.
However, I'm wondering if there is a better/ more proper way?
Would using gdk_event_new() and gdk_event_put() be a better option?
https://developer.gnome.org/gdk/unstable/gdk-Events.html#gdk-event-put
If so can anybody provide a small sample or snippet of code that
demonstrates how to use gdk_event_put() and setup the GdkEventButton
event fields?
Any advise would be appreciated.
Thank you,
Jim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]