efl/src/examples/elementary
Felipe Magno de Almeida a594413ccb elementary: Rename EAPI macro to ELM_API in Elementary 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-10-11 13:00:04 -03:00
..
.gitignore Example: Add efl_canvas_textblock_obstacles example 2020-01-03 11:42:31 +01:00
actionslider_example_01.c
bg_cxx_example_01.cc cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
bg_cxx_example_02.cc cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
bg_example_01.c
bg_example_01.js examples: js: ensure we finish all statements with a semicolon 2019-12-24 09:23:14 -05:00
bg_example_02.c
bg_example_02.js
bg_example_03.c examples: resolve float compare warnings 2020-05-12 16:10:02 +02:00
box_cxx_example_02.cc cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
box_example_02.c
box_js_example_01.js
box_js_example_02.js
bubble_example_01.c
button_cxx_example_00.cc cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
button_cxx_example_01.cc cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
button_example_00.c
button_example_00.js
button_example_01.c
button_example_01.js examples: js: make sure we declare all variables 2019-12-24 09:23:22 -05:00
calendar_cxx_example_01.cc cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
calendar_cxx_example_02.cc cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
calendar_cxx_example_03.cc cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
calendar_cxx_example_04.cc examples: cxx: remove forced warning on unfinished APIs 2020-05-04 14:33:07 +02:00
calendar_cxx_example_05.cc examples: cxx: remove forced warning on unfinished APIs 2020-05-04 14:33:07 +02:00
calendar_example_01.c
calendar_example_01.js
calendar_example_02.c
calendar_example_02.js
calendar_example_03.c
calendar_example_03.js
calendar_example_04.c
calendar_example_04.js
calendar_example_05.c
calendar_example_05.js
calendar_example_06.c elm example : on some OS (windows...) struct tm has 9 fields and not 11. Fix warning. 2018-01-08 21:10:22 +09:00
check_example_01.c
clock_cxx_example.cc cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
clock_example.c
clock_example.js
codegen_example.c
codegen_example.edc
colorselector_example_01.c
combobox_example_01.c elementary: fix combobox example to not duplicate the definition of _GNU_SOURCE. 2019-03-01 08:59:50 -05:00
conformant_example_01.c
conformant_example_02.c
ctxpopup_example_01.c
datetime_example.c
dayselector_example.c
dict.txt
diskselector_example_01.c
diskselector_example_02.c
efl_canvas_layout_text.c efl.text.style: rename methods/properties and add text_ prefix 2019-12-20 09:58:27 +01:00
efl_canvas_layout_text.edc Canvas layout: support more Efl.Text.* with efl_part 2018-11-06 18:33:56 +02:00
efl_canvas_textblock_obstacles_example.c Get rid of trailing whitespaces (2 / 14) 2020-06-23 10:27:35 +02:00
efl_thread_1.c
efl_thread_2.c
efl_thread_3.c
efl_thread_4.c
efl_thread_5.c
efl_thread_6.c
efl_ui_collection_view_example_1.c efl_ui_multi_selectable: clean this up 2019-11-25 13:31:24 +01:00
efl_ui_grid_example_1.c efl_ui_win: default the window type to basic 2019-09-24 16:00:44 +02:00
efl_ui_grid_view_example_1.c here comes a new example 2019-11-29 08:08:22 +01:00
efl_ui_list_example_1.c efl_ui: cleanup elm headers 2019-12-12 10:20:31 -08:00
efl_ui_list_view_example.edc examples: fix edc build error 2019-01-24 13:27:24 +09:00
efl_ui_list_view_example_1.c elementary: migrate Efl.Ui.List_View to use Efl.Ui.Collection_View. 2019-09-24 11:12:44 -07:00
efl_ui_list_view_example_2.c elementary: migrate Efl.Ui.List_View to use Efl.Ui.Collection_View. 2019-09-24 11:12:44 -07:00
efl_ui_list_view_example_3.c efl_ui_multi_selectable: clean this up 2019-11-25 13:31:24 +01:00
efl_ui_radio_example_01.c efl_ui_win: default the window type to basic 2019-09-24 16:00:44 +02:00
efl_ui_relative_container_example_01.c efl_ui_relative_container: rename relative_layout 2019-11-12 14:33:13 +01:00
efl_ui_relative_container_example_02.c efl_ui_relative_container: rename relative_layout 2019-11-12 14:33:13 +01:00
efl_ui_scroller_example.c efl: remove EFL_EO_API_SUPPORT macro 2019-03-18 12:13:59 +01:00
efl_ui_slider_mono.cs csharp: Add licensing information. 2019-10-24 10:10:56 -03:00
efl_ui_slideshow_example.c efl_ui_spotlight: rename Stack_Manager to Fade_Manager 2020-01-23 12:55:16 +09:00
efl_ui_theme_example.edc efl_ui_theme: Introduce Efl.Ui.Theme class 2018-11-20 13:56:37 +09:00
efl_ui_theme_example_01.c efl_ui_win: default the window type to basic 2019-09-24 16:00:44 +02:00
efl_ui_theme_example_02.c efl_ui_win: default the window type to basic 2019-09-24 16:00:44 +02:00
efl_ui_unit_converter.cs efl.ui.text: rename to efl.ui.textbox 2019-12-11 09:47:50 +09:00
entry_example.c
filemvc.c efl: remove EFL_EO_API_SUPPORT macro 2019-03-18 12:13:59 +01:00
fileselector_button_example.c
fileselector_entry_example.c
fileselector_example.c filesel example - add locale.h include since we use setlocale 2019-07-28 10:33:07 +01:00
fileviewlist.c efl: remove EFL_EO_API_SUPPORT macro 2019-03-18 12:13:59 +01:00
filter_example.c Get rid of trailing whitespaces (2 / 14) 2020-06-23 10:27:35 +02:00
flip_example_01.c
flipselector_example.c
frame_example_01.c
general_funcs_example.c
gengrid_example.c singularize srand in eina_init - only once in one place 2020-10-03 20:46:50 +01:00
genlist_example_01.c examples: cast to uintptr_t instead of long 2019-08-01 14:37:02 -07:00
genlist_example_02.c examples: cast to uintptr_t instead of long 2019-08-01 14:37:02 -07:00
genlist_example_03.c examples: cast to uintptr_t instead of long 2019-08-01 14:37:02 -07:00
genlist_example_04.c examples: cast to uintptr_t instead of long 2019-08-01 14:37:02 -07:00
genlist_example_05.c
glview_example_01.c
hover_example_01.c
hoversel_example_01.c elementary: fix string usage in hoversel example. 2019-03-01 10:23:32 -05:00
icon_cxx_example_01.cc cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
icon_example_01.c
icon_example_01.js examples: js: fix variable name 2019-12-17 11:33:45 -03:00
image_example_01.c
image_webp_example_01.c Support WebP Animation Image Files 2020-05-29 11:40:37 +09:00
image_webp_example_02.c Support WebP Animation Image Files 2020-05-29 11:40:37 +09:00
index_example_01.c
index_example_02.c index_example_02: fix index example 2019-03-18 12:26:10 +01:00
inwin_example.c inwin_example: shot can never be the preferend engine 2019-03-18 12:34:30 +01:00
label_example_01.c
label_example_02.c examples: elementary: add more examples to build 2018-08-22 18:37:44 +09:00
label_example_03.c examples: elementary: add more examples to build 2018-08-22 18:37:44 +09:00
layout_example.edc
layout_example.js efl: Split Efl.Container and Efl.Content 2017-11-20 19:02:09 +09:00
layout_example_01.c
layout_example_02.c
layout_example_03.c
layout_property_bind.c elementary: small improvement on example migrating them to newer unified API. 2019-12-04 12:21:23 -08:00
list_example_01.c
list_example_02.c
list_example_03.c
map_example_01.c
map_example_02.c
map_example_03.c
mapbuf_example.c
menu_cxx_example_01.cc examples: cxx: remove forced warning on unfinished APIs 2020-05-04 14:33:07 +02:00
menu_example_01.c
menu_example_01.js
meson.build Support WebP Animation Image Files 2020-05-29 11:40:37 +09:00
naviframe_example.c
notify_example_01.c
panel_example_01.c
panes_example.c
photocam_example_01.c
popup_cxx_example.cc cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
popup_example_01.c
popup_example_01.js efl: Split Efl.Container and Efl.Content 2017-11-20 19:02:09 +09:00
popup_example_02.c
popup_example_03.c
prefs_data_example.c
prefs_example_01.c
prefs_example_01.epc
prefs_example_02.c
prefs_example_02.epc
prefs_example_03.c
prefs_example_03.edc
prefs_example_03.epc
progressbar_example.c examples: resolve float compare warnings 2020-05-12 16:10:02 +02:00
radio_cxx_example_01.cc cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
radio_example_01.c
radio_example_01.js efl: Split Efl.Container and Efl.Content 2017-11-20 19:02:09 +09:00
radio_example_02.c
scroller_example_01.c
scroller_example_02.c scroller: refactory a momentum scroll animator 2018-08-29 15:58:10 +09:00
segment_control_example.c
separator_example_01.c
sky_01.jpg examples: Add popup cxx example 2017-11-28 17:15:42 +09:00
slider_cxx_example.cc cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
slider_example.c
slider_example.js examples: js: make sure we declare all variables 2019-12-24 09:23:22 -05:00
slideshow_example.c
spinner_cxx_example.cc cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
spinner_example.c spinner_example: add focused, unfocused callback to test focus signal 2018-09-13 09:54:28 +02:00
spinner_example.js
table_cxx_example_01.cc efl.ui.text: rename to efl.ui.textbox 2019-12-11 09:47:50 +09:00
table_cxx_example_02.cc cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
table_example_01.c
table_example_01.js
table_example_02.c
table_example_02.js
theme_example.edc
theme_example_01.c
theme_example_02.c
thumb_example_01.c
thumb_example_01.js
toolbar_cxx_example_01.cc elementary: Rename EAPI macro to ELM_API in Elementary library 2020-10-11 13:00:04 -03:00
toolbar_example_01.c
toolbar_example_02.c
toolbar_example_03.c
track_example_01.c
transit_example_01.c
transit_example_02.c
transit_example_03.c examples: resolve float compare warnings 2020-05-12 16:10:02 +02:00
transit_example_04.c
twitter_example_01.edc
twitter_example_01.js examples: js: use correct var to display user name 2019-12-24 09:23:29 -05:00
web_example_01.c elementary: fix web example to define _GNU_SOURCE only if needed. 2019-03-01 08:59:50 -05:00
web_example_02.c elementary: fix web example warning from duplicated _GNU_SOURCE. 2019-03-01 08:59:50 -05:00
win_example.c