# 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)/
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;
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;
/* 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);
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);
+++ /dev/null
-/*
- * 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;
-}