Go to the source code of this file.
Data Structures | |
struct | uiTimer_s |
Typedefs | |
typedef void(* | timerCallback_t )(struct uiNode_s *node, struct uiTimer_s *timer) |
typedef struct uiTimer_s | uiTimer_t |
Functions | |
uiTimer_t * | UI_AllocTimer (struct uiNode_s *node, int firstDelay, timerCallback_t callback) __attribute__((warn_unused_result)) |
Allocate a new time for a node. | |
void | UI_TimerStart (uiTimer_t *timer) |
Restart a timer. | |
void | UI_TimerStop (uiTimer_t *timer) |
Stop a timer. | |
void | UI_TimerRelease (uiTimer_t *timer) |
Release the timer. It no more exists. | |
void | UI_HandleTimers (void) |
Internal function to handle timers. |
Definition in file ui_timer.h.
typedef void(* timerCallback_t)(struct uiNode_s *node, struct uiTimer_s *timer) |
Definition at line 31 of file ui_timer.h.
uiTimer_t* UI_AllocTimer | ( | uiNode_t * | node, | |
int | firstDelay, | |||
timerCallback_t | callback | |||
) |
Allocate a new time for a node.
[in] | node | node parent of the timer |
[in] | firstDelay | millisecond delay to wait the callback |
[in] | callback | callback function to call every delay |
Definition at line 123 of file ui_timer.c.
References uiTimer_s::callback, uiTimer_s::calledTime, Com_Error(), uiTimer_s::delay, ERR_FATAL, i, uiTimer_s::isRunning, uiTimer_s::next, uiTimer_s::owner, uiTimer_s::prev, qfalse, and UI_TIMER_SLOT_NUMBER.
Referenced by testTimerDataStructure(), UI_GenAllRadarMap_f(), UI_InitDraw(), UI_SpinnerNodeDown(), UI_VScrollbarNodeAction(), and UI_ZoneNodeDown().
void UI_HandleTimers | ( | void | ) |
Internal function to handle timers.
Definition at line 98 of file ui_timer.c.
References uiTimer_s::callback, uiTimer_s::calledTime, CL_Milliseconds(), uiTimer_s::delay, uiTimer_s::isRunning, uiTimer_s::next, uiTimer_s::nextTime, uiTimer_s::owner, UI_InsertTimerInActiveList(), and UI_RemoveTimerFromActiveList().
Referenced by UI_Draw().
void UI_TimerRelease | ( | uiTimer_t * | timer | ) |
Release the timer. It no more exists.
Definition at line 177 of file ui_timer.c.
References uiTimer_s::callback, uiTimer_s::next, uiTimer_s::owner, uiTimer_s::prev, and UI_RemoveTimerFromActiveList().
Referenced by testTimerDataStructure(), UI_GenAllRadarMapRelease_f(), UI_SpinnerNodeCapturedMouseLost(), UI_VScrollbarNodeCapturedMouseLost(), and UI_ZoneNodeCapturedMouseLost().
void UI_TimerStart | ( | uiTimer_t * | timer | ) |
Restart a timer.
Definition at line 151 of file ui_timer.c.
References CL_Milliseconds(), uiTimer_s::delay, uiTimer_s::isRunning, uiTimer_s::next, uiTimer_s::nextTime, uiTimer_s::prev, qtrue, and UI_InsertTimerInActiveList().
Referenced by testTimerDataStructure(), UI_Draw(), UI_GenAllRadarMap_f(), UI_SpinnerNodeDown(), UI_VScrollbarNodeAction(), and UI_ZoneNodeDown().
void UI_TimerStop | ( | uiTimer_t * | timer | ) |
Stop a timer.
Definition at line 164 of file ui_timer.c.
References uiTimer_s::isRunning, uiTimer_s::next, uiTimer_s::prev, qfalse, and UI_RemoveTimerFromActiveList().
Referenced by testTimerDataStructure(), UI_CheckTooltipDelay(), and UI_Draw().