FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
gfx_event.c
Go to the documentation of this file.
1
/* system events retrieving */
2
3
#include "
fb_gfx.h
"
4
5
6
/*:::::*/
7
FBCALL
int
fb_GfxEvent
(
EVENT
*event)
8
{
9
EVENT
*e =
NULL
;
10
11
if
(!
__fb_gfx
)
12
return
FB_FALSE
;
13
14
EVENT_LOCK
();
15
if
(
__fb_gfx
->
event_head
!=
__fb_gfx
->
event_tail
) {
16
e = &
__fb_gfx
->
event_queue
[
__fb_gfx
->
event_head
];
17
if
(event)
18
__fb_gfx
->
event_head
= (
__fb_gfx
->
event_head
+ 1) & (
MAX_EVENTS
- 1);
19
}
20
if
(e && event)
21
fb_hMemCpy
(event, e,
sizeof
(
EVENT
));
22
EVENT_UNLOCK
();
23
24
return
e ?
FB_TRUE
:
FB_FALSE
;
25
}
gfxlib2
gfx_event.c
Generated on Thu Jan 23 2014 19:40:06 for FreeBASIC by
1.8.4