forked from enlightenment/efl
Ecore Exe: Start using eo events.
This commit is contained in:
parent
eed11ac529
commit
cc6b02bc22
|
@ -1427,6 +1427,7 @@ _ecore_exe_data_generic_handler(void *data,
|
||||||
Ecore_Exe *obj = data;
|
Ecore_Exe *obj = data;
|
||||||
int child_fd;
|
int child_fd;
|
||||||
int event_type;
|
int event_type;
|
||||||
|
const Eo_Event_Description *eo_event = NULL;
|
||||||
|
|
||||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||||
|
|
||||||
|
@ -1435,12 +1436,14 @@ _ecore_exe_data_generic_handler(void *data,
|
||||||
{
|
{
|
||||||
flags = ECORE_EXE_PIPE_READ;
|
flags = ECORE_EXE_PIPE_READ;
|
||||||
event_type = ECORE_EXE_EVENT_DATA;
|
event_type = ECORE_EXE_EVENT_DATA;
|
||||||
|
eo_event = ECORE_EXE_EVENT_DATA_GET;
|
||||||
child_fd = exe->child_fd_read;
|
child_fd = exe->child_fd_read;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
flags = ECORE_EXE_PIPE_ERROR;
|
flags = ECORE_EXE_PIPE_ERROR;
|
||||||
event_type = ECORE_EXE_EVENT_ERROR;
|
event_type = ECORE_EXE_EVENT_ERROR;
|
||||||
|
eo_event = ECORE_EXE_EVENT_DATA_ERROR;
|
||||||
child_fd = exe->child_fd_error;
|
child_fd = exe->child_fd_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1513,9 +1516,12 @@ _ecore_exe_data_generic_handler(void *data,
|
||||||
{
|
{
|
||||||
e = ecore_exe_event_data_get(obj, flags);
|
e = ecore_exe_event_data_get(obj, flags);
|
||||||
if (e) /* Send the event. */
|
if (e) /* Send the event. */
|
||||||
|
{
|
||||||
ecore_event_add(event_type, e,
|
ecore_event_add(event_type, e,
|
||||||
_ecore_exe_event_exe_data_free,
|
_ecore_exe_event_exe_data_free,
|
||||||
NULL);
|
NULL);
|
||||||
|
eo_do(obj, eo_event_callback_call(eo_event, e));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (lost_exe)
|
if (lost_exe)
|
||||||
|
|
|
@ -22,6 +22,10 @@ class Ecore.Exe (Eo.Base)
|
||||||
implements {
|
implements {
|
||||||
Eo.Base.finalize;
|
Eo.Base.finalize;
|
||||||
}
|
}
|
||||||
|
events {
|
||||||
|
data,get: Ecore_Exe_Event_Data;
|
||||||
|
data,error: Ecore_Exe_Event_Data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Notes:
|
/* FIXME: Notes:
|
||||||
|
|
Loading…
Reference in New Issue