FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
hook_inkey.c
Go to the documentation of this file.
1
/* inkey$ entrypoint, default to console mode */
2
3
#include "
fb.h
"
4
5
/*:::::*/
6
FBCALL
FBSTRING
*
fb_Inkey
(
void
)
7
{
8
FBSTRING
*res;
9
10
FB_LOCK
();
11
12
if
(
__fb_ctx
.
hooks
.
inkeyproc
)
13
res =
__fb_ctx
.
hooks
.
inkeyproc
( );
14
else
15
res =
fb_ConsoleInkey
( );
16
17
FB_UNLOCK
();
18
19
return
res;
20
}
21
22
/*:::::*/
23
FBCALL
int
fb_Getkey
(
void
)
24
{
25
int
res;
26
27
FB_LOCK
();
28
29
if
(
__fb_ctx
.
hooks
.
getkeyproc
)
30
res =
__fb_ctx
.
hooks
.
getkeyproc
( );
31
else
32
res =
fb_ConsoleGetkey
( );
33
34
FB_UNLOCK
();
35
36
return
res;
37
}
38
39
/*:::::*/
40
FBCALL
int
fb_KeyHit
(
void
)
41
{
42
int
res;
43
44
FB_LOCK
();
45
46
if
(
__fb_ctx
.
hooks
.
keyhitproc
)
47
res =
__fb_ctx
.
hooks
.
keyhitproc
( );
48
else
49
res =
fb_ConsoleKeyHit
( );
50
51
FB_UNLOCK
();
52
53
return
res;
54
}
rtlib
hook_inkey.c
Generated on Thu Jan 23 2014 19:40:11 for FreeBASIC by
1.8.4