UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
ui_timer.h
Go to the documentation of this file.
1
4
5
/*
6
Copyright (C) 2002-2025 UFO: Alien Invasion.
7
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License
10
as published by the Free Software Foundation; either version 2
11
of the License, or (at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
17
See the GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23
*/
24
25
#pragma once
26
27
#include "
../../shared/cxx.h
"
28
struct
uiNode_t
;
29
struct
uiTimer_s;
30
31
typedef
void
(*
timerCallback_t
)(
uiNode_t
* node,
struct
uiTimer_s*
timer
);
32
36
typedef
struct
uiTimer_s {
37
struct
uiTimer_s*
next
;
38
struct
uiTimer_s*
prev
;
39
int
nextTime
;
40
41
uiNode_t
*
owner
;
42
timerCallback_t
callback
;
43
int
calledTime
;
44
45
int
delay
;
46
void
*
userData
;
47
bool
isRunning
;
48
}
uiTimer_t
;
49
50
uiTimer_t
*
UI_AllocTimer
(
uiNode_t
* node,
int
firstDelay,
timerCallback_t
callback)
__attribute__
((warn_unused_result));
51
void
UI_TimerStart
(
uiTimer_t
*
timer
);
52
void
UI_TimerStop
(
uiTimer_t
*
timer
);
53
void
UI_TimerRelease
(
uiTimer_t
*
timer
);
54
void
UI_ResetTimers
(
void
);
55
void
UI_HandleTimers
(
void
);
56
57
#ifdef COMPILE_UNITTESTS
58
const
uiTimer_t
* UI_PrivateGetFirstTimer(
void
);
59
void
UI_PrivateInsertTimerInActiveList(
uiTimer_t
* first,
uiTimer_t
* newTimer);
60
#endif
cxx.h
__attribute__
#define __attribute__(x)
Definition
cxx.h:37
void
QGL_EXTERN void(APIENTRY *qglActiveTexture)(GLenum texture)
timer
Definition
common.cpp:81
uiNode_t
Atomic structure used to define most of the UI.
Definition
ui_nodes.h:80
uiTimer_t
Definition
ui_timer.h:36
uiTimer_t::calledTime
int calledTime
Definition
ui_timer.h:43
uiTimer_t::owner
uiNode_t * owner
Definition
ui_timer.h:41
uiTimer_t::nextTime
int nextTime
Definition
ui_timer.h:39
uiTimer_t::prev
struct uiTimer_s * prev
Definition
ui_timer.h:38
uiTimer_t::callback
timerCallback_t callback
Definition
ui_timer.h:42
uiTimer_t::isRunning
bool isRunning
Definition
ui_timer.h:47
uiTimer_t::next
struct uiTimer_s * next
Definition
ui_timer.h:37
uiTimer_t::delay
int delay
Definition
ui_timer.h:45
uiTimer_t::userData
void * userData
Definition
ui_timer.h:46
UI_HandleTimers
void UI_HandleTimers(void)
Internal function to handle timers.
Definition
ui_timer.cpp:98
UI_AllocTimer
uiTimer_t * UI_AllocTimer(uiNode_t *node, int firstDelay, timerCallback_t callback) __attribute__((warn_unused_result))
Allocate a new time for a node.
Definition
ui_timer.cpp:123
UI_TimerStop
void UI_TimerStop(uiTimer_t *timer)
Stop a timer.
Definition
ui_timer.cpp:163
UI_ResetTimers
void UI_ResetTimers(void)
Definition
ui_timer.cpp:185
UI_TimerStart
void UI_TimerStart(uiTimer_t *timer)
Restart a timer.
Definition
ui_timer.cpp:150
UI_TimerRelease
void UI_TimerRelease(uiTimer_t *timer)
Release the timer. It no more exists.
Definition
ui_timer.cpp:176
timerCallback_t
void(* timerCallback_t)(uiNode_t *node, struct uiTimer_s *timer)
Definition
ui_timer.h:31
src
client
ui
ui_timer.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0