efl/src/lib/ecore
Felipe Magno de Almeida 74204bccd7 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
2021-05-23 20:47:23 +01:00
..
Ecore.h ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
Ecore_Common.h ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
Ecore_Eo.h ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
Ecore_Getopt.h ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
Ecore_Legacy.h ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
Efl_Core.h ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_alloc.c
ecore_anim.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_api.h ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_app.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_event_message.c
ecore_event_message.eo docs: nicer formatting of the NULL keyword, everywhere 2019-09-10 16:05:44 +02:00
ecore_event_message_handler.c ecore: also error when trying to add an event handler for a type 0 event 2019-07-10 13:57:38 -04:00
ecore_event_message_handler.eo eolian: enable checking of beta/stable contexts in all classes 2019-03-11 13:42:29 +01:00
ecore_events.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_exe.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_exe_eo.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_exe_eo.h ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_exe_eo.legacy.h ecore_exe: remove all legacy usage from eo files 2019-03-06 13:02:49 -08:00
ecore_exe_posix.c ecore exe - fig signal block to unblock again - some sys dont on exec 2020-08-28 13:50:49 +01:00
ecore_exe_private.h ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_exe_win32.c bin/efl and ecore: include evil_private.h when appropriate 2019-05-17 11:53:35 +01:00
ecore_getopt.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_glib.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_idle_enterer.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_idle_exiter.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_idler.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_internal.h ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_job.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_main.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_main_common.h
ecore_main_timechanges.c ecore_main_timechanges: fix include 2020-05-26 14:22:30 +02:00
ecore_pipe.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_poller.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_private.h ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_signal.c ecore/signal: increase maximum signal throughput 2019-09-19 14:37:16 -07:00
ecore_thread.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_throttle.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_time.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
ecore_timer.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
efl_accelerate_interpolator.c Efl.Interpolator*: More sensible API names and docs 2019-11-06 15:50:11 +01:00
efl_accelerate_interpolator.eo Remove @beta from Efl.Interpolator classes 2019-12-19 16:45:13 -08:00
efl_app.c efl_loop / efl_app: make efl_app / efl_loop abstract 2019-02-21 19:13:39 +01:00
efl_app.eo efl: replace usage of ptr() in all stable APIs 2019-09-10 14:29:06 +02:00
efl_appthread.c efl/io: return EINVAL if null slice is passed for writing 2019-10-18 13:30:03 -04:00
efl_appthread.eo docs: Update Efl.Threadio and Efl.Appthread 2019-09-18 13:43:30 +02:00
efl_boolean_model.c efl: make sure all index for Efl_Model are unsigned int. 2019-12-18 10:33:09 -08:00
efl_boolean_model.eo eo files: Avoid container<ptr(value_type)> usage. 2019-11-29 17:22:07 -03:00
efl_bounce_interpolator.c Efl.Interpolator*: More sensible API names and docs 2019-11-06 15:50:11 +01:00
efl_bounce_interpolator.eo Remove @beta from Efl.Interpolator classes 2019-12-19 16:45:13 -08:00
efl_composite_model.c ecore: remove the composited children from the source of an Efl.CompositeModel. 2019-11-13 21:16:14 +01:00
efl_composite_model.eo eolian: fix eolian errors with EOLIAN_ENFORCE_SINCE=1 2019-10-14 16:55:52 +09:00
efl_container_model.c Efl_Ui: Move elementary and change namespace Ui for ui related models 2019-09-04 11:07:37 -04:00
efl_container_model.eo efl: change all occurences of @owned to @move 2019-09-06 17:01:05 +02:00
efl_core_command_line.c build: unbreak destructors 2019-09-10 15:11:24 -03:00
efl_core_command_line.eo eo: add missing move tag 2019-11-26 15:51:08 +01:00
efl_core_env.c efl core env - remove unused envrion declaration 2019-03-01 10:08:17 +00:00
efl_core_env.eo eo: add move tag to iterator 2019-11-26 15:51:05 +01:00
efl_core_proc_env.c evil: Define environ macro when using VS based on UCRT definition 2020-12-09 16:53:30 -03:00
efl_core_proc_env.eo eolian: rename @class on methods to @static 2019-08-16 16:27:00 +02:00
efl_cubic_bezier_interpolator.c Efl.Interpolator*: More sensible API names and docs 2019-11-06 15:50:11 +01:00
efl_cubic_bezier_interpolator.eo remove unused imports in eo/eot files 2020-04-19 01:44:50 +02:00
efl_decelerate_interpolator.c Efl.Interpolator*: More sensible API names and docs 2019-11-06 15:50:11 +01:00
efl_decelerate_interpolator.eo Remove @beta from Efl.Interpolator classes 2019-12-19 16:45:13 -08:00
efl_divisor_interpolator.c Efl.Interpolator*: More sensible API names and docs 2019-11-06 15:50:11 +01:00
efl_divisor_interpolator.eo Efl.Interpolator*: More sensible API names and docs 2019-11-06 15:50:11 +01:00
efl_exe.c ecore - efl exe - check returns of open and dup2 for stdin etc. fds 2020-09-20 00:20:42 +01:00
efl_exe.eo efl/exe: add term_with_parent flag 2020-03-12 12:17:07 -04:00
efl_filter_model.c ecore: refactor unpacking/packing code used in conjonction with eina_future_all*. 2020-01-31 10:11:35 -08:00
efl_filter_model.eo doc: update ecore_filter_model description 2019-09-24 17:24:49 +02:00
efl_general.h Mark EFL_MAIN and EFL_MAIN_EX macros as stable 2019-02-14 17:11:04 +01:00
efl_generic_model.c ecore: properly initialize all field in event generated by Efl.Generic_Model 2019-09-19 14:37:47 -07:00
efl_generic_model.eo eolian: fix eolian errors with EOLIAN_ENFORCE_SINCE=1 2019-10-14 16:55:52 +09:00
efl_io_buffered_stream.c efl_io_*: apply new event calling convention 2019-03-19 16:32:02 -04:00
efl_io_buffered_stream.eo docs: Fix typos and wrap EO files to 120 chars 2019-09-02 16:24:26 +02:00
efl_io_closer_fd.c
efl_io_closer_fd.eo docs: Remove obsolete @since tags from EO files 2019-03-20 20:16:05 +01:00
efl_io_copier.c
efl_io_copier.eo eo-files: convert all Eina.Strbuf & Eina.Binbuf 2020-06-09 10:29:29 +02:00
efl_io_file.c efl.file: improve api a bit 2019-02-27 13:17:10 -05:00
efl_io_file.eo docs: Fix typos and wrap EO files to 120 chars 2019-09-02 16:24:26 +02:00
efl_io_positioner_fd.c
efl_io_positioner_fd.eo docs: Remove obsolete @since tags from EO files 2019-03-20 20:16:05 +01:00
efl_io_reader_fd.c efl_io_*: apply new event calling convention 2019-03-19 16:32:02 -04:00
efl_io_reader_fd.eo docs: Remove obsolete @since tags from EO files 2019-03-20 20:16:05 +01:00
efl_io_sizer_fd.c
efl_io_sizer_fd.eo docs: Remove obsolete @since tags from EO files 2019-03-20 20:16:05 +01:00
efl_io_stderr.c
efl_io_stderr.eo docs: Remove obsolete @since tags from EO files 2019-03-20 20:16:05 +01:00
efl_io_stdin.c
efl_io_stdin.eo docs: Remove obsolete @since tags from EO files 2019-03-20 20:16:05 +01:00
efl_io_stdout.c
efl_io_stdout.eo docs: Remove obsolete @since tags from EO files 2019-03-20 20:16:05 +01:00
efl_io_writer_fd.c efl_io_*: apply new event calling convention 2019-03-19 16:32:02 -04:00
efl_io_writer_fd.eo docs: Remove obsolete @since tags from EO files 2019-03-20 20:16:05 +01:00
efl_linear_interpolator.c
efl_linear_interpolator.eo Remove @beta from Efl.Interpolator classes 2019-12-19 16:45:13 -08:00
efl_loop.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
efl_loop.eo eolian: stricter checks for const() validity 2019-09-26 16:19:12 +02:00
efl_loop_consumer.c
efl_loop_consumer.eo remove unused imports in eo/eot files 2020-04-19 01:44:50 +02:00
efl_loop_fd.c
efl_loop_fd.eo Mark BETA classes individually 2019-02-14 17:46:50 +01:00
efl_loop_handler.c fix various trivial null derefs 2019-10-18 13:30:10 -04:00
efl_loop_handler.eo docs: Fix typos and wrap EO files to 120 chars 2019-09-02 16:24:26 +02:00
efl_loop_message.c
efl_loop_message.eo Mark BETA classes individually 2019-02-14 17:46:50 +01:00
efl_loop_message_future.c
efl_loop_message_future.eo Mark BETA classes individually 2019-02-14 17:46:50 +01:00
efl_loop_message_future_handler.c
efl_loop_message_future_handler.eo Mark BETA classes individually 2019-02-14 17:46:50 +01:00
efl_loop_message_handler.c efl_message: add pending queue for filtering message. 2019-10-24 08:07:49 -07:00
efl_loop_message_handler.eo Mark BETA classes individually 2019-02-14 17:46:50 +01:00
efl_loop_model.c efl: add Efl.Model.Children_Index_Get. 2020-01-31 10:11:39 -08:00
efl_loop_model.eo efl: add Efl.Model.Children_Index_Get. 2020-01-31 10:11:39 -08:00
efl_loop_timer.eo efl: Make stable single-valued getters consistent. 2019-11-06 23:47:39 -03:00
efl_loop_timer_eo.legacy.c ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
efl_loop_timer_eo.legacy.h ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00
efl_sinusoidal_interpolator.c Efl.Interpolator*: More sensible API names and docs 2019-11-06 15:50:11 +01:00
efl_sinusoidal_interpolator.eo Remove @beta from Efl.Interpolator classes 2019-12-19 16:45:13 -08:00
efl_spring_interpolator.c Efl.Interpolator*: More sensible API names and docs 2019-11-06 15:50:11 +01:00
efl_spring_interpolator.eo Remove @beta from Efl.Interpolator classes 2019-12-19 16:45:13 -08:00
efl_task.c efl loops/threads - by defaylt tasks (exe and threads) exit with parent 2019-08-26 14:19:30 +01:00
efl_task.eo Use proper Eolian syntax for default values instead of docs 2019-09-20 11:55:55 -03:00
efl_thread.c ecore - efl thread - dont close invalid < 0 fd's 2020-09-20 00:20:42 +01:00
efl_thread.eo docs: Fix typos and wrap EO files to 120 chars 2019-09-02 16:24:26 +02:00
efl_threadio.c Efl.ThreadIO: replace empty implementations with @pure_virtual 2019-09-18 13:43:30 +02:00
efl_threadio.eo remove unused imports in eo/eot files 2020-04-19 01:44:50 +02:00
meson.build ecore: Rename EAPI macro to ECORE_API in Ecore library 2021-05-23 20:47:23 +01:00