emul_state: delete unnecessary functions
authorGiWoong Kim <giwoong.kim@samsung.com>
Fri, 8 Jan 2016 11:29:19 +0000 (20:29 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 13 Jan 2016 02:03:53 +0000 (11:03 +0900)
Change-Id: I86f25232bb0f5739c52b58c0d44ef686e6fa1204
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/Makefile.objs
tizen/src/emul_state.c
tizen/src/emul_state.h
tizen/src/emul_state_darwin.m [deleted file]

index 1e18465..083e762 100644 (file)
@@ -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)/
index f313877..8c910c1 100644 (file)
@@ -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;
index 0ad1e94..988d748 100644 (file)
@@ -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 (file)
index b4fab47..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Emulator
- *
- * Copyright (C) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Kitae Kim <kt920.kim@samsung.com>
- * SeokYeon Hwang <syeon.hwang@samsung.com>
- * MunKyu Im <munkyu.im@samsung.com>
- * GiWoong Kim <giwoong.kim@samsung.com>
- * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
- *
- * 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 <Cocoa/Cocoa.h>
-#import <AppKit/NSEvent.h>
-
-#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;
-}