aboutsummaryrefslogtreecommitdiff
path: root/include/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-12-10 15:08:08 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-01-11 11:57:17 +0100
commit7a1b46e09504419a3aa867dba3bcf23db5d6d956 (patch)
tree5aef77b9faa0de21b5d2f619a020ba722c704cca /include/ui
parenta311f891abf3833c1e4c5a62a6e5b0f1b81f22c3 (diff)
input: avoid malloc for mouse events
There is no reason to allocate mouse events using malloc, we can allcoate them from stack instead, save a few cpu cycles and make the code more readable with c99 initializers. Suggested-by: FelixYao <felix.yzg@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20181210140808.26794-1-kraxel@redhat.com
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/input.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/ui/input.h b/include/ui/input.h
index 34ebc67c5a..8c8ccb999f 100644
--- a/include/ui/input.h
+++ b/include/ui/input.h
@@ -49,7 +49,6 @@ int qemu_input_key_value_to_scancode(const KeyValue *value, bool down,
int *codes);
int qemu_input_linux_to_qcode(unsigned int lnx);
-InputEvent *qemu_input_event_new_btn(InputButton btn, bool down);
void qemu_input_queue_btn(QemuConsole *src, InputButton btn, bool down);
void qemu_input_update_buttons(QemuConsole *src, uint32_t *button_map,
uint32_t button_old, uint32_t button_new);
@@ -58,8 +57,6 @@ bool qemu_input_is_absolute(void);
int qemu_input_scale_axis(int value,
int min_in, int max_in,
int min_out, int max_out);
-InputEvent *qemu_input_event_new_move(InputEventKind kind,
- InputAxis axis, int value);
void qemu_input_queue_rel(QemuConsole *src, InputAxis axis, int value);
void qemu_input_queue_abs(QemuConsole *src, InputAxis axis, int value,
int min_in, int max_in);