From 5beabe1a69e6dda3e139e95d24c3e9c8e027990a Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 9 Jan 2018 02:15:21 +0100 Subject: Sources and import cleanup Signed-off-by: pacien --- src/gui/button.c | 9 ++++----- src/gui/component.c | 2 +- src/gui/group.c | 11 ++++------- src/gui/gui.c | 7 +++---- src/gui/pictureframe.c | 8 ++++---- src/gui/window.c | 8 +++----- 6 files changed, 19 insertions(+), 26 deletions(-) (limited to 'src/gui') 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 @@ +#include "gui/button.h" #include #include #include #include -#include "gui/button.h" -#include "MLV/MLV_all.h" +#include #include "common/mem.h" - static bool button_is_selected(int x, int y, Button *button) { assert(button != NULL); int x1 = button->component.x_pos; @@ -104,8 +103,8 @@ Button *button_create(const char *text, int sizeInterligne, int x_pos, int y_pos return button; } -void button_destroy(Button *button){ +void button_destroy(Button *button) { assert(button != NULL); free(button->label); free(button); -} \ No newline at end of file +} 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 @@ -#include +#include "gui/component.h" Mode mode = WAITING_BUTTON_SHOW; 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 @@ -#include -#include -#include +#include "gui/group.h" #include -#include -#include "MLV/MLV_shape.h" -#include "MLV/MLV_window.h" +#include +#include +#include "common/mem.h" void group_print(Component *parameterSelf) { assert(parameterSelf != NULL); @@ -84,4 +82,3 @@ void group_add_component(Group *group, Component *component) { } } - 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 @@ -#include "gui/window.h" #include "gui/gui.h" +#include +#include "gui/window.h" #include "common/mem.h" -#include "MLV/MLV_all.h" - GUI *gui_create(const char *fpath1, const char *fpath2) { GUI *gui = malloc_or_die(sizeof(GUI)); @@ -134,4 +133,4 @@ void gui_destroy(GUI *gui) { pictureframe_destroy(gui->pictureFrame1); pictureframe_destroy(gui->pictureFrame2); -} \ No newline at end of file +} diff --git a/src/gui/pictureframe.c b/src/gui/pictureframe.c index 53a0ed3..c012ece 100644 --- a/src/gui/pictureframe.c +++ b/src/gui/pictureframe.c @@ -1,7 +1,7 @@ +#include "gui/pictureframe.h" #include +#include #include "common/mem.h" -#include "gui/pictureframe.h" -#include "MLV/MLV_all.h" static bool pictureframe_is_selected(int x, int y, PictureFrame *pictureFrame) { assert(pictureFrame != NULL); @@ -116,6 +116,6 @@ PictureFrame *pictureframe_create(int width, int height, int x_pos, int y_pos, return pictureFrame; } -void pictureframe_destroy(PictureFrame *pictureFrame){ +void pictureframe_destroy(PictureFrame *pictureFrame) { free(pictureFrame); -} \ No newline at end of file +} diff --git a/src/gui/window.c b/src/gui/window.c index 1859f58..e4eacea 100644 --- a/src/gui/window.c +++ b/src/gui/window.c @@ -1,11 +1,9 @@ -#include -#include #include "gui/window.h" -#include "MLV/MLV_all.h" +#include +#include #include "painter/rasterizer.h" #include "common/mem.h" - Window *window_create(int width, int height, char *title) { assert(width > 0); assert(height > 0); @@ -83,4 +81,4 @@ void window_rendering(Window *window, PictureFrame *pictureFrame1, Canvas *canva } mode = EXITING; MLV_wait_seconds(15); -} \ No newline at end of file +} -- cgit v1.2.3