Rev 6456 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6456 | Rev 6457 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #ifndef KOLIBRI_BUTTON_H |
1 | #ifndef KOLIBRI_BUTTON_H |
2 | #define KOLIBRI_BUTTON_H |
2 | #define KOLIBRI_BUTTON_H |
Line 3... | Line 3... | ||
3 | 3 | ||
4 | struct kolibri_button { |
4 | typedef struct { |
5 | unsigned int x65536sizex; |
5 | unsigned int x65536sizex; |
6 | unsigned int y65536sizey; |
6 | unsigned int y65536sizey; |
7 | unsigned int color; |
7 | unsigned int color; |
8 | unsigned int identifier; |
8 | unsigned int identifier; |
9 | unsigned int XY; |
9 | unsigned int XY; |
Line 10... | Line 10... | ||
10 | }; |
10 | }kolibri_button; |
11 | 11 | ||
12 | struct kolibri_button *kolibri_new_button(unsigned int tlx, unsigned int tly, unsigned int sizex, unsigned int sizey, |
12 | kolibri_button *kolibri_new_button(unsigned int tlx, unsigned int tly, unsigned int sizex, unsigned int sizey, |
13 | unsigned int identifier, unsigned int color) |
13 | unsigned int identifier, unsigned int color) |
14 | { |
14 | { |
15 | struct kolibri_button* new_button = (struct kolibri_button *)malloc(sizeof(struct kolibri_button)); |
15 | kolibri_button* new_button = (kolibri_button *)malloc(sizeof(kolibri_button)); |
16 | new_button -> x65536sizex = (tlx << 16) + sizex; |
16 | new_button -> x65536sizex = (tlx << 16) + sizex; |
17 | new_button -> y65536sizey = (tly << 16) + sizey; |
17 | new_button -> y65536sizey = (tly << 16) + sizey; |
18 | new_button -> color = color; |
18 | new_button -> color = color; |
19 | new_button -> identifier = identifier; |
19 | new_button -> identifier = identifier; |
20 | new_button -> XY = 0; |
20 | new_button -> XY = 0; |
Line 21... | Line 21... | ||
21 | return new_button; |
21 | return new_button; |
22 | } |
22 | } |
23 | 23 | ||
24 | void draw_button(struct kolibri_button *some_button) |
24 | void draw_button(kolibri_button *some_button) |
Line 25... | Line 25... | ||
25 | { |
25 | { |