glamtk

view src/imtk.h @ 3:038e5577d527

added slider and progress bar widgets
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 31 Dec 2010 18:10:13 +0200
parents 3d661dd17af3
children 00a4ea4ee6dc
line source
1 #ifndef IMTK_H_
2 #define IMTK_H_
4 #define IMUID (65536 + __LINE__)
6 enum {
7 IMTK_TEXT_COLOR,
8 IMTK_BASE_COLOR,
9 IMTK_FOCUS_COLOR,
10 IMTK_BEVEL_LIT_COLOR,
11 IMTK_BEVEL_SHAD_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);
42 #endif /* IMTK_H_ */