2010-05-25 22:38:44 +00:00
|
|
|
/* 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
|
2012-02-27 13:01:10 +00:00
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2010-05-25 22:38:44 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GDK_DEVICE_PRIVATE_H__
|
|
|
|
#define __GDK_DEVICE_PRIVATE_H__
|
|
|
|
|
2010-12-11 02:55:56 +00:00
|
|
|
#include "gdkdevice.h"
|
2010-12-11 05:14:53 +00:00
|
|
|
#include "gdkdevicemanager.h"
|
2010-12-11 02:55:56 +00:00
|
|
|
#include "gdkevents.h"
|
2015-11-26 18:50:57 +00:00
|
|
|
#include "gdkseat.h"
|
2010-05-25 22:38:44 +00:00
|
|
|
|
|
|
|
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))
|
|
|
|
|
2010-12-24 20:54:12 +00:00
|
|
|
typedef struct _GdkDeviceClass GdkDeviceClass;
|
2010-12-11 02:55:56 +00:00
|
|
|
typedef struct _GdkDeviceKey GdkDeviceKey;
|
|
|
|
|
|
|
|
struct _GdkDeviceKey
|
|
|
|
{
|
|
|
|
guint keyval;
|
|
|
|
GdkModifierType modifiers;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GdkDevice
|
|
|
|
{
|
|
|
|
GObject parent_instance;
|
|
|
|
|
|
|
|
gchar *name;
|
|
|
|
GdkInputSource source;
|
|
|
|
GdkInputMode mode;
|
|
|
|
gboolean has_cursor;
|
|
|
|
gint num_keys;
|
2015-01-27 21:35:40 +00:00
|
|
|
GdkAxisFlags axis_flags;
|
2010-12-11 02:55:56 +00:00
|
|
|
GdkDeviceKey *keys;
|
|
|
|
GdkDeviceManager *manager;
|
|
|
|
GdkDisplay *display;
|
|
|
|
/* Paired master for master,
|
|
|
|
* associated master for slaves
|
|
|
|
*/
|
|
|
|
GdkDevice *associated;
|
|
|
|
GList *slaves;
|
|
|
|
GdkDeviceType type;
|
|
|
|
GArray *axes;
|
2016-02-25 13:25:14 +00:00
|
|
|
guint num_touches;
|
2014-11-18 13:24:52 +00:00
|
|
|
|
|
|
|
gchar *vendor_id;
|
|
|
|
gchar *product_id;
|
2015-11-26 18:50:57 +00:00
|
|
|
|
|
|
|
GdkSeat *seat;
|
2010-12-11 02:55:56 +00:00
|
|
|
};
|
|
|
|
|
2010-05-25 22:38:44 +00:00
|
|
|
struct _GdkDeviceClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
|
|
|
|
2010-12-11 02:55:56 +00:00
|
|
|
gboolean (* get_history) (GdkDevice *device,
|
|
|
|
GdkWindow *window,
|
|
|
|
guint32 start,
|
|
|
|
guint32 stop,
|
|
|
|
GdkTimeCoord ***events,
|
|
|
|
gint *n_events);
|
|
|
|
|
|
|
|
void (* get_state) (GdkDevice *device,
|
|
|
|
GdkWindow *window,
|
|
|
|
gdouble *axes,
|
|
|
|
GdkModifierType *mask);
|
2010-05-25 22:38:44 +00:00
|
|
|
|
|
|
|
void (* set_window_cursor) (GdkDevice *device,
|
|
|
|
GdkWindow *window,
|
|
|
|
GdkCursor *cursor);
|
|
|
|
|
|
|
|
void (* warp) (GdkDevice *device,
|
|
|
|
GdkScreen *screen,
|
2013-07-03 09:52:58 +00:00
|
|
|
gdouble x,
|
|
|
|
gdouble y);
|
2012-03-09 12:20:41 +00:00
|
|
|
void (* query_state) (GdkDevice *device,
|
2010-12-13 22:43:10 +00:00
|
|
|
GdkWindow *window,
|
|
|
|
GdkWindow **root_window,
|
|
|
|
GdkWindow **child_window,
|
2013-07-03 09:52:58 +00:00
|
|
|
gdouble *root_x,
|
|
|
|
gdouble *root_y,
|
|
|
|
gdouble *win_x,
|
|
|
|
gdouble *win_y,
|
2010-05-25 22:38:44 +00:00
|
|
|
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,
|
2013-07-03 09:52:58 +00:00
|
|
|
double *win_x,
|
|
|
|
double *win_y,
|
2010-05-25 22:38:44 +00:00
|
|
|
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);
|
2012-04-03 08:54:25 +00:00
|
|
|
void _gdk_device_get_axis_info (GdkDevice *device,
|
|
|
|
guint index,
|
|
|
|
GdkAtom *label_atom,
|
|
|
|
GdkAxisUse *use,
|
|
|
|
gdouble *min_value,
|
|
|
|
gdouble *max_value,
|
|
|
|
gdouble *resolution);
|
2010-05-25 22:38:44 +00:00
|
|
|
|
|
|
|
void _gdk_device_set_keys (GdkDevice *device,
|
|
|
|
guint num_keys);
|
|
|
|
|
|
|
|
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,
|
2013-07-03 09:52:58 +00:00
|
|
|
gdouble window_root_x,
|
|
|
|
gdouble window_root_y,
|
2010-05-25 22:38:44 +00:00
|
|
|
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,
|
2010-10-19 11:30:42 +00:00
|
|
|
gint n_events);
|
2010-05-25 22:38:44 +00:00
|
|
|
|
2010-12-13 11:20:34 +00:00
|
|
|
void _gdk_device_add_slave (GdkDevice *device,
|
|
|
|
GdkDevice *slave);
|
|
|
|
void _gdk_device_remove_slave (GdkDevice *device,
|
|
|
|
GdkDevice *slave);
|
2012-03-09 12:20:41 +00:00
|
|
|
void _gdk_device_query_state (GdkDevice *device,
|
2010-12-13 22:43:10 +00:00
|
|
|
GdkWindow *window,
|
|
|
|
GdkWindow **root_window,
|
|
|
|
GdkWindow **child_window,
|
2013-07-03 09:52:58 +00:00
|
|
|
gdouble *root_x,
|
|
|
|
gdouble *root_y,
|
|
|
|
gdouble *win_x,
|
|
|
|
gdouble *win_y,
|
2010-12-13 22:43:10 +00:00
|
|
|
GdkModifierType *mask);
|
|
|
|
GdkWindow * _gdk_device_window_at_position (GdkDevice *device,
|
2013-07-03 09:52:58 +00:00
|
|
|
gdouble *win_x,
|
|
|
|
gdouble *win_y,
|
2010-12-13 22:43:10 +00:00
|
|
|
GdkModifierType *mask,
|
|
|
|
gboolean get_toplevel);
|
2010-05-25 22:38:44 +00:00
|
|
|
|
2015-11-26 18:50:57 +00:00
|
|
|
void gdk_device_set_seat (GdkDevice *device,
|
|
|
|
GdkSeat *seat);
|
|
|
|
|
2010-05-25 22:38:44 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GDK_DEVICE_PRIVATE_H__ */
|