summaryrefslogtreecommitdiff
path: root/include/gui/button.h
blob: 4e8ad95276a782f8742dcc3b36b4ea9cfc2fdf3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef UPEM_MORPHING_BUTTON
#define UPEM_MORPHING_BUTTON

/**
 * File: button.h
 * Buttons handling
 */
#include "window.h"

/**
 * Struct: Button
 * Component that can be triggered by click to execute a specific action.
 *
 * Fields:
 *   component - component that will acted as a button thanks to a rightful initialization.
 */
typedef struct {
  Component component;
} Button;

/**
 * Function: button_init
 * Initializes the button.
 *
 * Parameters:
 *  *button - pointer to the input button
 *  text - label for the button
 */
void button_init(Button *button, char *text);

/**
 * Function: button_free
 * Frees the resources for the button.
 *
 * Parameters:
 *  *button - pointer to the input button
 */
void button_free(Button *button);

#endif