diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-05-28 10:33:05 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-05-28 10:33:05 +0100 |
commit | 4aa23452e366790e6c50dea73c8bc5eea44e2f38 (patch) | |
tree | 7da474230a9909a6f79d3d05f4cdce3532e41051 /include | |
parent | 9474ab1487cc70140099c8500ae4a1947ca966c1 (diff) | |
parent | 8977bd111f62035b675d41c432eb8b6bf6b86b0f (diff) |
Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-9' into staging
input: add event routing and multiseat support.
input: misc bugfixes and minor improvements.
# gpg: Signature made Mon 26 May 2014 07:44:29 BST using RSA key ID D3E87138
# gpg: Can't check signature: public key not found
* remotes/kraxel/tags/pull-input-9:
docs: add multiseat.txt
usb: add input routing support for tablet and keyboard
sdl: pass key event source to input layer
input: bind devices and input routing
input: switch hid mouse and tablet to the new input layer api.
input: switch hid keyboard to new input layer api.
input: keymap: add meta keys
input: add name to input_event_key_number
input: add qemu_input_key_number_to_qcode
input (curses): mask keycodes to remove modifier bits
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/input/hid.h | 4 | ||||
-rw-r--r-- | include/ui/input.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/hw/input/hid.h b/include/hw/input/hid.h index 2567879399..2127c7ce45 100644 --- a/include/hw/input/hid.h +++ b/include/hw/input/hid.h @@ -2,6 +2,7 @@ #define QEMU_HID_H #include "migration/vmstate.h" +#include "ui/input.h" #define HID_MOUSE 1 #define HID_TABLET 2 @@ -22,7 +23,6 @@ typedef void (*HIDEventFunc)(HIDState *s); typedef struct HIDMouseState { HIDPointerEvent queue[QUEUE_LENGTH]; int mouse_grabbed; - QEMUPutMouseEntry *eh_entry; } HIDMouseState; typedef struct HIDKeyboardState { @@ -31,7 +31,6 @@ typedef struct HIDKeyboardState { uint8_t leds; uint8_t key[16]; int32_t keys; - QEMUPutKbdEntry *eh_entry; } HIDKeyboardState; struct HIDState { @@ -47,6 +46,7 @@ struct HIDState { bool idle_pending; QEMUTimer *idle_timer; HIDEventFunc event; + QemuInputHandlerState *s; }; void hid_init(HIDState *hs, int kind, HIDEventFunc event); diff --git a/include/ui/input.h b/include/ui/input.h index 3d3d487f18..aa99b0cac7 100644 --- a/include/ui/input.h +++ b/include/ui/input.h @@ -29,6 +29,9 @@ QemuInputHandlerState *qemu_input_handler_register(DeviceState *dev, void qemu_input_handler_activate(QemuInputHandlerState *s); void qemu_input_handler_deactivate(QemuInputHandlerState *s); void qemu_input_handler_unregister(QemuInputHandlerState *s); +void qemu_input_handler_bind(QemuInputHandlerState *s, + const char *device_id, int head, + Error **errp); void qemu_input_event_send(QemuConsole *src, InputEvent *evt); void qemu_input_event_sync(void); @@ -36,6 +39,7 @@ InputEvent *qemu_input_event_new_key(KeyValue *key, bool down); void qemu_input_event_send_key(QemuConsole *src, KeyValue *key, bool down); void qemu_input_event_send_key_number(QemuConsole *src, int num, bool down); void qemu_input_event_send_key_qcode(QemuConsole *src, QKeyCode q, bool down); +int qemu_input_key_number_to_qcode(uint8_t nr); int qemu_input_key_value_to_number(const KeyValue *value); int qemu_input_key_value_to_qcode(const KeyValue *value); int qemu_input_key_value_to_scancode(const KeyValue *value, bool down, |