gtk2/gdk/gdkinput.h

110 lines
2.3 KiB
C
Raw Normal View History

1997-11-24 22:37:52 +00:00
#ifndef __GDK_INPUT_H__
#define __GDK_INPUT_H__
#include <gdk/gdktypes.h>
1997-11-24 22:37:52 +00:00
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
1997-11-24 22:37:52 +00:00
typedef struct _GdkDeviceKey GdkDeviceKey;
typedef struct _GdkDeviceInfo GdkDeviceInfo;
typedef struct _GdkTimeCoord GdkTimeCoord;
1997-11-24 22:37:52 +00:00
typedef enum
{
GDK_EXTENSION_EVENTS_NONE,
GDK_EXTENSION_EVENTS_ALL,
GDK_EXTENSION_EVENTS_CURSOR
} GdkExtensionMode;
1997-11-24 22:37:52 +00:00
typedef enum
1997-11-24 22:37:52 +00:00
{
GDK_SOURCE_MOUSE,
GDK_SOURCE_PEN,
GDK_SOURCE_ERASER,
GDK_SOURCE_CURSOR
} GdkInputSource;
1997-11-24 22:37:52 +00:00
typedef enum
{
GDK_MODE_DISABLED,
GDK_MODE_SCREEN,
GDK_MODE_WINDOW
} GdkInputMode;
1997-11-24 22:37:52 +00:00
typedef enum
{
GDK_AXIS_IGNORE,
GDK_AXIS_X,
GDK_AXIS_Y,
GDK_AXIS_PRESSURE,
GDK_AXIS_XTILT,
GDK_AXIS_YTILT,
GDK_AXIS_LAST
} GdkAxisUse;
struct _GdkDeviceInfo
{
guint32 deviceid;
gchar *name;
GdkInputSource source;
GdkInputMode mode;
gint has_cursor; /* TRUE if the X pointer follows device motion */
gint num_axes;
GdkAxisUse *axes; /* Specifies use for each axis */
gint num_keys;
GdkDeviceKey *keys;
1997-11-24 22:37:52 +00:00
};
struct _GdkDeviceKey
{
guint keyval;
GdkModifierType modifiers;
1997-11-24 22:37:52 +00:00
};
struct _GdkTimeCoord
1997-11-24 22:37:52 +00:00
{
guint32 time;
gdouble x;
gdouble y;
gdouble pressure;
gdouble xtilt;
gdouble ytilt;
1997-11-24 22:37:52 +00:00
};
GList *gdk_input_list_devices (void);
void gdk_input_set_extension_events (GdkWindow *window,
gint mask,
GdkExtensionMode mode);
void gdk_input_set_source (guint32 deviceid,
GdkInputSource source);
gint gdk_input_set_mode (guint32 deviceid,
GdkInputMode mode);
void gdk_input_set_axes (guint32 deviceid,
GdkAxisUse *axes);
void gdk_input_set_key (guint32 deviceid,
guint index,
guint keyval,
GdkModifierType modifiers);
void gdk_input_window_get_pointer (GdkWindow *window,
guint32 deviceid,
gdouble *x,
gdouble *y,
gdouble *pressure,
gdouble *xtilt,
gdouble *ytilt,
GdkModifierType *mask);
GdkTimeCoord *gdk_input_motion_events (GdkWindow *window,
guint32 deviceid,
guint32 start,
guint32 stop,
gint *nevents_return);
#ifdef __cplusplus
}
#endif /* __cplusplus */
1997-11-24 22:37:52 +00:00
1997-12-02 19:41:19 +00:00
#endif /* __GDK_INPUT_H__ */