diff options
author | sungmin ha <sungmin82.ha@samsung.com> | 2013-12-23 17:04:44 +0900 |
---|---|---|
committer | sungmin ha <sungmin82.ha@samsung.com> | 2013-12-23 17:18:35 +0900 |
commit | 08cbf9a28c214c14c0d0a675db6af70f8891365e (patch) | |
tree | c006d31b40e95b98e4ff3c322714cda9db7ff58c /ui/input.c | |
parent | ec4a54d4d7cf6cdbb179caf55bd851113ce2ba92 (diff) | |
download | qemu-08cbf9a28c214c14c0d0a675db6af70f8891365e.tar.gz qemu-08cbf9a28c214c14c0d0a675db6af70f8891365e.tar.bz2 qemu-08cbf9a28c214c14c0d0a675db6af70f8891365e.zip |
remote: added remote server/client packages spice-gtk, virt-viewer, celt, spice etc.
added spice input codes for tizen specific functions.
modified build script and makefile for ubuntu build.
Change-Id: Ia1adae6e31dcf461168b74728764cfa546e44d84
Signed-off-by: sungmin ha <sungmin82.ha@samsung.com>
Diffstat (limited to 'ui/input.c')
-rw-r--r-- | ui/input.c | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/ui/input.c b/ui/input.c index 0254d7e364..0177bf2407 100644 --- a/ui/input.c +++ b/ui/input.c @@ -22,6 +22,10 @@ * THE SOFTWARE. */ +#ifdef CONFIG_MARU +#include <pthread.h> +#endif + #include "sysemu/sysemu.h" #include "monitor/monitor.h" #include "ui/console.h" @@ -30,6 +34,15 @@ #include "qapi-types.h" #include "ui/keymaps.h" +#ifdef CONFIG_MARU +extern void maru_hwkey_event(int event_type, int keycode); +extern void do_rotation_event(int rotation_type); +extern void do_host_kbd_enable(bool on); +extern void shutdown_qemu_gracefully(void); +extern void request_close(void); +void* tizen_close_thread(void* data); +#endif + //#include "tizen/src/debug_ch.h" //MULTI_DEBUG_CHANNEL(tizen, input); @@ -524,6 +537,61 @@ int kbd_mouse_has_absolute(void) return 0; } +#ifdef CONFIG_MARU +void hwkey_put_keycode(int type, int keycode) +{ + if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) { + return; + } + maru_hwkey_event(type, keycode); +} + +void rotation_put_type(int type) +{ + if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) { + return; + } + do_rotation_event(type); +} + +void hostkbd_put_type(int type) +{ + if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) { + return; + } + do_host_kbd_enable(type); +} + +void* tizen_close_thread(void* type) +{ + int data = *(int*)type; + + if (data == 1) { + /* force close */ + shutdown_qemu_gracefully(); + } else { + request_close(); + } + + pthread_exit((void*)0); +} + +void tizen_close_put_type(int type) +{ + pthread_t thread_id; + + if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) { + return; + } + + if (0 != pthread_create(&thread_id, NULL, tizen_close_thread, (void*)&type)) { + error_report("fail to create tizen_close pthread.\n"); + } else { + printf("created tizen_close thread\n"); + } +} +#endif + MouseInfoList *qmp_query_mice(Error **errp) { MouseInfoList *mice_list = NULL; |