rev |
line source |
nuclear@0
|
1 #ifndef IMTK_H_
|
nuclear@0
|
2 #define IMTK_H_
|
nuclear@0
|
3
|
nuclear@5
|
4 #include <stdlib.h>
|
nuclear@5
|
5
|
nuclear@5
|
6
|
nuclear@4
|
7 #define IMUID (__LINE__ << 10)
|
nuclear@4
|
8 #define IMUID_IDX(i) ((__LINE__ << 10) + ((i) << 1))
|
nuclear@1
|
9
|
nuclear@1
|
10
|
nuclear@0
|
11 /* key/button state enum */
|
nuclear@0
|
12 enum {
|
nuclear@0
|
13 IMTK_UP,
|
nuclear@0
|
14 IMTK_DOWN
|
nuclear@0
|
15 };
|
nuclear@0
|
16
|
nuclear@0
|
17 enum {
|
nuclear@0
|
18 IMTK_LEFT_BUTTON,
|
nuclear@0
|
19 IMTK_MIDDLE_BUTTON,
|
nuclear@0
|
20 IMTK_RIGHT_BUTTON
|
nuclear@0
|
21 };
|
nuclear@0
|
22
|
nuclear@7
|
23
|
nuclear@7
|
24 #ifdef __cplusplus
|
nuclear@7
|
25 extern "C" {
|
nuclear@7
|
26 #endif
|
nuclear@7
|
27
|
nuclear@7
|
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@7
|
32
|
nuclear@7
|
33 void imtk_set_viewport(int x, int y);
|
nuclear@7
|
34 void imtk_get_viewport(int *width, int *height);
|
nuclear@0
|
35
|
nuclear@5
|
36 void imtk_post_redisplay(void);
|
nuclear@5
|
37
|
nuclear@0
|
38 void imtk_begin(void);
|
nuclear@0
|
39 void imtk_end(void);
|
nuclear@0
|
40
|
nuclear@0
|
41 int imtk_button(int id, const char *label, int x, int y);
|
nuclear@1
|
42 int imtk_checkbox(int id, const char *label, int x, int y, int state);
|
nuclear@2
|
43 void imtk_textbox(int id, char *textbuf, size_t buf_sz, int x, int y);
|
nuclear@3
|
44 float imtk_slider(int id, float pos, float min, float max, int x, int y);
|
nuclear@3
|
45 void imtk_progress(int id, float pos, int x, int y);
|
nuclear@7
|
46 /*
|
nuclear@4
|
47 int imtk_listbox(int id, const char *list, int sel, int x, int y);
|
nuclear@4
|
48 int imtk_combobox(int id, char *textbuf, size_t buf_sz, const char *list, int sel, int x, int y);
|
nuclear@7
|
49 */
|
nuclear@4
|
50
|
nuclear@4
|
51 /* helper functions to create and destroy item lists for listboxes and comboboxes */
|
nuclear@7
|
52 /*
|
nuclear@4
|
53 char *imtk_create_list(const char *first, ...);
|
nuclear@4
|
54 void imtk_free_list(char *list);
|
nuclear@7
|
55 */
|
nuclear@7
|
56
|
nuclear@7
|
57 #ifdef __cplusplus
|
nuclear@7
|
58 }
|
nuclear@7
|
59 #endif
|
nuclear@0
|
60
|
nuclear@0
|
61 #endif /* IMTK_H_ */
|