From c906498380648be500e05b35465554d96086409c Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Sat, 10 May 2008 23:15:32 +0000 Subject: [PATCH] Idler/Animator cleanups. SVN revision: 34531 --- src/desktops.c | 2 +- src/dialog.c | 2 +- src/ecompmgr.c | 2 +- src/focus.c | 2 +- src/pager.c | 2 +- src/timers.c | 15 +-------------- src/timers.h | 3 +-- 7 files changed, 7 insertions(+), 21 deletions(-) diff --git a/src/desktops.c b/src/desktops.c index 0da0cd3a..bb1c9e3a 100644 --- a/src/desktops.c +++ b/src/desktops.c @@ -2159,7 +2159,7 @@ DesksSighan(int sig, void *prm __UNUSED__) case ESIGNAL_START: /* Draw all the buttons that belong on the desktop */ DeskShowButtons(); - IdlerAdd(50, _DesksIdler, NULL); + IdlerAdd(_DesksIdler, NULL); break; } } diff --git a/src/dialog.c b/src/dialog.c index e78b62c4..38bd21f4 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -1759,7 +1759,7 @@ _DialogsCheckUpdate(void *data __UNUSED__) void DialogsInit(void) { - IdlerAdd(50, _DialogsCheckUpdate, NULL); + IdlerAdd(_DialogsCheckUpdate, NULL); } static void diff --git a/src/ecompmgr.c b/src/ecompmgr.c index 76067e8c..64a7a055 100644 --- a/src/ecompmgr.c +++ b/src/ecompmgr.c @@ -2843,7 +2843,7 @@ ECompMgrSighan(int sig, void *prm __UNUSED__) ECompMgrInit(); if (Conf_compmgr.enable) ECompMgrStart(); - IdlerAdd(50, _ECompMgrIdler, NULL); + IdlerAdd(_ECompMgrIdler, NULL); break; } } diff --git a/src/focus.c b/src/focus.c index 63aea28d..85e706f1 100644 --- a/src/focus.c +++ b/src/focus.c @@ -886,7 +886,7 @@ FocusSighan(int sig, void *prm __UNUSED__) { case ESIGNAL_START: /* Delay focusing a bit to allow things to settle down */ - IdlerAdd(50, _FocusIdler, NULL); + IdlerAdd(_FocusIdler, NULL); DoIn("FOCUS_INIT_TIMEOUT", 0.5, FocusInitTimeout, 0, NULL); break; diff --git a/src/pager.c b/src/pager.c index b7983ca6..5f6e1f72 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1729,7 +1729,7 @@ PagersShow(int enable) for (i = 0; i < DesksGetNumber(); i++) PagersForDesktopEnable(DeskGet(i)); UpdatePagerSel(); - Mode_pagers.idler = IdlerAdd(50, _PagersIdler, NULL); + Mode_pagers.idler = IdlerAdd(_PagersIdler, NULL); } else if (!enable && Conf_pagers.enable) { diff --git a/src/timers.c b/src/timers.c index 34631986..ab73ab0a 100644 --- a/src/timers.c +++ b/src/timers.c @@ -179,13 +179,12 @@ static Ecore_List *idler_list = NULL; typedef void (IdlerFunc) (void *data); struct _idler { - int order; IdlerFunc *func; void *data; }; Idler * -IdlerAdd(int order, IdlerFunc * func, void *data) +IdlerAdd(IdlerFunc * func, void *data) { Idler *id; @@ -193,7 +192,6 @@ IdlerAdd(int order, IdlerFunc * func, void *data) if (!id) return NULL; - id->order = order; /* Not used atm. */ id->func = func; id->data = data; @@ -238,7 +236,6 @@ static Ecore_List *animator_list = NULL; typedef int (AnimatorFunc) (void *data); struct _animator { - char *name; AnimatorFunc *func; void *data; }; @@ -278,7 +275,6 @@ AnimatorAdd(AnimatorFunc * func, void *data) #if DEBUG_ANIMATORS Eprintf("AnimatorAdd %p func=%p data=%p\n", an, func, data); #endif - an->name = NULL; an->func = func; an->data = data; @@ -306,7 +302,6 @@ AnimatorDel(Animator * an) #endif ecore_list_node_remove(animator_list, an); - Efree(an->name); Efree(an); if (ecore_list_count(animator_list) == 0) @@ -315,11 +310,3 @@ AnimatorDel(Animator * an) RemoveTimerEvent("Anim"); } } - -#if 0 /* Unused */ -void * -AnimatorGetData(Animator * an) -{ - return an->data; -} -#endif diff --git a/src/timers.h b/src/timers.h index 2cdbd9fe..0111e0a4 100644 --- a/src/timers.h +++ b/src/timers.h @@ -34,13 +34,12 @@ int RemoveTimerEvent(const char *name); double TimersRun(double t); typedef struct _idler Idler; -Idler *IdlerAdd(int order, void (*func) (void *data), void *data); +Idler *IdlerAdd(void (*func) (void *data), void *data); void IdlerDel(Idler * id); void IdlersRun(void); typedef struct _animator Animator; Animator *AnimatorAdd(int (*func) (void *data), void *data); void AnimatorDel(Animator * an); -void *AnimatorGetData(Animator * an); #endif /* _TIMERS_H_ */