summaryrefslogtreecommitdiff
path: root/include/gui/button.h
blob: 85371518dab333ed0c2037dfd5660a595c7d6b71 (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
#ifndef UPEM_MORPHING_BUTTON
#define UPEM_MORPHING_BUTTON

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

/**
 * Type: Button
 * Component that can be triggered by click to execute a specific action.
 */
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