cd07933fba383148e58cde42dc2f7f9a0ff715a1
[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 #include "lang.h"
20
21 /*---------------------------------------------------------------------------*/
22
23 #define GUI_FACE N_("ttf/DejaVuSans-Bold.ttf")
24
25 #define GUI_SML  0
26 #define GUI_MED  1
27 #define GUI_LRG  2
28
29 #define GUI_NW   1
30 #define GUI_SW   2
31 #define GUI_NE   4
32 #define GUI_SE   8
33
34 #define GUI_LFT  (GUI_NW  | GUI_SW)
35 #define GUI_RGT  (GUI_NE  | GUI_SE)
36 #define GUI_TOP  (GUI_NW  | GUI_NE)
37 #define GUI_BOT  (GUI_SW  | GUI_SE)
38 #define GUI_ALL  (GUI_TOP | GUI_BOT)
39
40 extern const GLfloat gui_wht[4];
41 extern const GLfloat gui_yel[4];
42 extern const GLfloat gui_red[4];
43 extern const GLfloat gui_blu[4];
44 extern const GLfloat gui_grn[4];
45 extern const GLfloat gui_blk[4];
46 extern const GLfloat gui_gry[4];
47
48 /*---------------------------------------------------------------------------*/
49
50 void gui_init(void);
51 void gui_free(void);
52
53 /*---------------------------------------------------------------------------*/
54
55 enum trunc
56 {
57     TRUNC_NONE,
58     TRUNC_HEAD,
59     TRUNC_TAIL
60 };
61
62 void gui_set_label(int, const char *);
63 void gui_set_image(int, const char *);
64 void gui_set_multi(int, const char *);
65 void gui_set_count(int, int);
66 void gui_set_clock(int, int);
67 void gui_set_color(int, const float *, const float *);
68 void gui_set_trunc(int, enum trunc);
69 void gui_set_fill(int);
70
71 /*---------------------------------------------------------------------------*/
72
73 int  gui_harray(int);
74 int  gui_varray(int);
75 int  gui_hstack(int);
76 int  gui_vstack(int);
77 int  gui_filler(int);
78
79 int  gui_image(int, const char *, int, int);
80 int  gui_start(int, const char *, int, int, int);
81 int  gui_state(int, const char *, int, int, int);
82 int  gui_label(int, const char *, int, int, const float *, const float *);
83 int  gui_multi(int, const char *, int, int, const float *, const float *);
84 int  gui_count(int, int, int, int);
85 int  gui_clock(int, int, int, int);
86 int  gui_space(int);
87
88 /*---------------------------------------------------------------------------*/
89
90 void gui_dump(int, int);
91 void gui_layout(int, int, int);
92 int  gui_search(int, int, int);
93 int  gui_active(int, int, int);
94 int  gui_delete(int);
95
96 /*---------------------------------------------------------------------------*/
97
98 void gui_paint(int);
99 void gui_pulse(int, float);
100 void gui_timer(int, float);
101 int  gui_point(int, int, int);
102 int  gui_stick(int, int, float, int);
103 void gui_stuck(void);
104 int  gui_click(void);
105 void gui_focus(int);
106
107 int  gui_token(int);
108 int  gui_value(int);
109 void gui_toggle(int);
110
111 /*---------------------------------------------------------------------------*/
112
113 #endif