glamtk
view src/imtk.h @ 5:86ba127ac2f2
trying to put some glamour in the toolkit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 09 Mar 2011 01:13:28 +0200 |
parents | 038e5577d527 |
children | cd00a5775373 |
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_BEVEL_LIT_COLOR,
12 IMTK_BEVEL_SHAD_COLOR
13 };
15 /* key/button state enum */
16 enum {
17 IMTK_UP,
18 IMTK_DOWN
19 };
21 enum {
22 IMTK_LEFT_BUTTON,
23 IMTK_MIDDLE_BUTTON,
24 IMTK_RIGHT_BUTTON
25 };
27 void imtk_set_color(int col, float r, float g, float b);
29 void imtk_inp_key(int key, int state);
30 void imtk_inp_mouse(int bn, int state);
31 void imtk_inp_motion(int x, int y);
32 void imtk_inp_reshape(int x, int y);
34 void imtk_begin(void);
35 void imtk_end(void);
37 int imtk_button(int id, const char *label, int x, int y);
38 int imtk_checkbox(int id, const char *label, int x, int y, int state);
39 void imtk_textbox(int id, char *textbuf, size_t buf_sz, int x, int y);
40 float imtk_slider(int id, float pos, float min, float max, int x, int y);
41 void imtk_progress(int id, float pos, int x, int y);
42 int imtk_listbox(int id, const char *list, int sel, int x, int y);
43 int imtk_combobox(int id, char *textbuf, size_t buf_sz, const char *list, int sel, int x, int y);
45 /* helper functions to create and destroy item lists for listboxes and comboboxes */
46 char *imtk_create_list(const char *first, ...);
47 void imtk_free_list(char *list);
49 #endif /* IMTK_H_ */