FDOSTUI
FreeDOS Text User Interface
box.h
Go to the documentation of this file.
1 /*
2  BOX.H
3 
4  License CC0 PUBLIC DOMAIN
5 
6  To the extent possible under law, Mark J. Olesen has waived all copyright
7  and related or neighboring rights to FDOSTUI Library. This work is published
8  from: United States.
9 */
10 #ifndef __box_h__
11 
12 struct box
13 {
14  int m_pos_x;
15  int m_pos_y;
16  unsigned int m_len_x;
17  unsigned int m_len_y;
18 };
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 extern int
26  int const i_pos_x,
27  int const i_pos_y,
28  struct box const* i_box);
29 
30 extern int
32  struct box const* i_box1,
33  struct box const* i_box2);
34 
35 extern int
36 box_equal(
37  struct box const* i_box1,
38  struct box const* i_box2);
39 
40 #ifdef __cplusplus
41 }
42 #endif
43 
44 #define __box_h__
45 #endif
int m_pos_y
Definition: box.h:15
unsigned int m_len_y
Definition: box.h:17
int m_pos_x
Definition: box.h:14
int box_contains(int const i_pos_x, int const i_pos_y, struct box const *i_box)
test if point is within box
Definition: box.c:13
int box_contains_box(struct box const *i_box1, struct box const *i_box2)
test if a box is contained in another
Definition: box.c:69
unsigned int m_len_x
Definition: box.h:16
int box_equal(struct box const *i_box1, struct box const *i_box2)
test if box is equal to another
Definition: box.c:88
defines a rectangular region
Definition: box.h:12