2 * Maru Virtio Touchscreen Device
4 * Copyright (c) 2011 - 2013 Samsung Electronics Co., Ltd All Rights Reserved
7 * GiWoong Kim <giwoong.kim@samsung.com>
8 * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30 #ifndef MARU_TOUCHSCREEN_H_
31 #define MARU_TOUCHSCREEN_H_
33 #include "hw/virtio/virtio.h"
35 #define TYPE_VIRTIO_TOUCHSCREEN "virtio-touchscreen-device"
36 #define VIRTIO_TOUCHSCREEN(obj) \
37 OBJECT_CHECK(VirtIOTouchscreen, (obj), TYPE_VIRTIO_TOUCHSCREEN)
39 #define TOUCHSCREEN_OPTION_NAME "max_point"
40 #define DEFAULT_MAX_FINGER (1)
42 typedef struct VirtIOTouchscreen {
44 /* simply a queue into which buffers are posted
45 by the guest for consumption by the host */
52 unsigned int max_finger;
55 /* This structure must match the kernel definitions */
56 typedef struct EmulTouchEvent {
61 void virtio_touchscreen_event(int x, int y, int z, int buttons_state);
62 void maru_virtio_touchscreen_notify(void);
64 #endif /* MARU_TOUCHSCREEN_H_ */