From: GiWoong Kim Date: Fri, 8 Jan 2016 11:29:19 +0000 (+0900) Subject: emul_state: delete unnecessary functions X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~92 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=786935de9eb8f7eb2cd2105d7bf6037eb427304b;p=sdk%2Femulator%2Fqemu.git emul_state: delete unnecessary functions Change-Id: I86f25232bb0f5739c52b58c0d44ef686e6fa1204 Signed-off-by: GiWoong Kim --- diff --git a/tizen/src/Makefile.objs b/tizen/src/Makefile.objs index 1e18465030..083e762b83 100644 --- a/tizen/src/Makefile.objs +++ b/tizen/src/Makefile.objs @@ -23,9 +23,8 @@ obj-y += eventcast/ # maru hardware obj-y += hw/ -# NSRunLoop and emul_state_darwin +# NSRunLoop obj-$(CONFIG_DARWIN) += ns_event.o -obj-$(CONFIG_DARWIN) += emul_state_darwin.o ifdef CONFIG_EXTENSION_PATH obj-y += $(CONFIG_EXTENSION_PATH)/ diff --git a/tizen/src/emul_state.c b/tizen/src/emul_state.c index f313877d8a..8c910c109c 100644 --- a/tizen/src/emul_state.c +++ b/tizen/src/emul_state.c @@ -105,60 +105,6 @@ int get_multi_touch_enable(void) return _emul_state.multitouch_enable; } -/* retrieves the status of the host lock key */ -int get_host_lock_key_state(int key) -{ - /* support only capslock, numlock */ -#if defined(CONFIG_LINUX) - unsigned state = 0; - Display *display = XOpenDisplay((char*)0); - if (display) { - XkbGetIndicatorState(display, XkbUseCoreKbd, &state); - } - XCloseDisplay(display); - - if (key == HOST_CAPSLOCK_KEY) { - return (state & 0x01) != 0; - } else if (key == HOST_NUMLOCK_KEY) { - return (state & 0x02) != 0; - } - -#elif defined(CONFIG_WIN32) - if (key == HOST_CAPSLOCK_KEY) { - return (GetKeyState(VK_CAPITAL) & 1) != 0; - } else if (key == HOST_NUMLOCK_KEY) { - return (GetKeyState(VK_NUMLOCK) & 1) != 0; - } -#elif defined(CONFIG_DARWIN) - return get_host_lock_key_state_darwin(key); -#endif - - return -1; -} - -/* manage CapsLock key state for host keyboard input */ -void set_emul_caps_lock_state(int state) -{ - _emul_state.qemu_caps_lock = state; -} - -int get_emul_caps_lock_state(void) -{ - return _emul_state.qemu_caps_lock; -} - -/* manage NumLock key state for host keyboard input */ -void set_emul_num_lock_state(int state) -{ - _emul_state.qemu_num_lock = state; -} - -int get_emul_num_lock_state(void) -{ - return _emul_state.qemu_num_lock; -} - - void set_emuld_connection(bool connected) { _emul_state.emuld_connection = connected; diff --git a/tizen/src/emul_state.h b/tizen/src/emul_state.h index 0ad1e94076..988d748ad8 100644 --- a/tizen/src/emul_state.h +++ b/tizen/src/emul_state.h @@ -91,8 +91,6 @@ typedef struct EmulatorConfigState { int emulator_condition; int emuld_condition; int multitouch_enable; - int qemu_caps_lock; - int qemu_num_lock; /* add here */ char emulator_profile[MAX_PROFILE]; bool emuld_connection; @@ -101,8 +99,6 @@ typedef struct EmulatorConfigState { /* setter */ void set_emulator_condition(int state); -void set_emul_caps_lock_state(int state); -void set_emul_num_lock_state(int state); void set_emul_tap_enable(bool enable); void set_emuld_connection(bool connected); void set_sdb_connection(bool connected); @@ -112,11 +108,6 @@ const char* get_emul_skin_path(void); bool get_emul_cpu_accel(void); int get_emulator_condition(void); -int get_host_lock_key_state(int key); -int get_host_lock_key_state_darwin(int key); -int get_emul_caps_lock_state(void); -int get_emul_num_lock_state(void); - bool get_emuld_connection(void); bool get_sdb_connection(void); int get_max_touch_point(void); diff --git a/tizen/src/emul_state_darwin.m b/tizen/src/emul_state_darwin.m deleted file mode 100644 index b4fab4786e..0000000000 --- a/tizen/src/emul_state_darwin.m +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Emulator - * - * Copyright (C) 2013 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Kitae Kim - * SeokYeon Hwang - * MunKyu Im - * GiWoong Kim - * YeongKyoon Lee - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Contributors: - * - S-Core Co., Ltd - * - */ - -#import -#import - -#include "emul_state.h" - -/* retrieves the status of the host lock key */ -int get_host_lock_key_state_darwin(int key) -{ - /* support only capslock */ - if (key == HOST_CAPSLOCK_KEY) { - return ((NSAlphaShiftKeyMask & [NSEvent modifierFlags]) ? 1 : 0); - } else if (key == HOST_NUMLOCK_KEY) { - return 0; - } - - return -1; -}