diff options
author | Matthias Clasen <mclasen@redhat.com> | 2010-05-25 18:38:44 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-05-25 18:38:44 -0400 |
commit | bd4609b14042a91646cd9057764eecfbc6faf42b (patch) | |
tree | 8721405d2b45a998f87cccc672b4070780907fb8 /gdk/gdkdeviceprivate.h | |
parent | a538f639b69a39d7bb85b39af2dfd296d28fc0aa (diff) | |
download | gtk+-bd4609b14042a91646cd9057764eecfbc6faf42b.tar.gz |
Merge the xi2-for-master branch
Diffstat (limited to 'gdk/gdkdeviceprivate.h')
-rw-r--r-- | gdk/gdkdeviceprivate.h | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/gdk/gdkdeviceprivate.h b/gdk/gdkdeviceprivate.h new file mode 100644 index 0000000000..15f0546954 --- /dev/null +++ b/gdk/gdkdeviceprivate.h @@ -0,0 +1,135 @@ +/* GDK - The GIMP Drawing Kit + * Copyright (C) 2009 Carlos Garnacho <carlosg@gnome.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION) +#error "Only <gdk/gdk.h> can be included directly." +#endif + +#ifndef __GDK_DEVICE_PRIVATE_H__ +#define __GDK_DEVICE_PRIVATE_H__ + +#include <gdk/gdkdevice.h> +#include <gdk/gdkevents.h> + +G_BEGIN_DECLS + +#define GDK_DEVICE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_DEVICE, GdkDeviceClass)) +#define GDK_IS_DEVICE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_DEVICE)) +#define GDK_DEVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_DEVICE, GdkDeviceClass)) + +typedef struct _GdkDeviceClass GdkDeviceClass; + +struct _GdkDeviceClass +{ + GObjectClass parent_class; + + gboolean (* get_history) (GdkDevice *device, + GdkWindow *window, + guint32 start, + guint32 stop, + GdkTimeCoord ***events, + guint *n_events); + + void (* get_state) (GdkDevice *device, + GdkWindow *window, + gdouble *axes, + GdkModifierType *mask); + + void (* set_window_cursor) (GdkDevice *device, + GdkWindow *window, + GdkCursor *cursor); + + void (* warp) (GdkDevice *device, + GdkScreen *screen, + gint x, + gint y); + gboolean (* query_state) (GdkDevice *device, + GdkWindow *window, + GdkWindow **root_window, + GdkWindow **child_window, + gint *root_x, + gint *root_y, + gint *win_x, + gint *win_y, + GdkModifierType *mask); + GdkGrabStatus (* grab) (GdkDevice *device, + GdkWindow *window, + gboolean owner_events, + GdkEventMask event_mask, + GdkWindow *confine_to, + GdkCursor *cursor, + guint32 time_); + void (*ungrab) (GdkDevice *device, + guint32 time_); + + GdkWindow * (* window_at_position) (GdkDevice *device, + gint *win_x, + gint *win_y, + GdkModifierType *mask, + gboolean get_toplevel); + void (* select_window_events) (GdkDevice *device, + GdkWindow *window, + GdkEventMask event_mask); +}; + +void _gdk_device_set_associated_device (GdkDevice *device, + GdkDevice *relative); + +void _gdk_device_reset_axes (GdkDevice *device); +guint _gdk_device_add_axis (GdkDevice *device, + GdkAtom label_atom, + GdkAxisUse use, + gdouble min_value, + gdouble max_value, + gdouble resolution); + +void _gdk_device_set_keys (GdkDevice *device, + guint num_keys); + +GdkAxisUse _gdk_device_get_axis_use (GdkDevice *device, + guint index); + +gboolean _gdk_device_translate_window_coord (GdkDevice *device, + GdkWindow *window, + guint index, + gdouble value, + gdouble *axis_value); + +gboolean _gdk_device_translate_screen_coord (GdkDevice *device, + GdkWindow *window, + gint window_root_x, + gint window_root_y, + guint index, + gdouble value, + gdouble *axis_value); + +gboolean _gdk_device_translate_axis (GdkDevice *device, + guint index, + gdouble value, + gdouble *axis_value); + +GdkTimeCoord ** _gdk_device_allocate_history (GdkDevice *device, + guint n_events); + +void _gdk_input_check_extension_events (GdkDevice *device); + + +G_END_DECLS + +#endif /* __GDK_DEVICE_PRIVATE_H__ */ |