From b03f48c683de132b1a2c1b07dddbcd0c9e1c9751 Mon Sep 17 00:00:00 2001 From: Juan Zhao Date: Thu, 17 Oct 2013 10:48:17 +0800 Subject: [PATCH] change the macro name 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 | 4 ++-- src/x2w_general.h | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ecore_x_2w.h b/src/ecore_x_2w.h index 0aca567..485b527 100644 --- a/src/ecore_x_2w.h +++ b/src/ecore_x_2w.h @@ -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() \ diff --git a/src/x2w_general.h b/src/x2w_general.h index 02f5b6d..f1646b6 100644 --- a/src/x2w_general.h +++ b/src/x2w_general.h @@ -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 -- 2.7.4