glamtk

view src/imtk.h @ 11:0f426edc2245

foo bar
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 18 Jun 2011 07:42:17 +0300
parents 00a4ea4ee6dc
children
line source
1 #ifndef IMTK_H_
2 #define IMTK_H_
4 #define IMUID (__LINE__ << 10)
5 #define IMUID_IDX(i) ((__LINE__ << 10) + ((i) << 1))
7 enum {
8 IMTK_TEXT_COLOR,
9 IMTK_BASE_COLOR,
10 IMTK_FOCUS_COLOR,
11 IMTK_FRAME_COLOR
12 };
14 /* key/button state enum */
15 enum {
16 IMTK_UP,
17 IMTK_DOWN
18 };
20 enum {
21 IMTK_LEFT_BUTTON,
22 IMTK_MIDDLE_BUTTON,
23 IMTK_RIGHT_BUTTON
24 };
26 void imtk_set_color(int col, float r, float g, float b);
28 void imtk_inp_key(int key, int state);
29 void imtk_inp_mouse(int bn, int state);
30 void imtk_inp_motion(int x, int y);
31 void imtk_inp_reshape(int x, int y);
33 void imtk_begin(void);
34 void imtk_end(void);
36 int imtk_button(int id, const char *label, int x, int y);
37 int imtk_checkbox(int id, const char *label, int x, int y, int state);
38 void imtk_textbox(int id, char *textbuf, size_t buf_sz, int x, int y);
39 float imtk_slider(int id, float pos, float min, float max, int x, int y);
40 void imtk_progress(int id, float pos, int x, int y);
41 int imtk_listbox(int id, const char *list, int sel, int x, int y);
42 int imtk_combobox(int id, char *textbuf, size_t buf_sz, const char *list, int sel, int x, int y);
44 /* helper functions to create and destroy item lists for listboxes and comboboxes */
45 char *imtk_create_list(const char *first, ...);
46 void imtk_free_list(char *list);
48 #endif /* IMTK_H_ */