ecore: Add basic thread checks
Signed-off-by: Mike McCormack <mj.mccormack@samsung.com> SVN revision: 61041
This commit is contained in:
parent
f7ec79e13e
commit
7b1d7bd4a0
|
@ -166,6 +166,8 @@ ecore_animator_add(Ecore_Task_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
Ecore_Animator *animator;
|
Ecore_Animator *animator;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
animator = calloc(1, sizeof(Ecore_Animator));
|
animator = calloc(1, sizeof(Ecore_Animator));
|
||||||
if (!animator) return NULL;
|
if (!animator) return NULL;
|
||||||
|
@ -204,6 +206,8 @@ ecore_animator_timeline_add(double runtime, Ecore_Timeline_Cb func, const void *
|
||||||
{
|
{
|
||||||
Ecore_Animator *animator;
|
Ecore_Animator *animator;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (runtime <= 0.0) runtime = 0.0;
|
if (runtime <= 0.0) runtime = 0.0;
|
||||||
animator = ecore_animator_add(_ecore_animator_run, NULL);
|
animator = ecore_animator_add(_ecore_animator_run, NULL);
|
||||||
animator->data = animator;
|
animator->data = animator;
|
||||||
|
@ -358,6 +362,8 @@ ecore_animator_pos_map(double pos, Ecore_Pos_Map map, double v1, double v2)
|
||||||
EAPI void *
|
EAPI void *
|
||||||
ecore_animator_del(Ecore_Animator *animator)
|
ecore_animator_del(Ecore_Animator *animator)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(animator, ECORE_MAGIC_ANIMATOR))
|
if (!ECORE_MAGIC_CHECK(animator, ECORE_MAGIC_ANIMATOR))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(animator, ECORE_MAGIC_ANIMATOR,
|
ECORE_MAGIC_FAIL(animator, ECORE_MAGIC_ANIMATOR,
|
||||||
|
@ -380,6 +386,8 @@ ecore_animator_del(Ecore_Animator *animator)
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_animator_frametime_set(double frametime)
|
ecore_animator_frametime_set(double frametime)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (frametime < 0.0) frametime = 0.0;
|
if (frametime < 0.0) frametime = 0.0;
|
||||||
if (animators_frametime == frametime) return;
|
if (animators_frametime == frametime) return;
|
||||||
animators_frametime = frametime;
|
animators_frametime = frametime;
|
||||||
|
@ -409,6 +417,8 @@ ecore_animator_frametime_get(void)
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_animator_freeze(Ecore_Animator *animator)
|
ecore_animator_freeze(Ecore_Animator *animator)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(animator, ECORE_MAGIC_ANIMATOR))
|
if (!ECORE_MAGIC_CHECK(animator, ECORE_MAGIC_ANIMATOR))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(animator, ECORE_MAGIC_ANIMATOR,
|
ECORE_MAGIC_FAIL(animator, ECORE_MAGIC_ANIMATOR,
|
||||||
|
@ -429,6 +439,8 @@ ecore_animator_freeze(Ecore_Animator *animator)
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_animator_thaw(Ecore_Animator *animator)
|
ecore_animator_thaw(Ecore_Animator *animator)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(animator, ECORE_MAGIC_ANIMATOR))
|
if (!ECORE_MAGIC_CHECK(animator, ECORE_MAGIC_ANIMATOR))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(animator, ECORE_MAGIC_ANIMATOR,
|
ECORE_MAGIC_FAIL(animator, ECORE_MAGIC_ANIMATOR,
|
||||||
|
@ -463,6 +475,8 @@ ecore_animator_thaw(Ecore_Animator *animator)
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_animator_source_set(Ecore_Animator_Source source)
|
ecore_animator_source_set(Ecore_Animator_Source source)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
src = source;
|
src = source;
|
||||||
_end_tick();
|
_end_tick();
|
||||||
if (animators) _begin_tick();
|
if (animators) _begin_tick();
|
||||||
|
@ -478,6 +492,8 @@ ecore_animator_source_set(Ecore_Animator_Source source)
|
||||||
EAPI Ecore_Animator_Source
|
EAPI Ecore_Animator_Source
|
||||||
ecore_animator_source_get(void)
|
ecore_animator_source_get(void)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
return src;
|
return src;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -499,6 +515,8 @@ ecore_animator_source_get(void)
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_animator_custom_source_tick_begin_callback_set(Ecore_Cb func, const void *data)
|
ecore_animator_custom_source_tick_begin_callback_set(Ecore_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
begin_tick_cb = func;
|
begin_tick_cb = func;
|
||||||
begin_tick_data = data;
|
begin_tick_data = data;
|
||||||
_end_tick();
|
_end_tick();
|
||||||
|
@ -519,6 +537,8 @@ ecore_animator_custom_source_tick_begin_callback_set(Ecore_Cb func, const void *
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_animator_custom_source_tick_end_callback_set(Ecore_Cb func, const void *data)
|
ecore_animator_custom_source_tick_end_callback_set(Ecore_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
end_tick_cb = func;
|
end_tick_cb = func;
|
||||||
end_tick_data = data;
|
end_tick_data = data;
|
||||||
_end_tick();
|
_end_tick();
|
||||||
|
@ -537,6 +557,8 @@ ecore_animator_custom_source_tick_end_callback_set(Ecore_Cb func, const void *da
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_animator_custom_tick(void)
|
ecore_animator_custom_tick(void)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (src == ECORE_ANIMATOR_SOURCE_CUSTOM) _do_tick();
|
if (src == ECORE_ANIMATOR_SOURCE_CUSTOM) _do_tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,8 @@ static char **app_argv = NULL;
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_app_args_set(int argc, const char **argv)
|
ecore_app_args_set(int argc, const char **argv)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if ((argc < 1) ||
|
if ((argc < 1) ||
|
||||||
(!argv)) return;
|
(!argv)) return;
|
||||||
app_argc = argc;
|
app_argc = argc;
|
||||||
|
@ -63,6 +65,8 @@ ecore_app_args_set(int argc, const char **argv)
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_app_args_get(int *argc, char ***argv)
|
ecore_app_args_get(int *argc, char ***argv)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (argc) *argc = app_argc;
|
if (argc) *argc = app_argc;
|
||||||
if (argv) *argv = app_argv;
|
if (argv) *argv = app_argv;
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,6 +142,8 @@ ecore_event_handler_add(int type, Ecore_Event_Handler_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
Ecore_Event_Handler *eh;
|
Ecore_Event_Handler *eh;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
if ((type <= ECORE_EVENT_NONE) || (type >= event_id_max)) return NULL;
|
if ((type <= ECORE_EVENT_NONE) || (type >= event_id_max)) return NULL;
|
||||||
eh = calloc(1, sizeof(Ecore_Event_Handler));
|
eh = calloc(1, sizeof(Ecore_Event_Handler));
|
||||||
|
@ -193,6 +195,8 @@ ecore_event_handler_add(int type, Ecore_Event_Handler_Cb func, const void *data)
|
||||||
EAPI void *
|
EAPI void *
|
||||||
ecore_event_handler_del(Ecore_Event_Handler *event_handler)
|
ecore_event_handler_del(Ecore_Event_Handler *event_handler)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(event_handler, ECORE_MAGIC_EVENT_HANDLER))
|
if (!ECORE_MAGIC_CHECK(event_handler, ECORE_MAGIC_EVENT_HANDLER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(event_handler, ECORE_MAGIC_EVENT_HANDLER,
|
ECORE_MAGIC_FAIL(event_handler, ECORE_MAGIC_EVENT_HANDLER,
|
||||||
|
@ -216,6 +220,8 @@ ecore_event_handler_del(Ecore_Event_Handler *event_handler)
|
||||||
EAPI void *
|
EAPI void *
|
||||||
ecore_event_handler_data_get(Ecore_Event_Handler *eh)
|
ecore_event_handler_data_get(Ecore_Event_Handler *eh)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(eh, ECORE_MAGIC_EVENT_HANDLER))
|
if (!ECORE_MAGIC_CHECK(eh, ECORE_MAGIC_EVENT_HANDLER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(eh, ECORE_MAGIC_EVENT_HANDLER, "ecore_event_handler_data_get");
|
ECORE_MAGIC_FAIL(eh, ECORE_MAGIC_EVENT_HANDLER, "ecore_event_handler_data_get");
|
||||||
|
@ -237,6 +243,9 @@ EAPI void *
|
||||||
ecore_event_handler_data_set(Ecore_Event_Handler *eh, const void *data)
|
ecore_event_handler_data_set(Ecore_Event_Handler *eh, const void *data)
|
||||||
{
|
{
|
||||||
void *old;
|
void *old;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(eh, ECORE_MAGIC_EVENT_HANDLER))
|
if (!ECORE_MAGIC_CHECK(eh, ECORE_MAGIC_EVENT_HANDLER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(eh, ECORE_MAGIC_EVENT_HANDLER, "ecore_event_handler_data_set");
|
ECORE_MAGIC_FAIL(eh, ECORE_MAGIC_EVENT_HANDLER, "ecore_event_handler_data_set");
|
||||||
|
@ -274,6 +283,8 @@ _ecore_event_generic_free (void *data __UNUSED__, void *event)
|
||||||
EAPI Ecore_Event *
|
EAPI Ecore_Event *
|
||||||
ecore_event_add(int type, void *ev, Ecore_End_Cb func_free, void *data)
|
ecore_event_add(int type, void *ev, Ecore_End_Cb func_free, void *data)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
/* if (!ev) return NULL;*/
|
/* if (!ev) return NULL;*/
|
||||||
if (type <= ECORE_EVENT_NONE) return NULL;
|
if (type <= ECORE_EVENT_NONE) return NULL;
|
||||||
if (type >= event_id_max) return NULL;
|
if (type >= event_id_max) return NULL;
|
||||||
|
@ -295,6 +306,8 @@ ecore_event_add(int type, void *ev, Ecore_End_Cb func_free, void *data)
|
||||||
EAPI void *
|
EAPI void *
|
||||||
ecore_event_del(Ecore_Event *event)
|
ecore_event_del(Ecore_Event *event)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(event, ECORE_MAGIC_EVENT))
|
if (!ECORE_MAGIC_CHECK(event, ECORE_MAGIC_EVENT))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(event, ECORE_MAGIC_EVENT, "ecore_event_del");
|
ECORE_MAGIC_FAIL(event, ECORE_MAGIC_EVENT, "ecore_event_del");
|
||||||
|
@ -318,6 +331,8 @@ ecore_event_del(Ecore_Event *event)
|
||||||
EAPI int
|
EAPI int
|
||||||
ecore_event_type_new(void)
|
ecore_event_type_new(void)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
event_id_max++;
|
event_id_max++;
|
||||||
return event_id_max - 1;
|
return event_id_max - 1;
|
||||||
}
|
}
|
||||||
|
@ -347,6 +362,8 @@ ecore_event_filter_add(Ecore_Data_Cb func_start, Ecore_Filter_Cb func_filter, Ec
|
||||||
{
|
{
|
||||||
Ecore_Event_Filter *ef;
|
Ecore_Event_Filter *ef;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!func_filter) return NULL;
|
if (!func_filter) return NULL;
|
||||||
ef = calloc(1, sizeof(Ecore_Event_Filter));
|
ef = calloc(1, sizeof(Ecore_Event_Filter));
|
||||||
if (!ef) return NULL;
|
if (!ef) return NULL;
|
||||||
|
@ -371,6 +388,8 @@ ecore_event_filter_add(Ecore_Data_Cb func_start, Ecore_Filter_Cb func_filter, Ec
|
||||||
EAPI void *
|
EAPI void *
|
||||||
ecore_event_filter_del(Ecore_Event_Filter *ef)
|
ecore_event_filter_del(Ecore_Event_Filter *ef)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(ef, ECORE_MAGIC_EVENT_FILTER))
|
if (!ECORE_MAGIC_CHECK(ef, ECORE_MAGIC_EVENT_FILTER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(ef, ECORE_MAGIC_EVENT_FILTER, "ecore_event_filter_del");
|
ECORE_MAGIC_FAIL(ef, ECORE_MAGIC_EVENT_FILTER, "ecore_event_filter_del");
|
||||||
|
|
|
@ -50,6 +50,8 @@ ecore_idle_enterer_add(Ecore_Task_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
Ecore_Idle_Enterer *ie;
|
Ecore_Idle_Enterer *ie;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
ie = calloc(1, sizeof(Ecore_Idle_Enterer));
|
ie = calloc(1, sizeof(Ecore_Idle_Enterer));
|
||||||
if (!ie) return NULL;
|
if (!ie) return NULL;
|
||||||
|
@ -75,6 +77,8 @@ ecore_idle_enterer_before_add(Ecore_Task_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
Ecore_Idle_Enterer *ie;
|
Ecore_Idle_Enterer *ie;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
ie = calloc(1, sizeof(Ecore_Idle_Enterer));
|
ie = calloc(1, sizeof(Ecore_Idle_Enterer));
|
||||||
if (!ie) return NULL;
|
if (!ie) return NULL;
|
||||||
|
@ -94,6 +98,8 @@ ecore_idle_enterer_before_add(Ecore_Task_Cb func, const void *data)
|
||||||
EAPI void *
|
EAPI void *
|
||||||
ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer)
|
ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(idle_enterer, ECORE_MAGIC_IDLE_ENTERER))
|
if (!ECORE_MAGIC_CHECK(idle_enterer, ECORE_MAGIC_IDLE_ENTERER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(idle_enterer, ECORE_MAGIC_IDLE_ENTERER,
|
ECORE_MAGIC_FAIL(idle_enterer, ECORE_MAGIC_IDLE_ENTERER,
|
||||||
|
|
|
@ -49,6 +49,8 @@ ecore_idle_exiter_add(Ecore_Task_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
Ecore_Idle_Exiter *ie;
|
Ecore_Idle_Exiter *ie;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
ie = calloc(1, sizeof(Ecore_Idle_Exiter));
|
ie = calloc(1, sizeof(Ecore_Idle_Exiter));
|
||||||
if (!ie) return NULL;
|
if (!ie) return NULL;
|
||||||
|
@ -68,6 +70,8 @@ ecore_idle_exiter_add(Ecore_Task_Cb func, const void *data)
|
||||||
EAPI void *
|
EAPI void *
|
||||||
ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter)
|
ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(idle_exiter, ECORE_MAGIC_IDLE_EXITER))
|
if (!ECORE_MAGIC_CHECK(idle_exiter, ECORE_MAGIC_IDLE_EXITER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(idle_exiter, ECORE_MAGIC_IDLE_EXITER,
|
ECORE_MAGIC_FAIL(idle_exiter, ECORE_MAGIC_IDLE_EXITER,
|
||||||
|
|
|
@ -674,10 +674,11 @@ _ecore_main_loop_shutdown(void)
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_main_loop_iterate(void)
|
ecore_main_loop_iterate(void)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
#ifndef USE_G_MAIN_LOOP
|
#ifndef USE_G_MAIN_LOOP
|
||||||
_ecore_main_loop_iterate_internal(1);
|
_ecore_main_loop_iterate_internal(1);
|
||||||
#else
|
#else
|
||||||
g_main_context_iteration(NULL, 1);
|
g_main_context_iteration(NULL, 1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -702,6 +703,7 @@ ecore_main_loop_iterate(void)
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_main_loop_begin(void)
|
ecore_main_loop_begin(void)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
#ifndef USE_G_MAIN_LOOP
|
#ifndef USE_G_MAIN_LOOP
|
||||||
in_main_loop++;
|
in_main_loop++;
|
||||||
while (do_quit == 0) _ecore_main_loop_iterate_internal(0);
|
while (do_quit == 0) _ecore_main_loop_iterate_internal(0);
|
||||||
|
@ -820,6 +822,8 @@ ecore_main_fd_handler_add(int fd, Ecore_Fd_Handler_Flags flags, Ecore_Fd_Cb func
|
||||||
{
|
{
|
||||||
Ecore_Fd_Handler *fdh;
|
Ecore_Fd_Handler *fdh;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if ((fd < 0) || (flags == 0) || (!func)) return NULL;
|
if ((fd < 0) || (flags == 0) || (!func)) return NULL;
|
||||||
|
|
||||||
fdh = calloc(1, sizeof(Ecore_Fd_Handler));
|
fdh = calloc(1, sizeof(Ecore_Fd_Handler));
|
||||||
|
@ -895,6 +899,8 @@ ecore_main_win32_handler_add(void *h __UNUSED__, Ecore_Win32_Handle_Cb func __UN
|
||||||
EAPI void *
|
EAPI void *
|
||||||
ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler)
|
ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER))
|
if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(fd_handler, ECORE_MAGIC_FD_HANDLER,
|
ECORE_MAGIC_FAIL(fd_handler, ECORE_MAGIC_FD_HANDLER,
|
||||||
|
@ -960,6 +966,8 @@ ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler __UNUSED__)
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_main_fd_handler_prepare_callback_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Prep_Cb func, const void *data)
|
ecore_main_fd_handler_prepare_callback_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Prep_Cb func, const void *data)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER))
|
if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(fd_handler, ECORE_MAGIC_FD_HANDLER,
|
ECORE_MAGIC_FAIL(fd_handler, ECORE_MAGIC_FD_HANDLER,
|
||||||
|
@ -1006,6 +1014,8 @@ ecore_main_fd_handler_active_get(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_
|
||||||
{
|
{
|
||||||
int ret = EINA_FALSE;
|
int ret = EINA_FALSE;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER))
|
if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(fd_handler, ECORE_MAGIC_FD_HANDLER,
|
ECORE_MAGIC_FAIL(fd_handler, ECORE_MAGIC_FD_HANDLER,
|
||||||
|
@ -1029,6 +1039,8 @@ ecore_main_fd_handler_active_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER))
|
if (!ECORE_MAGIC_CHECK(fd_handler, ECORE_MAGIC_FD_HANDLER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(fd_handler, ECORE_MAGIC_FD_HANDLER,
|
ECORE_MAGIC_FAIL(fd_handler, ECORE_MAGIC_FD_HANDLER,
|
||||||
|
|
|
@ -107,6 +107,8 @@ ecore_timer_precision_get(void)
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_timer_precision_set(double value)
|
ecore_timer_precision_set(double value)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (value < 0.0)
|
if (value < 0.0)
|
||||||
{
|
{
|
||||||
ERR("Precision %f less than zero, ignored", value);
|
ERR("Precision %f less than zero, ignored", value);
|
||||||
|
@ -139,6 +141,8 @@ ecore_timer_add(double in, Ecore_Task_Cb func, const void *data)
|
||||||
double now;
|
double now;
|
||||||
Ecore_Timer *timer;
|
Ecore_Timer *timer;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
if (in < 0.0) in = 0.0;
|
if (in < 0.0) in = 0.0;
|
||||||
timer = calloc(1, sizeof(Ecore_Timer));
|
timer = calloc(1, sizeof(Ecore_Timer));
|
||||||
|
@ -173,6 +177,8 @@ ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data)
|
||||||
double now;
|
double now;
|
||||||
Ecore_Timer *timer;
|
Ecore_Timer *timer;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!func) return NULL;
|
if (!func) return NULL;
|
||||||
if (in < 0.0) in = 0.0;
|
if (in < 0.0) in = 0.0;
|
||||||
timer = calloc(1, sizeof(Ecore_Timer));
|
timer = calloc(1, sizeof(Ecore_Timer));
|
||||||
|
@ -201,6 +207,8 @@ ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data)
|
||||||
EAPI void *
|
EAPI void *
|
||||||
ecore_timer_del(Ecore_Timer *timer)
|
ecore_timer_del(Ecore_Timer *timer)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
|
if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
|
ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
|
||||||
|
@ -237,6 +245,8 @@ ecore_timer_del(Ecore_Timer *timer)
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_timer_interval_set(Ecore_Timer *timer, double in)
|
ecore_timer_interval_set(Ecore_Timer *timer, double in)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
|
if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
|
ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
|
||||||
|
@ -255,6 +265,8 @@ ecore_timer_interval_set(Ecore_Timer *timer, double in)
|
||||||
EAPI double
|
EAPI double
|
||||||
ecore_timer_interval_get(Ecore_Timer *timer)
|
ecore_timer_interval_get(Ecore_Timer *timer)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
|
if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
|
ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
|
||||||
|
@ -275,6 +287,8 @@ ecore_timer_interval_get(Ecore_Timer *timer)
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_timer_delay(Ecore_Timer *timer, double add)
|
ecore_timer_delay(Ecore_Timer *timer, double add)
|
||||||
{
|
{
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
|
if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
|
ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
|
||||||
|
@ -304,6 +318,8 @@ ecore_timer_pending_get(Ecore_Timer *timer)
|
||||||
{
|
{
|
||||||
double now;
|
double now;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
|
if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
|
ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
|
||||||
|
@ -337,6 +353,8 @@ ecore_timer_freeze(Ecore_Timer *timer)
|
||||||
{
|
{
|
||||||
double now;
|
double now;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
|
if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
|
ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
|
||||||
|
@ -376,6 +394,8 @@ ecore_timer_thaw(Ecore_Timer *timer)
|
||||||
{
|
{
|
||||||
double now;
|
double now;
|
||||||
|
|
||||||
|
ECORE_MAIN_LOOP_ASSERT();
|
||||||
|
|
||||||
if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
|
if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
|
||||||
{
|
{
|
||||||
ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
|
ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
|
||||||
|
|
Loading…
Reference in New Issue