efl/src/lib/evas
Felipe Magno de Almeida 2fa81c36b5 evas: Rename EAPI macro to EVAS_API in Evas library
evil: Rename EAPI macro to EVIL_API in Evil library

Patch 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
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>
2020-09-13 10:14:31 -03:00
..
cache evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
canvas evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
common evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
file evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
filters evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
gesture evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
include evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
software_generic evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
vg evas_vg_cache: Don't caching vg file if value_provider is applied. 2020-06-09 10:57:21 +09:00
Efl_Canvas.h evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
Evas.h evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
Evas.hh efl: remove EFL_EO_API_SUPPORT macro 2019-03-18 12:13:59 +01:00
Evas_Common.h evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
Evas_Eo.h Fix namespace clashes for Efl.Text.Cursor 2020-04-14 12:25:55 +02:00
Evas_GL.h evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
Evas_Internal.h evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
Evas_Legacy.h evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
Evas_Loader.h evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
evas_api.h evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
main.c evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00
meson.build evas: Rename EAPI macro to EVAS_API in Evas library 2020-09-13 10:14:31 -03:00