ecore: Rename EAPI macro to ECORE_API in Ecore library

Summary:
=  The Rationale =

EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.

MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.

For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.

With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).

Example 1:
dll1:
```
EAPI void foo(void);

EAPI void bar()
{
  foo();
}
```
dll2:
```
EAPI void foo()
{
  printf ("foo\n");
}
```

This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.

However, the following:
Example 2:

dll1:

```
EAPI extern int foo;
EAPI void foobar(void);

EAPI void bar()
{
  foo = 5;
  foobar();
}
```

dll2:

```
EAPI int foo = 0;
EAPI void foobar()
{
  printf ("foo %d\n", foo);
}
```

This will work on mingw but will not work for MSVC. And that's why
EAPI is the only solution that worked for MSVC.

Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>

Reviewers: vtorri, raster

Reviewed By: raster

Subscribers: raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12271
This commit is contained in:
Felipe Magno de Almeida 2021-05-23 20:08:05 +01:00 committed by Carsten Haitzler (Rasterman)
parent 1304d95717
commit 74204bccd7
37 changed files with 452 additions and 540 deletions

View File

@ -276,32 +276,7 @@
#include <Eina.h>
#include <Eo.h>
#include <Efl.h>
#ifdef EAPI
# undef EAPI
#endif
#ifdef _WIN32
# ifdef EFL_BUILD
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif
# else
# define EAPI __declspec(dllimport)
# endif
#else
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else
# define EAPI
# endif
# else
# define EAPI
# endif
#endif
#include <ecore_api.h>
#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
@ -331,13 +306,10 @@ extern "C" {
#endif
#include "Ecore_Eo.h"
EAPI double _ecore_main_loop_wakeup_time_get(void);
ECORE_API double _ecore_main_loop_wakeup_time_get(void);
#ifdef __cplusplus
}
#endif
#undef EAPI
#define EAPI
#endif

File diff suppressed because it is too large Load Diff

View File

@ -45,9 +45,9 @@
/* To be deprecated at some point */
/** Please use efl_provider_register instead. */
EAPI Eina_Bool efl_loop_register(Efl_Loop *obj, const Efl_Class *klass, const Efl_Object *provider);
ECORE_API Eina_Bool efl_loop_register(Efl_Loop *obj, const Efl_Class *klass, const Efl_Object *provider);
/** Please use efl_provider_unregister instead. */
EAPI Eina_Bool efl_loop_unregister(Efl_Loop *obj, const Efl_Class *klass, const Efl_Object *provider);
ECORE_API Eina_Bool efl_loop_unregister(Efl_Loop *obj, const Efl_Class *klass, const Efl_Object *provider);
/**
* @brief Quits the main loop once all the events currently on the queue have
@ -59,9 +59,9 @@ EAPI Eina_Bool efl_loop_unregister(Efl_Loop *obj, const Efl_Class *klass, const
*
* @ingroup Efl_Loop
*/
EAPI void efl_exit(int exit_code);
ECORE_API void efl_exit(int exit_code);
EAPI int efl_loop_exit_code_process(Eina_Value *value);
ECORE_API int efl_loop_exit_code_process(Eina_Value *value);
#include "efl_loop_consumer.eo.h"
@ -71,7 +71,7 @@ EAPI int efl_loop_exit_code_process(Eina_Value *value);
* @param[in] obj An object which is either a loop or a loop consumer
* @return The current loop's future scheduler.
*/
EAPI Eina_Future_Scheduler *efl_loop_future_scheduler_get(const Eo *obj);
ECORE_API Eina_Future_Scheduler *efl_loop_future_scheduler_get(const Eo *obj);
#include "efl_loop_fd.eo.h"
#include "efl_loop_handler.eo.h"
@ -86,7 +86,7 @@ EAPI Eina_Future_Scheduler *efl_loop_future_scheduler_get(const Eo *obj);
#include "efl_cubic_bezier_interpolator.eo.h"
/* We ue the factory pattern here, so you shouldn't call eo_add directly. */
EAPI Eo *efl_main_loop_get(void);
ECORE_API Eo *efl_main_loop_get(void);
/**
* @}

View File

@ -3,32 +3,7 @@
#include <stdio.h>
#include <Eina.h>
#ifdef EAPI
# undef EAPI
#endif
#ifdef _WIN32
# ifdef EFL_BUILD
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif
# else
# define EAPI __declspec(dllimport)
# endif
#else
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else
# define EAPI
# endif
# else
# define EAPI
# endif
#endif
#include <ecore_api.h>
/**
* @ingroup Ecore
@ -1025,7 +1000,7 @@ struct _Ecore_Getopt
*
* @see ecore_getopt_help_category()
*/
EAPI void ecore_getopt_help(FILE *fp, const Ecore_Getopt *info);
ECORE_API void ecore_getopt_help(FILE *fp, const Ecore_Getopt *info);
/**
* Shows help for a single category (along with program usage and description).
@ -1038,7 +1013,7 @@ EAPI void ecore_getopt_help(FILE *fp, const Ecore_Getopt *info);
*
* @see ecore_getopt_help()
*/
EAPI Eina_Bool ecore_getopt_help_category(FILE *fp, const Ecore_Getopt *info, const char *category);
ECORE_API Eina_Bool ecore_getopt_help_category(FILE *fp, const Ecore_Getopt *info, const char *category);
/**
* Checks parser for duplicate entries, print them out.
@ -1046,7 +1021,7 @@ EAPI Eina_Bool ecore_getopt_help_category(FILE *fp, const Ecore_Getopt *info, c
* @return @c EINA_TRUE if there are duplicates, @c EINA_FALSE otherwise.
* @param parser The parser to be checked.
*/
EAPI Eina_Bool ecore_getopt_parser_has_duplicates(const Ecore_Getopt *parser);
ECORE_API Eina_Bool ecore_getopt_parser_has_duplicates(const Ecore_Getopt *parser);
/**
* Parses command line parameters.
@ -1110,7 +1085,7 @@ EAPI Eina_Bool ecore_getopt_parser_has_duplicates(const Ecore_Getopt *parser);
*
* @see ecore_getopt_parse_positional()
*/
EAPI int ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int argc, char **argv);
ECORE_API int ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int argc, char **argv);
/**
* Parses command line positional parameters.
@ -1163,7 +1138,7 @@ EAPI int ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Valu
* last positional argument is of action @c
* ECORE_GETOPT_ACTION_APPEND then it will be the same as @a argc.
*/
EAPI int ecore_getopt_parse_positional(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int argc, char **argv, int start);
ECORE_API int ecore_getopt_parse_positional(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int argc, char **argv, int start);
/**
@ -1172,7 +1147,7 @@ EAPI int ecore_getopt_parse_positional(const Ecore_Getopt *parser, Ecore_
* @param list Pointer to list to be freed.
* @return always @c NULL, so you can easily make your list head @c NULL.
*/
EAPI Eina_List *ecore_getopt_list_free(Eina_List *list);
ECORE_API Eina_List *ecore_getopt_list_free(Eina_List *list);
/**
* Helper ecore_getopt callback to parse geometry (x:y:w:h).
@ -1189,7 +1164,7 @@ EAPI Eina_List *ecore_getopt_list_free(Eina_List *list);
*
* @c callback_data value is ignored, you can safely use @c NULL.
*/
EAPI Eina_Bool ecore_getopt_callback_geometry_parse(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, const char *str, void *data, Ecore_Getopt_Value *storage);
ECORE_API Eina_Bool ecore_getopt_callback_geometry_parse(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, const char *str, void *data, Ecore_Getopt_Value *storage);
/**
* Helper ecore_getopt callback to parse geometry size (WxH).
@ -1205,7 +1180,7 @@ EAPI Eina_Bool ecore_getopt_callback_geometry_parse(const Ecore_Getopt *parser,
*
* @c callback_data value is ignored, you can safely use @c NULL.
*/
EAPI Eina_Bool ecore_getopt_callback_size_parse(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, const char *str, void *data, Ecore_Getopt_Value *storage);
ECORE_API Eina_Bool ecore_getopt_callback_size_parse(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, const char *str, void *data, Ecore_Getopt_Value *storage);
#ifdef __cplusplus
}
@ -1215,7 +1190,4 @@ EAPI Eina_Bool ecore_getopt_callback_size_parse(const Ecore_Getopt *parser, con
* @}
*/
#undef EAPI
#define EAPI
#endif /* _ECORE_GETOPT_H */

View File

