diff options
author | Mun, Gwan-gyeong <kk.moon@samsung.com> | 2014-12-02 19:28:23 +0900 |
---|---|---|
committer | Mun, Gwan-gyeong <kk.moon@samsung.com> | 2014-12-02 23:08:28 +0900 |
commit | 809c84e26a75884edc15be34de493f1665c42bb6 (patch) | |
tree | c75c3cd6d8bbce370c1088e4ce160802ae10e9ae /devicemgr | |
parent | 00375af2ad6d4196e21b1f6bc990cebfb6ef33b9 (diff) | |
download | e17-extra-modules-tizen.tar.gz e17-extra-modules-tizen.tar.bz2 e17-extra-modules-tizen.zip |
Apply build option to tizen 3.0
Change-Id: I626b304e38ccacd457359fc8e954b747f21d6646
Diffstat (limited to 'devicemgr')
-rwxr-xr-x | devicemgr/configure.ac | 2 | ||||
-rwxr-xr-x | devicemgr/src/e_mod_main.c | 55 | ||||
-rwxr-xr-x | devicemgr/src/e_mod_main.h | 7 | ||||
-rwxr-xr-x | devicemgr/src/scrnconf_devicemgr.h | 1 | ||||
-rwxr-xr-x | devicemgr/src/sf_rotation_devicemgr.c | 3 |
5 files changed, 67 insertions, 1 deletions
diff --git a/devicemgr/configure.ac b/devicemgr/configure.ac index c1a6036..526d7f2 100755 --- a/devicemgr/configure.ac +++ b/devicemgr/configure.ac @@ -62,7 +62,7 @@ dnl ======================================================================== # checks for pkg-config dnl ======================================================================== #PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment, gestureproto, xgesture]) -PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment, sensor, vconf, dlog]) +PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment, vconf, dlog]) ENLIGHTENMENT_CFLAGS="${ENLIGHTENMENT_CFLAGS} " AC_SUBST(ENLIGHTENMENT_CFLAGS) AC_SUBST(ENLIGHTENMENT_LIBS) diff --git a/devicemgr/src/e_mod_main.c b/devicemgr/src/e_mod_main.c index 79a5c0d..e10fa87 100755 --- a/devicemgr/src/e_mod_main.c +++ b/devicemgr/src/e_mod_main.c @@ -48,10 +48,13 @@ e_modapi_init(E_Module* m) e_devicemgr.zone_add_handler = ecore_event_handler_add(E_EVENT_ZONE_ADD, (Ecore_Event_Handler_Cb)_e_devicemgr_cb_zone_add, NULL); e_devicemgr.zone_del_handler = ecore_event_handler_add(E_EVENT_ZONE_DEL, (Ecore_Event_Handler_Cb)_e_devicemgr_cb_zone_del, NULL); + e_devicemgr.e_msg_handler = e_msg_handler_add(_e_mod_move_e_msg_handler, NULL); + if (!e_devicemgr.window_property_handler) SLOG(LOG_DEBUG, "DEVICEMGR", "[e_devicemgr][%s] Failed to add ECORE_X_EVENT_WINDOW_PROPERTY handler\n", __FUNCTION__); if (!e_devicemgr.event_generic_handler) SLOG(LOG_DEBUG, "DEVICEMGR", "[e_devicemgr][%s] Failed to add ECORE_X_EVENT_GENERIC handler\n", __FUNCTION__); if (!e_devicemgr.zone_add_handler) SLOG(LOG_DEBUG, "DEVICEMGR", "[e_devicemgr][%s] Failed to add E_EVENT_ZONE_ADD handler\n", __FUNCTION__); if (!e_devicemgr.zone_del_handler) SLOG(LOG_DEBUG, "DEVICEMGR", "[e_devicemgr][%s] Failed to add E_EVENT_ZONE_DEL handler\n", __FUNCTION__); + if (!e_devicemgr.e_msg_handler) SLOG(LOG_DEBUG, "DEVICEMGR", "[e_devicemgr][%s] Failed to add E_MSG handler\n", __FUNCTION__); if (e_devicemgr.scrnconf_enable) { @@ -77,6 +80,7 @@ e_modapi_shutdown(E_Module* m) ecore_event_handler_del(e_devicemgr.event_generic_handler); ecore_event_handler_del(e_devicemgr.zone_add_handler); ecore_event_handler_del(e_devicemgr.zone_del_handler); + if (e_devicemgr.e_msg_handler) e_msg_handler_del(e_devicemgr.e_msg_handler); e_devicemgr.window_property_handler = NULL; e_devicemgr.event_generic_handler = NULL; e_devicemgr.zone_add_handler = NULL; @@ -102,6 +106,7 @@ _e_devicemgr_init(void) { unsigned int val = 1; int res, ret = 1; + int enable = 0; memset(&e_devicemgr, 0, sizeof(DeviceMgr)); @@ -143,8 +148,10 @@ _e_devicemgr_init(void) e_devicemgr.atomDevMgrCfg = ecore_x_atom_get(STR_ATOM_DEVICEMGR_CFG); e_devicemgr.atomFloat = ecore_x_atom_get(XATOM_FLOAT); e_devicemgr.atomInputTransform = ecore_x_atom_get(EVDEVMULTITOUCH_PROP_TRANSFORM); + e_devicemgr.atomExKeyboardEnabled = ecore_x_atom_get(E_PROP_EXTERNAL_KEYBOARD_ENABLED); ecore_x_window_prop_card32_set(e_devicemgr.rootWin, e_devicemgr.atomTouchInput, &val, 1); + ecore_x_window_prop_card32_set(e_devicemgr.rootWin, e_devicemgr.atomExKeyboardEnabled, &enable, 1); memset(&e_devicemgr.virtual_touchpad_area_info, -1, sizeof(e_devicemgr.virtual_touchpad_area_info)); memset(&e_devicemgr.virtual_multitouch_id, -1, sizeof(e_devicemgr.virtual_multitouch_id)); e_devicemgr.virtual_touchpad_pointed_window = 0; @@ -193,10 +200,12 @@ _e_devicemgr_init(void) } e_mod_scrnconf_container_bg_canvas_visible_set(EINA_FALSE); +#ifdef _F_DEVICE_ROTATION_ if(EINA_FALSE == e_mod_sf_rotation_init()) { SLOG(LOG_DEBUG, "DEVICEMGR", "[e_devicemgr] Failed to init rotation!\n"); } +#endif out: return ret; @@ -205,10 +214,12 @@ out: static void _e_devicemgr_fini(void) { +#ifdef _F_DEVICE_ROTATION_ if(EINA_FALSE == e_mod_sf_rotation_deinit()) { SLOG(LOG_DEBUG, "DEVICEMGR", "[e_devicemgr] Failed to deinit rotation!\n"); } +#endif e_mod_devicemgr_config_shutdown(); } @@ -658,6 +669,50 @@ _e_devicemgr_cb_client_message (void* data, int type, void* event) return 1; } +static void +_e_mod_move_e_msg_handler(void *data, const char *name, const char *info, int val, E_Object *obj, void *msgdata) +{ + Eina_List* l; + DeviceMgr_Device_Info *ldata; + unsigned int ret_val = 1; + + if (!strncmp(name, "e.move.quickpanel", sizeof("e.move.quickpanel"))) + { + if ((!strncmp(info, "start", sizeof("start")))) + { + // quickpanel state on + ret_val = 0; + ecore_x_window_prop_card32_set(e_devicemgr.rootWin, e_devicemgr.atomExKeyboardEnabled, &ret_val, 1); + EINA_LIST_FOREACH(e_devicemgr.device_list, l ,ldata) + { + if(ldata->type == E_DEVICEMGR_KEYBOARD) + { + if(_e_devicemgr_detach_slave(ldata->id) == EINA_FALSE) + { + SLOG(LOG_DEBUG, "DEVICEMGR", "[DeviceMgr] : fail to detach slave device(%d) \n", ldata->id); + } + } + } + } + else if ((!strncmp(info, "end", sizeof("end"))) && (val == 0)) + { + // quickpanel state off + ret_val = 1; + ecore_x_window_prop_card32_set(e_devicemgr.rootWin, e_devicemgr.atomExKeyboardEnabled, &ret_val, 1); + EINA_LIST_FOREACH(e_devicemgr.device_list, l ,ldata) + { + if(ldata->type == E_DEVICEMGR_KEYBOARD) + { + if(_e_devicemgr_reattach_slave(ldata->id, e_devicemgr.vck_id) == EINA_FALSE) + { + SLOG(LOG_DEBUG, "DEVICEMGR", "[DeviceMgr] : fail to reattach slave device(%d) to master device(%d) \n", ldata->id, e_devicemgr.vck_id); + } + } + } + } + } +} + static int _e_devicemgr_xinput_init(void) { diff --git a/devicemgr/src/e_mod_main.h b/devicemgr/src/e_mod_main.h index 91e724b..a14b9c4 100755 --- a/devicemgr/src/e_mod_main.h +++ b/devicemgr/src/e_mod_main.h @@ -60,6 +60,8 @@ #define E_VIRTUAL_TOUCHPAD_NAME "Virtual Touchpad" #define EVDEVMULTITOUCH_PROP_TRANSFORM "EvdevMultitouch Transform Matrix" #define XATOM_FLOAT "FLOAT" +#define E_PROP_EXTERNAL_KEYBOARD_ENABLED "External Keyboard Enabled" + #define DEVICEMGR_PREFIX "/usr/lib/enlightenment/modules/e17-extra-modules-devicemgr/" @@ -131,6 +133,7 @@ typedef struct _DeviceMgr_ Ecore_X_Atom atomFloat; Ecore_X_Atom atomVirtualTouchpadInt; Ecore_X_Atom atomDeviceMgrInputWindow; + Ecore_X_Atom atomExKeyboardEnabled; /* scrn conf atoms */ Ecore_X_Atom atomScrnConfDispModeSet; @@ -157,6 +160,7 @@ typedef struct _DeviceMgr_ Ecore_Event_Handler *client_message_handler; E_Border_Hook *border_move_end_hook; E_Border_Hook *border_resize_end_hook; + E_Msg_Handler *e_msg_handler; //variables to set XRROutputProperty RROutput output; @@ -208,6 +212,7 @@ static void _e_devicemgr_hook_border_move_end(void *data, void *border); static void _e_devicemgr_hook_border_resize_end(void *data, void *border); static Eina_Bool _e_devicemgr_get_zones(void); static E_Zone* _e_devicemgr_get_nth_zone(int index); +static void _e_mod_move_e_msg_handler(void *data, const char *name, const char *info, int val, E_Object *obj, void *msgdata); static void _e_devicemgr_update_input_transform_matrix(Eina_Bool reset); static void _e_devicemgr_init_transform_matrix(void); @@ -243,6 +248,8 @@ static void _e_devicemgr_virtual_multitouch_helper_init(int deviceid); static void _e_devicemgr_virtual_multitouch_helper_fini(void); static void _e_devicemgr_show_device_list(unsigned int val); +#ifdef _F_DEVICE_ROTATION_ Eina_Bool e_mod_sf_rotation_init(void); Eina_Bool e_mod_sf_rotation_deinit(void); +#endif #endif//__E_MOD_MAIN_H__ diff --git a/devicemgr/src/scrnconf_devicemgr.h b/devicemgr/src/scrnconf_devicemgr.h index bd83900..f625a90 100755 --- a/devicemgr/src/scrnconf_devicemgr.h +++ b/devicemgr/src/scrnconf_devicemgr.h @@ -3,6 +3,7 @@ #include <X11/Xlib.h> #include <utilX.h> +#include <utilX_ext.h> #define STR_ATOM_SCRNCONF_DISPMODE_SET "_SCRNCONF_DISPMODE_SET" #define STR_ATOM_SCRNCONF_INFO "_SCRNCONF_INFO" diff --git a/devicemgr/src/sf_rotation_devicemgr.c b/devicemgr/src/sf_rotation_devicemgr.c index c7ea3ff..bdd3c4e 100755 --- a/devicemgr/src/sf_rotation_devicemgr.c +++ b/devicemgr/src/sf_rotation_devicemgr.c @@ -17,6 +17,8 @@ * Please, see the COPYING file for the original copyright owner and * license. */ +#ifdef _F_DEVICE_ROTATION_ + #include <stdio.h> #include <stdlib.h> #include <errno.h> @@ -390,3 +392,4 @@ _sensor_rotation_set(int ang) ATOM_DEVICE_ROTATION_ANGLE, &val, 1); } +#endif |