summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpacien2018-01-09 02:15:21 +0100
committerpacien2018-01-09 02:15:21 +0100
commit5beabe1a69e6dda3e139e95d24c3e9c8e027990a (patch)
tree6a4eb07cca4c6edfbfaddeac59fed99e4230f201
parent5980fa86c1fc90849102bbc24679423f978e2a50 (diff)
downloadmorpher-5beabe1a69e6dda3e139e95d24c3e9c8e027990a.tar.gz
Sources and import cleanup
Signed-off-by: pacien <pacien.trangirard@pacien.net>
-rw-r--r--include/common/time.h2
-rw-r--r--include/gui/button.h8
-rw-r--r--include/gui/component.h2
-rw-r--r--include/gui/group.h3
-rw-r--r--include/gui/pictureframe.h8
-rw-r--r--include/gui/textview.h3
-rw-r--r--include/gui/window.h8
-rw-r--r--src/common/geom.c1
-rw-r--r--src/gui/button.c9
-rw-r--r--src/gui/component.c2
-rw-r--r--src/gui/group.c11
-rw-r--r--src/gui/gui.c7
-rw-r--r--src/gui/pictureframe.c8
-rw-r--r--src/gui/window.c8
14 files changed, 36 insertions, 44 deletions
diff --git a/include/common/time.h b/include/common/time.h
index bd50533..3024cde 100644
--- a/include/common/time.h
+++ b/include/common/time.h
@@ -11,7 +11,7 @@
11 * Pacien TRAN-GIRARD 11 * Pacien TRAN-GIRARD
12 */ 12 */
13 13
14#include "geom.h" 14#include "common/geom.h"
15 15
16/** 16/**
17 * Constants: Time vectors 17 * Constants: Time vectors
diff --git a/include/gui/button.h b/include/gui/button.h
index c447328..1b82a7f 100644
--- a/include/gui/button.h
+++ b/include/gui/button.h
@@ -1,5 +1,6 @@
1#ifndef UPEM_MORPHING_BUTTON 1#ifndef UPEM_MORPHING_BUTTON
2#define UPEM_MORPHING_BUTTON 2#define UPEM_MORPHING_BUTTON
3
3/** 4/**
4 * File: button.h 5 * File: button.h
5 * Buttons handling 6 * Buttons handling
@@ -8,7 +9,7 @@
8 * Adam NAILI 9 * Adam NAILI
9 */ 10 */
10 11
11#include "component.h" 12#include "gui/component.h"
12 13
13/** 14/**
14 * Struct: Button 15 * Struct: Button
@@ -39,8 +40,7 @@ typedef struct {
39 * Returns: 40 * Returns:
40 * A pointer of Button 41 * A pointer of Button
41 */ 42 */
42Button * 43Button *button_create(const char *text, int sizeInterligne, int x_pos, int y_pos, ClickHandler clickHandler);
43button_create(const char *text, int sizeInterligne, int x_pos, int y_pos, ClickHandler clickHandler);
44 44
45/** 45/**
46 * Function: button_destroy 46 * Function: button_destroy
@@ -95,7 +95,6 @@ void button_click_exit(int x, int y, Component *parameterSelf);
95 */ 95 */
96void button_click_none(int x, int y, Component *parameterSelf); 96void button_click_none(int x, int y, Component *parameterSelf);
97 97
98
99/** 98/**
100 * Function: button_click_more_frame 99 * Function: button_click_more_frame
101 * Multiplies by two the number of frames to create when rendering. 100 * Multiplies by two the number of frames to create when rendering.
@@ -129,5 +128,4 @@ void button_click_less_frame(int x, int y, Component *parameterSelf);
129 */ 128 */
130void button_click_rendering(int x, int y, Component *parameterSelf); 129void button_click_rendering(int x, int y, Component *parameterSelf);
131 130
132
133#endif 131#endif
diff --git a/include/gui/component.h b/include/gui/component.h
index f545bbc..895e9ba 100644
--- a/include/gui/component.h
+++ b/include/gui/component.h
@@ -67,4 +67,4 @@ typedef struct Component {
67 PrintMethod print_method; 67 PrintMethod print_method;
68} Component; 68} Component;
69 69
70#endif //UPEM_C_COMPONENT_H 70#endif
diff --git a/include/gui/group.h b/include/gui/group.h
index 1006c74..19dd319 100644
--- a/include/gui/group.h
+++ b/include/gui/group.h
@@ -9,7 +9,7 @@
9 * Adam NAILI 9 * Adam NAILI
10 */ 10 */
11 11
12#include "component.h" 12#include "gui/component.h"
13 13
14/** 14/**
15 * Struct: _GroupElement 15 * Struct: _GroupElement
@@ -93,5 +93,4 @@ void group_free(Group *group);
93 */ 93 */
94void group_add_component(Group *group, Component *component); 94void group_add_component(Group *group, Component *component);
95 95
96
97#endif 96#endif
diff --git a/include/gui/pictureframe.h b/include/gui/pictureframe.h
index f6edbf6..0432b1c 100644
--- a/include/gui/pictureframe.h
+++ b/include/gui/pictureframe.h
@@ -8,11 +8,14 @@
8 * Adam NAILI 8 * Adam NAILI
9 */ 9 */
10 10
11#include "gui/component.h"
11#include "morpher/morphing.h" 12#include "morpher/morphing.h"
12#include "painter/canvas.h" 13#include "painter/canvas.h"
13#include "component.h"
14 14
15/*Needed storage point to share memory between the origin PictureFrame and the target PictureFrame. It ables to cancel the Add constraint functionality*/ 15/*
16 * Needed storage point to share memory between the origin PictureFrame and the target PictureFrame.
17 * It ables to cancel the Add constraint functionality
18 */
16CartesianVector savedPoint; 19CartesianVector savedPoint;
17 20
18/** 21/**
@@ -118,5 +121,4 @@ void pictureframe_click_handler_origin(int x_pos, int y_pos, Component *paramete
118 */ 121 */
119void pictureframe_click_handler_target(int x_pos, int y_pos, Component *parameterSelf); 122void pictureframe_click_handler_target(int x_pos, int y_pos, Component *parameterSelf);
120 123
121
122#endif 124#endif
diff --git a/include/gui/textview.h b/include/gui/textview.h
index 91106c0..ff41e7e 100644
--- a/include/gui/textview.h
+++ b/include/gui/textview.h
@@ -7,7 +7,8 @@
7 * Author: 7 * Author:
8 * Adam NAILI 8 * Adam NAILI
9 */ 9 */
10#include "component.h" 10
11#include "gui/component.h"
11 12
12typedef struct { 13typedef struct {
13 Component component; 14 Component component;
diff --git a/include/gui/window.h b/include/gui/window.h
index 612da28..c3da3e4 100644
--- a/include/gui/window.h
+++ b/include/gui/window.h
@@ -9,10 +9,10 @@
9 * Adam NAILI 9 * Adam NAILI
10 */ 10 */
11 11
12#include "MLV/MLV_keyboard.h" 12#include <MLV/MLV_keyboard.h>
13#include "group.h" 13#include "gui/group.h"
14#include "button.h" 14#include "gui/button.h"
15#include "pictureframe.h" 15#include "gui/pictureframe.h"
16 16
17/** 17/**
18 * Struct: Window 18 * Struct: Window
diff --git a/src/common/geom.c b/src/common/geom.c
index eb35727..f903fe8 100644
--- a/src/common/geom.c
+++ b/src/common/geom.c
@@ -1,6 +1,5 @@
1#include "common/geom.h" 1#include "common/geom.h"
2#include <math.h> 2#include <math.h>
3#include <common/geom.h>
4#include "morpher/matrix.h" 3#include "morpher/matrix.h"
5 4
6static inline IntVector int_round(RealVector x) { 5static inline IntVector int_round(RealVector x) {
diff --git a/src/gui/button.c b/src/gui/button.c
index 35ac2ed..1ed5965 100644
--- a/src/gui/button.c
+++ b/src/gui/button.c
@@ -1,12 +1,11 @@
1#include "gui/button.h"
1#include <stdlib.h> 2#include <stdlib.h>
2#include <stdbool.h> 3#include <stdbool.h>
3#include <assert.h> 4#include <assert.h>
4#include <string.h> 5#include <string.h>
5#include "gui/button.h" 6#include <MLV/MLV_all.h>
6#include "MLV/MLV_all.h"
7#include "common/mem.h" 7#include "common/mem.h"
8 8
9
10static bool button_is_selected(int x, int y, Button *button) { 9static bool button_is_selected(int x, int y, Button *button) {
11 assert(button != NULL); 10 assert(button != NULL);
12 int x1 = button->component.x_pos; 11 int x1 = button->component.x_pos;
@@ -104,8 +103,8 @@ Button *button_create(const char *text, int sizeInterligne, int x_pos, int y_pos
104 return button; 103 return button;
105} 104}
106 105
107void button_destroy(Button *button){ 106void button_destroy(Button *button) {
108 assert(button != NULL); 107 assert(button != NULL);
109 free(button->label); 108 free(button->label);
110 free(button); 109 free(button);
111} \ No newline at end of file 110}
diff --git a/src/gui/component.c b/src/gui/component.c
index 3eb31c5..c45ea4f 100644
--- a/src/gui/component.c
+++ b/src/gui/component.c
@@ -1,4 +1,4 @@
1#include <gui/component.h> 1#include "gui/component.h"
2 2
3Mode mode = WAITING_BUTTON_SHOW; 3Mode mode = WAITING_BUTTON_SHOW;
4 4
diff --git a/src/gui/group.c b/src/gui/group.c
index af9abac..7f5adcd 100644
--- a/src/gui/group.c
+++ b/src/gui/group.c
@@ -1,10 +1,8 @@
1#include <stdlib.h> 1#include "gui/group.h"
2#include <gui/group.h>
3#include <common/mem.h>
4#include <assert.h> 2#include <assert.h>
5#include <gui/component.h> 3#include <stdlib.h>
6#include "MLV/MLV_shape.h" 4#include <MLV/MLV_shape.h>
7#include "MLV/MLV_window.h" 5#include "common/mem.h"
8 6
9void group_print(Component *parameterSelf) { 7void group_print(Component *parameterSelf) {
10 assert(parameterSelf != NULL); 8 assert(parameterSelf != NULL);
@@ -84,4 +82,3 @@ void group_add_component(Group *group, Component *component) {
84 82
85 } 83 }
86} 84}
87
diff --git a/src/gui/gui.c b/src/gui/gui.c
index ced2661..bf73bdb 100644
--- a/src/gui/gui.c
+++ b/src/gui/gui.c
@@ -1,8 +1,7 @@
1#include "gui/window.h"
2#include "gui/gui.h" 1#include "gui/gui.h"
2#include <MLV/MLV_all.h>
3#include "gui/window.h"
3#include "common/mem.h" 4#include "common/mem.h"
4#include "MLV/MLV_all.h"
5
6 5