@ -38,7 +38,7 @@ typedef struct _Ecore_Poller Ecore_Poller;
* @c 0 it will be deleted automatically making any references/handles for it
* invalid.
*/
EAPI Ecore_Poller *ecore_poller_add(Ecore_Poller_Type type, int interval, Ecore_Task_Cb func, const void *data);
ECORE_API Ecore_Poller *ecore_poller_add(Ecore_Poller_Type type, int interval, Ecore_Task_Cb func, const void *data);
/**
* @brief Deletes the specified poller from the timer list.
@ -49,7 +49,7 @@ EAPI Ecore_Poller *ecore_poller_add(Ecore_Poller_Type type, int interval, Ecore_
* @note @a poller must be a valid handle. If the poller function has already
* returned @c 0, the handle is no longer valid (and does not need to be deleted).
*/
EAPI void *ecore_poller_del(Ecore_Poller *poller);
ECORE_API void *ecore_poller_del(Ecore_Poller *poller);
/**
* @brief Sets the time(in seconds) between ticks for the given poller type.
@ -59,7 +59,7 @@ EAPI void *ecore_poller_del(Ecore_Poller *poller);
* This will adjust the time between ticks of the given timer type defined by
* @p type to the time period defined by @p poll_time.
*/
EAPI void ecore_poller_poll_interval_set(Ecore_Poller_Type type, double poll_time);
ECORE_API void ecore_poller_poll_interval_set(Ecore_Poller_Type type, double poll_time);
/**
* @brief Gets the time(in seconds) between ticks for the given poller type.
@ -68,7 +68,7 @@ EAPI void ecore_poller_poll_interval_set(Ecore_Poller_Type type, double poll_tim
*
* This will get the time between ticks of the specified poller timer.
*/
EAPI double ecore_poller_poll_interval_get(Ecore_Poller_Type type);
ECORE_API double ecore_poller_poll_interval_get(Ecore_Poller_Type type);
/**
* @brief Polling interval rate of the poller.
@ -77,14 +77,14 @@ EAPI double ecore_poller_poll_interval_get(Ecore_Poller_Type type);
*
* @return @c true on success, @c false on failure.
*/
EAPI Eina_Bool ecore_poller_poller_interval_set(Ecore_Poller *obj, int interval);
ECORE_API Eina_Bool ecore_poller_poller_interval_set(Ecore_Poller *obj, int interval);
/**
* @brief Polling interval rate of the poller.
*
* @return The tick interval; must be a power of 2 and <= 32768.
*/
EAPI int ecore_poller_poller_interval_get(const Ecore_Poller *obj);
ECORE_API int ecore_poller_poller_interval_get(const Ecore_Poller *obj);
/**
* @}
@ -125,7 +125,7 @@ typedef struct _Ecore_Animator Ecore_Animator;
* @note The default @p frametime value is 1/30th of a second.
*
*/
EAPI Ecore_Animator *ecore_animator_add(Ecore_Task_Cb func, const void *data);
ECORE_API Ecore_Animator *ecore_animator_add(Ecore_Task_Cb func, const void *data);
/**
* @brief Adds an animator that runs for a limited time.
@ -157,7 +157,7 @@ EAPI Ecore_Animator *ecore_animator_add(Ecore_Task_Cb func, const void *data);
*
* @since 1.1.0
*/
EAPI Ecore_Animator *ecore_animator_timeline_add(double runtime, Ecore_Timeline_Cb func, const void *data);
ECORE_API Ecore_Animator *ecore_animator_timeline_add(double runtime, Ecore_Timeline_Cb func, const void *data);
/**
* @brief Deletes the specified animator from the animator list.
@ -172,7 +172,7 @@ EAPI Ecore_Animator *ecore_animator_timeline_add(double runtime, Ecore_Timeline_
* is invalid and should not be used again. It will not get called again after
* deletion.
*/
EAPI void *ecore_animator_del(Ecore_Animator *animator);
ECORE_API void *ecore_animator_del(Ecore_Animator *animator);
/**
* @brief Suspends the specified animator.
@ -188,7 +188,7 @@ EAPI void *ecore_animator_del(Ecore_Animator *animator);
* will increase as if the animator hadn't been frozen and the animator may
* have it's execution halted if @p runtime elapsed.
*/
EAPI void ecore_animator_freeze(Ecore_Animator *animator);
ECORE_API void ecore_animator_freeze(Ecore_Animator *animator);
/**
* @brief Restores execution of the specified animator.
@ -198,7 +198,7 @@ EAPI void ecore_animator_freeze(Ecore_Animator *animator);
* The specified @p animator will be put back in the set of animators that are
* executed during main loop.
*/
EAPI void ecore_animator_thaw(Ecore_Animator *animator);
ECORE_API void ecore_animator_thaw(Ecore_Animator *animator);
/**
* @}
@ -228,7 +228,7 @@ EAPI void ecore_animator_thaw(Ecore_Animator *animator);
* @c 0 it will be deleted automatically making any references/handles for it
* invalid.
*/
EAPI Ecore_Timer *ecore_timer_add(double in, Ecore_Task_Cb func, const void *data);
ECORE_API Ecore_Timer *ecore_timer_add(double in, Ecore_Task_Cb func, const void *data);
/**
* Creates a timer to call the given function in the given period of time.
@ -242,7 +242,7 @@ EAPI Ecore_Timer *ecore_timer_add(double in, Ecore_Task_Cb func, const void *dat
* ecore_loop_time_get() not ecore_time_get() as ecore_timer_add() uses. See
* ecore_timer_add() for more details.
*/
EAPI Ecore_Timer *ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data);
ECORE_API Ecore_Timer *ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data);
/**
* Deletes the specified timer from the timer list.
@ -253,7 +253,7 @@ EAPI Ecore_Timer *ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void
* Note: @p timer must be a valid handle. If the timer function has already
* returned @c 0, the handle is no longer valid (and does not need to be delete).
*/
EAPI void *ecore_timer_del(Ecore_Timer *timer);
ECORE_API void *ecore_timer_del(Ecore_Timer *timer);
/**
* Pauses a running timer.
@ -269,7 +269,7 @@ EAPI void *ecore_timer_del(Ecore_Timer *timer);
*
* @see ecore_timer_thaw()
*/
EAPI void ecore_timer_freeze(Ecore_Timer *timer);
ECORE_API void ecore_timer_freeze(Ecore_Timer *timer);
/**
* @brief Return whether the timer is freezing.
@ -278,7 +278,7 @@ EAPI void ecore_timer_freeze(Ecore_Timer *timer);
*
* @see ecore_timer_freeze(), ecore_timer_thaw()
*/
EAPI Eina_Bool ecore_timer_freeze_get(Ecore_Timer *timer);
ECORE_API Eina_Bool ecore_timer_freeze_get(Ecore_Timer *timer);
/**
* @brief Resumes a frozen (paused) timer.
@ -293,7 +293,7 @@ EAPI Eina_Bool ecore_timer_freeze_get(Ecore_Timer *timer);
*
* @see ecore_timer_freeze()
*/
EAPI void ecore_timer_thaw(Ecore_Timer *timer);
ECORE_API void ecore_timer_thaw(Ecore_Timer *timer);
#include "efl_loop_timer_eo.legacy.h"
@ -321,7 +321,7 @@ EAPI void ecore_timer_thaw(Ecore_Timer *timer);
*
* Idlers are useful for progressively processing data without blocking.
*/
EAPI Ecore_Idler *ecore_idler_add(Ecore_Task_Cb func, const void *data);
ECORE_API Ecore_Idler *ecore_idler_add(Ecore_Task_Cb func, const void *data);
/**
* Deletes an idler callback from the list to be executed.
@ -329,7 +329,7 @@ EAPI Ecore_Idler *ecore_idler_add(Ecore_Task_Cb func, const void *data);
* @return The data pointer passed to the idler callback on success, @c NULL
* otherwise.
*/
EAPI void *ecore_idler_del(Ecore_Idler *idler);
ECORE_API void *ecore_idler_del(Ecore_Idler *idler);
/**
* Adds an idle enterer handler.
@ -341,7 +341,7 @@ EAPI void *ecore_idler_del(Ecore_Idler *idler);
* idle state, as long as it returns @c 1 (or @c ECORE_CALLBACK_RENEW). A return of @c 0
* (or @c ECORE_CALLBACK_CANCEL) deletes the idle enterer.
*/
EAPI Ecore_Idle_Enterer *ecore_idle_enterer_add(Ecore_Task_Cb func, const void *data);
ECORE_API Ecore_Idle_Enterer *ecore_idle_enterer_add(Ecore_Task_Cb func, const void *data);
/**
* Adds an idle enterer handler at the start of the list so it gets called earlier than others.
@ -353,7 +353,7 @@ EAPI Ecore_Idle_Enterer *ecore_idle_enterer_add(Ecore_Task_Cb func, const void *
* idle state, as long as it returns @c 1 (or @c ECORE_CALLBACK_RENEW). A return of @c 0
* (or @c ECORE_CALLBACK_CANCEL) deletes the idle enterer.
*/
EAPI Ecore_Idle_Enterer *ecore_idle_enterer_before_add(Ecore_Task_Cb func, const void *data);
ECORE_API Ecore_Idle_Enterer *ecore_idle_enterer_before_add(Ecore_Task_Cb func, const void *data);
/**
* Deletes an idle enterer callback.
@ -361,7 +361,7 @@ EAPI Ecore_Idle_Enterer *ecore_idle_enterer_before_add(Ecore_Task_Cb func, const
* @return The data pointer passed to the idler enterer callback on success.
* @c NULL otherwise.
*/
EAPI void *ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer);
ECORE_API void *ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer);
/**
* Adds an idle exiter handler.
@ -372,7 +372,7 @@ EAPI void *ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer);
* idle state, as long as it returns @c 1 (or @c ECORE_CALLBACK_RENEW). A return of @c 0
* (or @c ECORE_CALLBACK_CANCEL) deletes the idle exiter.
*/
EAPI Ecore_Idle_Exiter *ecore_idle_exiter_add(Ecore_Task_Cb func, const void *data);
ECORE_API Ecore_Idle_Exiter *ecore_idle_exiter_add(Ecore_Task_Cb func, const void *data);
/**
* Deletes an idle exiter handler from the list to be run on exiting idle state.
@ -380,7 +380,7 @@ EAPI Ecore_Idle_Exiter *ecore_idle_exiter_add(Ecore_Task_Cb func, const void *da
* @return The data pointer that was being being passed to the handler if
* successful. @c NULL otherwise.
*/
EAPI void *ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter);
ECORE_API void *ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter);
/**
* @}
@ -412,22 +412,22 @@ EAPI void *ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter);
* added to the queue.
* @note Once the job has been executed, the job handle is invalid.
*/
EAPI Ecore_Job *ecore_job_add(Ecore_Cb func, const void *data);
ECORE_API Ecore_Job *ecore_job_add(Ecore_Cb func, const void *data);
/**
* Deletes a queued job that has not yet been executed.
* @param obj Handle of the job to delete.
* @return The data pointer that was to be passed to the job.
*/
EAPI void *ecore_job_del(Ecore_Job *obj);
ECORE_API void *ecore_job_del(Ecore_Job *obj);
/**
* @}
*/
#ifdef EFL_BETA_API_SUPPORT
EAPI Ecore_Animator *ecore_evas_animator_timeline_add(void *evo, double runtime, Ecore_Timeline_Cb func, const void *data);
EAPI Ecore_Animator *ecore_evas_animator_add(void *evo, Ecore_Task_Cb func, const void *data);
ECORE_API Ecore_Animator *ecore_evas_animator_timeline_add(void *evo, double runtime, Ecore_Timeline_Cb func, const void *data);
ECORE_API Ecore_Animator *ecore_evas_animator_add(void *evo, Ecore_Task_Cb func, const void *data);
#endif /* EFL_BETA_API_SUPPORT */
#endif

View File

@ -6,31 +6,8 @@
#include <Eina.h>
#include <Eo.h>
#include <Efl.h>
#ifdef EAPI
# undef EAPI
#endif
#ifdef _WIN32
# ifdef EFL_BUILD
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif
# else
# define EAPI __declspec(dllimport)
# endif
#else
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else
# define EAPI
# endif
# else
# define EAPI
# endif
#endif
#include "ecore_api.h"
#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
@ -54,7 +31,7 @@
extern "C" {
#endif
EAPI extern double _efl_startup_time;
ECORE_API extern double _efl_startup_time;
#include "Ecore_Common.h"
#include "Ecore_Eo.h"
@ -63,9 +40,6 @@ EAPI extern double _efl_startup_time;
}
#endif
#undef EAPI
#define EAPI
#endif
// We are including efl_general.h again, just in case Efl_Core.h was already included before this

View File

