X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=demo_prior;a=blobdiff_plain;f=src%2Fimtk%2Fstate.h;fp=src%2Fimtk%2Fstate.h;h=42933f7a5c0a50a294c8cb67baae2fff16930d74;hp=0000000000000000000000000000000000000000;hb=2f14a35e7d557da12f24056267b911f24774aa18;hpb=5eefe7b94c8d6c6caa2c10e3835ab0831a3c42a1 diff --git a/src/imtk/state.h b/src/imtk/state.h new file mode 100644 index 0000000..42933f7 --- /dev/null +++ b/src/imtk/state.h @@ -0,0 +1,26 @@ +#ifndef STATE_H_ +#define STATE_H_ + +struct imtk_state { + int scr_width, scr_height; + int mousex, mousey, prevx, prevy, mouse_bnmask; + int active, hot, input, prev_active; +}; + +void imtk_set_active(int id); +int imtk_is_active(int id); +int imtk_set_hot(int id); +int imtk_is_hot(int id); +void imtk_set_focus(int id); +int imtk_has_focus(int id); +int imtk_hit_test(int x, int y, int w, int h); + +void imtk_get_mouse(int *xptr, int *yptr); +void imtk_set_prev_mouse(int x, int y); +void imtk_get_prev_mouse(int *xptr, int *yptr); +int imtk_button_state(int bn); + +int imtk_get_key(void); + + +#endif /* STATE_H_ */