summaryrefslogtreecommitdiff
path: root/include/gui/window.h
diff options
context:
space:
mode:
authorAdam NAILI2018-01-03 19:40:51 +0100
committerAdam NAILI2018-01-03 19:40:51 +0100
commit2f3d8ebc9b5e10e56bed5da316f5ef098dda0997 (patch)
treee2df4b6eaf81cb72f6fef75f6cf7324b0e671f23 /include/gui/window.h
parent54dac24c8f7be833124a90bafdca78810fc0d96a (diff)
downloadmorpher-2f3d8ebc9b5e10e56bed5da316f5ef098dda0997.tar.gz
Updating documentation, cleaning includes, updating report
Diffstat (limited to 'include/gui/window.h')
-rw-r--r--include/gui/window.h62
1 files changed, 37 insertions, 25 deletions
diff --git a/include/gui/window.h b/include/gui/window.h
index 10f0e74..e6b14dc 100644
--- a/include/gui/window.h
+++ b/include/gui/window.h
@@ -1,20 +1,15 @@
1#ifndef UPEM_MORPHING_WINDOW 1#ifndef UPEM_MORPHING_WINDOW
2#define UPEM_MORPHING_WINDOW 2#define UPEM_MORPHING_WINDOW
3 3
4#include "MLV/MLV_keyboard.h"
5#include "group.h"
6#include "button.h"
7#include "pictureframe.h"
4/** 8/**
5 * File: window.h 9 * File: window.h
6 * Windows and components handling. 10 * Windows and components handling.
7 *
8 * See also:
9 * The famous OS
10 */ 11 */
11 12
12#include <MLV/MLV_keyboard.h>
13#include "group.h"
14#include "component.h"
15#include "button.h"
16#include "pictureframe.h"
17
18/** 13/**
19 * Struct: Window 14 * Struct: Window
20 * Supports and handles components. 15 * Supports and handles components.
@@ -34,25 +29,26 @@ typedef struct {
34} Window; 29} Window;
35 30
36/** 31/**
37 * Function: window_init 32 * Function: window_create
38 * Initializes a window. 33 * Allocates and initializes a window.
39 * 34 *
40 * Parameters: 35 * Parameters:
41 * *window - pointer to the input window
42 * width - width of the window to initialize 36 * width - width of the window to initialize
43 * height - height of the window to initialize 37 * height - height of the window to initialize
44 * *title - title of the actual window 38 * *title - title of the actual window
39 * Returns:
40 * A pointer to a Window
45 */ 41 */
46void window_init(Window *window, int width, int height, char *title); 42Window *window_create(int width, int height, char *title);
47 43
48/** 44/**
49 * Function: window_free 45 * Function: window_destroy
50 * Frees the resources supported by the window and the window itself. 46 * Frees the resources supported by the window and the window itself.
51 * 47 *
52 * Parameters: 48 * Parameters:
53 * *window - pointer to the input window 49 * *window - pointer to the input window
54 */ 50 */
55void window_free(Window *window); 51void window_destroy(Window *window);
56 52
57/** 53/**
58 * Function: window_add_button 54 * Function: window_add_button
@@ -75,15 +71,6 @@ void window_add_button(Window *window, Button *button);
75void window_add_pictureframe(Window *window, PictureFrame *pictureFrame); 71void window_add_pictureframe(Window *window, PictureFrame *pictureFrame);
76 72
77/** 73/**
78 * Function: window_create
79 * Initializes the resources to create a window.
80 *
81 * Parameters:
82 * *window - pointer to the input window
83 */
84void window_create(Window *window);
85
86/**
87 * Function: window_print_buttons 74 * Function: window_print_buttons
88 * Prints all the buttons to the screen 75 * Prints all the buttons to the screen
89 * 76 *
@@ -101,9 +88,34 @@ void window_print_buttons(Window *window);
101 */ 88 */
102void window_print_pictureframes(Window *window); 89void window_print_pictureframes(Window *window);
103 90
91/**
92 * Function: window_click_keyboard_handler
93 * Handles click and keyboard.
94 *
95 * Parameters:
96 * *window - pointer to the current window
97 * *keyboardButton - code of the keyboard key that is pushed or released
98 * *keyboardModifier - mode of the keyboard when a key is push or released
99 * *unicode - character coded in unicode of the letter obtained by combining the code and the mode
100 * *mouse_x - coordinate on the X axis of the mouse
101 * *mouse_y - coordinate on the Y axis of the mouse
102 */
104void window_click_keyboard_handler(Window *window, MLV_Keyboard_button *keyboardButton, 103void window_click_keyboard_handler(Window *window, MLV_Keyboard_button *keyboardButton,
105 MLV_Keyboard_modifier *keyboardModifier, 104 MLV_Keyboard_modifier *keyboardModifier,
106 int *unicode, int *mouse_x, int *mouse_y); 105 int *unicode, int *mouse_x, int *mouse_y);
107void window_rendering(Window *window,PictureFrame *pictureFrame1,Canvas *canvasSrc, Canvas *canvasTarget, Morphing *morphing); 106
107/**
108 * Function: window_rendering
109 * Launches the rendering on the pictureframe origin.
110 *
111 * Parameters:
112 * *window - pointer to the current window
113 * *pictureFrame1 - pointer to the origin PictureFrame
114 * *canvasSrc - pointer to the source Canvas
115 * *canvasTarget - pointer to the target Canvas
116 * *morphing - pointer to the Morphing that will makes the transformation
117 */
118void window_rendering(Window *window, PictureFrame *pictureFrame1, Canvas *canvasSrc, Canvas *canvasTarget,
119 Morphing *morphing);
108 120
109#endif 121#endif