[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    Re: Simulate mouse/button presses?
From:       Tristan Van Berkom <tvb () gnome ! org>
Date:       2013-07-09 22:00:51
Message-ID: CAGUy9W+KxuupcpXyf9zonxPQhvTr+urHB9Ab=rLV3jfGH7WvGg () mail ! gmail ! com
[Download RAW message or body]

On Wed, Jul 10, 2013 at 6:25 AM, Jim Norton <jimnorton@jimnorton.org> wrote:
> 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.

If you are writing for a specific hardware, then you might want to just provide
a driver for it, here is a sample touchscreen input module for you:
    http://cgit.freedesktop.org/xorg/driver/xf86-input-elographics/tree/src/xf86Elo.c

If you are installing wayland or something other than X, then there's probably
a different method.

Cheers,
    -Tristan

>
> 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
>
>
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic