glamtk
diff src/imtk.h @ 4:00a4ea4ee6dc
attempt at slightly more complex widgets
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 05 Mar 2011 09:25:27 +0200 |
parents | 038e5577d527 |
children | cd00a5775373 |
line diff
1.1 --- a/src/imtk.h Fri Dec 31 18:10:13 2010 +0200 1.2 +++ b/src/imtk.h Sat Mar 05 09:25:27 2011 +0200 1.3 @@ -1,7 +1,8 @@ 1.4 #ifndef IMTK_H_ 1.5 #define IMTK_H_ 1.6 1.7 -#define IMUID (65536 + __LINE__) 1.8 +#define IMUID (__LINE__ << 10) 1.9 +#define IMUID_IDX(i) ((__LINE__ << 10) + ((i) << 1)) 1.10 1.11 enum { 1.12 IMTK_TEXT_COLOR, 1.13 @@ -38,5 +39,11 @@ 1.14 void imtk_textbox(int id, char *textbuf, size_t buf_sz, int x, int y); 1.15 float imtk_slider(int id, float pos, float min, float max, int x, int y); 1.16 void imtk_progress(int id, float pos, int x, int y); 1.17 +int imtk_listbox(int id, const char *list, int sel, int x, int y); 1.18 +int imtk_combobox(int id, char *textbuf, size_t buf_sz, const char *list, int sel, int x, int y); 1.19 + 1.20 +/* helper functions to create and destroy item lists for listboxes and comboboxes */ 1.21 +char *imtk_create_list(const char *first, ...); 1.22 +void imtk_free_list(char *list); 1.23 1.24 #endif /* IMTK_H_ */