| 1 |
/* |
| 2 |
* Clutter. |
| 3 |
* |
| 4 |
* An OpenGL based 'interactive canvas' library. |
| 5 |
* |
| 6 |
* Copyright (C) 2011 Intel Corporation. |
| 7 |
* |
| 8 |
* This library is free software; you can redistribute it and/or |
| 9 |
* modify it under the terms of the GNU Lesser General Public |
| 10 |
* License as published by the Free Software Foundation; either |
| 11 |
* version 2 of the License, or (at your option) any later version. |
| 12 |
* |
| 13 |
* This library is distributed in the hope that it will be useful, |
| 14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
* Lesser General Public License for more details. |
| 17 |
* |
| 18 |
* You should have received a copy of the GNU Lesser General Public |
| 19 |
* License along with this library. If not, see |
| 20 |
* <http://www.gnu.org/licenses/>. |
| 21 |
|
| 22 |
* Authors: |
| 23 |
* Robert Bragg <[email protected]> |
| 24 |
*/ |
| 25 |
|
| 26 |
#ifndef __CLUTTER_INPUT_DEVICE_WAYLAND_H__ |
| 27 |
#define __CLUTTER_INPUT_DEVICE_WAYLAND_H__ |
| 28 |
|
| 29 |
#include <xkbcommon/xkbcommon.h> |
| 30 |
#include <glib-object.h> |
| 31 |
#include <clutter/clutter-event.h> |
| 32 |
|
| 33 |
#include "clutter-device-manager-private.h" |
| 34 |
#include "cogl/clutter-stage-cogl.h" |
| 35 |
|
| 36 |
#define CLUTTER_TYPE_INPUT_DEVICE_WAYLAND (_clutter_input_device_wayland_get_type ()) |
| 37 |
#define CLUTTER_INPUT_DEVICE_WAYLAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_INPUT_DEVICE_WAYLAND, ClutterInputDeviceWayland)) |
| 38 |
#define CLUTTER_IS_INPUT_DEVICE_WAYLAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_INPUT_DEVICE_WAYLAND)) |
| 39 |
|
| 40 |
typedef struct _ClutterInputDeviceWayland ClutterInputDeviceWayland; |
| 41 |
|
| 42 |
struct _ClutterInputDeviceWayland |
| 43 |
{ |
| 44 |
ClutterInputDevice device; |
| 45 |
struct wl_seat *input_device; |
| 46 |
ClutterStageCogl *pointer_focus; |
| 47 |
ClutterStageCogl *keyboard_focus; |
| 48 |
gdouble x, y; |
| 49 |
struct xkb_state *xkb; |
| 50 |
gint has_pointer; |
| 51 |
gint has_keyboard; |
| 52 |
xkb_keycode_t repeat_key; |
| 53 |
guint repeat_time; |
| 54 |
guint repeat_source; |
| 55 |
gboolean is_initial_repeat; |
| 56 |
ClutterModifierType button_modifier_state; |
| 57 |
}; |
| 58 |
|
| 59 |
GType _clutter_input_device_wayland_get_type (void) G_GNUC_CONST; |
| 60 |
|
| 61 |
extern const struct wl_seat_listener _clutter_seat_wayland_listener; |
| 62 |
|
| 63 |
#endif /* __CLUTTER_INPUT_DEVICE_WAYLAND_H__ */ |