summaryrefslogtreecommitdiff
path: root/clutter/mir/clutter-input-device-mir.c
blob: 3e5f8fa390b85b3a05085d93ac7325b83bb48062 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
 * Clutter.
 *
 * An OpenGL based 'interactive canvas' library.
 *
 * Copyright (C) 2014 Canonical Ltd.
 *
 * 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/>.

 * Authors:
 *  Marco Trevisan <marco.trevisan@canonical.com>
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "clutter-device-manager-private.h"
#include "clutter-input-device-mir.h"

typedef struct _ClutterInputDeviceClass ClutterInputDeviceMirClass;

#define clutter_input_device_mir_get_type _clutter_input_device_mir_get_type
G_DEFINE_TYPE (ClutterInputDeviceMir, clutter_input_device_mir, CLUTTER_TYPE_INPUT_DEVICE);

static gboolean
clutter_input_device_mir_keycode_to_evdev (ClutterInputDevice *device,
                                           guint hardware_keycode,
                                           guint *evdev_keycode)
{
  *evdev_keycode = hardware_keycode - 8;
  return TRUE;
}

static void
clutter_input_device_mir_class_init (ClutterInputDeviceMirClass *klass)
{
  klass->keycode_to_evdev = clutter_input_device_mir_keycode_to_evdev;
}

static void
clutter_input_device_mir_init (ClutterInputDeviceMir *self)
{
}