summaryrefslogtreecommitdiff
path: root/include/gui/gui.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gui/gui.h')
-rw-r--r--include/gui/gui.h53
1 files changed, 45 insertions, 8 deletions
diff --git a/include/gui/gui.h b/include/gui/gui.h
index daaf8de..10f59e8 100644
--- a/include/gui/gui.h
+++ b/include/gui/gui.h
@@ -1,11 +1,32 @@
1#ifndef UPEM_MORPHING_GUI 1#ifndef UPEM_MORPHING_GUI
2#define UPEM_MORPHING_GUI 2#define UPEM_MORPHING_GUI
3 3
4#include <gui/window.h> 4#include "gui/window.h"
5
5/** 6/**
6 * File: gui.h 7 * File: gui.h
7 */ 8 */
8 9
10
11/**
12 * Struct: GUI
13 * Supports all the parts of the GUI
14 *
15 * Fields:
16 * *window - pointer to the Window
17 * *button1 - pointer to the button 1
18 * *button2 - pointer to the button 2
19 * *button3 - pointer to the button 3
20 * *button4 - pointer to the button 4
21 * *button5 - pointer to the button 5
22 * *button6 - pointer to the button 6
23 * *button7 - pointer to the button 7
24 * *pictureFrame1 - pointer to the picture frame 1
25 * *pictureFrame2 - pointer to the picture frame 2
26 * *canvasSrc - pointer to the canvas 1
27 * *canvasTrg - pointer to the canvas 2
28 * *morphing - pointer to the current morphing
29 */
9typedef struct { 30typedef struct {
10 Window *window; 31 Window *window;
11 Button *button1; 32 Button *button1;
@@ -20,20 +41,36 @@ typedef struct {
20 Canvas *canvasSrc; 41 Canvas *canvasSrc;
21 Canvas *canvasTrg; 42 Canvas *canvasTrg;
22 Morphing *morphing; 43 Morphing *morphing;
23 MLV_Keyboard_button keyboardButton;
24 MLV_Keyboard_modifier keyboardModifier;
25 int unicode;
26 int mouse_x;
27 int mouse_y;
28} GUI; 44} GUI;
29 45
46/**
47 * Function: gui_create
48 *
49 *
50 * Parameters:
51 * *fpath1 - path to the first picture
52 * *fpath2 - path to the second picture
53 *
54 * Returns:
55 * A pointer to a GUI structure
56 */
57GUI *gui_create(const char *fpath1, const char *fpath2);
30 58
31GUI *gui_init(const char *fpath1, const char *fpath2);
32/** 59/**
33 * Function: gui_handle_event 60 * Function: gui_handle_event
34 * Builds and opens the graphical user interface. 61 * Builds and opens the graphical user interface.
62 *
63 * Parameters:
64 * *gui - pointer to the current GUI structure
35 */ 65 */
36void gui_handle_event(GUI *gui); 66void gui_handle_event(GUI *gui);
37 67
38void gui_free(GUI *gui); 68/**
69 * Function: gui_destroy
70 * Frees the resources allocated for the GUI
71 * Parameters:
72 * *gui - pointer to the current GUI structure
73 */
74void gui_destroy(GUI *gui);
75
39#endif 76#endif