diff --git a/src/lib/elementary/elm_module_helper.h b/src/lib/elementary/elm_module_helper.h index eba3237266..5c2f49ebdd 100644 --- a/src/lib/elementary/elm_module_helper.h +++ b/src/lib/elementary/elm_module_helper.h @@ -1,43 +1,28 @@ -/* A small helper header defining EAPI for elementary modules, it should be +/* A small helper header defining ELM_API for elementary modules, it should be * included last in the modules C files. */ #ifndef ELM_MODULE_HELPER_H #define ELM_MODULE_HELPER_H -#ifdef EAPI -# undef EAPI -#endif -#ifdef EWAPI -# undef EWAPI -#endif - #ifdef _WIN32 -# ifdef EFL_BUILD -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) -# else -# define EAPI -# endif +# ifndef EFL_MODULE_STATIC +# define EMODAPI __declspec(dllexport) # else -# define EAPI __declspec(dllimport) +# define EMODAPI +# endif +# define EMODAPI_WEAK +#elif defined(__GNUC__) +# if __GNUC__ >= 4 +# define EMODAPI __attribute__ ((visibility("default"))) +# define EMODAPI_WEAK __attribute__ ((weak)) +# else +# define EMODAPI +# define EMODAPI_WEAK # endif -# define EAPI_WEAK #else -# ifdef __GNUC__ -# if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# define EAPI_WEAK __attribute__ ((weak)) -# else -# define EAPI -# define EAPI_WEAK -# endif -# else -# define EAPI -# define EAPI_WEAK -# endif +# define EMODAPI +# define EMODAPI_WEAK #endif -#define EWAPI EAPI EAPI_WEAK - #endif diff --git a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c index 7018a66691..c505886e5c 100644 --- a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c +++ b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c @@ -14,18 +14,22 @@ #include "ecore_evas_private.h" #include "ecore_evas_cocoa.h" -#ifdef EAPI -# undef EAPI -#endif - -#ifdef __GNUC__ -# if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) +#ifdef _WIN32 +# ifndef EFL_MODULE_STATIC +# define EMODAPI __declspec(dllexport) # else -# define EAPI +# define EMODAPI # endif #else -# define EAPI +# ifdef __GNUC__ +# if __GNUC__ >= 4 +# define EMODAPI __attribute__ ((visibility("default"))) +# endif +# endif +#endif /* ! _WIN32 */ + +#ifndef EMODAPI +# define EMODAPI #endif static int _ecore_evas_init_count = 0; @@ -651,7 +655,7 @@ _ecore_evas_cocoa_window_get(const Ecore_Evas *ee) return (Ecore_Cocoa_Window *)(ee->prop.window); } -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_cocoa_new_internal(Ecore_Cocoa_Window *parent EINA_UNUSED, int x, int y, int w, int h) { Ecore_Evas *ee; diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index c8f0eb8c24..b992915aaa 100644 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -24,28 +24,24 @@ # include #endif -#ifdef EAPI -# undef EAPI -#endif - #ifdef _WIN32 -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) +# ifndef EFL_MODULE_STATIC +# define EMODAPI __declspec(dllexport) # else -# define EAPI -# endif /* ! DLL_EXPORT */ +# define EMODAPI +# endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI +# define EMODAPI __attribute__ ((visibility("default"))) # endif -# else -# define EAPI # endif #endif /* ! _WIN32 */ +#ifndef EMODAPI +# define EMODAPI +#endif + #define VSYNC_ANIMATOR 1 typedef struct _Ecore_Evas_Engine_Drm_Data @@ -1139,14 +1135,14 @@ eng_err: return NULL; } -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_drm_new_internal(const char *device, unsigned int parent EINA_UNUSED, int x, int y, int w, int h) { return _ecore_evas_new_internal(device, x, y, w, h, EINA_FALSE); } #ifdef BUILD_ECORE_EVAS_GL_DRM -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_gl_drm_new_internal(const char *device, unsigned int parent EINA_UNUSED, int x, int y, int w, int h) { static void *libglapi = NULL; diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c index 37963fe664..65c33c0104 100644 --- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c +++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c @@ -1,27 +1,23 @@ #include "ecore_evas_extn_engine.h" -#ifdef EAPI -# undef EAPI -#endif - #ifdef _WIN32 -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) +# ifndef EFL_MODULE_STATIC +# define EMODAPI __declspec(dllexport) # else -# define EAPI -# endif /* ! DLL_EXPORT */ +# define EMODAPI +# endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI +# define EMODAPI __attribute__ ((visibility("default"))) # endif -# else -# define EAPI # endif #endif /* ! _WIN32 */ +#ifndef EMODAPI +# define EMODAPI +#endif + #define NBUF 2 static int blank = 0x00000000; @@ -1184,7 +1180,7 @@ _ipc_server_data(void *data, int type EINA_UNUSED, void *event) return ECORE_CALLBACK_PASS_ON; } -EAPI Evas_Object * +EMODAPI Evas_Object * ecore_evas_extn_plug_new_internal(Ecore_Evas *ee_target) { Evas_Object *o; @@ -2118,7 +2114,7 @@ static const Ecore_Evas_Engine_Func _ecore_extn_socket_engine_func = NULL //fn_last_tick_get }; -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_extn_socket_new_internal(int w, int h) { Evas_Engine_Info_Buffer *einfo; @@ -2325,13 +2321,13 @@ _ecore_evas_extn_interface_new(void) return iface; } -EAPI void +EMODAPI void ecore_evas_extn_socket_events_block_set_internal(Ecore_Evas *ee, Eina_Bool events_block) { ee->events_block = events_block; } -EAPI Eina_Bool +EMODAPI Eina_Bool ecore_evas_extn_socket_events_block_get_internal(Ecore_Evas *ee) { return ee->events_block; diff --git a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c index ce671e2e3e..d92979abb6 100644 --- a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c +++ b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c @@ -17,28 +17,24 @@ #include "ecore_evas_private.h" #include -#ifdef EAPI -# undef EAPI -#endif - #ifdef _WIN32 -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) +# ifndef EFL_MODULE_STATIC +# define EMODAPI __declspec(dllexport) # else -# define EAPI -# endif /* ! DLL_EXPORT */ +# define EMODAPI +# endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI +# define EMODAPI __attribute__ ((visibility("default"))) # endif -# else -# define EAPI # endif #endif /* ! _WIN32 */ +#ifndef EMODAPI +# define EMODAPI +#endif + static int _ecore_evas_init_count = 0; static char *ecore_evas_default_display = "0"; @@ -564,7 +560,7 @@ static Ecore_Evas_Engine_Func _ecore_fb_engine_func = NULL, //fn_last_tick_get }; -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_fb_new_internal(const char *disp_name, int rotation, int w, int h) { Evas_Engine_Info_FB *einfo; diff --git a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c index ef4ba057b9..cb6e6e831a 100644 --- a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c +++ b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c @@ -20,27 +20,24 @@ #include #include "ecore_evas_private.h" -#ifdef EAPI -# undef EAPI -#endif - #ifdef _WIN32 -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) +# ifndef EFL_MODULE_STATIC +# define EMODAPI __declspec(dllexport) # else -# define EAPI -# endif /* ! DLL_EXPORT */ +# define EMODAPI +# endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI +# define EMODAPI __attribute__ ((visibility("default"))) # endif -# else -# define EAPI # endif #endif /* ! _WIN32 */ + +#ifndef EMODAPI +# define EMODAPI +#endif + /* * SDL only handle one window at a time. That's by definition, there is nothing wrong here. * @@ -631,7 +628,7 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu return NULL; } -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_sdl_new_internal(const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha) { @@ -645,7 +642,7 @@ ecore_evas_sdl_new_internal(const char* name, int w, int h, int fullscreen, return ee; } -EAPI Ecore_Evas* +EMODAPI Ecore_Evas* ecore_evas_sdl16_new_internal(const char* name EINA_UNUSED, int w EINA_UNUSED, int h EINA_UNUSED, int fullscreen EINA_UNUSED, int hwsurface EINA_UNUSED, int noframe EINA_UNUSED, int alpha EINA_UNUSED) { ERR("OUCH !"); @@ -653,7 +650,7 @@ ecore_evas_sdl16_new_internal(const char* name EINA_UNUSED, int w EINA_UNUSED, i } #ifdef BUILD_ECORE_EVAS_OPENGL_SDL -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_gl_sdl_new_internal(const char* name, int w, int h, int fullscreen, int noframe) { Ecore_Evas *ee; diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 1cec016ebc..e9569f650d 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -6,8 +6,8 @@ #include #include "ecore_wl2_internal.h" -EAPI extern Eina_List *_evas_canvas_image_data_unset(Evas *eo_e); -EAPI extern void _evas_canvas_image_data_regenerate(Eina_List *list); +EMODAPI extern Eina_List *_evas_canvas_image_data_unset(Evas *eo_e); +EMODAPI extern void _evas_canvas_image_data_regenerate(Eina_List *list); #define _smart_frame_type "ecore_evas_wl_frame" diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c index fd9415de41..5e08c33a7b 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c @@ -5,30 +5,26 @@ # include # include -#ifdef EAPI -# undef EAPI -#endif - #ifdef _WIN32 -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) +# ifndef EFL_MODULE_STATIC +# define EMODAPI __declspec(dllexport) # else -# define EAPI -# endif /* ! DLL_EXPORT */ +# define EMODAPI +# endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI +# define EMODAPI __attribute__ ((visibility("default"))) # endif -# else -# define EAPI # endif #endif /* ! _WIN32 */ +#ifndef EMODAPI +# define EMODAPI +#endif + /* external functions */ -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_wayland_egl_new_internal(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame, const int *opt) { LOGFN; diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c index 1481bf6f2b..6db7403cc0 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c @@ -5,30 +5,26 @@ # include # include -#ifdef EAPI -# undef EAPI -#endif - #ifdef _WIN32 -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) +# ifndef EFL_MODULE_STATIC +# define EMODAPI __declspec(dllexport) # else -# define EAPI -# endif /* ! DLL_EXPORT */ +# define EMODAPI +# endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI +# define EMODAPI __attribute__ ((visibility("default"))) # endif -# else -# define EAPI # endif #endif /* ! _WIN32 */ +#ifndef EMODAPI +# define EMODAPI +#endif + /* external functions */ -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_wayland_shm_new_internal(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame) { LOGFN; diff --git a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c index 623515da95..ca1ddc0ddb 100644 --- a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c +++ b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c @@ -28,28 +28,24 @@ # include #endif -#ifdef EAPI -# undef EAPI -#endif - #ifdef _WIN32 -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) +# ifndef EFL_MODULE_STATIC +# define EMODAPI __declspec(dllexport) # else -# define EAPI -# endif /* ! DLL_EXPORT */ +# define EMODAPI +# endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI +# define EMODAPI __attribute__ ((visibility("default"))) # endif -# else -# define EAPI # endif #endif /* ! _WIN32 */ +#ifndef EMODAPI +# define EMODAPI +#endif + #ifdef BUILD_ECORE_EVAS_WIN32 #define ECORE_EVAS_EVENT_COUNT 11 @@ -1636,7 +1632,7 @@ _ecore_evas_win32_new_internal(int (*_ecore_evas_engine_backend_init)(Ecore_Evas return ee; } -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_software_gdi_new_internal(Ecore_Win32_Window *parent, int x, int y, @@ -1660,7 +1656,7 @@ ecore_evas_software_gdi_new_internal(Ecore_Win32_Window *parent, #endif } -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_software_ddraw_new_internal(Ecore_Win32_Window *parent, int x, int y, diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c b/src/modules/ecore_evas/engines/x/ecore_evas_x.c index bb5f02c853..c75af6368f 100644 --- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c +++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c @@ -27,28 +27,24 @@ #include "ecore_evas_private.h" #include "ecore_evas_x11.h" -#ifdef EAPI -# undef EAPI -#endif - #ifdef _WIN32 -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) +# ifndef EFL_MODULE_STATIC +# define EMODAPI __declspec(dllexport) # else -# define EAPI -# endif /* ! DLL_EXPORT */ +# define EMODAPI +# endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI +# define EMODAPI __attribute__ ((visibility("default"))) # endif -# else -# define EAPI # endif #endif /* ! _WIN32 */ +#ifndef EMODAPI +# define EMODAPI +#endif + #define ECORE_EVAS_X11_SELECTION 0x7F #define EDBG(...) \ @@ -1943,7 +1939,7 @@ _ecore_evas_x_layer_update(Ecore_Evas *ee) /* FIXME: Set gnome layer */ } -EAPI void ecore_x_window_root_properties_select(void); +EMODAPI void ecore_x_window_root_properties_select(void); static int _ecore_evas_x_init(void) @@ -4760,7 +4756,7 @@ _ecore_evas_x_flush_post(void *data, Evas *e EINA_UNUSED, void *event_info EINA_ #endif #ifdef BUILD_ECORE_EVAS_SOFTWARE_X11 -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_software_x11_new_internal(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h) { @@ -4963,7 +4959,7 @@ ecore_evas_software_x11_new_internal(const char *disp_name, Ecore_X_Window paren return ee; } -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_software_x11_pixmap_new_internal(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h) { @@ -5277,7 +5273,7 @@ _ecore_evas_software_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window w #endif #ifdef BUILD_ECORE_EVAS_OPENGL_X11 -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_gl_x11_options_new_internal(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h, const int *opt) { @@ -5401,14 +5397,14 @@ ecore_evas_gl_x11_options_new_internal(const char *disp_name, Ecore_X_Window par return ee; } -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_gl_x11_new_internal(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h) { return ecore_evas_gl_x11_options_new_internal(disp_name, parent, x, y, w, h, NULL); } -EAPI Ecore_Evas * +EMODAPI Ecore_Evas * ecore_evas_gl_x11_pixmap_new_internal(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h) { diff --git a/src/modules/ecore_evas/vnc_server/ecore_evas_vnc_server.c b/src/modules/ecore_evas/vnc_server/ecore_evas_vnc_server.c index c2a392400c..83e5e9137b 100644 --- a/src/modules/ecore_evas/vnc_server/ecore_evas_vnc_server.c +++ b/src/modules/ecore_evas/vnc_server/ecore_evas_vnc_server.c @@ -24,28 +24,24 @@ static int _ecore_evas_vnc_server_log_dom; static unsigned int _available_seat = 1; -#ifdef EAPI -# undef EAPI -#endif - #ifdef _WIN32 -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) +# ifndef EFL_MODULE_STATIC +# define EMODAPI __declspec(dllexport) # else -# define EAPI -# endif /* ! DLL_EXPORT */ +# define EMODAPI +# endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) -# else -# define EAPI +# define EMODAPI __attribute__ ((visibility("default"))) # endif -# else -# define EAPI # endif #endif /* ! _WIN32 */ +#ifndef EMODAPI +# define EMODAPI +#endif + #ifdef WRN #undef WRN #endif @@ -732,7 +728,7 @@ _ecore_evas_vnc_server_del(void *data, const Efl_Event *ev EINA_UNUSED) free(server); } -EAPI Evas_Object * +EMODAPI Evas_Object * ecore_evas_vnc_server_new(Ecore_Evas *ee, int port, const char *addr, Ecore_Evas_Vnc_Client_Accept_Cb accept_cb, Ecore_Evas_Vnc_Client_Disconnected_Cb disc_cb, @@ -834,7 +830,7 @@ ecore_evas_vnc_server_new(Ecore_Evas *ee, int port, const char *addr, return NULL; } -EAPI Eina_Bool +EMODAPI Eina_Bool ecore_evas_vnc_server_pointer_xy_get(const Evas_Object *snapshot, const Evas_Device *pointer, Evas_Coord *x, Evas_Coord *y) diff --git a/src/modules/elementary/access_output/mod.c b/src/modules/elementary/access_output/mod.c index cabf0a6a55..54d877ab53 100644 --- a/src/modules/elementary/access_output/mod.c +++ b/src/modules/elementary/access_output/mod.c @@ -4,10 +4,6 @@ #include "Elementary.h" -#ifndef EFL_BUILD -# define EFL_BUILD -#endif -#undef ELM_MODULE_HELPER_H #include "elm_module_helper.h" /* to enable this module @@ -44,7 +40,7 @@ _exe_del(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) } // module api funcs needed -EAPI int +EMODAPI int elm_modapi_init(void *m EINA_UNUSED) { exe_exit_handler = @@ -53,7 +49,7 @@ elm_modapi_init(void *m EINA_UNUSED) return 1; // succeed always } -EAPI int +EMODAPI int elm_modapi_shutdown(void *m EINA_UNUSED) { if (exe_exit_handler) @@ -65,7 +61,7 @@ elm_modapi_shutdown(void *m EINA_UNUSED) } // module fucns for the specific module type -EAPI void +EMODAPI void out_read(const char *txt) { if (!tmpf) @@ -80,7 +76,7 @@ out_read(const char *txt) if (write(tmpfd, txt, strlen(txt)) < 0) perror("write to tmpfile (espeak)"); } -EAPI void +EMODAPI void out_read_done(void) { char buf[PATH_MAX]; @@ -103,7 +99,7 @@ out_read_done(void) } } -EAPI void +EMODAPI void out_cancel(void) { if (espeak) @@ -121,7 +117,7 @@ out_cancel(void) } } -EAPI void +EMODAPI void out_done_callback_set(void (*func) (void *data), const void *data) { cb_func = func; diff --git a/src/modules/elementary/prefs/prefs_iface.c b/src/modules/elementary/prefs/prefs_iface.c index d09658a052..e0301b1983 100644 --- a/src/modules/elementary/prefs/prefs_iface.c +++ b/src/modules/elementary/prefs/prefs_iface.c @@ -267,7 +267,7 @@ elm_prefs_page_common_unpack(Evas_Object *it, elm_box_unpack(obj, it); } -EAPI int +EMODAPI int elm_modapi_init(void *m EINA_UNUSED) { _elm_prefs_log_dom = eina_log_domain_register @@ -279,7 +279,7 @@ elm_modapi_init(void *m EINA_UNUSED) return 1; // succeed always } -EAPI int +EMODAPI int elm_modapi_shutdown(void *m EINA_UNUSED) { elm_prefs_item_iface_unregister(_elm_prefs_item_widgets); diff --git a/src/modules/elementary/test_entry/mod.c b/src/modules/elementary/test_entry/mod.c index b80cb182ce..3edab2204c 100644 --- a/src/modules/elementary/test_entry/mod.c +++ b/src/modules/elementary/test_entry/mod.c @@ -11,32 +11,32 @@ #include "elm_module_helper.h" // module api funcs needed -EAPI int +EMODAPI int elm_modapi_init(void *m EINA_UNUSED) { return 1; // succeed always } -EAPI int +EMODAPI int elm_modapi_shutdown(void *m EINA_UNUSED) { return 1; // succeed always } // module fucns for the specific module type -EAPI void +EMODAPI void obj_hook(Evas_Object *obj) { printf("hook: %p\n", obj); } -EAPI void +EMODAPI void obj_unhook(Evas_Object *obj) { printf("unhook: %p\n", obj); } -EAPI void +EMODAPI void obj_longpress(Evas_Object *obj) { printf("longpress: %p\n", obj); diff --git a/src/modules/elementary/test_map/mod.c b/src/modules/elementary/test_map/mod.c index 15c4ff3344..601acbaf42 100644 --- a/src/modules/elementary/test_map/mod.c +++ b/src/modules/elementary/test_map/mod.c @@ -12,25 +12,25 @@ #undef ELM_MODULE_HELPER_H #include "elm_module_helper.h" -EAPI Eina_Stringshare * +EMODAPI Eina_Stringshare * map_module_source_name_get(void) { return eina_stringshare_add("test_map"); } -EAPI int +EMODAPI int map_module_tile_zoom_min_get(void) { return 0; } -EAPI int +EMODAPI int map_module_tile_zoom_max_get(void) { return 18; } -EAPI char * +EMODAPI char * map_module_tile_url_get(Evas_Object *obj EINA_UNUSED, int x, int y, int zoom) { char buf[PATH_MAX]; @@ -39,61 +39,61 @@ map_module_tile_url_get(Evas_Object *obj EINA_UNUSED, int x, int y, int zoom) return strdup(buf); } -EAPI char * +EMODAPI char * map_module_route_source_get(void) { return NULL; } -EAPI void +EMODAPI void map_module_route_source_parse(Elm_Map_Route *r EINA_UNUSED) { return; } -EAPI char * +EMODAPI char * map_module_route_url_get(Evas_Object *obj EINA_UNUSED, const char *type_name EINA_UNUSED, int method EINA_UNUSED, double flon EINA_UNUSED, double flat EINA_UNUSED, double tlon EINA_UNUSED, double tlat EINA_UNUSED) { return strdup(""); } -EAPI char * +EMODAPI char * map_module_name_url_get(Evas_Object *obj EINA_UNUSED, int method EINA_UNUSED, const char *name EINA_UNUSED, double lon EINA_UNUSED, double lat EINA_UNUSED) { return strdup(""); } -EAPI void +EMODAPI void map_module_name_source_parse(Elm_Map_Name *n EINA_UNUSED) { return; } -EAPI void +EMODAPI void map_module_name_list_source_parse(Elm_Map_Name_List *nl EINA_UNUSED) { return; } -EAPI Eina_Bool +EMODAPI Eina_Bool map_module_tile_geo_to_coord(const Evas_Object *obj EINA_UNUSED, int zoom EINA_UNUSED, double lon EINA_UNUSED, double lat EINA_UNUSED, int size EINA_UNUSED, int *x EINA_UNUSED, int *y EINA_UNUSED) { return EINA_FALSE; } -EAPI Eina_Bool +EMODAPI Eina_Bool map_module_tile_coord_to_geo(const Evas_Object *obj EINA_UNUSED, int zoom EINA_UNUSED, int x EINA_UNUSED, int y EINA_UNUSED, int size EINA_UNUSED, double *lon EINA_UNUSED, double *lat EINA_UNUSED) { return EINA_FALSE; } -EAPI double +EMODAPI double map_module_tile_scale_get(const Evas_Object *obj EINA_UNUSED, double lon EINA_UNUSED, double lat EINA_UNUSED, int zoom EINA_UNUSED) { return 0; } -EAPI Evas_Object * +EMODAPI Evas_Object * map_module_tile_copyright_get(Evas_Object *obj EINA_UNUSED) { return NULL; diff --git a/src/modules/elementary/web/none/elm_web_none.c b/src/modules/elementary/web/none/elm_web_none.c index 88218462dc..45cd773242 100644 --- a/src/modules/elementary/web/none/elm_web_none.c +++ b/src/modules/elementary/web/none/elm_web_none.c @@ -309,24 +309,24 @@ _elm_web_none_elm_web_inwin_mode_get(const Eo *obj EINA_UNUSED, Elm_Web_None_Dat return EINA_FALSE; } -EAPI void +EMODAPI void ewm_window_features_ref(Elm_Web_Window_Features *wf EINA_UNUSED) { } -EAPI void +EMODAPI void ewm_window_features_unref(Elm_Web_Window_Features *wf EINA_UNUSED) { } -EAPI Eina_Bool +EMODAPI Eina_Bool ewm_window_features_property_get(const Elm_Web_Window_Features *wf EINA_UNUSED, Elm_Web_Window_Feature_Flag flag EINA_UNUSED) { return EINA_FALSE; } -EAPI void +EMODAPI void ewm_window_features_region_get(const Elm_Web_Window_Features *wf EINA_UNUSED, Evas_Coord *x, Evas_Coord *y, @@ -339,12 +339,12 @@ ewm_window_features_region_get(const Elm_Web_Window_Features *wf EINA_UNUSED, if (h) *h = 0; } -EAPI void +EMODAPI void ewm_unneed_web(void) { } -EAPI Eina_Bool +EMODAPI Eina_Bool ewm_need_web(void) { if (_none_log_dom == -1) @@ -352,7 +352,7 @@ ewm_need_web(void) return EINA_TRUE; } -EAPI const Efl_Class * +EMODAPI const Efl_Class * ewm_class_get(void) { return elm_web_none_class_get(); diff --git a/src/modules/elementary/web/none/elm_web_none_eo.h b/src/modules/elementary/web/none/elm_web_none_eo.h index df91907d17..21097be917 100644 --- a/src/modules/elementary/web/none/elm_web_none_eo.h +++ b/src/modules/elementary/web/none/elm_web_none_eo.h @@ -19,6 +19,6 @@ typedef Eo Elm_Web_None; */ #define ELM_WEB_NONE_CLASS elm_web_none_class_get() -EWAPI const Efl_Class *elm_web_none_class_get(void) EINA_CONST; +EMODAPI EMODAPI_WEAK const Efl_Class *elm_web_none_class_get(void) EINA_CONST; #endif diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h index baa1660d66..14364ae9d3 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_common.h +++ b/src/modules/evas/engines/gl_common/evas_gl_common.h @@ -74,29 +74,25 @@ typedef struct _Evas_GL_Filter Evas_GL_Filter; typedef Eina_Bool (*evas_gl_make_current_cb)(void *engine_data, void *doit); -#ifdef EAPI -# undef EAPI -#endif - #ifdef _WIN32 -# ifdef EFL_BUILD -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) -# else -# define EAPI -# endif +# ifndef EFL_MODULE_STATIC +# define EMODAPI __declspec(dllexport) # else -# define EAPI __declspec(dllimport) +# define EMODAPI # endif +# define EMODAPI_WEAK #else # ifdef __GNUC__ # if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) +# define EMODAPI __attribute__ ((visibility("default"))) +# define EMODAPI_WEAK __attribute__ ((weak)) # else -# define EAPI +# define EMODAPI +# define EMODAPI_WEAK # endif # else -# define EAPI +# define EMODAPI +# define EMODAPI_WEAK # endif #endif @@ -544,38 +540,38 @@ struct _Evas_GL_Image_Data_Map }; /* GL_Common function that are used by gl_generic inherited module */ -EAPI void evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc); -EAPI void evas_gl_common_image_ref(Evas_GL_Image *im); -EAPI void evas_gl_common_image_unref(Evas_GL_Image *im); -EAPI Evas_GL_Image *evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, Evas_Colorspace cspace); -EAPI void evas_gl_common_image_native_disable(Evas_GL_Image *im); -EAPI void evas_gl_common_image_free(Evas_GL_Image *im); -EAPI void evas_gl_common_image_native_enable(Evas_GL_Image *im); +EMODAPI void evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc); +EMODAPI void evas_gl_common_image_ref(Evas_GL_Image *im); +EMODAPI void evas_gl_common_image_unref(Evas_GL_Image *im); +EMODAPI Evas_GL_Image *evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, Evas_Colorspace cspace); +EMODAPI void evas_gl_common_image_native_disable(Evas_GL_Image *im); +EMODAPI void evas_gl_common_image_free(Evas_GL_Image *im); +EMODAPI void evas_gl_common_image_native_enable(Evas_GL_Image *im); -EAPI int evas_gl_preload_init(void); -EAPI int evas_gl_preload_shutdown(void); -EAPI Eina_Bool evas_gl_preload_enabled(void); +EMODAPI int evas_gl_preload_init(void); +EMODAPI int evas_gl_preload_shutdown(void); +EMODAPI Eina_Bool evas_gl_preload_enabled(void); -EAPI Evas_Engine_GL_Context *evas_gl_common_context_new(void); +EMODAPI Evas_Engine_GL_Context *evas_gl_common_context_new(void); -EAPI void evas_gl_common_context_flush(Evas_Engine_GL_Context *gc); -EAPI void evas_gl_common_context_free(Evas_Engine_GL_Context *gc); -EAPI void evas_gl_common_context_use(Evas_Engine_GL_Context *gc); -EAPI void evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc); -EAPI void evas_gl_common_context_done(Evas_Engine_GL_Context *gc); +EMODAPI void evas_gl_common_context_flush(Evas_Engine_GL_Context *gc); +EMODAPI void evas_gl_common_context_free(Evas_Engine_GL_Context *gc); +EMODAPI void evas_gl_common_context_use(Evas_Engine_GL_Context *gc); +EMODAPI void evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc); +EMODAPI void evas_gl_common_context_done(Evas_Engine_GL_Context *gc); -EAPI void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot); -EAPI int evas_gl_common_buffer_dump(Evas_Engine_GL_Context *gc, const char* dname, const char* fname, int frame, const char* suffix); +EMODAPI void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot); +EMODAPI int evas_gl_common_buffer_dump(Evas_Engine_GL_Context *gc, const char* dname, const char* fname, int frame, const char* suffix); -EAPI void evas_gl_preload_render_lock(evas_gl_make_current_cb make_current, void *engine_data); -EAPI void evas_gl_preload_render_unlock(evas_gl_make_current_cb make_current, void *engine_data); -EAPI void evas_gl_preload_render_relax(evas_gl_make_current_cb make_current, void *engine_data); -EAPI void evas_gl_symbols(void *(*GetProcAddress)(const char *name), const char *extsn); -EAPI Eina_Bool evas_gl_extension_string_check(const char *ext, const char *exts); +EMODAPI void evas_gl_preload_render_lock(evas_gl_make_current_cb make_current, void *engine_data); +EMODAPI void evas_gl_preload_render_unlock(evas_gl_make_current_cb make_current, void *engine_data); +EMODAPI void evas_gl_preload_render_relax(evas_gl_make_current_cb make_current, void *engine_data); +EMODAPI void evas_gl_symbols(void *(*GetProcAddress)(const char *name), const char *extsn); +EMODAPI Eina_Bool evas_gl_extension_string_check(const char *ext, const char *exts); -EAPI void evas_gl_common_error_set(int error_enum); -EAPI int evas_gl_common_error_get(void); -EAPI void *evas_gl_common_current_context_get(void); +EMODAPI void evas_gl_common_error_set(int error_enum); +EMODAPI int evas_gl_common_error_get(void); +EMODAPI void *evas_gl_common_current_context_get(void); typedef int (*Evas_GL_Preload)(void); typedef void (*Evas_GL_Common_Image_Call)(Evas_GL_Image *im); @@ -588,7 +584,7 @@ typedef int (*Evas_GL_Common_Buffer_Dump_Call)(Evas_Engine_GL_Context *gc,const typedef void (*Evas_Gl_Symbols)(void *(*GetProcAddress)(const char *sym), const char *extsn); typedef Eina_Bool (*Evas_Gl_Extension_String_Check)(const char *exts, const char *ext); -EAPI void __evas_gl_err(int err, const char *file, const char *func, int line, const char *op); +EMODAPI void __evas_gl_err(int err, const char *file, const char *func, int line, const char *op); int evas_gl_common_version_check(int *minor_version); void evas_gl_common_tiling_start(Evas_Engine_GL_Context *gc, @@ -692,7 +688,7 @@ void evas_gl_common_filter_inverse_color_push(Evas_Engine_GL_Contex int evas_gl_common_shader_program_init(Evas_GL_Shared *shared); void evas_gl_common_shader_program_shutdown(Evas_GL_Shared *shared); -EAPI void evas_gl_common_shaders_flush(Evas_GL_Shared *shared); +EMODAPI void evas_gl_common_shaders_flush(Evas_GL_Shared *shared); Evas_GL_Program *evas_gl_common_shader_program_get(Evas_Engine_GL_Context *gc, Shader_Type type, @@ -788,8 +784,8 @@ extern GLboolean (*glsym_glUnmapBuffer) (GLenum a); extern void (*glsym_glRenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); #ifdef GL_GLES -EAPI void * evas_gl_common_eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list); -EAPI int evas_gl_common_eglDestroyImage (EGLDisplay dpy, void *im); +EMODAPI void * evas_gl_common_eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list); +EMODAPI int evas_gl_common_eglDestroyImage (EGLDisplay dpy, void *im); extern unsigned int (*eglsym_eglDestroyImage) (void *a, void *b); extern void (*secsym_glEGLImageTargetTexture2DOES) (int a, void *b); extern void *(*secsym_eglMapImageSEC) (void *a, void *b, int c, int d); @@ -984,9 +980,6 @@ _comp_tex_sub_2d(Evas_Engine_GL_Context *gc, int x, int y, int w, int h, int fmt #endif -#undef EAPI -#define EAPI - extern Eina_Bool _need_context_restore; extern void _context_restore(void); diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c index af51f9626e..e76b27a012 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_context.c +++ b/src/modules/evas/engines/gl_common/evas_gl_context.c @@ -87,7 +87,7 @@ sym_missing(void) * Previously we used strstr(), however there are some extensions * whose names are subsets of others. */ -EAPI Eina_Bool +EMODAPI Eina_Bool evas_gl_extension_string_check(const char *exts, const char *ext) { const char *ptr; @@ -155,7 +155,7 @@ _has_ext(const char *ext, const char **pexts, int *pnum) #ifdef GL_GLES -EAPI void * +EMODAPI void * evas_gl_common_eglCreateImage(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list) { if (eglsym_eglCreateImageKHR) @@ -178,7 +178,7 @@ evas_gl_common_eglCreateImage(EGLDisplay dpy, EGLContext ctx, EGLenum target, EG return NULL; } -EAPI int +EMODAPI int evas_gl_common_eglDestroyImage(EGLDisplay dpy, void *im) { if (eglsym_eglDestroyImage) @@ -189,7 +189,7 @@ evas_gl_common_eglDestroyImage(EGLDisplay dpy, void *im) #endif /* FIXME: return error if a required symbol was not found */ -EAPI void +EMODAPI void evas_gl_symbols(void *(*GetProcAddress)(const char *name), const char *extsn) { int failed = 0, num = 0; @@ -442,7 +442,7 @@ static void shader_array_flush(Evas_Engine_GL_Context *gc); static Evas_Engine_GL_Context *_evas_gl_common_context = NULL; static Evas_GL_Shared *shared = NULL; -EAPI void +EMODAPI void __evas_gl_err(int err, const char *file, const char *func, int line, const char *op) { const char *errmsg; @@ -863,7 +863,7 @@ _evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc) } } -EAPI Evas_Engine_GL_Context * +EMODAPI Evas_Engine_GL_Context * evas_gl_common_context_new(void) { Evas_Engine_GL_Context *gc; @@ -1419,7 +1419,7 @@ array_alloc(Evas_Engine_GL_Context *gc, int n) #undef RALOC } -EAPI void +EMODAPI void evas_gl_common_context_free(Evas_Engine_GL_Context *gc) { int i, j; @@ -1507,7 +1507,7 @@ evas_gl_common_context_free(Evas_Engine_GL_Context *gc) } } -EAPI void +EMODAPI void evas_gl_common_context_use(Evas_Engine_GL_Context *gc) { if (_evas_gl_common_context == gc) return; @@ -1515,7 +1515,7 @@ evas_gl_common_context_use(Evas_Engine_GL_Context *gc) if (gc) _evas_gl_common_viewport_set(gc); } -EAPI void +EMODAPI void evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc) { int i; @@ -1608,7 +1608,7 @@ evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc) _evas_gl_common_viewport_set(gc); } -EAPI void +EMODAPI void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot) { if ((gc->w == w) && (gc->h == h) && (gc->rot == rot)) return; @@ -1659,7 +1659,7 @@ evas_gl_common_tiling_done(Evas_Engine_GL_Context *gc EINA_UNUSED) } -EAPI void +EMODAPI void evas_gl_common_context_done(Evas_Engine_GL_Context *gc) { if (gc->master_clip.used) @@ -3909,7 +3909,7 @@ evas_gl_common_filter_inverse_color_push(Evas_Engine_GL_Context *gc, } // ---------------------------------------------------------------------------- -EAPI void +EMODAPI void evas_gl_common_context_flush(Evas_Engine_GL_Context *gc) { shader_array_flush(gc); @@ -4712,7 +4712,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc) gc->havestuff = EINA_FALSE; } -EAPI int +EMODAPI int evas_gl_common_buffer_dump(Evas_Engine_GL_Context *gc, const char* dname, const char* buf_name, int frame, const char *suffix) { RGBA_Image *im = NULL; diff --git a/src/modules/evas/engines/gl_common/evas_gl_core.c b/src/modules/evas/engines/gl_common/evas_gl_core.c index 786c54c825..5a10e37842 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_core.c +++ b/src/modules/evas/engines/gl_common/evas_gl_core.c @@ -1721,7 +1721,7 @@ _evgl_tls_resource_destroy(void *eng_data) evgl_engine->resource_key = 0; } -EAPI void * /* EVGL_Context */ +EMODAPI void * /* EVGL_Context */ evas_gl_common_current_context_get(void) { EVGL_Resource *rsc; @@ -1735,7 +1735,7 @@ evas_gl_common_current_context_get(void) return rsc->current_ctx; } -EAPI void * +EMODAPI void * evgl_current_native_context_get(EVGL_Context *ctx) { EVGLNative_Context context; @@ -1787,7 +1787,7 @@ _evgl_direct_enabled(void) return _evgl_direct_renderable(rsc, sfc); } -EAPI void +EMODAPI void evas_gl_common_error_set(int error_enum) { EVGL_Resource *rsc; @@ -1801,7 +1801,7 @@ evas_gl_common_error_set(int error_enum) rsc->error_state = error_enum; } -EAPI int +EMODAPI int evas_gl_common_error_get(void) { EVGL_Resource *rsc; @@ -3266,7 +3266,7 @@ evgl_direct_partial_render_end() } } -EAPI void +EMODAPI void evas_gl_common_context_restore_set(Eina_Bool enable) { _need_context_restore = enable; diff --git a/src/modules/evas/engines/gl_common/evas_gl_core.h b/src/modules/evas/engines/gl_common/evas_gl_core.h index 7aead8dd96..8eec4baad2 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_core.h +++ b/src/modules/evas/engines/gl_common/evas_gl_core.h @@ -3,29 +3,25 @@ #define EVAS_GL_NO_GL_H_CHECK 1 #include "Evas_GL.h" -#ifdef EAPI -# undef EAPI +#ifdef EMODAPI +# undef EMODAPI #endif #ifdef _WIN32 -# ifdef EFL_BUILD -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) -# else -# define EAPI -# endif +# ifndef EFL_MODULE_STATIC +# define EMODAPI __declspec(dllexport) # else -# define EAPI __declspec(dllimport) +# define EMODAPI # endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) +# define EMODAPI __attribute__ ((visibility("default"))) # else -# define EAPI +# define EMODAPI # endif # else -# define EAPI +# define EMODAPI # endif #endif @@ -43,11 +39,11 @@ typedef struct _EVGL_Cap EVGL_Cap; typedef struct _EVGL_Surface_Cap EVGL_Surface_Cap; typedef struct _EVGL_Surface_Format EVGL_Surface_Format; -EAPI void evgl_engine_shutdown(void *eng_data); -EAPI void *evgl_native_surface_buffer_get(EVGL_Surface *sfc, Eina_Bool *is_egl_image); -EAPI int evgl_native_surface_yinvert_get(EVGL_Surface *sfc); -EAPI void *evgl_current_native_context_get(EVGL_Context *ctx); -EAPI void evas_gl_common_context_restore_set(Eina_Bool); +EMODAPI void evgl_engine_shutdown(void *eng_data); +EMODAPI void *evgl_native_surface_buffer_get(EVGL_Surface *sfc, Eina_Bool *is_egl_image); +EMODAPI int evgl_native_surface_yinvert_get(EVGL_Surface *sfc); +EMODAPI void *evgl_current_native_context_get(EVGL_Context *ctx); +EMODAPI void evas_gl_common_context_restore_set(Eina_Bool); typedef void (*EVGL_Engine_Call)(void *eng_data); typedef void *(*EVGL_Native_Surface_Call)(void *sfc, Eina_Bool *is_egl_image); @@ -89,7 +85,4 @@ void evgl_direct_partial_info_clear(void); void evgl_direct_partial_render_start(void); void evgl_direct_partial_render_end(void); -#undef EAPI -#define EAPI - #endif //_EVAS_GL_CORE_H diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c index 3a75852ed0..78a3fe09b1 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_image.c +++ b/src/modules/evas/engines/gl_common/evas_gl_image.c @@ -8,7 +8,7 @@ evas_gl_common_image_alloc_ensure(Evas_GL_Image *im) im->w, im->h); } -EAPI void +EMODAPI void evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc) { Eina_List *l; @@ -89,7 +89,7 @@ _evas_gl_image_cache_add(Evas_GL_Image *im) return EINA_FALSE; } -EAPI void +EMODAPI void evas_gl_common_image_ref(Evas_GL_Image *im) { if (im->references == 0) @@ -99,7 +99,7 @@ evas_gl_common_image_ref(Evas_GL_Image *im) im->references++; } -EAPI void +EMODAPI void evas_gl_common_image_unref(Evas_GL_Image *im) { im->references--; @@ -330,7 +330,7 @@ evas_gl_common_image_mmap(Evas_Engine_GL_Context *gc, Eina_File *f, const char * return evas_gl_common_image_new_from_rgbaimage(gc, im_im, lo, error); } -EAPI Evas_GL_Image * +EMODAPI Evas_GL_Image * evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, Evas_Colorspace cspace) { Evas_GL_Image *im; @@ -539,7 +539,7 @@ evas_gl_common_image_alpha_set(Evas_GL_Image *im, int alpha) return im; } -EAPI void +EMODAPI void evas_gl_common_image_native_enable(Evas_GL_Image *im) { if (im->cs.data) @@ -571,7 +571,7 @@ evas_gl_common_image_native_enable(Evas_GL_Image *im) im->tex_only = 1; } -EAPI void +EMODAPI void evas_gl_common_image_native_disable(Evas_GL_Image *im) { if (im->im) @@ -691,7 +691,7 @@ evas_gl_common_image_cache_flush(Evas_Engine_GL_Context *gc) _evas_gl_image_cache_trim(gc); } -EAPI void +EMODAPI void evas_gl_common_image_free(Evas_GL_Image *im) { if (!im) return; diff --git a/src/modules/evas/engines/gl_common/evas_gl_preload.c b/src/modules/evas/engines/gl_common/evas_gl_preload.c index df5a4be924..6b51e338c0 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_preload.c +++ b/src/modules/evas/engines/gl_common/evas_gl_preload.c @@ -231,7 +231,7 @@ _evas_gl_preload_tile_async(void *data EINA_UNUSED, Eina_Thread t EINA_UNUSED) // Put the async preloader on standby -EAPI void +EMODAPI void evas_gl_preload_render_lock(evas_gl_make_current_cb make_current, void *engine_data) { if (!async_loader_init) return ; @@ -251,7 +251,7 @@ evas_gl_preload_render_lock(evas_gl_make_current_cb make_current, void *engine_d } // Let the async preloader run ! -EAPI void +EMODAPI void evas_gl_preload_render_unlock(evas_gl_make_current_cb make_current, void *engine_data) { if (!async_loader_init) return ; @@ -272,7 +272,7 @@ evas_gl_preload_render_unlock(evas_gl_make_current_cb make_current, void *engine } // add a way to destroy surface and temporarily stop the rendering of the image -EAPI void +EMODAPI void evas_gl_preload_render_relax(evas_gl_make_current_cb make_current, void *engine_data) { if (engine_data != async_engine_data) return ; @@ -324,7 +324,7 @@ evas_gl_preload_target_unregister(Evas_GL_Texture *tex, Eo *target) } } -EAPI int +EMODAPI int evas_gl_preload_init(void) { const char *s = getenv("EVAS_GL_PRELOAD"); @@ -342,7 +342,7 @@ evas_gl_preload_init(void) return async_loader_init; } -EAPI int +EMODAPI int evas_gl_preload_shutdown(void) { const char *s = getenv("EVAS_GL_PRELOAD"); @@ -360,7 +360,7 @@ evas_gl_preload_shutdown(void) return async_loader_init; } -EAPI Eina_Bool +EMODAPI Eina_Bool evas_gl_preload_enabled(void) { return (async_loader_init >= 1); diff --git a/src/modules/evas/engines/gl_common/evas_gl_shader.c b/src/modules/evas/engines/gl_common/evas_gl_shader.c index b3802f2c70..5d84504817 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_shader.c +++ b/src/modules/evas/engines/gl_common/evas_gl_shader.c @@ -714,7 +714,7 @@ evas_gl_common_shader_program_init(Evas_GL_Shared *shared) return 1; } -EAPI void +EMODAPI void evas_gl_common_shaders_flush(Evas_GL_Shared *shared) { diff --git a/src/modules/evas/engines/gl_generic/evas_ector_gl.h b/src/modules/evas/engines/gl_generic/evas_ector_gl.h index 6e4c46e5fc..f73ea675d3 100644 --- a/src/modules/evas/engines/gl_generic/evas_ector_gl.h +++ b/src/modules/evas/engines/gl_generic/evas_ector_gl.h @@ -1,27 +1,17 @@ #ifndef EVAS_ECTOR_GL_H #define EVAS_ECTOR_GL_H -#undef EAPI - #ifdef _WIN32 -# ifdef EFL_BUILD -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) -# else -# define EAPI -# endif -# else -# define EAPI __declspec(dllimport) -# endif +# define EMODAPI __declspec(dllexport) #else # ifdef __GNUC__ # if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) +# define EMODAPI __attribute__ ((visibility("default"))) # else -# define EAPI +# define EMODAPI # endif # else -# define EAPI +# define EMODAPI # endif #endif @@ -29,8 +19,5 @@ #include "evas_ector_gl_buffer.eo.h" #include "evas_ector_gl_image_buffer.eo.h" -#undef EAPI -#define EAPI - #endif /* ! EVAS_ECTOR_GL_H */ diff --git a/src/modules/evas/engines/gl_generic/meson.build b/src/modules/evas/engines/gl_generic/meson.build index 3a00883b8a..0464ea43a8 100644 --- a/src/modules/evas/engines/gl_generic/meson.build +++ b/src/modules/evas/engines/gl_generic/meson.build @@ -59,6 +59,7 @@ foreach eo_file : pub_eo_files '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'), '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'), + '-e', 'EMODAPI', '-gchd', '@INPUT@']) endforeach diff --git a/src/modules/evas/engines/software_generic/evas_ector_software.h b/src/modules/evas/engines/software_generic/evas_ector_software.h index f2625371a3..e7a962670a 100644 --- a/src/modules/evas/engines/software_generic/evas_ector_software.h +++ b/src/modules/evas/engines/software_generic/evas_ector_software.h @@ -1,37 +1,29 @@ #ifndef EVAS_ECTOR_SOFTWARE_H #define EVAS_ECTOR_SOFTWARE_H -#ifdef EAPI -# undef EAPI -#endif - #ifdef _WIN32 -# ifdef EFL_BUILD -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) -# else -# define EAPI -# endif +# ifndef EFL_MODULE_STATIC +# define EMODAPI __declspec(dllexport) # else -# define EAPI __declspec(dllimport) +# define EMODAPI # endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) +# define EMODAPI __attribute__ ((visibility("default"))) +# define EMODAPI_WEAK __attribute__ ((weak)) # else -# define EAPI +# define EMODAPI +# define EMODAPI_WEAK # endif # else -# define EAPI +# define EMODAPI +# define EMODAPI_WEAK # endif #endif #include "evas_ector_buffer.eo.h" #include "evas_ector_software_buffer.eo.h" -#undef EAPI -#define EAPI - #endif /* ! EVAS_ECTOR_SOFTWARE_H */ diff --git a/src/modules/evas/engines/software_generic/evas_native_common.h b/src/modules/evas/engines/software_generic/evas_native_common.h index 4121746fd7..d238a4b358 100644 --- a/src/modules/evas/engines/software_generic/evas_native_common.h +++ b/src/modules/evas/engines/software_generic/evas_native_common.h @@ -1,29 +1,24 @@ #ifndef _EVAS_NATIVE_COMMON_H #define _EVAS_NATIVE_COMMON_H -#ifdef EAPI -# undef EAPI -#endif - #ifdef _WIN32 -# ifdef EFL_BUILD -# ifdef DLL_EXPORT -# define EAPI __declspec(dllexport) -# else -# define EAPI -# endif +# ifndef EFL_MODULE_STATIC +# define EMODAPI __declspec(dllexport) # else -# define EAPI __declspec(dllimport) +# define EMODAPI # endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 -# define EAPI __attribute__ ((visibility("default"))) +# define EMODAPI __attribute__ ((visibility("default"))) +# define EMODAPI_WEAK __attribute__ ((weak)) # else -# define EAPI +# define EMODAPI +# define EMODAPI_WEAK # endif # else -# define EAPI +# define EMODAPI +# define EMODAPI_WEAK # endif #endif @@ -109,10 +104,10 @@ struct _Native } ns_data; /**< Choose one union data according to your surface in Evas Engine. */ }; -EAPI void *_evas_native_tbm_surface_image_set(void *data, void *image, void *native); -EAPI int _evas_native_tbm_surface_stride_get(void *data, void *native); -EAPI int _evas_native_tbm_init(void); -EAPI void _evas_native_tbm_shutdown(void); +EMODAPI void *_evas_native_tbm_surface_image_set(void *data, void *image, void *native); +EMODAPI int _evas_native_tbm_surface_stride_get(void *data, void *native); +EMODAPI int _evas_native_tbm_init(void); +EMODAPI void _evas_native_tbm_shutdown(void); void *_evas_native_dmabuf_surface_image_set(void *image, void *native); diff --git a/src/modules/evas/engines/software_generic/evas_native_tbm.c b/src/modules/evas/engines/software_generic/evas_native_tbm.c index 2827e80d02..cf6ad4b4b6 100644 --- a/src/modules/evas/engines/software_generic/evas_native_tbm.c +++ b/src/modules/evas/engines/software_generic/evas_native_tbm.c @@ -70,7 +70,7 @@ static int (*sym_tbm_surface_map) (tbm_surface_h surface, int opt, tbm_surface_i static int (*sym_tbm_surface_unmap) (tbm_surface_h surface) = NULL; static int (*sym_tbm_surface_get_info) (tbm_surface_h surface, tbm_surface_info_s *info) = NULL; -EAPI int +EMODAPI int _evas_native_tbm_init(void) { if (tbm_lib) @@ -118,7 +118,7 @@ _evas_native_tbm_init(void) return tbm_ref; } -EAPI void +EMODAPI void _evas_native_tbm_shutdown(void) { if (tbm_ref > 0) @@ -262,7 +262,7 @@ _native_free_cb(void *image) _evas_native_tbm_shutdown(); } -EAPI int +EMODAPI int _evas_native_tbm_surface_stride_get(void *data EINA_UNUSED, void *native) { Evas_Native_Surface *ns = native; @@ -285,7 +285,7 @@ _evas_native_tbm_surface_stride_get(void *data EINA_UNUSED, void *native) return stride; } -EAPI void * +EMODAPI void * _evas_native_tbm_surface_image_set(void *data EINA_UNUSED, void *image, void *native) { Evas_Native_Surface *ns = native; diff --git a/src/modules/evas/image_loaders/eet/evas_image_load_eet.c b/src/modules/evas/image_loaders/eet/evas_image_load_eet.c index 4760ecc94e..9b4dfe4cdc 100644 --- a/src/modules/evas/image_loaders/eet/evas_image_load_eet.c +++ b/src/modules/evas/image_loaders/eet/evas_image_load_eet.c @@ -1,5 +1,5 @@ #ifdef HAVE_CONFIG_H -# include "config.h" /* so that EAPI in Eet.h is correctly defined */ +# include "config.h" /* so that EMODAPI in Eet.h is correctly defined */ #endif #include diff --git a/src/modules/evas/image_savers/eet/evas_image_save_eet.c b/src/modules/evas/image_savers/eet/evas_image_save_eet.c index d3c4eba155..c4e97840a1 100644 --- a/src/modules/evas/image_savers/eet/evas_image_save_eet.c +++ b/src/modules/evas/image_savers/eet/evas_image_save_eet.c @@ -1,5 +1,5 @@ #ifdef HAVE_CONFIG_H -# include "config.h" /* so that EAPI in Eet.h is correctly defined */ +# include "config.h" /* so that EMODAPI in Eet.h is correctly defined */ #endif #include