imtk

view src/imtk.h @ 2:3d661dd17af3

- initial textbox implementation added - made the test program slightly more interesting
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 31 Dec 2010 01:54:53 +0200
parents dfbd12d1f566
children 038e5577d527
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 void imtk_window(int id, const char *title, int x, int y, int width, int height);
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);
41 #endif /* IMTK_H_ */