Idler/Animator cleanups.

SVN revision: 34531
This commit is contained in:
Kim Woelders 2008-05-10 23:15:32 +00:00
parent a0a4f36725
commit c906498380
7 changed files with 7 additions and 21 deletions

View File

@ -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;
}
}

View File

@ -1759,7 +1759,7 @@ _DialogsCheckUpdate(void *data __UNUSED__)
void
DialogsInit(void)
{
IdlerAdd(50, _DialogsCheckUpdate, NULL);
IdlerAdd(_DialogsCheckUpdate, NULL);
}
static void

View File

@ -2843,7 +2843,7 @@ ECompMgrSighan(int sig, void *prm __UNUSED__)
ECompMgrInit();
if (Conf_compmgr.enable)
ECompMgrStart();
IdlerAdd(50, _ECompMgrIdler, NULL);
IdlerAdd(_ECompMgrIdler, NULL);
break;
}
}

View File

@ -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;

View File

@ -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)
{

View File

@ -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

View File

@ -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_ */