diff options
author | Adam NAILI | 2017-12-12 13:09:53 +0100 |
---|---|---|
committer | Adam NAILI | 2017-12-12 13:09:53 +0100 |
commit | 45800d79fb2fd74542daeda29e2cb2467f46399a (patch) | |
tree | 1a689d762eff9d99e9bea0dac3d7532a71f52390 /include/gui | |
parent | 00a6e1d29ad8dae2d769810b9af65c3934788487 (diff) | |
download | morpher-45800d79fb2fd74542daeda29e2cb2467f46399a.tar.gz |
Reworking on the _GroupElement structure and updating doc
Diffstat (limited to 'include/gui')
-rw-r--r-- | include/gui/group.h | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/include/gui/group.h b/include/gui/group.h index 1887bf6..88fffbc 100644 --- a/include/gui/group.h +++ b/include/gui/group.h | |||
@@ -9,15 +9,14 @@ | |||
9 | 9 | ||
10 | /** | 10 | /** |
11 | * Struct: _GroupElement | 11 | * Struct: _GroupElement |
12 | * Nod of the linked list that is involved in the Group behavior | 12 | * Node of the linked list that is involved in the Group behavior |
13 | * | 13 | * |
14 | * Parameters: | 14 | * Parameters: |
15 | * *component - component | 15 | * *component - component |
16 | * *sub_component - sub component | 16 | * *sub_component - sub component |
17 | * *next - link to the next nod | 17 | * *next - link to the next node |
18 | */ | 18 | */ |
19 | typedef struct _GroupElement { | 19 | typedef struct _GroupElement { |
20 | Component *component; | ||
21 | Component *sub_component; | 20 | Component *sub_component; |
22 | struct _GroupElement *next; | 21 | struct _GroupElement *next; |
23 | } GroupElement; | 22 | } GroupElement; |
@@ -37,10 +36,46 @@ typedef struct { | |||
37 | int padding; | 36 | int padding; |
38 | } Group; | 37 | } Group; |
39 | 38 | ||
39 | /** | ||
40 | * Function: group_print | ||
41 | * Print method for a group (BETA VERSION). | ||
42 | * | ||
43 | * Parameters: | ||
44 | * *parameter - pointer that will be casted into a Group to print | ||
45 | */ | ||
46 | void group_print(void *parameter); | ||
47 | |||
48 | /** | ||
49 | * Function: group_init | ||
50 | * Initializes fields of a Group that must be allocated before. | ||
51 | * | ||
52 | * Parameters: | ||
53 | * *group - group that must be initialized | ||
54 | * width - width of the current group | ||
55 | * height - height of the current group | ||
56 | * 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 | ||
58 | * padding - space between each components | ||
59 | */ | ||
40 | void group_init(Group *group, int width, int height, int x_pos, int y_pos, int padding); | 60 | void group_init(Group *group, int width, int height, int x_pos, int y_pos, int padding); |
41 | 61 | ||
62 | /** | ||
63 | * Function: group_free | ||
64 | * Frees the resources held by the group like the linked list. | ||
65 | * | ||
66 | * Parameters: | ||
67 | * *group - group that must be freed | ||
68 | */ | ||
42 | void group_free(Group *group); | 69 | void group_free(Group *group); |
43 | 70 | ||
71 | /** | ||
72 | * Function: group_add_component | ||
73 | * Adds the component at the end of the chained list held by group_head. | ||
74 | * | ||
75 | * Parameters: | ||
76 | * *group - group in which we add the component | ||
77 | * *component - component which is added to the group | ||
78 | */ | ||
44 | void group_add_component(Group *group, Component *component); | 79 | void group_add_component(Group *group, Component *component); |
45 | 80 | ||
46 | #endif | 81 | #endif |