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
devs/lauromoura/fix-csharp-life
Xavi Artigas 5 years ago committed by Cedric BAIL
parent bc7793f138
commit 0448e6cfa4
  1. 2
      reference/c/core/src/core_loop.c
  2. 2
      reference/c/net/src/net_session.c
  3. 4
      tutorial/c/eo-classes/src/example_rectangle.c
  4. 4
      tutorial/c/eo-inherit/src/example_rectangle.c
  5. 2
      tutorial/c/eo-multiinherit/src/example_circle.c
  6. 2
      tutorial/c/eo-multiinherit/src/example_colored.c
  7. 4
      tutorial/c/eo-multiinherit/src/example_rectangle.c
  8. 4
      tutorial/c/lifecycle/src/lifecycle_main.c

@ -119,7 +119,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
Efl_Loop *loop;
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,
version->micro, version->build_id);
_print_loop(loop, "Application");

@ -68,7 +68,7 @@ _session_changed(void *data EINA_UNUSED, const Efl_Event *event)
" state: %s\n"
" technology: %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)),
_technology_name(efl_net_session_technology_get(session)),
efl_net_session_interface_get(session));

@ -14,7 +14,7 @@ _example_rectangle_width_set(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd, in
}
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;
}
@ -26,7 +26,7 @@ _example_rectangle_height_set(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd, i
}
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;
}

@ -14,7 +14,7 @@ _example_rectangle_width_set(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd, in
}
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;
}
@ -26,7 +26,7 @@ _example_rectangle_height_set(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd, i
}
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;
}

@ -14,7 +14,7 @@ _example_circle_radius_set(Eo *obj EINA_UNUSED, Example_Circle_Data *pd, int rad
}
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;
}

@ -17,7 +17,7 @@ _example_colored_color_set(Eo *obj EINA_UNUSED, Example_Colored_Data *pd,
}
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)
{
if (red)

@ -14,7 +14,7 @@ _example_rectangle_width_set(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd, in
}
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;
}
@ -26,7 +26,7 @@ _example_rectangle_height_set(Eo *obj EINA_UNUSED, Example_Rectangle_Data *pd, i
}
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;
}

@ -21,11 +21,11 @@ _lifecycle_simulation(void *data, const Efl_Event *ev EINA_UNUSED)
{
case 0:
// 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;
case 1:
// 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;
default:
// Last call, exit the application

Loading…
Cancel
Save