efl/src/tests/evas
Felipe Magno de Almeida 0363fd8238 evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.

=  The Rationale =

This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.

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
LIBAPI is the only solution that works for MSVC.

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

Reviewers: vtorri, woohyun, jptiz, lucas

Reviewed By: vtorri, lucas

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 23:06:12 -03:00
..
dicts Evas textblock: fix wrong hyphenation issues with non UTF8 encoded dictionary 2018-05-06 12:01:41 +03:00
fonts evas textblock : update font source when it set using font_source_set 2020-06-22 17:02:05 +09:00
images evas: add a test for loading Android 9patch file. 2019-07-12 09:54:24 -07:00
efl_canvas_animation.c tests: resolve float comparison warnings 2020-05-09 09:25:14 +01:00
efl_test_canvas.c efl/canvas: add Efl_Canvas.h 2019-09-30 10:33:24 +02:00
efl_test_canvas2.c efl/canvas: add Efl_Canvas.h 2019-09-30 10:33:24 +02:00
efl_test_canvas3.c efl/canvas: add Efl_Canvas.h 2019-09-30 10:33:24 +02:00
evas_buffer_helper.c evas_object_textblock: add support for variation sequences 2019-12-12 16:22:12 +09:00
evas_buffer_helper.h evas_object_textblock: add support for variation sequences 2019-12-12 16:22:12 +09:00
evas_suite.c canvas 3d: remove all canvas3d features across efl. 2020-03-25 19:14:02 +09:00
evas_suite.h canvas 3d: remove all canvas3d features across efl. 2020-03-25 19:14:02 +09:00
evas_test_callbacks.c evas/callbacks: emit hardcoded legacy smart callbacks always 2019-10-14 09:29:23 -04:00
evas_test_evasgl.c fix build. 2019-06-20 14:20:34 +02:00
evas_test_events.c evas test - use correct type for ptr type tracking called 2019-08-11 17:09:32 +01:00
evas_test_filters.c tests: resolve float comparison warnings 2020-05-09 09:25:14 +01:00
evas_test_focus.c evas_events: fix wrong event listening 2019-06-28 09:03:14 +02:00
evas_test_image.c evas test - fix evas suite image data compare 2020-11-13 09:51:13 +00:00
evas_test_init.c tests: add instrumentation to existing tests to find slow tests 2018-04-05 11:10:25 +02:00
evas_test_mask.c efl.canvas.object: clip -> clipper && clipees -> clipped_objects 2019-02-27 13:17:37 -05:00
evas_test_new.c evas test - actually use result of add of rect obj for test 2018-11-09 11:43:59 +00:00
evas_test_object.c introduce efl_canvas_object_animation 2019-11-20 09:58:24 +01:00
evas_test_object_smart.c evas_object_textblock: add support for variation sequences 2019-12-12 16:22:12 +09:00
evas_test_render_engines.c tests: add evas render test for callbacks 2019-04-08 13:19:56 +09:00
evas_test_text.c tests: resolve float comparison warnings 2020-05-09 09:25:14 +01:00
evas_test_textblock.c evas: Rename EAPI macro to EVAS_API in Evas library 2020-12-15 23:06:12 -03:00
evas_tests_helpers.h evas: add a test for loading Android 9patch file. 2019-07-12 09:54:24 -07:00
meson.build build: add eet to evas suite 2020-06-02 08:54:19 +02:00