efl/src/lib/ecore_audio
Felipe Magno de Almeida 7b02a3290f ecore_audio: Rename EAPI macro to ECORE_AUDIO_API in Ecore Audio 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-09 15:10:58 -03:00
..
Ecore_Audio.h ecore_audio: Rename EAPI macro to ECORE_AUDIO_API in Ecore Audio library 2020-09-09 15:10:58 -03:00
ecore_audio.c ecore_audio: Rename EAPI macro to ECORE_AUDIO_API in Ecore Audio library 2020-09-09 15:10:58 -03:00
ecore_audio.eo docs: nicer formatting of the NULL keyword, everywhere 2019-09-10 16:05:44 +02:00
ecore_audio_alsa.c
ecore_audio_api.h ecore_audio: Rename EAPI macro to ECORE_AUDIO_API in Ecore Audio library 2020-09-09 15:10:58 -03:00
ecore_audio_custom.c
ecore_audio_in.eo eolian: rename event_prefix to event_c_prefix for consistency 2019-09-26 16:47:22 +02:00
ecore_audio_in_sndfile.eo eolian: move from eo_prefix to c_prefix 2019-05-09 16:17:44 +02:00
ecore_audio_in_tone.eo eolian: move from eo_prefix to c_prefix 2019-05-09 16:17:44 +02:00
ecore_audio_obj.c eolian gen: enable constness generation on property getter impls 2018-04-17 20:31:55 +02:00
ecore_audio_obj.h
ecore_audio_obj_in.c ecore/audio: free vio on in/out object destruction 2020-03-25 22:13:02 +01:00
ecore_audio_obj_in.h efl: include sys/types.h where ssize_t is used 2018-06-21 14:09:59 +02:00
ecore_audio_obj_in_sndfile.c ecore/audio: correctly handle sndfile error when setting new vio 2020-03-25 22:13:10 +01:00
ecore_audio_obj_in_sndfile.h
ecore_audio_obj_in_tone.c
ecore_audio_obj_in_tone.h
ecore_audio_obj_out.c ecore/audio: free vio on in/out object destruction 2020-03-25 22:13:02 +01:00
ecore_audio_obj_out.h
ecore_audio_obj_out_pulse.c Get rid of trailing whitespaces (4 / 14) 2020-06-23 10:29:14 +02:00
ecore_audio_obj_out_pulse.h
ecore_audio_obj_out_sndfile.c eolian gen: enable constness generation on property getter impls 2018-04-17 20:31:55 +02:00
ecore_audio_obj_out_sndfile.h
ecore_audio_obj_out_wasapi.c ecore_audio wasapi - fix ecore win32 handler deletion and destruction 2018-01-13 14:46:08 +09:00
ecore_audio_obj_out_wasapi.h
ecore_audio_out.eo eolian: move from eo_prefix to c_prefix 2019-05-09 16:17:44 +02:00
ecore_audio_out_pulse.eo eolian: rename event_prefix to event_c_prefix for consistency 2019-09-26 16:47:22 +02:00
ecore_audio_out_sndfile.eo eolian: move from eo_prefix to c_prefix 2019-05-09 16:17:44 +02:00
ecore_audio_out_wasapi.eo eolian: rename event_prefix to event_c_prefix for consistency 2019-09-26 16:47:22 +02:00
ecore_audio_private.h ecore/audio: add a couple more functions to the pulse callback struct 2020-03-25 22:13:04 +01:00
ecore_audio_protected.h
ecore_audio_pulse.c
ecore_audio_pulse_ml.c
ecore_audio_sndfile_vio.c
meson.build ecore_audio: Rename EAPI macro to ECORE_AUDIO_API in Ecore Audio library 2020-09-09 15:10:58 -03:00