forked from enlightenment/efl
efl: move signal events from efl.loop to efl.app
these are process-wide and not loop-specific
This commit is contained in:
parent
3e94be5d73
commit
3dbca39f98
|
@ -46,7 +46,7 @@ typedef struct _Signal_Data
|
||||||
} Signal_Data;
|
} Signal_Data;
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_ecore_signal_pipe_read(Eo *obj)
|
_ecore_signal_pipe_read(Eo *obj EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Signal_Data sdata;
|
Signal_Data sdata;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -74,14 +74,10 @@ _ecore_signal_pipe_read(Eo *obj)
|
||||||
ecore_event_add(ECORE_EVENT_SIGNAL_USER, e,
|
ecore_event_add(ECORE_EVENT_SIGNAL_USER, e,
|
||||||
_ecore_signal_generic_free, NULL);
|
_ecore_signal_generic_free, NULL);
|
||||||
}
|
}
|
||||||
Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
|
if (sdata.sig == SIGUSR1)
|
||||||
if (loop)
|
efl_event_callback_call(_efl_app, EFL_APP_EVENT_SIGNAL_USR1, NULL);
|
||||||
{
|
else
|
||||||
if (sdata.sig == SIGUSR1)
|
efl_event_callback_call(_efl_app, EFL_APP_EVENT_SIGNAL_USR2, NULL);
|
||||||
efl_event_callback_call(loop, EFL_LOOP_EVENT_SIGNAL_USR1, NULL);
|
|
||||||
else
|
|
||||||
efl_event_callback_call(loop, EFL_LOOP_EVENT_SIGNAL_USR2, NULL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SIGHUP:
|
case SIGHUP:
|
||||||
|
@ -93,9 +89,7 @@ _ecore_signal_pipe_read(Eo *obj)
|
||||||
ecore_event_add(ECORE_EVENT_SIGNAL_HUP, e,
|
ecore_event_add(ECORE_EVENT_SIGNAL_HUP, e,
|
||||||
_ecore_signal_generic_free, NULL);
|
_ecore_signal_generic_free, NULL);
|
||||||
}
|
}
|
||||||
Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
|
efl_event_callback_call(_efl_app, EFL_APP_EVENT_SIGNAL_HUP, NULL);
|
||||||
if (loop)
|
|
||||||
efl_event_callback_call(loop, EFL_LOOP_EVENT_SIGNAL_HUP, NULL);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SIGQUIT:
|
case SIGQUIT:
|
||||||
|
|
|
@ -38,6 +38,11 @@ class Efl.App (Efl.Object)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
events {
|
||||||
|
signal,usr1; [[System specific, but on unix maps to SIGUSR1 signal to the process - only called on main loop object]]
|
||||||
|
signal,usr2; [[System specific, but on unix maps to SIGUSR2 signal to the process - only called on main loop object]]
|
||||||
|
signal,hup; [[System specific, but on unix maps to SIGHUP signal to the process - only called on main loop object]]
|
||||||
|
}
|
||||||
implements {
|
implements {
|
||||||
Efl.Object.constructor;
|
Efl.Object.constructor;
|
||||||
Efl.Object.destructor;
|
Efl.Object.destructor;
|
||||||
|
|
|
@ -124,9 +124,6 @@ class Efl.Loop (Efl.Task)
|
||||||
pause; [[Called when the window is not going be displayed for some time]]
|
pause; [[Called when the window is not going be displayed for some time]]
|
||||||
resume; [[Called before a window is rendered after a pause event]]
|
resume; [[Called before a window is rendered after a pause event]]
|
||||||
terminate; [[Called before starting the shutdown of Elementary]]
|
terminate; [[Called before starting the shutdown of Elementary]]
|
||||||
signal,usr1; [[System specific, but on unix maps to SIGUSR1 signal to the process - only called on main loop object]]
|
|
||||||
signal,usr2; [[System specific, but on unix maps to SIGUSR2 signal to the process - only called on main loop object]]
|
|
||||||
signal,hup; [[System specific, but on unix maps to SIGHUP signal to the process - only called on main loop object]]
|
|
||||||
}
|
}
|
||||||
implements {
|
implements {
|
||||||
Efl.Object.constructor;
|
Efl.Object.constructor;
|
||||||
|
|
Loading…
Reference in New Issue