FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
gfx_getmouse.c
Go to the documentation of this file.
1
/* GETMOUSE function support. */
2
3
#include "
fb_gfx.h
"
4
5
6
/*:::::*/
7
int
fb_GfxGetMouse
(
int
*x,
int
*y,
int
*z,
int
*buttons,
int
*clip)
8
{
9
int
failure =
TRUE
;
10
int
temp_z, temp_buttons, temp_clip;
11
12
if
(!z)
13
z = &temp_z;
14
if
(!buttons)
15
buttons = &temp_buttons;
16
if
(!clip)
17
clip = &temp_clip;
18
if
((
__fb_gfx
) && (
__fb_gfx
->
driver
->
get_mouse
)) {
19
DRIVER_LOCK
();
20
failure =
__fb_gfx
->
driver
->
get_mouse
(x, y, z, buttons, clip);
21
DRIVER_UNLOCK
();
22
}
23
if
(failure) {
24
*x = *y = *z = *buttons = *clip = -1;
25
return
fb_ErrorSetNum
(
FB_RTERROR_ILLEGALFUNCTIONCALL
);
26
}
27
return
fb_ErrorSetNum
(
FB_RTERROR_OK
);
28
}
gfxlib2
gfx_getmouse.c
Generated on Thu Jan 23 2014 19:40:06 for FreeBASIC by
1.8.4