| 1 |
/* |
| 2 |
* Clutter. |
| 3 |
* |
| 4 |
* An OpenGL based 'interactive canvas' library. |
| 5 |
* |
| 6 |
* Copyright (C) 2014 Canonical Ltd. |
| 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 <http://www.gnu.org/licenses/>. |
| 20 |
|
| 21 |
* Authors: |
| 22 |
* Marco Trevisan <[email protected]> |
| 23 |
*/ |
| 24 |
|
| 25 |
#ifdef HAVE_CONFIG_H |
| 26 |
#include "config.h" |
| 27 |
#endif |
| 28 |
|
| 29 |
#include "clutter-device-manager-private.h" |
| 30 |
#include "clutter-input-device-mir.h" |
| 31 |
|
| 32 |
typedef struct _ClutterInputDeviceClass ClutterInputDeviceMirClass; |
| 33 |
|
| 34 |
#define clutter_input_device_mir_get_type _clutter_input_device_mir_get_type |
| 35 |
G_DEFINE_TYPE (ClutterInputDeviceMir, clutter_input_device_mir, CLUTTER_TYPE_INPUT_DEVICE); |
| 36 |
|
| 37 |
static gboolean |
| 38 |
clutter_input_device_mir_keycode_to_evdev (ClutterInputDevice *device, |
| 39 |
guint hardware_keycode, |
| 40 |
guint *evdev_keycode) |
| 41 |
{ |
| 42 |
*evdev_keycode = hardware_keycode - 8; |
| 43 |
return TRUE; |
| 44 |
} |
| 45 |
|
| 46 |
static void |
| 47 |
clutter_input_device_mir_class_init (ClutterInputDeviceMirClass *klass) |
| 48 |
{ |
| 49 |
klass->keycode_to_evdev = clutter_input_device_mir_keycode_to_evdev; |
| 50 |
} |
| 51 |
|
| 52 |
static void |
| 53 |
clutter_input_device_mir_init (ClutterInputDeviceMir *self) |
| 54 |
{ |
| 55 |
} |