2015-11-26 18:47:38 +00:00
|
|
|
/* GDK - The GIMP Drawing Kit
|
|
|
|
* Copyright (C) 2015 Red Hat
|
|
|
|
*
|
|
|
|
* 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, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* Author: Carlos Garnacho <carlosg@gnome.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GDK_SEAT_H__
|
|
|
|
#define __GDK_SEAT_H__
|
|
|
|
|
2019-11-27 13:33:43 +00:00
|
|
|
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
2015-11-26 18:47:38 +00:00
|
|
|
#error "Only <gdk/gdk.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <glib-object.h>
|
2018-03-20 10:46:11 +00:00
|
|
|
#include <gdk/gdksurface.h>
|
2015-11-26 18:47:38 +00:00
|
|
|
#include <gdk/gdkevents.h>
|
|
|
|
#include <gdk/gdktypes.h>
|
|
|
|
|
2015-12-22 08:39:28 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2015-11-26 18:47:38 +00:00
|
|
|
#define GDK_TYPE_SEAT (gdk_seat_get_type ())
|
|
|
|
#define GDK_SEAT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_SEAT, GdkSeat))
|
|
|
|
#define GDK_IS_SEAT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_SEAT))
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GdkSeatCapabilities:
|
|
|
|
* @GDK_SEAT_CAPABILITY_NONE: No input capabilities
|
|
|
|
* @GDK_SEAT_CAPABILITY_POINTER: The seat has a pointer (e.g. mouse)
|
|
|
|
* @GDK_SEAT_CAPABILITY_TOUCH: The seat has touchscreen(s) attached
|
|
|
|
* @GDK_SEAT_CAPABILITY_TABLET_STYLUS: The seat has drawing tablet(s) attached
|
|
|
|
* @GDK_SEAT_CAPABILITY_KEYBOARD: The seat has keyboard(s) attached
|
2017-11-27 20:39:05 +00:00
|
|
|
* @GDK_SEAT_CAPABILITY_TABLET_PAD: The seat has drawing tablet pad(s) attached
|
2015-11-26 18:47:38 +00:00
|
|
|
* @GDK_SEAT_CAPABILITY_ALL_POINTING: The union of all pointing capabilities
|
|
|
|
* @GDK_SEAT_CAPABILITY_ALL: The union of all capabilities
|
|
|
|
*
|
|
|
|
* Flags describing the seat capabilities.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GDK_SEAT_CAPABILITY_NONE = 0,
|
|
|
|
GDK_SEAT_CAPABILITY_POINTER = 1 << 0,
|
|
|
|
GDK_SEAT_CAPABILITY_TOUCH = 1 << 1,
|
|
|
|
GDK_SEAT_CAPABILITY_TABLET_STYLUS = 1 << 2,
|
|
|
|
GDK_SEAT_CAPABILITY_KEYBOARD = 1 << 3,
|
2017-11-27 20:39:05 +00:00
|
|
|
GDK_SEAT_CAPABILITY_TABLET_PAD = 1 << 4,
|
2015-11-26 18:47:38 +00:00
|
|
|
GDK_SEAT_CAPABILITY_ALL_POINTING = (GDK_SEAT_CAPABILITY_POINTER | GDK_SEAT_CAPABILITY_TOUCH | GDK_SEAT_CAPABILITY_TABLET_STYLUS),
|
|
|
|
GDK_SEAT_CAPABILITY_ALL = (GDK_SEAT_CAPABILITY_ALL_POINTING | GDK_SEAT_CAPABILITY_KEYBOARD)
|
|
|
|
} GdkSeatCapabilities;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GdkSeatGrabPrepareFunc:
|
|
|
|
* @seat: the #GdkSeat being grabbed
|
2018-03-20 14:14:10 +00:00
|
|
|
* @surface: the #GdkSurface being grabbed
|
2015-11-26 18:47:38 +00:00
|
|
|
* @user_data: user data passed in gdk_seat_grab()
|
|
|
|
*
|
2018-03-20 14:14:10 +00:00
|
|
|
* Type of the callback used to set up @surface so it can be
|
|
|
|
* grabbed. A typical action would be ensuring the surface is
|
2015-11-26 18:47:38 +00:00
|
|
|
* visible, although there's room for other initialization
|
|
|
|
* actions.
|
|
|
|
*/
|
|
|
|
typedef void (* GdkSeatGrabPrepareFunc) (GdkSeat *seat,
|
2018-03-20 14:14:10 +00:00
|
|
|
GdkSurface *surface,
|
2015-11-26 18:47:38 +00:00
|
|
|
gpointer user_data);
|
|
|
|
|
|
|
|
struct _GdkSeat
|
|
|
|
{
|
|
|
|
GObject parent_instance;
|
|
|
|
};
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2015-11-26 18:47:38 +00:00
|
|
|
GType gdk_seat_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2015-11-26 18:47:38 +00:00
|
|
|
GdkDisplay * gdk_seat_get_display (GdkSeat *seat);
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2015-11-26 18:47:38 +00:00
|
|
|
GdkSeatCapabilities
|
|
|
|
gdk_seat_get_capabilities (GdkSeat *seat);
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2015-11-26 18:47:38 +00:00
|
|
|
GList * gdk_seat_get_slaves (GdkSeat *seat,
|
|
|
|
GdkSeatCapabilities capabilities);
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2015-11-26 18:47:38 +00:00
|
|
|
GdkDevice * gdk_seat_get_pointer (GdkSeat *seat);
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2015-11-26 18:47:38 +00:00
|
|
|
GdkDevice * gdk_seat_get_keyboard (GdkSeat *seat);
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2017-11-27 19:21:42 +00:00
|
|
|
GList * gdk_seat_get_master_pointers (GdkSeat *seat,
|
|
|
|
GdkSeatCapabilities capabilities);
|
|
|
|
|
2015-12-22 08:39:28 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
2015-11-26 18:47:38 +00:00
|
|
|
#endif /* __GDK_SEAT_H__ */
|