Re: ref: Xinput and gxid



"Wang, Paul" <Paul Wang avnet com> writes:

Hi, everyone,

I am a starter of GTK, but what I am going to do is not simple.
I am going to use the Xinput  of the XFree86. 

There is information at:

 http://www.gtk.org/~otaylor/xinput/howto/index.html

The information about configuring your X server is sadly out
of date with respect to XFree86 4.0. Sigh :-(

For more in date information, see:

 http://www.lepied.com/xfree86/

I do not know if the GTK & GDK ( what version? need patches?) support that?

No, it's been standard for a couple of years now. You need to configure
GTK+ with:

 --with-xinput=xfree

Most Linux distributions (Red Hat and Debian at least), ship GTK+ packages
configured in this manner.

What is GXID?  Where can I find information about how to use it. 

You don't need to use it for XFree86. Don't worry about it.

(It won't be built unless you configure GTK+ with --with-xinput=gxid,
and handles switching between mouse and extension device if
the server doesn't support using both at once.)

What kinds of events (Widgets) are defined for Xinputs?

If you turn on XInput extension events for a widget:

void       gtk_widget_set_extension_events (GtkWidget           *widget,
                                            GdkExtensionMode    mode);
typedef enum
{
  GDK_EXTENSION_EVENTS_NONE,
  GDK_EXTENSION_EVENTS_ALL,
  GDK_EXTENSION_EVENTS_CURSOR
} GdkExtensionMode;

Then, the way it works is that the GdkEvent structure for things 
like motion and button press events will simply contain extra information.

You can look at the source for gsumi 

 http://www.gtk.org/~otaylor/gsumi/index.html

As an example.
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]