Rev 6524 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6524 | Rev 8581 | ||
---|---|---|---|
Line 17... | Line 17... | ||
17 | uint32_t select; // internal state: 0 - passive, 2 - pressed, 1 - clicked |
17 | uint32_t select; // internal state: 0 - passive, 2 - pressed, 1 - clicked |
18 | uint32_t click; // clicked - 1, zero it after tested |
18 | uint32_t click; // clicked - 1, zero it after tested |
19 | } pict_button; |
19 | } pict_button; |
Line 20... | Line 20... | ||
20 | 20 | ||
21 | 21 | ||
22 | inline pict_button* kolibri_pict_button(pict_button* b, uint32_t x_w, uint32_t y_h, void* active_pict, void* passive_pict, void* pressed_pict, uint32_t bpp, void* palette, int32_t offset_line) |
22 | static inline pict_button* kolibri_pict_button(pict_button* b, uint32_t x_w, uint32_t y_h, void* active_pict, void* passive_pict, void* pressed_pict, uint32_t bpp, void* palette, int32_t offset_line) |
23 | { |
23 | { |
24 | b->type = b->mouse_pos = b->mouse_keys = b->mouse_keys_old = b->select = b->click = 0; |
24 | b->type = b->mouse_pos = b->mouse_keys = b->mouse_keys_old = b->select = b->click = 0; |
25 | b->x_w = x_w; |
25 | b->x_w = x_w; |
Line 32... | Line 32... | ||
32 | b->offset_raw = offset_line; |
32 | b->offset_raw = offset_line; |
Line 33... | Line 33... | ||
33 | 33 | ||
34 | return b; |
34 | return b; |
Line 35... | Line 35... | ||
35 | } |
35 | } |
36 | 36 | ||
37 | inline pict_button* kolibri_new_pict_button(uint32_t x_w, uint32_t y_h, void* active_pict, void* passive_pict, void* pressed_pict, uint32_t bpp, void* palette, int32_t offset_line) |
37 | static inline pict_button* kolibri_new_pict_button(uint32_t x_w, uint32_t y_h, void* active_pict, void* passive_pict, void* pressed_pict, uint32_t bpp, void* palette, int32_t offset_line) |
38 | { |
38 | { |
39 | pict_button *new_d_but = (pict_button *)malloc(sizeof(pict_button)); |
39 | pict_button *new_d_but = (pict_button *)malloc(sizeof(pict_button)); |
Line 40... | Line 40... | ||
40 | return kolibri_pict_button(new_d_but, x_w, y_h, active_pict, passive_pict, pressed_pict, bpp, palette, offset_line); |
40 | return kolibri_pict_button(new_d_but, x_w, y_h, active_pict, passive_pict, pressed_pict, bpp, palette, offset_line); |
41 | } |
41 | } |
42 | 42 | ||
43 | inline void gui_add_pict_button(kolibri_window *wnd, pict_button* db) |
43 | static inline void gui_add_pict_button(kolibri_window *wnd, pict_button* db) |