change the macro name
authorJuan Zhao <juan.j.zhao@intel.com>
Thu, 17 Oct 2013 02:48:17 +0000 (10:48 +0800)
committerJuan Zhao <juan.j.zhao@intel.com>
Thu, 12 Dec 2013 09:18:13 +0000 (17:18 +0800)
Using WIDTH and HEIGHT will triggle wrt-plugin-common's error:
=>src/modules/tizen/WidgetDB/WidgetDB.cpp:165:36: error: expected unqualified-id before numeric constant
And the code there uses WIDTH as a enum parameter. So change macro name to X2W specific.

In wrt-setting, there is the issue: TRUE and FALSE is declared:
webapp-common/listview.cpp:250:44: error: 'TRUE' was not declared in this scope
webapp-common/listview.cpp:267:44: error: 'FALSE' was not declared in this scope

This is because of some EFL package defines this macro. But in our efl, it was
 not defined.
Before we are changing them in the package directly, to make one change and fit
 all these kind of issues, let's try to fix it in x2w.

src/ecore_x_2w.h
src/x2w_general.h

index 0aca567..485b527 100644 (file)
@@ -9,8 +9,8 @@ extern "C" {
 ({                                                     \
        DO_PRAGMA                                       \
        PRINT_LOCATIONS("e_core_x_window_size_get")     \
-       *w=(int)WIDTH;                                  \
-       *h=(int)HEIGHT;                                 \
+       *w=(int)X2W_WIDTH;                                      \
+       *h=(int)X2W_HEIGHT;                                     \
 })
 
 #define ecore_x_window_prop_any_type()                 \
index 02f5b6d..f1646b6 100644 (file)
@@ -12,8 +12,8 @@ extern "C" {
 #define ROOT_WIN_ID    1
 #define FAKE_RETURN_INT        ROOT_WIN_ID
 #define FAKE_RETURN_POINTER    NULL
-#define WIDTH  720
-#define HEIGHT 1280
+#define X2W_WIDTH      720
+#define X2W_HEIGHT     1280
 #define PRINT_LOCATIONS(string) fprintf(stderr, "file: %s, \tfunc: %s, \tline: %d, using %s\n", __FILE__, __FUNCTION__, __LINE__, string);
 #define PRINT_LOCATION fprintf(stderr, "file: %s, \tfunc: %s, \tline: %d\n", __FILE__, __FUNCTION__, __LINE__);
 #if GCC_VERSION > 40800
@@ -26,6 +26,14 @@ extern "C" {
 #define RETURN_POINTER(a) ({DO_PRAGMA PRINT_LOCATIONS(a); FAKE_RETURN_POINTER;})
 #define RETURN_VOID(a) do {DO_PRAGMA PRINT_LOCATIONS(a);} while(0)
 
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif