EU1KY AA
hit.h
Go to the documentation of this file.
1 /*
2  * (c) Yury Kuchura
3  * kuchura@gmail.com
4  *
5  * This code can be used on terms of WTFPL Version 2 (http://www.wtfpl.net/).
6  */
7 
8 #ifndef _HIT_H_
9 #define _HIT_H_
10 
11 #include <stdint.h>
12 #include "LCD.h"
13 #include "main.h"
14 
15 struct HitRect
16 {
17  uint32_t x1;
18  uint32_t y1;
19  uint32_t x2;
20  uint32_t y2;
22 };
23 
24 #define HITRECT(x0, y0, width, height, callback) \
25  {(x0), (y0), (x0) + (width) - 1, (y0) + (height) - 1, (callback)}
26 
27 #define HITEND { 0xFFFFFFFFul, 0, 0xFFFFFFFFul, 0, 0 }
28 
29 int HitTest(const struct HitRect* r, uint32_t x, uint32_t y);
30 void ShowHitRect(const struct HitRect* hitArr);// WK
31 
32 #endif
Definition: hit.h:15
static const struct HitRect hitArr[]
Definition: tdr.c:511
uint32_t y2
Definition: hit.h:20
uint32_t y1
Definition: hit.h:18
void(* HitCallback)(void)
Definition: hit.h:21
int HitTest(const struct HitRect *r, uint32_t x, uint32_t y)
Definition: hit.c:24
uint32_t x1
Definition: hit.h:17
void ShowHitRect(const struct HitRect *hitArr)
Definition: hit.c:13
void(Delete(void))
Definition: mainwnd.c:360
uint32_t x2
Definition: hit.h:19