Update examples to latest EFL API

Summary:
Some of the EFL tutorials are not currently building due to changes in the API :
* const Eo* in getters.
* Efl.Loop -> Efl.App
* efl_net_session_name -> efl_net_session_network_name

Reviewers: cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D5977
This commit is contained in:
Xavi Artigas 2018-04-23 13:35:36 -07:00 committed by Cedric BAIL
parent bc7793f138
commit 0448e6cfa4
8 changed files with 12 additions and 12 deletions

View File

@ -119,7 +119,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
Efl_Loop *loop; Efl_Loop *loop;
loop = ev->object; loop = ev->object;
version = efl_loop_efl_version_get(loop); version = efl_app_efl_version_get(loop);
printf("Running on EFL version %d.%d.%d [%s]\n\n", version->major, version->minor, printf("Running on EFL version %d.%d.%d [%s]\n\n", version->major, version->minor,
version->micro, version->build_id); version->micro, version->build_id);
_print_loop(loop, "Application"); _print_loop(loop, "Application");

View File

@ -68,7 +68,7 @@ _session_changed(void *data EINA_UNUSED, const Efl_Event *event)
" state: %s\n" " state: %s\n"
" technology: %s\n" " technology: %s\n"
" interface: '%s'\n", " interface: '%s'\n",
efl_net_session_name_get(session), efl_net_session_network_name_get(session),
_state_name(efl_net_session_state_get(session)), _state_name(efl_net_session_state_get(session)),
_technology_name(efl_net_session_technology_get(session)), _technology_name(efl_net_session_technology_get(session)),
efl_net_session_interface_get(session)); efl_net_session_interface_get(session));

View File

@ -14,7 +14,7 @@ _example_rectangle_width_set(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd, in
} }
EOLIAN static int EOLIAN static int
_example_rectangle_width_get(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd) _example_rectangle_width_get(const Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd)
{ {
return pd->width; return pd->width;
} }
@ -26,7 +26,7 @@ _example_rectangle_height_set(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd, i
} }
EOLIAN static int EOLIAN static int
_example_rectangle_height_get(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd) _example_rectangle_height_get(const Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd)
{ {
return pd->height; return pd->height;
} }

View File

@ -14,7 +14,7 @@ _example_rectangle_width_set(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd, in
} }
EOLIAN static int EOLIAN static int
_example_rectangle_width_get(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd) _example_rectangle_width_get(const Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd)
{ {
return pd->width; return pd->width;
} }
@ -26,7 +26,7 @@ _example_rectangle_height_set(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd, i
} }
EOLIAN static int EOLIAN static int
_example_rectangle_height_get(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd) _example_rectangle_height_get(const Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd)
{ {
return pd->height; return pd->height;
} }

View File

@ -14,7 +14,7 @@ _example_circle_radius_set(Eo *obj EINA_UNUSED, Example_Circle_Data *pd, int rad
} }
EOLIAN static int EOLIAN static int
_example_circle_radius_get(Eo *obj EINA_UNUSED , Example_Circle_Data *pd) _example_circle_radius_get(const Eo *obj EINA_UNUSED , Example_Circle_Data *pd)
{ {
return pd->radius; return pd->radius;
} }

View File

@ -17,7 +17,7 @@ _example_colored_color_set(Eo *obj EINA_UNUSED, Example_Colored_Data *pd,
} }
EOLIAN static void EOLIAN static void
_example_colored_color_get(Eo *obj EINA_UNUSED, Example_Colored_Data *pd, _example_colored_color_get(const Eo *obj EINA_UNUSED, Example_Colored_Data *pd,
int *red, int *green, int *blue) int *red, int *green, int *blue)
{ {
if (red) if (red)

View File

@ -14,7 +14,7 @@ _example_rectangle_width_set(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd, in
} }
EOLIAN static int EOLIAN static int
_example_rectangle_width_get(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd) _example_rectangle_width_get(const Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd)
{ {
return pd->width; return pd->width;
} }
@ -26,7 +26,7 @@ _example_rectangle_height_set(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd, i
} }
EOLIAN static int EOLIAN static int
_example_rectangle_height_get(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd) _example_rectangle_height_get(const Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd)
{ {
return pd->height; return pd->height;
} }

View File

@ -21,11 +21,11 @@ _lifecycle_simulation(void *data, const Efl_Event *ev EINA_UNUSED)
{ {
case 0: case 0:
// First call, pause the application // First call, pause the application
efl_event_callback_call(loop, EFL_LOOP_EVENT_PAUSE, NULL); efl_event_callback_call(loop, EFL_APP_EVENT_PAUSE, NULL);
break; break;
case 1: case 1:
// Second call, resume the application // Second call, resume the application
efl_event_callback_call(loop, EFL_LOOP_EVENT_RESUME, NULL); efl_event_callback_call(loop, EFL_APP_EVENT_RESUME, NULL);
break; break;
default: default:
// Last call, exit the application // Last call, exit the application