David 'Digit' Turner | 34f2974 | 2010-05-25 18:16:10 -0700 | [diff] [blame] | 1 | /* Copyright (C) 2010 The Android Open Source Project |
| 2 | ** |
| 3 | ** This software is licensed under the terms of the GNU General Public |
| 4 | ** License version 2, as published by the Free Software Foundation, and |
| 5 | ** may be copied, distributed, and modified under those terms. |
| 6 | ** |
| 7 | ** This program is distributed in the hope that it will be useful, |
| 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | ** GNU General Public License for more details. |
| 11 | */ |
| 12 | #ifndef _QEMU_USEREVENTS_H |
| 13 | #define _QEMU_USEREVENTS_H |
| 14 | |
| 15 | /* A simple abstract interface to user-events. This is used to de-couple |
| 16 | * QEMU-specific and UI-specific code. |
| 17 | * |
| 18 | * QEMU-specific implementation in user-events-qemu.c |
| 19 | */ |
| 20 | |
| 21 | void user_event_key(unsigned key, unsigned down); |
| 22 | void user_event_keycode(int kcode); |
| 23 | void user_event_keycodes(int *kcodes, int count); |
| 24 | void user_event_mouse(int dx, int dy, int dz, unsigned buttons_state); |
| 25 | void user_event_generic(int type, int code, int value); |
| 26 | |
| 27 | /* The following is used to register a callback function that will receive |
| 28 | * user_event_generic() calls. This is used by hw/goldfish_events_device.c |
| 29 | */ |
| 30 | typedef void QEMUPutGenericEvent(void* opaque, int type, int code, int value); |
| 31 | void user_event_register_generic(void* opaque, QEMUPutGenericEvent callback); |
| 32 | |
| 33 | #endif /* _QEMU_USEREVENTS_H */ |