forked from enlightenment/efl
Ecore exe: Start using the control interface.
This commit is contained in:
parent
cc6b02bc22
commit
6e5a35e43e
|
@ -2196,6 +2196,7 @@ fi
|
||||||
EFL_PLATFORM_DEPEND([ECORE], [all])
|
EFL_PLATFORM_DEPEND([ECORE], [all])
|
||||||
EFL_INTERNAL_DEPEND_PKG([ECORE], [eo])
|
EFL_INTERNAL_DEPEND_PKG([ECORE], [eo])
|
||||||
EFL_INTERNAL_DEPEND_PKG([ECORE], [eina])
|
EFL_INTERNAL_DEPEND_PKG([ECORE], [eina])
|
||||||
|
EFL_INTERNAL_DEPEND_PKG([ECORE], [efl])
|
||||||
|
|
||||||
EFL_ADD_LIBS([ECORE], [-lm])
|
EFL_ADD_LIBS([ECORE], [-lm])
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
|
|
||||||
#define MY_CLASS ECORE_EXE_CLASS
|
#define MY_CLASS ECORE_EXE_CLASS
|
||||||
|
|
||||||
|
#include <Efl.h>
|
||||||
|
|
||||||
/* FIXME: Getting respawn to work
|
/* FIXME: Getting respawn to work
|
||||||
*
|
*
|
||||||
* There is no way that we can do anything about the internal state info of
|
* There is no way that we can do anything about the internal state info of
|
||||||
|
@ -1062,23 +1064,24 @@ ecore_exe_flags_get(const Ecore_Exe *obj)
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_exe_pause(Ecore_Exe *obj)
|
ecore_exe_pause(Ecore_Exe *obj)
|
||||||
{
|
{
|
||||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
eo_do(obj, efl_control_suspend_set(EINA_TRUE));
|
||||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
|
||||||
if (!eo_isa(obj, MY_CLASS))
|
|
||||||
return;
|
|
||||||
|
|
||||||
kill(exe->pid, SIGSTOP);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_exe_continue(Ecore_Exe *obj)
|
ecore_exe_continue(Ecore_Exe *obj)
|
||||||
{
|
{
|
||||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
eo_do(obj, efl_control_suspend_set(EINA_FALSE));
|
||||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
}
|
||||||
if (!eo_isa(obj, MY_CLASS))
|
|
||||||
return;
|
|
||||||
|
|
||||||
kill(exe->pid, SIGCONT);
|
EOLIAN static void
|
||||||
|
_ecore_exe_efl_control_suspend_set(Eo *obj EINA_UNUSED, Ecore_Exe_Data *exe, Eina_Bool suspend)
|
||||||
|
{
|
||||||
|
EINA_MAIN_LOOP_CHECK_RETURN;
|
||||||
|
|
||||||
|
if (suspend)
|
||||||
|
kill(exe->pid, SIGSTOP);
|
||||||
|
else
|
||||||
|
kill(exe->pid, SIGCONT);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class Ecore.Exe (Eo.Base)
|
class Ecore.Exe (Eo.Base, Efl.Control)
|
||||||
{
|
{
|
||||||
eo_prefix: ecore_obj_exe;
|
eo_prefix: ecore_obj_exe;
|
||||||
properties {
|
properties {
|
||||||
|
@ -21,6 +21,7 @@ class Ecore.Exe (Eo.Base)
|
||||||
}
|
}
|
||||||
implements {
|
implements {
|
||||||
Eo.Base.finalize;
|
Eo.Base.finalize;
|
||||||
|
Efl.Control.suspend.set;
|
||||||
}
|
}
|
||||||
events {
|
events {
|
||||||
data,get: Ecore_Exe_Event_Data;
|
data,get: Ecore_Exe_Event_Data;
|
||||||
|
|
Loading…
Reference in New Issue