Correct logic of BSP back/front tests
[neverball] / share / gui.h
1 /*
2  * Copyright (C) 2003 Robert Kooima
3  *
4  * NEVERBALL is  free software; you can redistribute  it and/or modify
5  * it under the  terms of the GNU General  Public License as published
6  * by the Free  Software Foundation; either version 2  of the License,
7  * or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT  ANY  WARRANTY;  without   even  the  implied  warranty  of
11  * MERCHANTABILITY or  FITNESS FOR A PARTICULAR PURPOSE.   See the GNU
12  * General Public License for more details.
13  */
14
15 #ifndef GUI_H
16 #define GUI_H
17
18 #include "glext.h"
19
20 /*---------------------------------------------------------------------------*/
21
22 #define GUI_SML  0
23 #define GUI_MED  1
24 #define GUI_LRG  2
25
26 #define GUI_NW   1
27 #define GUI_SW   2
28 #define GUI_NE   4
29 #define GUI_SE   8
30
31 #define GUI_LFT  (GUI_NW  | GUI_SW)
32 #define GUI_RGT  (GUI_NE  | GUI_SE)
33 #define GUI_TOP  (GUI_NW  | GUI_NE)
34 #define GUI_BOT  (GUI_SW  | GUI_SE)
35 #define GUI_ALL  (GUI_TOP | GUI_BOT)
36
37 extern const GLfloat gui_wht[4];
38 extern const GLfloat gui_yel[4];
39 extern const GLfloat gui_red[4];
40 extern const GLfloat gui_blu[4];
41 extern const GLfloat gui_grn[4];
42 extern const GLfloat gui_blk[4];
43 extern const GLfloat gui_gry[4];
44
45 /*---------------------------------------------------------------------------*/
46
47 void gui_init(void);
48 void gui_free(void);
49
50 /*---------------------------------------------------------------------------*/
51
52 void gui_set_label(int, const char *);
53 void gui_set_image(int, const char *);
54 void gui_set_multi(int, const char *);
55 void gui_set_count(int, int);
56 void gui_set_clock(int, int);
57 void gui_set_color(int, const float *, const float *);
58
59 /*---------------------------------------------------------------------------*/
60
61 int  gui_harray(int);
62 int  gui_varray(int);
63 int  gui_hstack(int);
64 int  gui_vstack(int);
65 int  gui_filler(int);
66
67 int  gui_image(int, const char *, int, int);
68 int  gui_start(int, const char *, int, int, int);
69 int  gui_state(int, const char *, int, int, int);
70 int  gui_label(int, const char *, int, int, const float *, const float *);
71 int  gui_multi(int, const char *, int, int, const float *, const float *);
72 int  gui_count(int, int, int, int);
73 int  gui_clock(int, int, int, int);
74 int  gui_space(int);
75
76 /*---------------------------------------------------------------------------*/
77
78 void gui_dump(int, int);
79 void gui_layout(int, int, int);
80 int  gui_search(int, int, int);
81 int  gui_active(int, int, int);
82 int  gui_delete(int);
83
84 /*---------------------------------------------------------------------------*/
85
86 void gui_paint(int);
87 void gui_pulse(int, float);
88 void gui_timer(int, float);
89 int  gui_point(int, int, int);
90 int  gui_stick(int, int, int);
91 void gui_stuck(void);
92 int  gui_click(void);
93 void gui_focus(int);
94
95 int  gui_token(int);
96 int  gui_value(int);
97 void gui_toggle(int);
98
99 /*---------------------------------------------------------------------------*/
100
101 #endif