extern "C" {
#endif
-#if defined(__GNUC__) && __GNUC__ >= 4
-#define X2W_DEPRECATED __attribute__ ((deprecated))
-#else
-#define X2W_DEPRECATED
-#endif
-
#include <stdio.h>
-#define ROOT_WIN_ID 1
-#define MAGIC_WIN_ID 0
-#define FAKE_DISPLAY 0
-#define WIDTH 720
-#define HEIGHT 1280
-#define PRINT_LOG(string) fprintf(stderr, "%s\n", string);
+#define ROOT_WIN_ID 1
+#define FAKE_RETURN_INT ROOT_WIN_ID
+#define FAKE_RETURN_POINTER NULL
+#define WIDTH 720
+#define 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__);
-#define PRINT_SCREENSIZE_SUGGESTION fprintf(stderr, "if it is to get screen size, please use ecore_evas_screen_geometry_get API instead.\n");
+#define DO_PRAGMA _Pragma ("GCC warning \"X-func\"")
+
+#define RETURN_INT(a) ({DO_PRAGMA PRINT_LOCATIONS(a); FAKE_RETURN_INT;})
+#define RETURN_POINTER(a) ({DO_PRAGMA PRINT_LOCATIONS(a); FAKE_RETURN_POINTER;})
+#define RETURN_VOID(a) do {DO_PRAGMA PRINT_LOCATIONS(a);} while(0)
-void ecore_x_func_is_used(void) X2W_DEPRECATED;
+#define elm_win_xwindow_get(win) \
+ RETURN_INT("e_lm_win_xwindow_get")
#define ecore_x_window_size_get(win, w, h) \
-do { \
- ecore_x_func_is_used(); \
+({ \
+ DO_PRAGMA \
PRINT_LOCATIONS("e_core_x_window_size_get") \
*w=(int)WIDTH; \
*h=(int)HEIGHT; \
-} while (0)
-
-
-#define ecore_x_window_root_first_get() \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
+})
+#define ecore_x_window_root_first_get() \
+ RETURN_INT("e_core_x_window_root_first_get")
#define ecore_x_icccm_name_class_set(win, n, c) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-/*what's this API used for*/
-#define elm_win_xwindow_get(win) ({ \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
- ROOT_WIN_ID; \
-})
+ RETURN_VOID("e_core_x_icccm_name_class_set")
#define ecore_x_window_prop_string_set(win, type, str) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
+ RETURN_VOID("e_core_x_window_prop_string_set")
-#define ecore_x_display_get() ({ \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
- FAKE_DISPLAY;})
+#define ecore_x_display_get() \
+ RETURN_INT("e_core_x_display_get")
-#define ecore_x_window_root_get(win) ({ \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
- ROOT_WIN_ID;})
+#define ecore_x_window_root_get(win) \
+ RETURN_INT("e_core_x_window_root_get")
-#define utilx_hide_fake_effect(dpy, win) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_window_focus_get() ({ \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
- ROOT_WIN_ID;})
+#define ecore_x_window_focus_get() \
+ RETURN_INT("e_core_x_window_focus_get") \
#define ecore_x_event_mask_set(w, mask) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
+ RETURN_VOID("e_core_x_event_mask_set")
-#define ecore_x_window_prop_card32_get(win, atom, val, len) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
+#define ecore_x_window_prop_card32_get(win, atom, val, len) \
+ RETURN_INT("e_core_x_window_prop_card32_get")
-#define ecore_x_window_prop_property_set(win, type, format, size, data, number) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
+#define ecore_x_window_prop_property_set(win, type, format, size, data, number) \
+ RETURN_VOID("e_core_x_window_prop_property_set")
-#define ecore_x_sync() \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
+#define ecore_x_sync() \
+ RETURN_VOID("e_core_x_sync")
-#define ecore_x_init(name) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
+#define ecore_x_init(name) \
+ RETURN_INT("e_core_x_init")
#define ecore_x_dpi_get() \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
+ RETURN_INT("e_core_x_dpi_get")
#define ecore_x_default_screen_get(void) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
+ RETURN_INT("e_core_x_default_screen_get")
#define ecore_x_screen_size_get(screen, w, h) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
+ RETURN_VOID("e_core_x_screen_size_get")
#define ecore_x_window_cursor_set(win, c) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
+ RETURN_VOID("e_core_x_window_cursor_set")
#define ecore_x_cursor_shape_get(shape) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
+ RETURN_INT("e_core_x_cursor_shape_get")
#define ecore_x_icccm_title_get(win) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_window_input_new(parent, x, y, w, h) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_event_mask_unset(w, mask) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_icccm_title_set(win, t)\
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_netwm_name_set(win, name) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_netwm_pid_set(win, pid) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-
-#define ecore_x_netwm_pid_get(win, pid) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_window_delete_request_send(win) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-
-#define ecore_x_icccm_name_class_set(win, n, c) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-
-#define ecore_x_netwm_window_type_set(win, type) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_pointer_ungrab(void) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define elm_config_preferred_engine_set(engine) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-
-#define ecore_x_icccm_transient_for_set(win,forwin) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_window_client_manage(win) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_window_prop_window_get( win, atom, val, len) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_e_virtual_keyboard_state_get(win) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-
-#define ecore_x_window_prop_xid_get(win, atom, type, lst, len) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_window_prop_property_get(win, property, type, size, data, num) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_netwm_name_get(win, name) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_window_shape_input_rectangle_set(win, x, y, w, h) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define XIQueryVersion( dpy, major_version_inout, minor_version_inout ) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define XIGetProperty(display,deviceid,property,offset,length,delete_property,type,type_return,format_return,num_items_return, bytes_after_return, data) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define XIQueryDevice( dpy,deviceid,ndevices_return) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define XIFreeDeviceInfo(info) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_window_prop_string_set(win, type, str) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-
-#define ecore_x_e_illume_keyboard_geometry_set(win, x, y, w, h) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_e_virtual_keyboard_state_set(win, state) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_window_prop_card32_set(win, atom, val, num) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_window_prop_xid_set(win, atom, type, lst, num) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_window_prop_window_list_get(win, atom, plst) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
-
-#define ecore_x_netwm_opacity_set(win, opacity) \
-do { \
- ecore_x_func_is_used(); \
- PRINT_LOCATION \
-} while (0)
+ RETURN_POINT("e_core_x_icccm_title_get")
+
+#define ecore_x_window_input_new(parent, x, y, w, h) \
+ RETURN_INT("e_core_x_window_input_new")
+
+#define ecore_x_event_mask_unset(w, mask) \
+ RETURN_VOID("e_core_x_event_mask_unset")
+
+#define ecore_x_icccm_title_set(win, t) \
+ RETURN_VOID("e_core_x_icccm_title_set")
+
+#define ecore_x_netwm_name_set(win, name) \
+ RETURN_VOID("e_core_x_netwm_name_set")
+
+#define ecore_x_netwm_pid_set(win, pid) \
+ RETURN_VOID("e_core_x_netwm_pid_set")
+
+
+#define ecore_x_netwm_pid_get(win, pid) \
+ RETURN_INT("e_core_x_netwm_pid_get")
+
+#define ecore_x_window_delete_request_send(win) \
+ RETURN_VOID("e_core_x_window_delete_request_send")
+
+#define ecore_x_netwm_window_type_set(win, type) \
+ RETURN_VOID("e_core_x_netwm_window_type_set")
+
+#define ecore_x_pointer_ungrab(void) \
+ RETURN_VOID("e_core_x_pointer_ungrab")
+
+
+#define ecore_x_icccm_transient_for_set(win,forwin) \
+ RETURN_VOID("e_core_x_icccm_transient_for_set")
+
+#define ecore_x_window_client_manage(win) \
+ RETURN_VOID("ecore_x_window_client_manage")
+
+#define ecore_x_window_prop_window_get( win, atom, val, len) \
+ RETURN_INT("ecore_x_window_prop_window_get")
+
+#define ecore_x_e_virtual_keyboard_state_get(win) \
+ RETURN_INT("e_core_x_e_virtual_keyboard_state_get")
+
+/*check values*/
+#define ecore_x_window_prop_xid_get(win, atom, type, lst, len) \
+ RETURN_INT("e_core_x_window_prop_xid_get")
+
+#define ecore_x_window_prop_property_get(win, property, type, size, data, num) \
+ RETURN_INT("e_core_x_window_prop_property_get")
+
+#define ecore_x_netwm_name_get(win, name) \
+ RETURN_INT("e_core_x_netwm_name_get")
+
+#define ecore_x_window_shape_input_rectangle_set(win, x, y, w, h) \
+ RETURN_VOID(e_core_x_window_shape_input_rectangle_set)
+
+#define ecore_x_window_prop_string_set(win, type, str) \
+ RETURN_VOID("e_core_x_window_prop_string_set")
+
+#define ecore_x_e_illume_keyboard_geometry_set(win, x, y, w, h) \
+ RETURN_VOID("e_core_x_e_illume_keyboard_geometry_set")
+
+#define ecore_x_e_virtual_keyboard_state_set(win, state) \
+ RETURN_VOID("e_core_x_e_virtual_keyboard_state_set")
+
+#define ecore_x_window_prop_card32_set(win, atom, val, num) \
+ RETURN_VOID("e_core_x_window_prop_card32_set")
+
+#define ecore_x_window_prop_xid_set(win, atom, type, lst, num) \
+ RETURN_VOID("e_core_x_window_prop_xid_set")
+
+#define ecore_x_window_prop_window_list_get(win, atom, plst) \
+ RETURN_INT("e_core_x_window_prop_window_list_get")
+
+#define ecore_x_netwm_opacity_set(win, opacity) \
+ RETURN_VOID("e_core_x_netwm_opacity_set")
+
+#define utilx_hide_fake_effect(dpy, win) \
+ RETURN_VOID("u_tilx_hide_fake_effect")
+
+#define XIQueryVersion( dpy, major_version_inout, minor_version_inout ) \
+ RETURN_INT("X_IQueryVersion")
+
+#define XIGetProperty(dis,dev,prop,o,l,d,t,ct,f,n, b, d2) \
+ RETURN_INT("X_IGetProperty")
+#define XIQueryDevice( dpy,deviceid,ndevices_return) \
+ RETURN_POINT("X_IQueryDevice")
+#define XIFreeDeviceInfo(info) \
+ RETURN_VOID("X_IFreeDeviceInfo")
#ifdef __cplusplus
} /* extern "C" */