@ -41,9 +41,9 @@
#endif
static Ecore_Version _version = { VMAJ, VMIN, VMIC, VREV };
EAPI Ecore_Version *ecore_version = &_version;
ECORE_API Ecore_Version *ecore_version = &_version;
EAPI double _efl_startup_time = 0;
ECORE_API double _efl_startup_time = 0;
#if defined(HAVE_MALLINFO) || defined(HAVE_MALLOC_INFO) || defined(HAVE_MALLINFO2)
# define KEEP_MAX(Global, Local) \
@ -220,13 +220,13 @@ _efl_first_loop_iterate(void *data, const Efl_Event *event)
_efl_first_loop_iterate, data);
}
EAPI void
ECORE_API void
ecore_app_no_system_modules(void)
{
_no_system_modules = EINA_TRUE;
}
EAPI int
ECORE_API int
ecore_init(void)
{
if (++_ecore_init_count != 1)
@ -367,7 +367,7 @@ shutdown_evil:
return --_ecore_init_count;
}
EAPI int
ECORE_API int
ecore_shutdown(void)
{
Ecore_Pipe *p;
@ -481,7 +481,7 @@ ecore_shutdown(void)
static unsigned int _ecore_init_ex = 0;
EAPI unsigned int
ECORE_API unsigned int
ecore_init_ex(int argc, char **argv)
{
if (_ecore_init_ex++ != 0) return _ecore_init_ex;
@ -494,7 +494,7 @@ ecore_init_ex(int argc, char **argv)
return _ecore_init_ex;
}
EAPI unsigned int
ECORE_API unsigned int
ecore_shutdown_ex(void)
{
if (--_ecore_init_ex != 0) return _ecore_init_ex;
@ -516,7 +516,7 @@ typedef struct _Ecore_Fork_Cb Ecore_Fork_Cb;
static int fork_cbs_walking = 0;
static Eina_List *fork_cbs = NULL;
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_fork_reset_callback_add(Ecore_Cb func, const void *data)
{
Ecore_Fork_Cb *fcb;
@ -530,7 +530,7 @@ ecore_fork_reset_callback_add(Ecore_Cb func, const void *data)
return EINA_TRUE;
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_fork_reset_callback_del(Ecore_Cb func, const void *data)
{
Eina_List *l;
@ -553,7 +553,7 @@ ecore_fork_reset_callback_del(Ecore_Cb func, const void *data)
return EINA_FALSE;
}
EAPI void
ECORE_API void
ecore_fork_reset(void)
{
Eina_List *l, *ln;
@ -608,7 +608,7 @@ ecore_fork_reset(void)
#endif
}
EAPI void
ECORE_API void
ecore_main_loop_thread_safe_call_async(Ecore_Cb callback,
void *data)
{
@ -633,7 +633,7 @@ ecore_main_loop_thread_safe_call_async(Ecore_Cb callback,
_ecore_main_loop_thread_safe_call(order);
}
EAPI void *
ECORE_API void *
ecore_main_loop_thread_safe_call_sync(Ecore_Data_Cb callback,
void *data)
{
@ -673,7 +673,7 @@ ecore_main_loop_thread_safe_call_sync(Ecore_Data_Cb callback,
return ret;
}
EAPI void
ECORE_API void
ecore_main_loop_thread_safe_call_wait(double wait)
{
ecore_pipe_wait(_thread_call, 1, wait);
@ -681,7 +681,7 @@ ecore_main_loop_thread_safe_call_wait(double wait)
static Efl_Id_Domain _ecore_main_domain = EFL_ID_DOMAIN_INVALID;
EAPI int
ECORE_API int
ecore_thread_main_loop_begin(void)
{
Ecore_Safe_Call *order;
@ -731,7 +731,7 @@ ecore_thread_main_loop_begin(void)
return _thread_loop;
}
EAPI int
ECORE_API int
ecore_thread_main_loop_end(void)
{
int current_id;
@ -774,7 +774,7 @@ ecore_thread_main_loop_end(void)
return 0;
}
EAPI void
ECORE_API void
ecore_print_warning(const char *function EINA_UNUSED,
const char *sparam EINA_UNUSED)
{
@ -787,7 +787,7 @@ ecore_print_warning(const char *function EINA_UNUSED,
if (getenv("ECORE_ERROR_ABORT")) abort();
}
EAPI void
ECORE_API void
_ecore_magic_fail(const void *d,
Ecore_Magic m,
Ecore_Magic req_m,
@ -1123,13 +1123,13 @@ _thread_callback(void *data EINA_UNUSED,
_ecore_main_call_flush();
}
EAPI Ecore_Power_State
ECORE_API Ecore_Power_State
ecore_power_state_get(void)
{
return _ecore_power_state;
}
EAPI void
ECORE_API void
ecore_power_state_set(Ecore_Power_State state)
{
if (_ecore_power_state == state) return;
@ -1137,13 +1137,13 @@ ecore_power_state_set(Ecore_Power_State state)
ecore_event_add(ECORE_EVENT_POWER_STATE, NULL, NULL, NULL);
}
EAPI Ecore_Memory_State
ECORE_API Ecore_Memory_State
ecore_memory_state_get(void)
{
return _ecore_memory_state;
}
EAPI void
ECORE_API void
ecore_memory_state_set(Ecore_Memory_State state)
{
if (_ecore_memory_state == state) return;

View File

@ -532,14 +532,14 @@ _ecore_animator_add(Ecore_Task_Cb func,
return animator;
}
EAPI Ecore_Animator *
ECORE_API Ecore_Animator *
ecore_animator_add(Ecore_Task_Cb func,
const void *data)
{
return _ecore_animator_add(func, data);
}
EAPI Ecore_Animator *
ECORE_API Ecore_Animator *
ecore_animator_timeline_add(double runtime,
Ecore_Timeline_Cb func,
const void *data)
@ -745,7 +745,7 @@ _pos_map_cubic_bezier(double pos,
#define SUB(A, B) eina_f32p32_sub(A, B)
#define MUL(A, B) eina_f32p32_mul(A, B)
EAPI double
ECORE_API double
ecore_animator_pos_map_n(double pos,
Ecore_Pos_Map map,
int v_size,
@ -828,7 +828,7 @@ ecore_animator_pos_map_n(double pos,
return pos;
}
EAPI double
ECORE_API double
ecore_animator_pos_map(double pos,
Ecore_Pos_Map map,
double v1,
@ -841,7 +841,7 @@ ecore_animator_pos_map(double pos,
return ecore_animator_pos_map_n(pos, map, 2, v);
}
EAPI void *
ECORE_API void *
ecore_animator_del(Ecore_Animator *animator)
{
void *data = NULL;
@ -869,7 +869,7 @@ ecore_animator_del(Ecore_Animator *animator)
return data;
}
EAPI void
ECORE_API void
ecore_animator_frametime_set(double frametime)
{
EINA_MAIN_LOOP_CHECK_RETURN;
@ -880,14 +880,14 @@ ecore_animator_frametime_set(double frametime)
if (_have_animators()) _begin_tick();
}
EAPI double
ECORE_API double
ecore_animator_frametime_get(void)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(0.0);
return animators_frametime;
}
EAPI void
ECORE_API void
ecore_animator_freeze(Ecore_Animator *animator)
{
EINA_MAIN_LOOP_CHECK_RETURN;
@ -905,7 +905,7 @@ ecore_animator_freeze(Ecore_Animator *animator)
if (!_have_animators()) _end_tick();
}
EAPI void
ECORE_API void
ecore_animator_thaw(Ecore_Animator *animator)
{
EINA_MAIN_LOOP_CHECK_RETURN;
@ -923,7 +923,7 @@ ecore_animator_thaw(Ecore_Animator *animator)
if (_have_animators()) _begin_tick();
}
EAPI void
ECORE_API void
ecore_animator_source_set(Ecore_Animator_Source source)
{
EINA_MAIN_LOOP_CHECK_RETURN;
@ -936,14 +936,14 @@ ecore_animator_source_set(Ecore_Animator_Source source)
if (_have_animators()) _begin_tick();
}
EAPI Ecore_Animator_Source
ECORE_API Ecore_Animator_Source
ecore_animator_source_get(void)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(0);
return src;
}
EAPI void
ECORE_API void
ecore_animator_custom_source_tick_begin_callback_set(Ecore_Cb func,
const void *data)
{
@ -954,7 +954,7 @@ ecore_animator_custom_source_tick_begin_callback_set(Ecore_Cb func,
if (_have_animators()) _begin_tick();
}
EAPI void
ECORE_API void
ecore_animator_custom_source_tick_end_callback_set(Ecore_Cb func,
const void *data)
{
@ -965,7 +965,7 @@ ecore_animator_custom_source_tick_end_callback_set(Ecore_Cb func,
if (_have_animators()) _begin_tick();
}
EAPI void
ECORE_API void
ecore_animator_custom_tick(void)
{
EINA_MAIN_LOOP_CHECK_RETURN;

32
src/lib/ecore/ecore_api.h Normal file
View File

@ -0,0 +1,32 @@
#ifndef _EFL_CORE_API_H
#define _EFL_CORE_API_H
#ifdef ECORE_API
#error ECORE_API should not be already defined
#endif
#ifdef _WIN32
# ifndef ECORE_STATIC
# ifdef ECORE_BUILD
# define ECORE_API __declspec(dllexport)
# else
# define ECORE_API __declspec(dllimport)
# endif
# else
# define ECORE_API
# endif
# define ECORE_API_WEAK
#elif defined(__GNUC__)
# if __GNUC__ >= 4
# define ECORE_API __attribute__ ((visibility("default")))
# define ECORE_API_WEAK __attribute__ ((weak))
# else
# define ECORE_API
# define ECORE_API_WEAK
# endif
#else
# define ECORE_API
# define ECORE_API_WEAK
#endif
#endif

View File

@ -11,7 +11,7 @@
static int app_argc = 0;
static char **app_argv = NULL;
EAPI void
ECORE_API void
ecore_app_args_set(int argc,
const char **argv)
{
@ -25,7 +25,7 @@ ecore_app_args_set(int argc,
app_argv = (char **)argv;
}
EAPI void
ECORE_API void
ecore_app_args_get(int *argc,
char ***argv)
{
@ -35,7 +35,7 @@ ecore_app_args_get(int *argc,
if (argv) *argv = app_argv;
}
EAPI void
ECORE_API void
ecore_app_restart(void)
{
EINA_MAIN_LOOP_CHECK_RETURN;

View File

@ -9,7 +9,7 @@
static Ecore_Event_Message_Handler *_event_msg_handler = NULL;
EAPI Ecore_Event_Handler *
ECORE_API Ecore_Event_Handler *
ecore_event_handler_add(int type,
Ecore_Event_Handler_Cb func,
const void *data)
@ -18,7 +18,7 @@ ecore_event_handler_add(int type,
type, func, (void *)data);
}
EAPI Ecore_Event_Handler *
ECORE_API Ecore_Event_Handler *
ecore_event_handler_prepend(int type,
Ecore_Event_Handler_Cb func,
const void *data)
@ -27,20 +27,20 @@ ecore_event_handler_prepend(int type,
type, func, (void *)data);
}
EAPI void *
ECORE_API void *
ecore_event_handler_del(Ecore_Event_Handler *event_handler)
{
return ecore_event_message_handler_del(_event_msg_handler,
event_handler);
}
EAPI void *
ECORE_API void *
ecore_event_handler_data_get(Ecore_Event_Handler *eh)
{
return ecore_event_message_handler_data_get(_event_msg_handler, eh);
}
EAPI void *
ECORE_API void *
ecore_event_handler_data_set(Ecore_Event_Handler *eh,
const void *data)
{
@ -48,7 +48,7 @@ ecore_event_handler_data_set(Ecore_Event_Handler *eh,
(void *)data);
}
EAPI Ecore_Event *
ECORE_API Ecore_Event *
ecore_event_add(int type,
void *ev,
Ecore_End_Cb func_free,
@ -66,7 +66,7 @@ ecore_event_add(int type,
return (Ecore_Event *)msg;
}
EAPI void *
ECORE_API void *
ecore_event_del(Ecore_Event *event)
{
void *data = NULL;
@ -76,13 +76,13 @@ ecore_event_del(Ecore_Event *event)
return data;
}
EAPI int
ECORE_API int
ecore_event_type_new(void)
{
return ecore_event_message_handler_type_new(_event_msg_handler);
}
EAPI Ecore_Event_Filter *
ECORE_API Ecore_Event_Filter *
ecore_event_filter_add(Ecore_Data_Cb func_start,
Ecore_Filter_Cb func_filter,
Ecore_End_Cb func_end,
@ -93,19 +93,19 @@ ecore_event_filter_add(Ecore_Data_Cb func_start,
func_end, (void *)data);
}
EAPI void *
ECORE_API void *
ecore_event_filter_del(Ecore_Event_Filter *ef)
{
return ecore_event_message_handler_filter_del(_event_msg_handler, ef);
}
EAPI int
ECORE_API int
ecore_event_current_type_get(void)
{
return ecore_event_message_handler_current_type_get(_event_msg_handler);
}
EAPI void *
ECORE_API void *
ecore_event_current_event_get(void)
{
return ecore_event_message_handler_current_event_get(_event_msg_handler);
@ -192,7 +192,7 @@ _ecore_event_signal_realtime_new(void)
return calloc(1, sizeof(Ecore_Event_Signal_Realtime));
}
EAPI void
ECORE_API void
ecore_event_type_flush_internal(int type, ...)
{
va_list args;

View File

@ -33,26 +33,26 @@ struct _ecore_exe_dead_exe
char *cmd;
};
EAPI int ECORE_EXE_EVENT_ADD = 0;
EAPI int ECORE_EXE_EVENT_DEL = 0;
EAPI int ECORE_EXE_EVENT_DATA = 0;
EAPI int ECORE_EXE_EVENT_ERROR = 0;
ECORE_API int ECORE_EXE_EVENT_ADD = 0;
ECORE_API int ECORE_EXE_EVENT_DEL = 0;
ECORE_API int ECORE_EXE_EVENT_DATA = 0;
ECORE_API int ECORE_EXE_EVENT_ERROR = 0;
EAPI void
ECORE_API void
ecore_exe_run_priority_set(int pri)
{
EINA_MAIN_LOOP_CHECK_RETURN;
_impl_ecore_exe_run_priority_set(pri);
}
EAPI int
ECORE_API int
ecore_exe_run_priority_get(void)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(0);
return _impl_ecore_exe_run_priority_get();
}
EAPI Ecore_Exe *
ECORE_API Ecore_Exe *
ecore_exe_run(const char *exe_cmd,
const void *data)
{
@ -60,7 +60,7 @@ ecore_exe_run(const char *exe_cmd,
return ecore_exe_pipe_run(exe_cmd, 0, data);
}
EAPI Ecore_Exe *
ECORE_API Ecore_Exe *
ecore_exe_pipe_run(const char *exe_cmd,
Ecore_Exe_Flags flags,
const void *data)
@ -101,7 +101,7 @@ _ecore_exe_efl_object_finalize(Eo *obj, Ecore_Exe_Data *exe)
return _impl_ecore_exe_efl_object_finalize(obj, exe);
}
EAPI void
ECORE_API void
ecore_exe_callback_pre_free_set(Ecore_Exe *obj,
Ecore_Exe_Cb func)
{
@ -111,7 +111,7 @@ ecore_exe_callback_pre_free_set(Ecore_Exe *obj,
exe->pre_free_cb = func;
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_exe_send(Ecore_Exe *obj,
const void *data,
int size)
@ -130,7 +130,7 @@ ecore_exe_send(Ecore_Exe *obj,
return _impl_ecore_exe_send(obj, exe, data, size);
}
EAPI void
ECORE_API void
ecore_exe_close_stdin(Ecore_Exe *obj)
{
EINA_MAIN_LOOP_CHECK_RETURN;
@ -139,7 +139,7 @@ ecore_exe_close_stdin(Ecore_Exe *obj)
exe->close_stdin = 1;
}
EAPI void
ECORE_API void
ecore_exe_auto_limits_set(Ecore_Exe *obj,
int start_bytes,
int end_bytes,
@ -153,7 +153,7 @@ ecore_exe_auto_limits_set(Ecore_Exe *obj,
start_lines, end_lines);
}
EAPI Ecore_Exe_Event_Data *
ECORE_API Ecore_Exe_Event_Data *
ecore_exe_event_data_get(Ecore_Exe *obj,
Ecore_Exe_Flags flags)
{
@ -163,7 +163,7 @@ ecore_exe_event_data_get(Ecore_Exe *obj,
return _impl_ecore_exe_event_data_get(obj, exe, flags);
}
EAPI void
ECORE_API void
ecore_exe_tag_set(Ecore_Exe *obj,
const char *tag)
{
@ -175,7 +175,7 @@ ecore_exe_tag_set(Ecore_Exe *obj,
else exe->tag = NULL;
}
EAPI const char *
ECORE_API const char *
ecore_exe_tag_get(const Ecore_Exe *obj)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
@ -184,7 +184,7 @@ ecore_exe_tag_get(const Ecore_Exe *obj)
return exe->tag;
}
EAPI void *
ECORE_API void *
ecore_exe_free(Ecore_Exe *obj)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
@ -202,7 +202,7 @@ _ecore_exe_efl_object_destructor(Eo *obj, Ecore_Exe_Data *exe)
_impl_ecore_exe_efl_object_destructor(obj, exe);
}
EAPI void
ECORE_API void
ecore_exe_event_data_free(Ecore_Exe_Event_Data *e)
{
if (!e) return;
@ -211,7 +211,7 @@ ecore_exe_event_data_free(Ecore_Exe_Event_Data *e)
free(e);
}
EAPI pid_t
ECORE_API pid_t
ecore_exe_pid_get(const Ecore_Exe *obj)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(0);
@ -220,7 +220,7 @@ ecore_exe_pid_get(const Ecore_Exe *obj)
return exe->pid;
}
EAPI const char *
ECORE_API const char *
ecore_exe_cmd_get(const Ecore_Exe *obj)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
@ -229,7 +229,7 @@ ecore_exe_cmd_get(const Ecore_Exe *obj)
return ret;
}
EAPI void *
ECORE_API void *
ecore_exe_data_get(const Ecore_Exe *obj)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
@ -238,7 +238,7 @@ ecore_exe_data_get(const Ecore_Exe *obj)
return exe->data;
}
EAPI void *
ECORE_API void *
ecore_exe_data_set(Ecore_Exe *obj,
void *data)
{
@ -251,7 +251,7 @@ ecore_exe_data_set(Ecore_Exe *obj,
return ret;
}
EAPI Ecore_Exe_Flags
ECORE_API Ecore_Exe_Flags
ecore_exe_flags_get(const Ecore_Exe *obj)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(0);
@ -260,13 +260,13 @@ ecore_exe_flags_get(const Ecore_Exe *obj)
return exe->flags;
}
EAPI void
ECORE_API void
ecore_exe_pause(Ecore_Exe *obj)
{
efl_control_suspend_set(obj, EINA_TRUE);
}
EAPI void
ECORE_API void
ecore_exe_continue(Ecore_Exe *obj)
{
efl_control_suspend_set(obj, EINA_FALSE);
@ -280,7 +280,7 @@ _ecore_exe_efl_control_suspend_set(Eo *obj EINA_UNUSED, Ecore_Exe_Data *exe, Ein
else _impl_ecore_exe_continue(obj, exe);
}
EAPI void
ECORE_API void
ecore_exe_interrupt(Ecore_Exe *obj)
{
EINA_MAIN_LOOP_CHECK_RETURN;
@ -289,7 +289,7 @@ ecore_exe_interrupt(Ecore_Exe *obj)
_impl_ecore_exe_interrupt(obj, exe);
}
EAPI void
ECORE_API void
ecore_exe_quit(Ecore_Exe *obj)
{
EINA_MAIN_LOOP_CHECK_RETURN;
@ -298,7 +298,7 @@ ecore_exe_quit(Ecore_Exe *obj)
_impl_ecore_exe_quit(obj, exe);
}
EAPI void
ECORE_API void
ecore_exe_terminate(Ecore_Exe *obj)
{
EINA_MAIN_LOOP_CHECK_RETURN;
@ -307,7 +307,7 @@ ecore_exe_terminate(Ecore_Exe *obj)
_impl_ecore_exe_terminate(obj, exe);
}
EAPI void
ECORE_API void
ecore_exe_kill(Ecore_Exe *obj)
{
EINA_MAIN_LOOP_CHECK_RETURN;
@ -316,7 +316,7 @@ ecore_exe_kill(Ecore_Exe *obj)
_impl_ecore_exe_kill(obj, exe);
}
EAPI void
ECORE_API void
ecore_exe_signal(Ecore_Exe *obj,
int num)
{
@ -326,7 +326,7 @@ ecore_exe_signal(Ecore_Exe *obj,
_impl_ecore_exe_signal(obj, exe, num);
}
EAPI void
ECORE_API void
ecore_exe_hup(Ecore_Exe *obj)
{
EINA_MAIN_LOOP_CHECK_RETURN;

View File

@ -1,15 +1,15 @@
EWAPI const Efl_Event_Description _ECORE_EXE_EVENT_DATA_GET =
ECORE_API ECORE_API_WEAK const Efl_Event_Description _ECORE_EXE_EVENT_DATA_GET =
EFL_EVENT_DESCRIPTION("data,get");
EWAPI const Efl_Event_Description _ECORE_EXE_EVENT_DATA_ERROR =
ECORE_API ECORE_API_WEAK const Efl_Event_Description _ECORE_EXE_EVENT_DATA_ERROR =
EFL_EVENT_DESCRIPTION("data,error");
void _ecore_exe_command_set(Eo *obj, Ecore_Exe_Data *pd, const char *exe_cmd, Ecore_Exe_Flags flags);
EOAPI EFL_VOID_FUNC_BODYV(ecore_obj_exe_command_set, EFL_FUNC_CALL(exe_cmd, flags), const char *exe_cmd, Ecore_Exe_Flags flags);
ECORE_API ECORE_API_WEAK EFL_VOID_FUNC_BODYV(ecore_obj_exe_command_set, EFL_FUNC_CALL(exe_cmd, flags), const char *exe_cmd, Ecore_Exe_Flags flags);
void _ecore_exe_command_get(const Eo *obj, Ecore_Exe_Data *pd, const char **exe_cmd, Ecore_Exe_Flags *flags);
EOAPI EFL_VOID_FUNC_BODYV_CONST(ecore_obj_exe_command_get, EFL_FUNC_CALL(exe_cmd, flags), const char **exe_cmd, Ecore_Exe_Flags *flags);
ECORE_API ECORE_API_WEAK EFL_VOID_FUNC_BODYV_CONST(ecore_obj_exe_command_get, EFL_FUNC_CALL(exe_cmd, flags), const char **exe_cmd, Ecore_Exe_Flags *flags);
void _ecore_exe_efl_object_destructor(Eo *obj, Ecore_Exe_Data *pd);

View File

@ -80,7 +80,7 @@ typedef enum
*/
#define ECORE_EXE_CLASS ecore_exe_class_get()
EWAPI const Efl_Class *ecore_exe_class_get(void) EINA_CONST;
ECORE_API ECORE_API_WEAK const Efl_Class *ecore_exe_class_get(void) EINA_CONST;
/**
* @brief Controls the command that's executed. FIXME: May need a split/rename.
@ -91,7 +91,7 @@ EWAPI const Efl_Class *ecore_exe_class_get(void) EINA_CONST;
*
* @ingroup Ecore_Exe
*/
EOAPI void ecore_obj_exe_command_set(Eo *obj, const char *exe_cmd, Ecore_Exe_Flags flags);
ECORE_API ECORE_API_WEAK void ecore_obj_exe_command_set(Eo *obj, const char *exe_cmd, Ecore_Exe_Flags flags);
/**
* @brief Controls the command that's executed. FIXME: May need a split/rename.
@ -102,9 +102,9 @@ EOAPI void ecore_obj_exe_command_set(Eo *obj, const char *exe_cmd, Ecore_Exe_Fla
*
* @ingroup Ecore_Exe
*/
EOAPI void ecore_obj_exe_command_get(const Eo *obj, const char **exe_cmd, Ecore_Exe_Flags *flags);
ECORE_API ECORE_API_WEAK void ecore_obj_exe_command_get(const Eo *obj, const char **exe_cmd, Ecore_Exe_Flags *flags);
EWAPI extern const Efl_Event_Description _ECORE_EXE_EVENT_DATA_GET;
ECORE_API ECORE_API_WEAK extern const Efl_Event_Description _ECORE_EXE_EVENT_DATA_GET;
/** Data received event from the child process
* @return Ecore_Exe_Event_Data
@ -113,7 +113,7 @@ EWAPI extern const Efl_Event_Description _ECORE_EXE_EVENT_DATA_GET;
*/
#define ECORE_EXE_EVENT_DATA_GET (&(_ECORE_EXE_EVENT_DATA_GET))
EWAPI extern const Efl_Event_Description _ECORE_EXE_EVENT_DATA_ERROR;
ECORE_API ECORE_API_WEAK extern const Efl_Event_Description _ECORE_EXE_EVENT_DATA_ERROR;
/** Error received event from the child process
* @return Ecore_Exe_Event_Data

View File

@ -133,10 +133,10 @@ struct _Ecore_Exe_Data
typedef struct _Ecore_Exe_Data Ecore_Exe_Data;
EAPI extern int ECORE_EXE_EVENT_ADD;
EAPI extern int ECORE_EXE_EVENT_DEL;
EAPI extern int ECORE_EXE_EVENT_DATA;
EAPI extern int ECORE_EXE_EVENT_ERROR;
ECORE_API extern int ECORE_EXE_EVENT_ADD;
ECORE_API extern int ECORE_EXE_EVENT_DEL;
ECORE_API extern int ECORE_EXE_EVENT_DATA;
ECORE_API extern int ECORE_EXE_EVENT_ERROR;
Ecore_Exe *_ecore_exe_find(pid_t pid);
void *_ecore_exe_event_del_new(void);

View File

@ -810,7 +810,7 @@ _ecore_getopt_help_prepare(const Ecore_Getopt *parser)
return EINA_TRUE;
}
EAPI void
ECORE_API void
ecore_getopt_help(FILE *fp,
const Ecore_Getopt *parser)
{
@ -822,7 +822,7 @@ ecore_getopt_help(FILE *fp,
_ecore_getopt_help_options(fp, parser);
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_getopt_help_category(FILE *fp,
const Ecore_Getopt *parser,
const char *category)
@ -1977,7 +1977,7 @@ _ecore_getopt_parse_find_long_other(const Ecore_Getopt *parser,
return NULL;
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_getopt_parser_has_duplicates(const Ecore_Getopt *parser)
{
const Ecore_Getopt_Desc *desc = parser->descs;
@ -2028,7 +2028,7 @@ _ecore_getopt_find_help(const Ecore_Getopt *parser)
return NULL;
}
EAPI int
ECORE_API int
ecore_getopt_parse(const Ecore_Getopt *parser,
Ecore_Getopt_Value *values,
int argc,
@ -2092,7 +2092,7 @@ error:
return -1;
}
EAPI int
ECORE_API int
ecore_getopt_parse_positional(const Ecore_Getopt *parser,
Ecore_Getopt_Value *values,
int argc,
@ -2159,7 +2159,7 @@ error:
return -1;
}
EAPI Eina_List *
ECORE_API Eina_List *
ecore_getopt_list_free(Eina_List *list)
{
void *data;
@ -2169,7 +2169,7 @@ ecore_getopt_list_free(Eina_List *list)
return NULL;
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_getopt_callback_geometry_parse(const Ecore_Getopt *parser EINA_UNUSED,
const Ecore_Getopt_Desc *desc EINA_UNUSED,
const char *str,
@ -2187,7 +2187,7 @@ ecore_getopt_callback_geometry_parse(const Ecore_Getopt *parser EINA_UNUSED
return EINA_TRUE;
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_getopt_callback_size_parse(const Ecore_Getopt *parser EINA_UNUSED,
const Ecore_Getopt_Desc *desc EINA_UNUSED,
const char *str,

View File

@ -286,7 +286,7 @@ _ecore_glib_shutdown(void)
#endif
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_main_loop_glib_integrate(void)
{
#ifdef HAVE_GLIB
@ -310,7 +310,7 @@ ecore_main_loop_glib_integrate(void)
Eina_Bool _ecore_glib_always_integrate = 1;
EAPI void
ECORE_API void
ecore_main_loop_glib_always_integrate_disable(void)
{
_ecore_glib_always_integrate = 0;

View File

@ -14,14 +14,14 @@ EFL_CALLBACKS_ARRAY_DEFINE(ecore_idle_enterer_callbacks,
{ EFL_EVENT_DEL, _ecore_factorized_idle_event_del });
EAPI Ecore_Idle_Enterer *
ECORE_API Ecore_Idle_Enterer *
ecore_idle_enterer_add(Ecore_Task_Cb func,
const void *data)
{
return _ecore_factorized_idle_add(ecore_idle_enterer_callbacks(), func, data);
}
EAPI Ecore_Idle_Enterer *
ECORE_API Ecore_Idle_Enterer *
ecore_idle_enterer_before_add(Ecore_Task_Cb func,
const void *data)
{
@ -36,7 +36,7 @@ ecore_idle_enterer_before_add(Ecore_Task_Cb func,
return ie;
}
EAPI void *
ECORE_API void *
ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer)
{
return _ecore_factorized_idle_del(idle_enterer);

View File

@ -13,14 +13,14 @@ EFL_CALLBACKS_ARRAY_DEFINE(ecore_idle_exiter_callbacks,
{ EFL_LOOP_EVENT_IDLE_EXIT, _ecore_factorized_idle_process },
{ EFL_EVENT_DEL, _ecore_factorized_idle_event_del });
EAPI Ecore_Idle_Exiter *
ECORE_API Ecore_Idle_Exiter *
ecore_idle_exiter_add(Ecore_Task_Cb func,
const void *data)
{
return _ecore_factorized_idle_add(ecore_idle_exiter_callbacks(), func, data);
}
EAPI void *
ECORE_API void *
ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter)
{
return _ecore_factorized_idle_del(idle_exiter);

View File

@ -105,14 +105,14 @@ EFL_CALLBACKS_ARRAY_DEFINE(ecore_idler_callbacks,
{ EFL_LOOP_EVENT_IDLE, _ecore_factorized_idle_process },
{ EFL_EVENT_DEL, _ecore_factorized_idle_event_del });
EAPI Ecore_Idler *
ECORE_API Ecore_Idler *
ecore_idler_add(Ecore_Task_Cb func,
const void *data)
{
return _ecore_factorized_idle_add(ecore_idler_callbacks(), func, data);
}
EAPI void *
ECORE_API void *
ecore_idler_del(Ecore_Idler *idler)
{
return _ecore_factorized_idle_del(idler);

View File

@ -2,34 +2,10 @@
#ifndef _ECORE_INTERNAL_H
#define _ECORE_INTERNAL_H
#ifdef EAPI
# undef EAPI
#endif
#include <ecore_api.h>
#ifdef _WIN32
# ifdef EFL_BUILD
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif
# else
# define EAPI __declspec(dllimport)
# endif
#else
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else
# define EAPI
# endif
# else
# define EAPI
# endif
#endif
EAPI void ecore_loop_arguments_send(int argc, const char **argv);
EAPI Eina_Bool efl_loop_message_process(Eo *obj);
ECORE_API void ecore_loop_arguments_send(int argc, const char **argv);
ECORE_API Eina_Bool efl_loop_message_process(Eo *obj);
static inline Eina_Value
efl_model_list_value_get(Eina_List *childrens,
@ -162,7 +138,4 @@ _efl_future_all_repack(Eo *o EINA_UNUSED, void *data EINA_UNUSED, const Eina_Val
return eina_value_error_init(EFL_MODEL_ERROR_UNKNOWN);
}
#undef EAPI
#define EAPI
#endif

View File

@ -39,7 +39,7 @@ _ecore_job_shutdown(void)
_ecore_job_handler = NULL;
}
EAPI Ecore_Job *
ECORE_API Ecore_Job *
ecore_job_add(Ecore_Cb func,
const void *data)
{
@ -69,7 +69,7 @@ ecore_job_add(Ecore_Cb func,
return job;
}
EAPI void *
ECORE_API void *
ecore_job_del(Ecore_Job *job)
{
void *data;

View File

@ -209,7 +209,7 @@ static gboolean ecore_fds_ready;
static double _ecore_main_loop_wakeup_time = 0.0;
EAPI double _ecore_main_loop_wakeup_time_get(void)
ECORE_API double _ecore_main_loop_wakeup_time_get(void)
{
return _ecore_main_loop_wakeup_time;
}
@ -1280,21 +1280,21 @@ _ecore_main_loop_quit(Eo *obj, Efl_Loop_Data *pd)
#endif
}
EAPI void
ECORE_API void
ecore_main_loop_iterate(void)
{
EINA_MAIN_LOOP_CHECK_RETURN;
efl_loop_iterate(ML_OBJ);
}
EAPI int
ECORE_API int
ecore_main_loop_iterate_may_block(int may_block)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(0);
return efl_loop_iterate_may_block(ML_OBJ, may_block);
}
EAPI void
ECORE_API void
ecore_main_loop_begin(void)
{
DBG("ecore_main_loop_begin");
@ -1304,7 +1304,7 @@ ecore_main_loop_begin(void)
eina_evlog("-mainloop", NULL, 0.0, NULL);
}
EAPI void
ECORE_API void
ecore_main_loop_quit(void)
{
Eina_Value v = EINA_VALUE_EMPTY;
@ -1315,27 +1315,27 @@ ecore_main_loop_quit(void)
efl_loop_quit(ML_OBJ, v);
}
EAPI int
ECORE_API int
ecore_main_loop_nested_get(void)
{
return in_main_loop;
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_main_loop_animator_ticked_get(void)
{
DBG("ecore_main_loop_animator_ticked_get");
return _ecore_animator_run_get();
}
EAPI void
ECORE_API void
ecore_main_loop_select_func_set(Ecore_Select_Function func)
{
EINA_MAIN_LOOP_CHECK_RETURN;
main_loop_select = func;
}
EAPI Ecore_Select_Function
ECORE_API Ecore_Select_Function
ecore_main_loop_select_func_get(void)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
@ -1432,7 +1432,7 @@ _ecore_main_fd_handler_del(Eo *obj EINA_UNUSED,
return r;
}
EAPI Ecore_Fd_Handler *
ECORE_API Ecore_Fd_Handler *
ecore_main_fd_handler_add(int fd,
Ecore_Fd_Handler_Flags flags,
Ecore_Fd_Cb func,
@ -1449,7 +1449,7 @@ ecore_main_fd_handler_add(int fd,
return fdh;
}
EAPI Ecore_Fd_Handler *
ECORE_API Ecore_Fd_Handler *
ecore_main_fd_handler_file_add(int fd,
Ecore_Fd_Handler_Flags flags,
Ecore_Fd_Cb func,
@ -1463,7 +1463,7 @@ ecore_main_fd_handler_file_add(int fd,
buf_func, buf_data, EINA_TRUE);
}
EAPI void *
ECORE_API void *
ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler)
{
if (!fd_handler) return NULL;
@ -1479,7 +1479,7 @@ ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler)
}
#ifdef _WIN32
EAPI Ecore_Win32_Handler *
ECORE_API Ecore_Win32_Handler *
_ecore_main_win32_handler_add(Eo *obj,
Efl_Loop_Data *pd,
Eo *handler,
@ -1525,7 +1525,7 @@ _ecore_main_win32_handler_del(Eo *obj EINA_UNUSED,
return win32_handler->data;
}
EAPI Ecore_Win32_Handler *
ECORE_API Ecore_Win32_Handler *
ecore_main_win32_handler_add(void *h,
Ecore_Win32_Handle_Cb func,
const void *data)
@ -1534,7 +1534,7 @@ ecore_main_win32_handler_add(void *h,
return _ecore_main_win32_handler_add(ML_OBJ, ML_DAT, NULL, h, func, data);
}
EAPI void *
ECORE_API void *
ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler)
{
void *ret = NULL;
@ -1551,7 +1551,7 @@ ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler)
return ret;
}
#else
EAPI Ecore_Win32_Handler *
ECORE_API Ecore_Win32_Handler *
_ecore_main_win32_handler_add(Eo *obj EINA_UNUSED,
Efl_Loop_Data *pd EINA_UNUSED,
Eo *handler EINA_UNUSED,
@ -1570,7 +1570,7 @@ _ecore_main_win32_handler_del(Eo *obj EINA_UNUSED,
return NULL;
}
EAPI Ecore_Win32_Handler *
ECORE_API Ecore_Win32_Handler *
ecore_main_win32_handler_add(void *h EINA_UNUSED,
Ecore_Win32_Handle_Cb func EINA_UNUSED,
const void *data EINA_UNUSED)
@ -1578,14 +1578,14 @@ ecore_main_win32_handler_add(void *h EINA_UNUSED,
return NULL;
}
EAPI void *
ECORE_API void *
ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler EINA_UNUSED)
{
return NULL;
}
#endif
EAPI void
ECORE_API void
ecore_main_fd_handler_prepare_callback_set(Ecore_Fd_Handler *fd_handler,
Ecore_Fd_Prep_Cb func,
const void *data)
@ -1610,7 +1610,7 @@ ecore_main_fd_handler_prepare_callback_set(Ecore_Fd_Handler *fd_handler,
(pd->fd_handlers_with_prep, fd_handler);
}
EAPI int
ECORE_API int
ecore_main_fd_handler_fd_get(Ecore_Fd_Handler *fd_handler)
{
if (!fd_handler) return -1;
@ -1626,7 +1626,7 @@ ecore_main_fd_handler_fd_get(Ecore_Fd_Handler *fd_handler)
return fd_handler->fd;
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_main_fd_handler_active_get(Ecore_Fd_Handler *fd_handler,
Ecore_Fd_Handler_Flags flags)
{
@ -1646,7 +1646,7 @@ ecore_main_fd_handler_active_get(Ecore_Fd_Handler *fd_handler,
return ret;
}
EAPI void
ECORE_API void
ecore_main_fd_handler_active_set(Ecore_Fd_Handler *fd_handler,
Ecore_Fd_Handler_Flags flags)
{

View File

@ -89,14 +89,14 @@ GENERIC_ALLOC_SIZE_DECLARE(Ecore_Pipe);
static Eina_Bool _ecore_pipe_read(void *data,
Ecore_Fd_Handler *fd_handler);
EAPI Ecore_Pipe *
ECORE_API Ecore_Pipe *
ecore_pipe_add(Ecore_Pipe_Cb handler,
const void *data)
{
return _ecore_pipe_add(handler, data);
}
EAPI void *
ECORE_API void *
ecore_pipe_del(Ecore_Pipe *p)
{
if (!p) return NULL;
@ -104,7 +104,7 @@ ecore_pipe_del(Ecore_Pipe *p)
return _ecore_pipe_del(p);
}
EAPI void
ECORE_API void
ecore_pipe_read_close(Ecore_Pipe *p)
{
EINA_MAIN_LOOP_CHECK_RETURN;
@ -125,7 +125,7 @@ ecore_pipe_read_close(Ecore_Pipe *p)
}
}
EAPI int
ECORE_API int
ecore_pipe_read_fd(Ecore_Pipe *p)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(PIPE_FD_INVALID);
@ -133,7 +133,7 @@ ecore_pipe_read_fd(Ecore_Pipe *p)
return p->fd_read;
}
EAPI void
ECORE_API void
ecore_pipe_freeze(Ecore_Pipe *p)
{
EINA_MAIN_LOOP_CHECK_RETURN;
@ -149,7 +149,7 @@ ecore_pipe_freeze(Ecore_Pipe *p)
}
}
EAPI void
ECORE_API void
ecore_pipe_thaw(Ecore_Pipe *p)
{
EINA_MAIN_LOOP_CHECK_RETURN;
@ -164,7 +164,7 @@ ecore_pipe_thaw(Ecore_Pipe *p)
NULL, NULL);
}
EAPI int
ECORE_API int
ecore_pipe_wait(Ecore_Pipe *p,
int message_count,
double wait)
@ -172,7 +172,7 @@ ecore_pipe_wait(Ecore_Pipe *p,
return _ecore_pipe_wait(p, message_count, wait);
}
EAPI void
ECORE_API void
ecore_pipe_write_close(Ecore_Pipe *p)
{
if (!ECORE_MAGIC_CHECK(p, ECORE_MAGIC_PIPE))
@ -187,7 +187,7 @@ ecore_pipe_write_close(Ecore_Pipe *p)
}
}
EAPI int
ECORE_API int
ecore_pipe_write_fd(Ecore_Pipe *p)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(PIPE_FD_INVALID);
@ -195,7 +195,7 @@ ecore_pipe_write_fd(Ecore_Pipe *p)
return p->fd_write;
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_pipe_write(Ecore_Pipe *p,
const void *buffer,
unsigned int nbytes)
@ -289,7 +289,7 @@ out:
return ok;
}
EAPI Ecore_Pipe *
ECORE_API Ecore_Pipe *
ecore_pipe_full_add(Ecore_Pipe_Cb handler,
const void *data,
int fd_read,

View File

@ -211,7 +211,7 @@ _ecore_poller_cb_timer(void *data EINA_UNUSED)
return ECORE_CALLBACK_RENEW;
}
EAPI void
ECORE_API void
ecore_poller_poll_interval_set(Ecore_Poller_Type type EINA_UNUSED,
double poll_time)
{
@ -227,14 +227,14 @@ ecore_poller_poll_interval_set(Ecore_Poller_Type type EINA_UNUSED,
_ecore_poller_next_tick_eval();
}
EAPI double
ECORE_API double
ecore_poller_poll_interval_get(Ecore_Poller_Type type EINA_UNUSED)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(0.0);
return poll_interval;
}
EAPI Ecore_Poller *
ECORE_API Ecore_Poller *
ecore_poller_add(Ecore_Poller_Type type EINA_UNUSED,
int interval,
Ecore_Task_Cb func,
@ -278,7 +278,7 @@ ecore_poller_add(Ecore_Poller_Type type EINA_UNUSED,
return poller;
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_poller_poller_interval_set(Ecore_Poller *poller, int interval)
{
int ibit;
@ -310,7 +310,7 @@ ecore_poller_poller_interval_set(Ecore_Poller *poller, int interval)
return EINA_TRUE;
}
EAPI int
ECORE_API int
ecore_poller_poller_interval_get(const Ecore_Poller *poller)
{
int ibit, interval = 1;
@ -328,7 +328,7 @@ ecore_poller_poller_interval_get(const Ecore_Poller *poller)
return interval;
}
EAPI void *
ECORE_API void *
ecore_poller_del(Ecore_Poller *poller)
{
void *data;

View File

@ -2,6 +2,7 @@
#define _ECORE_PRIVATE_H
#include <assert.h>
#include <ecore_api.h>
#include "ecore_internal.h"
@ -9,32 +10,6 @@
#include "ecore_event_message.eo.h"
#include "ecore_event_message_handler.eo.h"
#ifdef EAPI
# undef EAPI
#endif
#ifdef _WIN32
# ifdef EFL_BUILD
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif
# else
# define EAPI __declspec(dllimport)
# endif
#else
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else
# define EAPI
# endif
# else
# define EAPI
# endif
#endif
extern int _ecore_log_dom;
#ifdef _ECORE_DEFAULT_LOG_DOM
# undef _ECORE_DEFAULT_LOG_DOM
@ -222,7 +197,7 @@ typedef struct _Ecore_Evas_Object_Animator_Interface
void *(*del)(Ecore_Animator *animator);
} Ecore_Evas_Object_Animator_Interface;
EAPI void ecore_evas_object_animator_init(Ecore_Evas_Object_Animator_Interface *iface);
ECORE_API void ecore_evas_object_animator_init(Ecore_Evas_Object_Animator_Interface *iface);
#define EVAS_FRAME_QUEUING 1 /* for test */
@ -247,6 +222,12 @@ EAPI void ecore_evas_object_animator_init(Ecore_Evas_Object_Animator_Interface *
typedef unsigned int Ecore_Magic;
#define ECORE_MAGIC Ecore_Magic __magic
ECORE_API void
_ecore_magic_fail(const void *d,
Ecore_Magic m,
Ecore_Magic req_m,
const char *fname EINA_UNUSED);
#define ECORE_MAGIC_SET(d, m) (d)->__magic = (m)
#define ECORE_MAGIC_CHECK(d, m) ((d) && ((d)->__magic == (m)))
#define ECORE_MAGIC_FAIL(d, m, fn) _ecore_magic_fail((d), (d) ? (d)->__magic : 0, (m), (fn));
@ -261,7 +242,7 @@ typedef unsigned int Ecore_Magic;
#undef IF_FN_DEL
#define IF_FN_DEL(_fn, ptr) if (ptr) { _fn(ptr); ptr = NULL; }
EAPI void
ECORE_API void
ecore_print_warning(const char *function,
const char *sparam);
@ -282,7 +263,7 @@ ecore_print_warning(const char *function,
return; \
}
EAPI void _ecore_magic_fail(const void *d,
ECORE_API void _ecore_magic_fail(const void *d,
Ecore_Magic m,
Ecore_Magic req_m,
const char *fname);
@ -557,7 +538,4 @@ extern Efl_Version _app_efl_version;
#define EFL_LOOP_DATA efl_data_scope_get(efl_main_loop_get(), EFL_LOOP_CLASS)
#undef EAPI
#define EAPI
#endif

View File

@ -654,7 +654,7 @@ _ecore_thread_shutdown(void)
CDD(_ecore_thread_global_hash_cond);
}
EAPI Ecore_Thread *
ECORE_API Ecore_Thread *
ecore_thread_run(Ecore_Thread_Cb func_blocking,
Ecore_Thread_Cb func_end,
Ecore_Thread_Cb func_cancel,
@ -737,7 +737,7 @@ retry:
return (Ecore_Thread *)work;
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_thread_cancel(Ecore_Thread *thread)
{
Ecore_Pthread_Worker *volatile work = (Ecore_Pthread_Worker *)thread;
@ -846,7 +846,7 @@ _ecore_thread_wait_end(void *data EINA_UNUSED, Ecore_Thread *thread)
_ecore_thread_wait_reset(waiter, worker);
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_thread_wait(Ecore_Thread *thread, double wait)
{
Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
@ -888,7 +888,7 @@ ecore_thread_wait(Ecore_Thread *thread, double wait)
}
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_thread_check(Ecore_Thread *thread)
{
Ecore_Pthread_Worker *volatile worker = (Ecore_Pthread_Worker *)thread;
@ -907,7 +907,7 @@ ecore_thread_check(Ecore_Thread *thread)
return cancel;
}
EAPI Ecore_Thread *
ECORE_API Ecore_Thread *
ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
Ecore_Thread_Notify_Cb func_notify,
Ecore_Thread_Cb func_end,
@ -1033,7 +1033,7 @@ on_error:
return (Ecore_Thread *)worker;
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_thread_feedback(Ecore_Thread *thread,
const void *data)
{
@ -1086,7 +1086,7 @@ ecore_thread_feedback(Ecore_Thread *thread,
}
#if 0
EAPI Ecore_Thread *
ECORE_API Ecore_Thread *
ecore_thread_message_run(Ecore_Thread_Cb func_main,
Ecore_Thread_Notify_Cb func_notify,
Ecore_Thread_Cb func_end,
@ -1145,7 +1145,7 @@ ecore_thread_message_run(Ecore_Thread_Cb func_main,
#endif
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_thread_reschedule(Ecore_Thread *thread)
{
Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
@ -1158,14 +1158,14 @@ ecore_thread_reschedule(Ecore_Thread *thread)
return EINA_TRUE;
}
EAPI int
ECORE_API int
ecore_thread_active_get(void)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(0);
return _ecore_thread_count;
}
EAPI int
ECORE_API int
ecore_thread_pending_get(void)
{
int ret;
@ -1177,7 +1177,7 @@ ecore_thread_pending_get(void)
return ret;
}
EAPI int
ECORE_API int
ecore_thread_pending_feedback_get(void)
{
int ret;
@ -1189,7 +1189,7 @@ ecore_thread_pending_feedback_get(void)
return ret;
}
EAPI int
ECORE_API int
ecore_thread_pending_total_get(void)
{
int ret;
@ -1201,14 +1201,14 @@ ecore_thread_pending_total_get(void)
return ret;
}
EAPI int
ECORE_API int
ecore_thread_max_get(void)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(0);
return _ecore_thread_count_max;
}
EAPI void
ECORE_API void
ecore_thread_max_set(int num)
{
EINA_MAIN_LOOP_CHECK_RETURN;
@ -1219,14 +1219,14 @@ ecore_thread_max_set(int num)
_ecore_thread_count_max = num;
}
EAPI void
ECORE_API void
ecore_thread_max_reset(void)
{
EINA_MAIN_LOOP_CHECK_RETURN;
_ecore_thread_count_max = eina_cpu_count() * 4;
}
EAPI int
ECORE_API int
ecore_thread_available_get(void)
{
int ret;
@ -1237,7 +1237,7 @@ ecore_thread_available_get(void)
return ret;
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_thread_local_data_add(Ecore_Thread *thread,
const char *key,
void *value,
@ -1275,7 +1275,7 @@ ecore_thread_local_data_add(Ecore_Thread *thread,
return ret;
}
EAPI void *
ECORE_API void *
ecore_thread_local_data_set(Ecore_Thread *thread,
const char *key,
void *value,
@ -1316,7 +1316,7 @@ ecore_thread_local_data_set(Ecore_Thread *thread,
return NULL;
}
EAPI void *
ECORE_API void *
ecore_thread_local_data_find(Ecore_Thread *thread,
const char *key)
{
@ -1337,7 +1337,7 @@ ecore_thread_local_data_find(Ecore_Thread *thread,
return NULL;
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_thread_local_data_del(Ecore_Thread *thread,
const char *key)
{
@ -1356,7 +1356,7 @@ ecore_thread_local_data_del(Ecore_Thread *thread,
return r;
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_thread_global_data_add(const char *key,
void *value,
Eina_Free_Cb cb,
@ -1395,7 +1395,7 @@ ecore_thread_global_data_add(const char *key,
return ret;
}
EAPI void *
ECORE_API void *
ecore_thread_global_data_set(const char *key,
void *value,
Eina_Free_Cb cb)
@ -1434,7 +1434,7 @@ ecore_thread_global_data_set(const char *key,
return NULL;
}
EAPI void *
ECORE_API void *
ecore_thread_global_data_find(const char *key)
{
Ecore_Thread_Data *ret;
@ -1452,7 +1452,7 @@ ecore_thread_global_data_find(const char *key)
return NULL;
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_thread_global_data_del(const char *key)
{
Eina_Bool ret;
@ -1469,7 +1469,7 @@ ecore_thread_global_data_del(const char *key)
return ret;
}
EAPI void *
ECORE_API void *
ecore_thread_global_data_wait(const char *key,
double seconds)
{

View File

@ -10,7 +10,7 @@
static int throttle_val = 0;
EAPI void
ECORE_API void
ecore_throttle_adjust(double amount)
{
EINA_MAIN_LOOP_CHECK_RETURN;
@ -19,7 +19,7 @@ ecore_throttle_adjust(double amount)
if (throttle_val < 0) throttle_val = 0;
}
EAPI double
ECORE_API double
ecore_throttle_get(void)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(0.0);

View File

@ -29,7 +29,7 @@ static Eina_Bool _ecore_time_got_clock_id = EINA_FALSE;
static double _ecore_time_clock_conversion = 1e-9;
#endif
EAPI double
ECORE_API double
ecore_time_get(void)
{
#ifdef _WIN32
@ -57,7 +57,7 @@ ecore_time_get(void)
#endif
}
EAPI double
ECORE_API double
ecore_time_unix_get(void)
{
#ifdef HAVE_GETTIMEOFDAY
@ -70,13 +70,13 @@ ecore_time_unix_get(void)
#endif
}
EAPI double
ECORE_API double
ecore_loop_time_get(void)
{
return efl_loop_time_get(ML_OBJ);
}
EAPI void
ECORE_API void
ecore_loop_time_set(double t)
{
efl_loop_time_set(ML_OBJ, t);

View File

@ -65,14 +65,14 @@ static void _efl_loop_timer_set(Efl_Loop_Timer_Data *timer, double at, double in
static double precision = 10.0 / 1000000.0;
EAPI double
ECORE_API double
ecore_timer_precision_get(void)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(0.0);
return precision;
}
EAPI void
ECORE_API void
ecore_timer_precision_set(double value)
{
EINA_MAIN_LOOP_CHECK_RETURN;
@ -185,7 +185,7 @@ EFL_CALLBACKS_ARRAY_DEFINE(legacy_timer,
{ EFL_LOOP_TIMER_EVENT_TIMER_TICK, _ecore_timer_legacy_tick },
{ EFL_EVENT_DEL, _ecore_timer_legacy_del });
EAPI Ecore_Timer *
ECORE_API Ecore_Timer *
ecore_timer_add(double in, Ecore_Task_Cb func, const void *data)
{
Ecore_Timer_Legacy *legacy;
@ -209,7 +209,7 @@ ecore_timer_add(double in, Ecore_Task_Cb func, const void *data)
return timer;
}
EAPI Ecore_Timer *
ECORE_API Ecore_Timer *
ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data)
{
Ecore_Timer_Legacy *legacy;
@ -234,7 +234,7 @@ ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data)
return timer;
}
EAPI void *
ECORE_API void *
ecore_timer_del(Ecore_Timer *timer)
{
void *data;
@ -330,7 +330,7 @@ _efl_loop_timer_time_pending_get(const Eo *obj EINA_UNUSED, Efl_Loop_Timer_Data
return ret;
}
EAPI void
ECORE_API void
ecore_timer_freeze(Ecore_Timer *timer)
{
ECORE_TIMER_CHECK(timer);
@ -360,7 +360,7 @@ _efl_loop_timer_efl_object_event_freeze(Eo *obj, Efl_Loop_Timer_Data *timer)
_efl_loop_timer_util_instanciate(timer->loop_data, timer);
}
EAPI Eina_Bool
ECORE_API Eina_Bool
ecore_timer_freeze_get(Ecore_Timer *timer)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(EINA_FALSE);
@ -373,7 +373,7 @@ _efl_loop_timer_efl_object_event_freeze_count_get(const Eo *obj EINA_UNUSED, Efl
return timer->frozen;
}
EAPI void
ECORE_API void
ecore_timer_thaw(Ecore_Timer *timer)
{
ECORE_TIMER_CHECK(timer);
@ -399,7 +399,7 @@ _efl_loop_timer_efl_object_event_thaw(Eo *obj, Efl_Loop_Timer_Data *timer)
_efl_loop_timer_set(timer, timer->pending + now, timer->in);
}
EAPI char *
ECORE_API char *
ecore_timer_dump(void)
{
return NULL;

View File

@ -33,7 +33,7 @@ GENERIC_ALLOC_SIZE_DECLARE(Efl_Loop_Promise_Simple_Data);
Eo *_mainloop_singleton = NULL;
Efl_Loop_Data *_mainloop_singleton_data = NULL;
EAPI Eo *
ECORE_API Eo *
efl_main_loop_get(void)
{
return efl_app_main_get();
@ -97,7 +97,7 @@ _efl_loop_time_get(const Eo *obj EINA_UNUSED, Efl_Loop_Data *pd)
return pd->loop_time;
}
EAPI void
ECORE_API void
efl_exit(int exit_code)
{
Eina_Value v = EINA_VALUE_EMPTY;
@ -107,7 +107,7 @@ efl_exit(int exit_code)
efl_loop_quit(efl_main_loop_get(), v);
}
EAPI int
ECORE_API int
efl_loop_exit_code_process(Eina_Value *value)
{
Eina_Value def = EINA_VALUE_EMPTY;
@ -363,7 +363,7 @@ _efl_loop_arguments_cleanup(Eo *o EINA_UNUSED, void *data, const Eina_Future *de
// It doesn't make sense to send those argument to any other mainloop
// As it also doesn't make sense to allow anyone to override this, so
// should be internal for sure, not even protected.
EAPI void
ECORE_API void
ecore_loop_arguments_send(int argc, const char **argv)
{
Eina_Array *arga, *cml;
@ -637,9 +637,9 @@ _efl_loop_message_process(Eo *obj, Efl_Loop_Data *pd)
return EINA_TRUE;
}
EOAPI EFL_FUNC_BODY(efl_loop_message_process, Eina_Bool, 0);
ECORE_API ECORE_API_WEAK EFL_FUNC_BODY(efl_loop_message_process, Eina_Bool, 0);
EWAPI void
ECORE_API ECORE_API_WEAK void
efl_build_version_set(int vmaj, int vmin, int vmic, int revision,
const char *flavor, const char *build_id)
{
@ -671,7 +671,7 @@ EFL_SCHEDULER_ARRAY_DEFINE(loop_scheduler,
EFL_LOOP_EVENT_IDLE_ENTER,
EFL_LOOP_EVENT_IDLE);
EAPI Eina_Future_Scheduler *
ECORE_API Eina_Future_Scheduler *
efl_loop_future_scheduler_get(const Eo *obj)
{
Efl_Loop *loop;

View File

@ -1,35 +1,35 @@
EAPI void
ECORE_API void
ecore_timer_interval_set(Efl_Loop_Timer *obj, double in)
{
efl_loop_timer_interval_set(obj, in);
}
EAPI double
ECORE_API double
ecore_timer_interval_get(const Efl_Loop_Timer *obj)
{
return efl_loop_timer_interval_get(obj);
}
EAPI double
ECORE_API double
ecore_timer_pending_get(const Efl_Loop_Timer *obj)
{
return efl_loop_timer_time_pending_get(obj);
}
EAPI void
ECORE_API void
ecore_timer_reset(Efl_Loop_Timer *obj)
{
efl_loop_timer_reset(obj);
}
EAPI void
ECORE_API void
ecore_timer_loop_reset(Efl_Loop_Timer *obj)
{
efl_loop_timer_loop_reset(obj);
}
EAPI void
ECORE_API void
ecore_timer_delay(Efl_Loop_Timer *obj, double add)
{
efl_loop_timer_delay(obj, add);

View File

@ -24,7 +24,7 @@ typedef Eo Efl_Loop_Timer;
*
* @ingroup Ecore_Timer_Group
*/
EAPI void ecore_timer_interval_set(Efl_Loop_Timer *obj, double in);
ECORE_API void ecore_timer_interval_set(Efl_Loop_Timer *obj, double in);
/**
* @brief Interval the timer ticks on.
@ -35,7 +35,7 @@ EAPI void ecore_timer_interval_set(Efl_Loop_Timer *obj, double in);
*
* @ingroup Ecore_Timer_Group
*/
EAPI double ecore_timer_interval_get(const Efl_Loop_Timer *obj);
ECORE_API double ecore_timer_interval_get(const Efl_Loop_Timer *obj);
/**
* @brief Pending time regarding a timer.
@ -46,7 +46,7 @@ EAPI double ecore_timer_interval_get(const Efl_Loop_Timer *obj);
*
* @ingroup Ecore_Timer_Group
*/
EAPI double ecore_timer_pending_get(const Efl_Loop_Timer *obj);
ECORE_API double ecore_timer_pending_get(const Efl_Loop_Timer *obj);
/**
* @brief Resets a timer to its full interval. This effectively makes the timer
@ -61,7 +61,7 @@ EAPI double ecore_timer_pending_get(const Efl_Loop_Timer *obj);
*
* @ingroup Ecore_Timer_Group
*/
EAPI void ecore_timer_reset(Efl_Loop_Timer *obj);
ECORE_API void ecore_timer_reset(Efl_Loop_Timer *obj);
/** This effectively resets a timer but based on the time when this iteration
* of the main loop started.
@ -70,7 +70,7 @@ EAPI void ecore_timer_reset(Efl_Loop_Timer *obj);
*
* @ingroup Ecore_Timer_Group
*/
EAPI void ecore_timer_loop_reset(Efl_Loop_Timer *obj);
ECORE_API void ecore_timer_loop_reset(Efl_Loop_Timer *obj);
/**
* @brief Adds a delay to the next occurrence of a timer. This doesn't affect
@ -81,6 +81,6 @@ EAPI void ecore_timer_loop_reset(Efl_Loop_Timer *obj);
*
* @ingroup Ecore_Timer_Group
*/
EAPI void ecore_timer_delay(Efl_Loop_Timer *obj, double add);
ECORE_API void ecore_timer_delay(Efl_Loop_Timer *obj, double add);
#endif

View File

@ -23,6 +23,7 @@ foreach eo_file : pub_legacy_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', 'ECORE_API',
'-gchd', '@INPUT@'])
endforeach
@ -83,6 +84,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', 'ECORE_API',
'-gchd', '@INPUT@'])
endforeach
@ -99,6 +101,7 @@ ecore_header_src = [
'efl_general.h',
'Ecore_Getopt.h',
'ecore_exe_eo.h',
'ecore_api.h',
'ecore_exe_eo.legacy.h',
'efl_loop_timer_eo.legacy.h',
]
@ -202,7 +205,7 @@ ecore_lib = library('ecore',
dependencies: ecore_pub_deps + [ecore_deps, ecore_ext_deps],
include_directories : config_dir + [include_directories(join_paths('..','..'))],
install: true,
c_args : package_c_args,
c_args : [package_c_args, '-DECORE_BUILD'],
version : meson.project_version()
)

View File

@ -25,4 +25,7 @@ void ecore_test_ecore_args(TCase *tc);
void ecore_test_ecore_pipe(TCase *tc);
void ecore_test_ecore_evas_selection(TCase *tc);
#define ECORETEST_API
#define ECORETEST_API_WEAK
#endif /* _ECORE_SUITE_H */

View File

@ -15,6 +15,9 @@ typedef struct {
} Efl_App_Test_CML_Data;
#define ECORETEST_API
#define ECORETEST_API_WEAK
#include "efl_app_test_cml.eo.h"
#include "efl_app_test_cml.eo.c"

View File

@ -39,6 +39,7 @@ foreach eo_file : test_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', 'ECORETEST_API',
'-gchd', '@INPUT@'])
endforeach
@ -95,6 +96,7 @@ foreach eo_file : priv_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', 'ECORETEST_API',
'-gchd', '@INPUT@'])
endforeach