ui_timer.h File Reference

This graph shows which files directly or indirectly include this file:

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_tUI_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.

Detailed Description

Definition in file ui_timer.h.


Typedef Documentation

typedef void(* timerCallback_t)(struct uiNode_s *node, struct uiTimer_s *timer)

Definition at line 31 of file ui_timer.h.

typedef struct uiTimer_s uiTimer_t
Todo:
We can use void* for the owner type, and allow to use it outside nodes

Function Documentation

uiTimer_t* UI_AllocTimer ( uiNode_t node,
int  firstDelay,
timerCallback_t  callback 
)

Allocate a new time for a node.

Parameters:
[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   ) 
void UI_TimerRelease ( uiTimer_t timer  ) 
void UI_TimerStart ( uiTimer_t timer  ) 
void UI_TimerStop ( uiTimer_t timer  ) 

Generated by  doxygen 1.6.2