forked from enlightenment/efl
Fix examples according to the recent eo event changes.
This commit is contained in:
parent
6594ba0b6d
commit
d2fba6c595
|
@ -14,11 +14,9 @@
|
||||||
static unsigned int children_count = 0;
|
static unsigned int children_count = 0;
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_event_interface_load_status_cb(void *data EINA_UNUSED, Eo *model,
|
_event_interface_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
const Eo_Event_Description *desc EINA_UNUSED,
|
|
||||||
void *event_info)
|
|
||||||
{
|
{
|
||||||
Efl_Model_Load *actual_load = (Efl_Model_Load*)event_info;
|
Efl_Model_Load *actual_load = (Efl_Model_Load*)event->event_info;
|
||||||
Eina_Array *properties_list;
|
Eina_Array *properties_list;
|
||||||
Eina_Array_Iterator iterator;
|
Eina_Array_Iterator iterator;
|
||||||
Eina_Value const* property_value;
|
Eina_Value const* property_value;
|
||||||
|
@ -29,8 +27,8 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, Eo *model,
|
||||||
if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
|
if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
|
|
||||||
name = eldbus_model_proxy_name_get(model);
|
name = eldbus_model_proxy_name_get(event->obj);
|
||||||
efl_model_properties_get(model, &properties_list);
|
efl_model_properties_get(event->obj, &properties_list);
|
||||||
|
|
||||||
printf(" -> %s\n", name);
|
printf(" -> %s\n", name);
|
||||||
if (eina_array_count(properties_list))
|
if (eina_array_count(properties_list))
|
||||||
|
@ -38,7 +36,7 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, Eo *model,
|
||||||
|
|
||||||
EINA_ARRAY_ITER_NEXT(properties_list, i, property, iterator)
|
EINA_ARRAY_ITER_NEXT(properties_list, i, property, iterator)
|
||||||
{
|
{
|
||||||
efl_model_property_get(model, property, &property_value);
|
efl_model_property_get(event->obj, property, &property_value);
|
||||||
if (property_value)
|
if (property_value)
|
||||||
{
|
{
|
||||||
prop_str = eina_value_to_string(property_value);
|
prop_str = eina_value_to_string(property_value);
|
||||||
|
@ -57,11 +55,9 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, Eo *model,
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_event_load_status_cb(void *data EINA_UNUSED, Eo *model,
|
_event_load_status_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
const Eo_Event_Description *desc EINA_UNUSED,
|
|
||||||
void *event_info)
|
|
||||||
{
|
{
|
||||||
Efl_Model_Load *actual_load = (Efl_Model_Load*)event_info;
|
Efl_Model_Load *actual_load = (Efl_Model_Load*)event->event_info;
|
||||||
Eina_Accessor *accessor;
|
Eina_Accessor *accessor;
|
||||||
Eo *child = NULL;
|
Eo *child = NULL;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
@ -69,7 +65,7 @@ _event_load_status_cb(void *data EINA_UNUSED, Eo *model,
|
||||||
if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
|
if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
|
|
||||||
efl_model_children_count_get(model, &children_count);
|
efl_model_children_count_get(event->obj, &children_count);
|
||||||
if (children_count == 0)
|
if (children_count == 0)
|
||||||
{
|
{
|
||||||
printf("Don't find Interfaces\n");
|
printf("Don't find Interfaces\n");
|
||||||
|
@ -77,7 +73,7 @@ _event_load_status_cb(void *data EINA_UNUSED, Eo *model,
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
efl_model_children_slice_get(model, 0, 0, &accessor);
|
efl_model_children_slice_get(event->obj, 0, 0, &accessor);
|
||||||
printf("\nInterfaces:\n");
|
printf("\nInterfaces:\n");
|
||||||
EINA_ACCESSOR_FOREACH(accessor, i, child)
|
EINA_ACCESSOR_FOREACH(accessor, i, child)
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
#define HEIGHT (240)
|
#define HEIGHT (240)
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_playback_started_cb(void *data EINA_UNUSED,
|
_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
|
||||||
Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
printf("Emotion object started playback.\n");
|
printf("Emotion object started playback.\n");
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,7 @@ static Eina_List *filenames = NULL;
|
||||||
static Eina_List *curfile = NULL;
|
static Eina_List *curfile = NULL;
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_playback_started_cb(void *data EINA_UNUSED,
|
_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
|
||||||
Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
printf("Emotion object started playback.\n");
|
printf("Emotion object started playback.\n");
|
||||||
|
|
||||||
|
@ -109,8 +108,7 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_frame_decode_cb(void *data EINA_UNUSED,
|
_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
|
||||||
Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
// fprintf(stderr, "smartcb: frame_decode\n");
|
// fprintf(stderr, "smartcb: frame_decode\n");
|
||||||
|
|
||||||
|
@ -118,40 +116,36 @@ _frame_decode_cb(void *data EINA_UNUSED,
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_length_change_cb(void *data EINA_UNUSED,
|
_length_change_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(o));
|
fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(event->obj));
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_position_update_cb(void *data EINA_UNUSED,
|
_position_update_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(o));
|
fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(event->obj));
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_progress_change_cb(void *data EINA_UNUSED,
|
_progress_change_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n",
|
fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n",
|
||||||
emotion_object_progress_status_get(o),
|
emotion_object_progress_status_get(event->obj),
|
||||||
emotion_object_progress_info_get(o));
|
emotion_object_progress_info_get(event->obj));
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_frame_resize_cb(void *data EINA_UNUSED,
|
_frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
int w, h;
|
int w, h;
|
||||||
emotion_object_size_get(o, &w, &h);
|
emotion_object_size_get(event->obj, &w, &h);
|
||||||
fprintf(stderr, "smartcb: frame_resize: %dx%d\n", w, h);
|
fprintf(stderr, "smartcb: frame_resize: %dx%d\n", w, h);
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
|
|
|
@ -19,8 +19,7 @@ static Eina_List *filenames = NULL;
|
||||||
static Eina_List *curfile = NULL;
|
static Eina_List *curfile = NULL;
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_playback_started_cb(void *data EINA_UNUSED,
|
_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
|
||||||
Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
printf("Emotion object started playback.\n");
|
printf("Emotion object started playback.\n");
|
||||||
|
|
||||||
|
@ -28,12 +27,11 @@ _playback_started_cb(void *data EINA_UNUSED,
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_playback_stopped_cb(void *data EINA_UNUSED,
|
_playback_stopped_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
printf("Emotion playback stopped.\n");
|
printf("Emotion playback stopped.\n");
|
||||||
emotion_object_play_set(o, EINA_FALSE);
|
emotion_object_play_set(event->obj, EINA_FALSE);
|
||||||
emotion_object_position_set(o, 0);
|
emotion_object_position_set(event->obj, 0);
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -133,8 +131,7 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, void *
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_frame_decode_cb(void *data EINA_UNUSED,
|
_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
|
||||||
Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
// fprintf(stderr, "smartcb: frame_decode\n");
|
// fprintf(stderr, "smartcb: frame_decode\n");
|
||||||
|
|
||||||
|
@ -142,30 +139,27 @@ _frame_decode_cb(void *data EINA_UNUSED,
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_length_change_cb(void *data EINA_UNUSED,
|
_length_change_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(o));
|
fprintf(stderr, "smartcb: length_change: %0.3f\n", emotion_object_play_length_get(event->obj));
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_position_update_cb(void *data EINA_UNUSED,
|
_position_update_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(o));
|
fprintf(stderr, "smartcb: position_update: %0.3f\n", emotion_object_position_get(event->obj));
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_progress_change_cb(void *data EINA_UNUSED,
|
_progress_change_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n",
|
fprintf(stderr, "smartcb: progress_change: %0.3f, %s\n",
|
||||||
emotion_object_progress_status_get(obj),
|
emotion_object_progress_status_get(event->obj),
|
||||||
emotion_object_progress_info_get(obj));
|
emotion_object_progress_info_get(event->obj));
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
#define HEIGHT (240)
|
#define HEIGHT (240)
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_playback_started_cb(void *data EINA_UNUSED,
|
_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event EINA_UNUSED)
|
||||||
Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
printf("Emotion object started playback.\n");
|
printf("Emotion object started playback.\n");
|
||||||
|
|
||||||
|
|
|
@ -34,73 +34,66 @@ _display_info(Evas_Object *o)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_playback_started_cb(void *data EINA_UNUSED,
|
_playback_started_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
printf(">>> Emotion object started playback.\n");
|
printf(">>> Emotion object started playback.\n");
|
||||||
_display_info(o);
|
_display_info(event->obj);
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_playback_finished_cb(void *data EINA_UNUSED,
|
_playback_finished_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
printf(">>> Emotion object finished playback.\n");
|
printf(">>> Emotion object finished playback.\n");
|
||||||
_display_info(o);
|
_display_info(event->obj);
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_open_done_cb(void *data EINA_UNUSED,
|
_open_done_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
printf(">>> Emotion object open done.\n");
|
printf(">>> Emotion object open done.\n");
|
||||||
_display_info(o);
|
_display_info(event->obj);
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_position_update_cb(void *data EINA_UNUSED,
|
_position_update_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
printf(">>> Emotion object first position update.\n");
|
printf(">>> Emotion object first position update.\n");
|
||||||
eo_event_callback_del(o, EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb, NULL);
|
eo_event_callback_del(event->obj, EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb, NULL);
|
||||||
_display_info(o);
|
_display_info(event->obj);
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_frame_decode_cb(void *data EINA_UNUSED,
|
_frame_decode_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
printf(">>> Emotion object first frame decode.\n");
|
printf(">>> Emotion object first frame decode.\n");
|
||||||
eo_event_callback_del(o, EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb, NULL);
|
eo_event_callback_del(event->obj, EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb, NULL);
|
||||||
_display_info(o);
|
_display_info(event->obj);
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_decode_stop_cb(void *data EINA_UNUSED,
|
_decode_stop_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
printf(">>> Emotion object decode stop.\n");
|
printf(">>> Emotion object decode stop.\n");
|
||||||
_display_info(o);
|
_display_info(event->obj);
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_frame_resize_cb(void *data EINA_UNUSED,
|
_frame_resize_cb(void *data EINA_UNUSED, const Eo_Event *event)
|
||||||
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
printf(">>> Emotion object frame resize.\n");
|
printf(">>> Emotion object frame resize.\n");
|
||||||
_display_info(o);
|
_display_info(event->obj);
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue