AC_DEFINE_UNQUOTED([HAVE_WAYLAND_ONLY],[1],[enable wayland-only version of enlightenment])
fi
+# to include e_comp_wl.h
+if test "x${have_wayland_only}" != "xno"; then
+ AC_DEFINE_UNQUOTED([HAVE_WAYLAND],[1],[enable wayland support])
+fi
+
dnl ========================================================================
# checks for wayland only argument
dnl ========================================================================
static Eina_Bool _e_keyrouter_send_key_events_register(int type, Ecore_Event_Key *ev);
static Eina_Bool _e_keyrouter_is_key_grabbed(int key);
-static Eina_Bool _e_keyrouter_check_top_visible_window(E_Comp *c, E_Client *ec_focus, int arr_idx);
-static void _e_keyrouter_find_top_register_window(E_Comp *c, int arr_idx);
+static Eina_Bool _e_keyrouter_check_top_visible_window(E_Client *ec_focus, int arr_idx);
+static void _e_keyrouter_find_top_register_window(int arr_idx);
static Eina_Bool
_e_keyrouter_is_key_grabbed(int key)
unsigned int keycode = ev->keycode;
struct wl_resource *surface_focus = NULL;
E_Client *ec_focus = NULL;
- E_Comp *c = NULL;
E_Keyrouter_Key_List_NodePtr key_node_data;
Eina_List *l = NULL;
}
krt->isWindowStackChanged = EINA_FALSE;
- c = e_comp_find_by_window(ev->window);
- if (_e_keyrouter_check_top_visible_window(c, ec_focus, keycode))
+ if (_e_keyrouter_check_top_visible_window(ec_focus, keycode))
{
_e_keyrouter_send_key_event(type, key_node_data->surface, NULL, ev);
KLDBG("TOPMOST (TOP_POSITION) Mode : Key %s (%d) ===> Surface (%p)\n",
_e_keyrouter_send_key_events_register(int type, Ecore_Event_Key *ev)
{
unsigned int keycode = ev->keycode;
- E_Comp *c = NULL;
if (!krt->HardKeys[keycode].registered_ptr)
{
}
static Eina_Bool
-_e_keyrouter_check_top_visible_window(E_Comp *c, E_Client *ec_focus, int arr_idx)
+_e_keyrouter_check_top_visible_window(E_Client *ec_focus, int arr_idx)
{
E_Client *ec_top = NULL;
Eina_List *l = NULL, *l_next = NULL;
E_Keyrouter_Key_List_NodePtr key_node_data = NULL;
- ec_top = e_client_top_get(c);
+ ec_top = e_client_top_get();
KLDBG("Top Client: %p\n", ec_top);
while (ec_top)
{
if (key_node_data)
{
- if (ec_top == e_pixmap_client_get(wl_resource_get_user_data(key_node_data->surface)))
+ if (ec_top == wl_resource_get_user_data(key_node_data->surface))
{
krt->HardKeys[arr_idx].top_ptr = eina_list_promote_list(krt->HardKeys[arr_idx].top_ptr, l);
KLDBG("Move a client(%p) to first index of list(key: %d)\n",
evtype = WL_KEYBOARD_KEY_STATE_RELEASED;
}
- serial = wl_display_next_serial(krt->cdata->wl.disp);
- EINA_LIST_FOREACH(krt->cdata->kbd.resources, l, res)
+ serial = wl_display_next_serial(e_comp_wl->wl.disp);
+ EINA_LIST_FOREACH(e_comp_wl->kbd.resources, l, res)
{
if (res)
{
struct wl_resource *surface = NULL;
Eina_Bool below_focus = EINA_FALSE;
- ec_top = e_client_top_get(e_comp);
+ ec_top = e_client_top_get();
ec_focus = e_client_focused_get();
while (ec_top)
#define LOG_TAG "KEYROUTER"
#include "dlog.h"
-EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Keyrouter Module of Window Manager" };
+E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Keyrouter Module of Window Manager" };
KeyRouter krt;
-EAPI void *
+E_API void *
e_modapi_init(E_Module *m)
{
if (!_e_keyrouter_init()) return NULL;
return m;
}
-EAPI int
+E_API int
e_modapi_shutdown(E_Module *m EINA_UNUSED)
{
Ecore_Event_Handler *h = NULL;
return 1;
}
-EAPI int
+E_API int
e_modapi_save(E_Module *m EINA_UNUSED)
{
/* Save something to be kept */
#include <utilX.h>
/*** E Module ***/
-EAPI extern E_Module_Api e_modapi;
+E_API extern E_Module_Api e_modapi;
-EAPI void *e_modapi_init(E_Module *m);
-EAPI int e_modapi_shutdown(E_Module *m);
-EAPI int e_modapi_save(E_Module *m);
+E_API void *e_modapi_init(E_Module *m);
+E_API int e_modapi_shutdown(E_Module *m);
+E_API int e_modapi_save(E_Module *m);
/* maximum number of hardkeys */
#define MIN_KEYCODE 8
#include <string.h>
E_KeyrouterPtr krt = NULL;
-EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Keyrouter Module of Window Manager" };
+E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Keyrouter Module of Window Manager" };
static E_Keyrouter_Config_Data *_e_keyrouter_init(E_Module *m);
static void _e_keyrouter_init_handlers(void);
goto err;
}
- E_Comp_Data *cdata = e_comp->wl_comp_data;
-
- if (!cdata)
- {
- KLDBG("Failed to get wl_comp_data ! (e_comp->wl_comp_data == NULL)\n");
- goto err;
- }
-
- krt->cdata = cdata;
-
kconfig = E_NEW(E_Keyrouter_Config_Data, 1);
EINA_SAFETY_ON_NULL_GOTO(kconfig, err);
krt->ef_handler = ecore_event_filter_add(NULL, _event_filter, NULL, NULL);
_e_keyrouter_init_handlers();
- krt->global = wl_global_create(cdata->wl.disp, &tizen_keyrouter_interface, 1, krt, _e_keyrouter_cb_bind);
+ krt->global = wl_global_create(e_comp_wl->wl.disp, &tizen_keyrouter_interface, 1, krt, _e_keyrouter_cb_bind);
if (!krt->global)
{
KLDBG("Failed to create global !\n");
return NULL;
}
-EAPI void *
+E_API void *
e_modapi_init(E_Module *m)
{
return _e_keyrouter_init(m);
}
-EAPI int
+E_API int
e_modapi_shutdown(E_Module *m)
{
E_Keyrouter_Config_Data *kconfig = m->data;
return 1;
}
-EAPI int
+E_API int
e_modapi_save(E_Module *m)
{
/* Save something to be kept */
struct _E_Keyrouter
{
- E_Comp_Data *cdata;
struct wl_global *global;
Ecore_Event_Filter *ef_handler;
Eina_List *handlers;
/* E Module */
-EAPI extern E_Module_Api e_modapi;
-EAPI void *e_modapi_init(E_Module *m);
-EAPI int e_modapi_shutdown(E_Module *m);
-EAPI int e_modapi_save(E_Module *m);
+E_API extern E_Module_Api e_modapi;
+E_API void *e_modapi_init(E_Module *m);
+E_API int e_modapi_shutdown(E_Module *m);
+E_API int e_modapi_save(E_Module *m);
int e_keyrouter_set_keygrab_in_list(struct wl_resource *surface, struct wl_client *client, uint32_t key, uint32_t mode);
int e_keyrouter_prepend_to_keylist(struct wl_resource *surface, struct wl_client *wc, uint32_t key, uint32_t mode);