imtk
annotate src/state.h @ 27:48e708baa7be
added predicate imtk_layout_contains(x, y)
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 12 Dec 2020 17:20:00 +0200 |
parents | |
children |
rev | line source |
---|---|
nuclear@6 | 1 #ifndef STATE_H_ |
nuclear@6 | 2 #define STATE_H_ |
nuclear@6 | 3 |
nuclear@6 | 4 struct imtk_state { |
nuclear@6 | 5 int scr_width, scr_height; |
nuclear@6 | 6 int mousex, mousey, prevx, prevy, mouse_bnmask; |
nuclear@6 | 7 int active, hot, input, prev_active; |
nuclear@6 | 8 }; |
nuclear@6 | 9 |
nuclear@6 | 10 void imtk_set_active(int id); |
nuclear@6 | 11 int imtk_is_active(int id); |
nuclear@6 | 12 int imtk_set_hot(int id); |
nuclear@6 | 13 int imtk_is_hot(int id); |
nuclear@6 | 14 void imtk_set_focus(int id); |
nuclear@6 | 15 int imtk_has_focus(int id); |
nuclear@6 | 16 int imtk_hit_test(int x, int y, int w, int h); |
nuclear@6 | 17 |
nuclear@6 | 18 void imtk_get_mouse(int *xptr, int *yptr); |
nuclear@6 | 19 void imtk_set_prev_mouse(int x, int y); |
nuclear@6 | 20 void imtk_get_prev_mouse(int *xptr, int *yptr); |
nuclear@6 | 21 int imtk_button_state(int bn); |
nuclear@6 | 22 |
nuclear@6 | 23 int imtk_get_key(void); |
nuclear@6 | 24 |
nuclear@6 | 25 |
nuclear@6 | 26 #endif /* STATE_H_ */ |