summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiwoong Im <jiwoong.im@samsung.com>2015-06-30 04:35:19 (GMT)
committerJiwoong Im <jiwoong.im@samsung.com>2015-06-30 07:12:32 (GMT)
commit33a9b2d54c03c69510ffb4bc27fd7f60ac9cd57e (patch)
treedca365c1bc3cf588450c7055b454ad0eedca504f
parentb12ee8c1184b9cf65b9c9c769d45bcfe66481caa (diff)
downloadui-gadget-1-submit/tizen/20150702.004900.zip
ui-gadget-1-submit/tizen/20150702.004900.tar.gz
ui-gadget-1-submit/tizen/20150702.004900.tar.bz2
Change-Id: I2580de7cfc88dbe54824863a7554774b6d9d627f Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
-rw-r--r--CMakeLists.txt8
-rw-r--r--include/ug-manager.h2
-rw-r--r--include/ui-gadget.h4
-rw-r--r--src/manager.c14
-rw-r--r--src/ug.c2
-rw-r--r--ui-gadget-1.pc.in2
6 files changed, 17 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c948b68..f5f588e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,12 +28,14 @@ ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
SET(PKGS_CHECK_MODULES "glib-2.0 bundle dlog capi-appfw-application appsvc capi-appfw-app-manager ecore elementary libtzplatform-config")
IF (with_x)
- PKG_CHECK_MODULES(PKGS REQUIRED ${PKGS_CHECK_MODULES} x11)
+ PKG_CHECK_MODULES(PKGS REQUIRED ${PKGS_CHECK_MODULES} x11)
+ SET(UG_FLAG "")
ENDIF(with_x)
IF (with_wayland)
- ADD_DEFINITIONS("-DWAYLAND")
- PKG_CHECK_MODULES(PKGS REQUIRED ${PKGS_CHECK_MODULES})
+ ADD_DEFINITIONS("-DUG_WAYLAND")
+ PKG_CHECK_MODULES(PKGS REQUIRED ${PKGS_CHECK_MODULES})
+ SET(UG_FLAG "-DUG_WAYLAND")
ENDIF (with_wayland)
FOREACH(flag ${PKGS_CFLAGS})
diff --git a/include/ug-manager.h b/include/ug-manager.h
index 5ce61f0..cd711dc 100644
--- a/include/ug-manager.h
+++ b/include/ug-manager.h
@@ -34,7 +34,7 @@ ui_gadget_h ugman_ug_load(ui_gadget_h parent,
int ugman_ug_del(ui_gadget_h ug);
int ugman_ug_del_all(void);
-#ifndef WAYLAND
+#ifndef UG_WAYLAND
int ugman_init(Display *disp, Window xid, void *win, enum ug_option opt);
#else
int ugman_init(void *win, enum ug_option opt);
diff --git a/include/ui-gadget.h b/include/ui-gadget.h
index 73a7510..7b2efe8 100644
--- a/include/ui-gadget.h
+++ b/include/ui-gadget.h
@@ -54,7 +54,7 @@
* @addtogroup UI_Gadget_For_User
* @{
*/
-#ifndef WAYLAND
+#ifndef UG_WAYLAND
#include <X11/Xlib.h>
#endif
@@ -217,7 +217,7 @@ struct ug_cbs {
* ...
* \endcode
*/
-#ifndef WAYLAND
+#ifndef UG_WAYLAND
int ug_init(Display *disp, Window xid, void *win, enum ug_option opt);
#else
int ug_init(void *win, enum ug_option opt);
diff --git a/src/manager.c b/src/manager.c
index 65fdff2..91ae208 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -25,7 +25,7 @@
#include <errno.h>
#include <glib.h>
-#ifndef WAYLAND
+#ifndef UG_WAYLAND
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <Ecore_X.h>
@@ -50,7 +50,7 @@ struct ug_manager {
void *win;
-#ifndef WAYLAND
+#ifndef UG_WAYLAND
Window win_id;
Display *disp;
#endif
@@ -129,7 +129,7 @@ static int ug_fvlist_del(ui_gadget_h c)
return 0;
}
-#ifndef WAYLAND
+#ifndef UG_WAYLAND
static int __ug_x_get_window_property(Display *dpy, Window win, Atom atom,
Atom type, unsigned int *val,
unsigned int len)
@@ -168,7 +168,7 @@ static int __ug_x_get_window_property(Display *dpy, Window win, Atom atom,
}
#endif
-#ifndef WAYLAND
+#ifndef UG_WAYLAND
static enum ug_event __ug_x_rotation_get(Display *dpy, Window win)
{
Window active_win;
@@ -595,7 +595,7 @@ static int ugman_ug_create(void *data)
}
if(ug_man.last_rotate_evt == UG_EVENT_NONE) {
-#ifndef WAYLAND
+#ifndef UG_WAYLAND
ug_man.last_rotate_evt = __ug_x_rotation_get(ug_man.disp, ug_man.win_id);
#endif
}
@@ -848,7 +848,7 @@ int ugman_ug_del_all(void)
return 0;
}
-#ifndef WAYLAND
+#ifndef UG_WAYLAND
int ugman_init(Display *disp, Window xid, void *win, enum ug_option opt)
{
ug_man.win = win;
@@ -884,7 +884,7 @@ int ugman_init(void *win, enum ug_option opt)
int ugman_init_efl(Evas_Object *win, enum ug_option opt)
{
-#ifndef WAYLAND
+#ifndef UG_WAYLAND
Ecore_X_Window xwin = elm_win_xwindow_get(win);
if (xwin)
return ugman_init((Display *)ecore_x_display_get(), xwin, win, opt);
diff --git a/src/ug.c b/src/ug.c
index 219c69f..57c4a53 100644
--- a/src/ug.c
+++ b/src/ug.c
@@ -94,7 +94,7 @@ UG_API ui_gadget_h ug_create(ui_gadget_h parent,
return ugman_ug_load(parent, name, mode, service, cbs);
}
-#ifndef WAYLAND
+#ifndef UG_WAYLAND
UG_API int ug_init(Display *disp, Window xid, void *win, enum ug_option opt)
{
if (!win || !xid || !disp) {
diff --git a/ui-gadget-1.pc.in b/ui-gadget-1.pc.in
index f9e884e..48f6bce 100644
--- a/ui-gadget-1.pc.in
+++ b/ui-gadget-1.pc.in
@@ -8,4 +8,4 @@ Description: UI Gadget Library
Version: @VERSION@
Requires: bundle capi-appfw-application
Libs: -L${libdir} -lui-gadget-1
-Cflags: -I${includedir}
+Cflags: -I${includedir} @UG_FLAG@