diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/gui/group.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/include/gui/group.h b/include/gui/group.h index 88fffbc..2a02ee4 100644 --- a/include/gui/group.h +++ b/include/gui/group.h | |||
@@ -28,22 +28,33 @@ typedef struct _GroupElement { | |||
28 | * Parameters: | 28 | * Parameters: |
29 | * component - Component used for the Group to catch clicks and handle print to delegate to the components contented in it | 29 | * component - Component used for the Group to catch clicks and handle print to delegate to the components contented in it |
30 | * *group_head - pointer to the head of the list that regroup all the components contained inside of the group | 30 | * *group_head - pointer to the head of the list that regroup all the components contained inside of the group |
31 | * padding - padding for all components | 31 | * margin - margin for all components |
32 | */ | 32 | */ |
33 | typedef struct { | 33 | typedef struct { |
34 | Component component; | 34 | Component component; |
35 | GroupElement *group_head; | 35 | GroupElement *group_head; |
36 | int padding; | 36 | int margin; |
37 | } Group; | 37 | } Group; |
38 | 38 | ||
39 | /** | 39 | /** |
40 | * Function: group_print | 40 | * Function: group_print |
41 | * Print method for a group (BETA VERSION). | 41 | * Print method for a group that will print all components contained in. |
42 | * | 42 | * |
43 | * Parameters: | 43 | * Parameters: |
44 | * *parameter - pointer that will be casted into a Group to print | 44 | * *parameterSelf - pointer that will be casted into a Group to print |
45 | */ | 45 | */ |
46 | void group_print(void *parameter); | 46 | void group_print(Component *parameterSelf); |
47 | |||
48 | /** | ||
49 | * Function: group_click_handler | ||
50 | * Delegates the click handling to the component contained inside. | ||
51 | * | ||
52 | * Parameters: | ||
53 | * x_pos - position of the mouse on x axis | ||
54 | * y_pos - position of the mouse on y axis | ||
55 | * *parameterSelf - pointer that will be casted into a Group to print | ||
56 | */ | ||
57 | void group_click_handler(int x_pos, int y_pos, Component *parameterSelf); | ||
47 | 58 | ||
48 | /** | 59 | /** |
49 | * Function: group_init | 60 | * Function: group_init |
@@ -55,9 +66,9 @@ void group_print(void *parameter); | |||
55 | * height - height of the current group | 66 | * height - height of the current group |
56 | * x_pos - position on the x axis from the upper left corner | 67 | * x_pos - position on the x axis from the upper left corner |
57 | * y_pos - position on the y axis from the upper left corner | 68 | * y_pos - position on the y axis from the upper left corner |
58 | * padding - space between each components | 69 | * margin - space between each components |
59 | */ | 70 | */ |
60 | void group_init(Group *group, int width, int height, int x_pos, int y_pos, int padding); | 71 | void group_init(Group *group, int width, int height, int x_pos, int y_pos, int margin); |
61 | 72 | ||
62 | /** | 73 | /** |
63 | * Function: group_free | 74 | * Function: group_free |
@@ -78,4 +89,5 @@ void group_free(Group *group); | |||
78 | */ | 89 | */ |
79 | void group_add_component(Group *group, Component *component); | 90 | void group_add_component(Group *group, Component *component); |
80 | 91 | ||
92 | |||
81 | #endif | 93 | #endif |