rev |
line source |
nuclear@0
|
1 #ifndef IMTK_H_
|
nuclear@0
|
2 #define IMTK_H_
|
nuclear@0
|
3
|
nuclear@4
|
4 #define IMUID (__LINE__ << 10)
|
nuclear@4
|
5 #define IMUID_IDX(i) ((__LINE__ << 10) + ((i) << 1))
|
nuclear@1
|
6
|
nuclear@1
|
7 enum {
|
nuclear@1
|
8 IMTK_TEXT_COLOR,
|
nuclear@1
|
9 IMTK_BASE_COLOR,
|
nuclear@1
|
10 IMTK_FOCUS_COLOR,
|
nuclear@1
|
11 IMTK_BEVEL_LIT_COLOR,
|
nuclear@1
|
12 IMTK_BEVEL_SHAD_COLOR
|
nuclear@1
|
13 };
|
nuclear@1
|
14
|
nuclear@0
|
15 /* key/button state enum */
|
nuclear@0
|
16 enum {
|
nuclear@0
|
17 IMTK_UP,
|
nuclear@0
|
18 IMTK_DOWN
|
nuclear@0
|
19 };
|
nuclear@0
|
20
|
nuclear@0
|
21 enum {
|
nuclear@0
|
22 IMTK_LEFT_BUTTON,
|
nuclear@0
|
23 IMTK_MIDDLE_BUTTON,
|
nuclear@0
|
24 IMTK_RIGHT_BUTTON
|
nuclear@0
|
25 };
|
nuclear@0
|
26
|
nuclear@1
|
27 void imtk_set_color(int col, float r, float g, float b);
|
nuclear@1
|
28
|
nuclear@0
|
29 void imtk_inp_key(int key, int state);
|
nuclear@0
|
30 void imtk_inp_mouse(int bn, int state);
|
nuclear@0
|
31 void imtk_inp_motion(int x, int y);
|
nuclear@0
|
32 void imtk_inp_reshape(int x, int y);
|
nuclear@0
|
33
|
nuclear@0
|
34 void imtk_begin(void);
|
nuclear@0
|
35 void imtk_end(void);
|
nuclear@0
|
36
|
nuclear@0
|
37 int imtk_button(int id, const char *label, int x, int y);
|
nuclear@1
|
38 int imtk_checkbox(int id, const char *label, int x, int y, int state);
|
nuclear@2
|
39 void imtk_textbox(int id, char *textbuf, size_t buf_sz, int x, int y);
|
nuclear@3
|
40 float imtk_slider(int id, float pos, float min, float max, int x, int y);
|
nuclear@3
|
41 void imtk_progress(int id, float pos, int x, int y);
|
nuclear@4
|
42 int imtk_listbox(int id, const char *list, int sel, int x, int y);
|
nuclear@4
|
43 int imtk_combobox(int id, char *textbuf, size_t buf_sz, const char *list, int sel, int x, int y);
|
nuclear@4
|
44
|
nuclear@4
|
45 /* helper functions to create and destroy item lists for listboxes and comboboxes */
|
nuclear@4
|
46 char *imtk_create_list(const char *first, ...);
|
nuclear@4
|
47 void imtk_free_list(char *list);
|
nuclear@0
|
48
|
nuclear@0
|
49 #endif /* IMTK_H_ */
|