BuildRequires: pkgconfig(enlightenment)
BuildRequires: pkgconfig(eldbus)
BuildRequires: pkgconfig(capi-ui-efl-util)
+BuildRequires: pkgconfig(ecore-wl2)
BuildRequires: gettext
BuildRequires: pkgconfig(tizen-extension-client)
BuildRequires: pkgconfig(tzsh-screensaver-manager-service)
%build
export GC_SECTIONS_FLAGS="-fdata-sections -ffunction-sections -Wl,--gc-sections"
-export CXXFLAGS+=" -Wall -g -fPIC -rdynamic ${GC_SECTIONS_FLAGS}"
+export CXXFLAGS+=" -Wall -g -fPIC -rdynamic ${GC_SECTIONS_FLAGS} -DEFL_BETA_API_SUPPORT "
export LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed -Wl,--rpath=/usr/lib"
%autogen
+#include <Ecore_Wl2.h>
+
#include "e_test_event.h"
#define E_TEST_WORK_TIME 3.0
this->log_dom_ = eina_log_domain_register("e-tc", EINA_COLOR_BLUE);
+ // Init Ecore_Wl2
+ if (!ecore_wl2_connected_display_get(NULL))
+ ecore_wl2_display_connect(NULL);
+
// init tizen_extension protocol
result = GetTizenPolicy();
EINA_SAFETY_ON_FALSE_RETURN_VAL(result, EINA_FALSE);
Ecore_Window EtEventLoop::GetWinId(Evas_Object *elm_win)
{
- Ecore_Wl_Window *wlwin = NULL;
+ Ecore_Wl2_Window *wlwin = NULL;
struct wl_surface *surf = NULL;
Ecore_Window id = 0;
struct tizen_resource *tzres = NULL;
- wlwin = elm_win_wl_window_get(elm_win);
+ wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(elm_win);
EINA_SAFETY_ON_NULL_RETURN_VAL(wlwin, 0);
- surf = ecore_wl_window_surface_get(wlwin);
+ surf = ecore_wl2_window_surface_get(wlwin);
EINA_SAFETY_ON_NULL_RETURN_VAL(surf, 0);
if (!this->tizen_surface_)
Eina_Bool EtEventLoop::GetTizenPolicy()
{
- Eina_Inlist *globals = NULL;
- Ecore_Wl_Global *global = NULL;
+ Eina_Iterator *globals = NULL;
+ Ecore_Wl2_Global *global = NULL;
struct wl_registry *registry = NULL;
if (!this->tizen_policy_)
{
- registry = ecore_wl_registry_get();
- globals = ecore_wl_globals_get();
+ registry = ecore_wl2_display_registry_get(ecore_wl2_connected_display_get(NULL));
+ globals = ecore_wl2_display_globals_get(ecore_wl2_connected_display_get(NULL));
EINA_SAFETY_ON_NULL_RETURN_VAL(registry, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(globals, EINA_FALSE);
- EINA_INLIST_FOREACH(globals, global)
+ EINA_ITERATOR_FOREACH(globals, global)
{
if (!strcmp(global->interface, "tizen_policy"))
{
wl_registry_bind(registry,
global->id,
&tizen_policy_interface,
- 7);
+ (global->version > 7)? 7 : global->version);
}
}
Eina_Bool EtEventLoop::GetTizenSurface()
{
- Eina_Inlist *globals = NULL;
- Ecore_Wl_Global *global = NULL;
+ Eina_Iterator *globals = NULL;
+ Ecore_Wl2_Global *global = NULL;
struct wl_registry *registry = NULL;
if (!this->tizen_surface_)
{
- registry = ecore_wl_registry_get();
- globals = ecore_wl_globals_get();
+ registry = ecore_wl2_display_registry_get(ecore_wl2_connected_display_get(NULL));
+ globals = ecore_wl2_display_globals_get(ecore_wl2_connected_display_get(NULL));
EINA_SAFETY_ON_NULL_RETURN_VAL(registry, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(globals, EINA_FALSE);
- EINA_INLIST_FOREACH(globals, global)
+ EINA_ITERATOR_FOREACH(globals, global)
{
if (!strcmp(global->interface, "tizen_surface"))
{
wl_registry_bind(registry,
global->id,
&tizen_surface_interface,
- 1);
+ (global->version > 1)? 1 : global->version);
}
}