UFO: Alien Invasion
Loading...
Searching...
No Matches
ui_timer.h File Reference
#include "../../shared/cxx.h"
Include dependency graph for ui_timer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  uiTimer_t

Typedefs

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

Functions

uiTimer_tUI_AllocTimer (uiNode_t *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_ResetTimers (void)
void UI_HandleTimers (void)
 Internal function to handle timers.

Typedef Documentation

◆ timerCallback_t

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

Definition at line 31 of file ui_timer.h.

Function Documentation

◆ UI_AllocTimer()

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

Allocate a new time for a node.

Parameters
[in]nodenode parent of the timer
[in]firstDelaymillisecond delay to wait the callback
[in]callbackcallback function to call every delay

Definition at line 123 of file ui_timer.cpp.

References Com_Error(), ERR_FATAL, i, UI_TIMER_SLOT_NUMBER, and ui_timerSlots.

Referenced by CL_BattlescapeRadarGenerateAll_f(), uiSpinnerNode::onMouseDown(), uiZoneNode::onMouseDown(), TEST_F(), UI_InitDraw(), UI_MouseDown(), and UI_VScrollbarNodeAction().

◆ UI_HandleTimers()

void UI_HandleTimers ( void )

Internal function to handle timers.

Definition at line 98 of file ui_timer.cpp.

References CL_Milliseconds(), ui_firstTimer, UI_InsertTimerInActiveList(), and UI_RemoveTimerFromActiveList().

Referenced by UI_Draw().

◆ UI_ResetTimers()

void UI_ResetTimers ( void )

Definition at line 185 of file ui_timer.cpp.

References OBJZERO, ui_firstTimer, and ui_timerSlots.

Referenced by UI_Shutdown().

◆ UI_TimerRelease()

◆ UI_TimerStart()

◆ UI_TimerStop()

void UI_TimerStop ( uiTimer_t * timer)