gdkinput.h

Go to the documentation of this file.
00001 #ifndef __GDK_INPUT_H__
00002 #define __GDK_INPUT_H__
00003 
00004 #include <gdk/gdktypes.h>
00005 
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif                          /* __cplusplus */
00009 
00010    typedef struct _GdkDeviceKey GdkDeviceKey;
00011    typedef struct _GdkDeviceInfo GdkDeviceInfo;
00012    typedef struct _GdkTimeCoord GdkTimeCoord;
00013 
00014    typedef enum {
00015       GDK_EXTENSION_EVENTS_NONE,
00016       GDK_EXTENSION_EVENTS_ALL,
00017       GDK_EXTENSION_EVENTS_CURSOR
00018    } GdkExtensionMode;
00019 
00020    typedef enum {
00021       GDK_SOURCE_MOUSE,
00022       GDK_SOURCE_PEN,
00023       GDK_SOURCE_ERASER,
00024       GDK_SOURCE_CURSOR
00025    } GdkInputSource;
00026 
00027    typedef enum {
00028       GDK_MODE_DISABLED,
00029       GDK_MODE_SCREEN,
00030       GDK_MODE_WINDOW
00031    } GdkInputMode;
00032 
00033    typedef enum {
00034       GDK_AXIS_IGNORE,
00035       GDK_AXIS_X,
00036       GDK_AXIS_Y,
00037       GDK_AXIS_PRESSURE,
00038       GDK_AXIS_XTILT,
00039       GDK_AXIS_YTILT,
00040       GDK_AXIS_LAST
00041    } GdkAxisUse;
00042 
00043    struct _GdkDeviceInfo {
00044       guint32 deviceid;
00045       gchar *name;
00046       GdkInputSource source;
00047       GdkInputMode mode;
00048       gint has_cursor;          /* TRUE if the X pointer follows device motion */
00049       gint num_axes;
00050       GdkAxisUse *axes;         /* Specifies use for each axis */
00051       gint num_keys;
00052       GdkDeviceKey *keys;
00053    };
00054 
00055    struct _GdkDeviceKey {
00056       guint keyval;
00057       GdkModifierType modifiers;
00058    };
00059 
00060    struct _GdkTimeCoord {
00061       guint32 time;
00062       gdouble x;
00063       gdouble y;
00064       gdouble pressure;
00065       gdouble xtilt;
00066       gdouble ytilt;
00067    };
00068 
00069    GList *gdk_input_list_devices(void);
00070    void gdk_input_set_extension_events(GdkWindow * window,
00071                                        gint mask, GdkExtensionMode mode);
00072    void gdk_input_set_source(guint32 deviceid, GdkInputSource source);
00073    gboolean gdk_input_set_mode(guint32 deviceid, GdkInputMode mode);
00074    void gdk_input_set_axes(guint32 deviceid, GdkAxisUse * axes);
00075    void gdk_input_set_key(guint32 deviceid,
00076                           guint index,
00077                           guint keyval, GdkModifierType modifiers);
00078    void gdk_input_window_get_pointer(GdkWindow * window,
00079                                      guint32 deviceid,
00080                                      gdouble * x,
00081                                      gdouble * y,
00082                                      gdouble * pressure,
00083                                      gdouble * xtilt,
00084                                      gdouble * ytilt,
00085                                      GdkModifierType * mask);
00086    GdkTimeCoord *gdk_input_motion_events(GdkWindow * window,
00087                                          guint32 deviceid,
00088                                          guint32 start,
00089                                          guint32 stop,
00090                                          gint * nevents_return);
00091 
00092 #ifdef __cplusplus
00093 }
00094 #endif                          /* __cplusplus */
00095 #endif                          /* __GDK_INPUT_H__ */

Generated on Tue Jul 5 14:14:37 2011 for ROOT_528-00b_version by  doxygen 1.5.1