blob: b9985d14a2737034edeceffee2dff28e2c8079c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*
* PARSEC HEADER: e_mouse.h
*/
#ifndef _E_MOUSE_H_
#define _E_MOUSE_H_
// mouse area definition in reference size
struct mouse_area_s {
int xpos;
int ypos;
int width;
int height;
};
// mouse area definition for scaled coordinates
struct mouse_area_scaled_s {
int xleft;
int xright;
int ytop;
int ybottom;
};
// external functions
void MouseCalcScaledAreas( mouse_area_s *src, mouse_area_scaled_s *dst, int numareas );
int DrawMouseCursor();
// determine whether a position is within the supplied area -------------------
//
inline
int MouseOverArea( mouse_area_scaled_s *area, int mousex, int mousey )
{
ASSERT( area != NULL );
return ( ( mousex >= area->xleft ) && ( mousex < area->xright ) &&
( mousey >= area->ytop ) && ( mousey < area->ybottom ) );
}
#endif // _E_MOUSE_H_
|