imtk
diff src/state.h @ 6:38609a9f7586
reorganizing ...
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 14 Apr 2011 14:22:42 +0300 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/state.h Thu Apr 14 14:22:42 2011 +0300 1.3 @@ -0,0 +1,26 @@ 1.4 +#ifndef STATE_H_ 1.5 +#define STATE_H_ 1.6 + 1.7 +struct imtk_state { 1.8 + int scr_width, scr_height; 1.9 + int mousex, mousey, prevx, prevy, mouse_bnmask; 1.10 + int active, hot, input, prev_active; 1.11 +}; 1.12 + 1.13 +void imtk_set_active(int id); 1.14 +int imtk_is_active(int id); 1.15 +int imtk_set_hot(int id); 1.16 +int imtk_is_hot(int id); 1.17 +void imtk_set_focus(int id); 1.18 +int imtk_has_focus(int id); 1.19 +int imtk_hit_test(int x, int y, int w, int h); 1.20 + 1.21 +void imtk_get_mouse(int *xptr, int *yptr); 1.22 +void imtk_set_prev_mouse(int x, int y); 1.23 +void imtk_get_prev_mouse(int *xptr, int *yptr); 1.24 +int imtk_button_state(int bn); 1.25 + 1.26 +int imtk_get_key(void); 1.27 + 1.28 + 1.29 +#endif /* STATE_H_ */