diff options
author | Li,Limin <liminx.li@intel.com> | 2014-01-08 18:01:31 +0800 |
---|---|---|
committer | Li,Limin <liminx.li@intel.com> | 2014-01-08 18:03:38 +0800 |
commit | 3a86573c836fcbe7cb6072e5607b4216c6c5c133 (patch) | |
tree | fb2b812369b88727e6c8d2365f3a4f0d831bcbb0 /client | |
parent | bc0915cd3c899263c1be54730be7df3ecb9b54dd (diff) | |
download | ui-gadget-1-3a86573c836fcbe7cb6072e5607b4216c6c5c133.tar.gz ui-gadget-1-3a86573c836fcbe7cb6072e5607b4216c6c5c133.tar.bz2 ui-gadget-1-3a86573c836fcbe7cb6072e5607b4216c6c5c133.zip |
init wayland supportsubmit/tizen/20140110.215645accepted/tizen/mobile/20140113.182040accepted/tizen/ivi/20140110.224049accepted/tizen/generic/20140114.145758accepted/tizen/mobile
The display server based on X or Wayland, is now a choice of different profile in Tizen 3.0.
Basically and consistently, two macros were used "with wayland" and "with x".
Below summarize the combination of the macros:
| wayland | x | meaning
|---------------------------
| 0 | 1 | pure X11 platform(no wayland)
| 1 | 0 | pure wayland platform (no X11)
| 1 | 1 | wayland but X compatibility
| 0 | 0 | no X and no wayland
This method unifies the meaning and usage. Deploy this method to ui-gadget package.
Signed-off-by: Li,Limin <liminx.li@intel.com>
Change-Id: Iceb95b03f824860b2aac74f35c0945380f6cc22a
Diffstat (limited to 'client')
-rw-r--r--[-rwxr-xr-x] | client/CMakeLists.txt | 21 | ||||
-rw-r--r--[-rwxr-xr-x] | client/ug-client.c | 15 |
2 files changed, 20 insertions, 16 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index cd31296..35f00af 100755..100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -7,18 +7,15 @@ SET(CLIENT_LOCALEDIR /usr/share/locale) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(CLIENT_PKGS REQUIRED - capi-appfw-application - capi-system-runtime-info - appcore-efl - appsvc - bundle - ecore-x - edje - dlog - elementary - evas - x11) +SET(CLIENT_PKGS_CHECK_MODULES "capi-appfw-application capi-system-runtime-info appcore-efl appsvc bundle edje dlog elementary evas") + +IF (with_x) + PKG_CHECK_MODULES(CLIENT_PKGS REQUIRED ${CLIENT_PKGS_CHECK_MODULES} ecore-x x11) +ENDIF(with_x) + +IF (with_wayland) + PKG_CHECK_MODULES(CLIENT_PKGS REQUIRED ${CLIENT_PKGS_CHECK_MODULES}) +ENDIF(with_wayland) FOREACH(flag ${CLIENT_PKGS_CFLAGS}) SET(CLIENT_CFLAGS "${CLIENT_CFLAGS} ${flag}") diff --git a/client/ug-client.c b/client/ug-client.c index cf9819d..46bd4e7 100755..100644 --- a/client/ug-client.c +++ b/client/ug-client.c @@ -22,7 +22,11 @@ #include <stdio.h> #include <appcore-efl.h> #include <ui-gadget.h> + +#ifndef WAYLAND #include <Ecore_X.h> +#endif + #include <dlog.h> #include <aul.h> #include <appsvc.h> @@ -31,8 +35,6 @@ #include "ug-client.h" -#include <Ecore_X.h> - #ifdef LOG_TAG #undef LOG_TAG #endif @@ -180,6 +182,7 @@ static void profile_changed_cb(void *data, Evas_Object * obj, void *event) static Evas_Object *create_win(const char *name) { + Ecore_Evas *ee; Evas_Object *eo; int w, h; @@ -191,8 +194,8 @@ static Evas_Object *create_win(const char *name) win_del, NULL); /* disable destktop mode evas_object_smart_callback_add(eo, "profile,changed", profile_changed_cb, NULL); */ - ecore_x_window_size_get(ecore_x_window_root_first_get(), - &w, &h); + ee = ecore_evas_ecore_evas_get(evas_object_evas_get(eo)); + evas_output_size_get(ee, &w, &h); evas_object_resize(eo, w, h); } @@ -247,7 +250,10 @@ static int app_create(void *data) if (win == NULL) return -1; ad->win = win; + +#ifndef WAYLAND UG_INIT_EFL(ad->win, UG_OPT_INDICATOR_ENABLE); +#endif bg = elm_bg_add(win); evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); @@ -358,6 +364,7 @@ static int app_reset(bundle *b, void *data) Ecore_X_Window id2 = elm_win_xwindow_get(ad->win); ret = appsvc_request_transient_app(b, id2, svc_cb, "svc test"); + if (ret) LOGD("fail to request transient app: return value(%d)", ret); else |