summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam NAILI2017-12-12 13:09:53 +0100
committerAdam NAILI2017-12-12 13:09:53 +0100
commit45800d79fb2fd74542daeda29e2cb2467f46399a (patch)
tree1a689d762eff9d99e9bea0dac3d7532a71f52390
parent00a6e1d29ad8dae2d769810b9af65c3934788487 (diff)
downloadmorpher-45800d79fb2fd74542daeda29e2cb2467f46399a.tar.gz
Reworking on the _GroupElement structure and updating doc
-rw-r--r--include/gui/group.h41
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 */
19typedef struct _GroupElement { 19typedef 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 */
46void 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 */
40void group_init(Group *group, int width, int height, int x_pos, int y_pos, int padding); 60void 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 */
42void group_free(Group *group); 69void 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 */
44void group_add_component(Group *group, Component *component); 79void group_add_component(Group *group, Component *component);
45 80
46#endif 81#endif