~ruther/CTU-FEE-B0B35APO-Semestral-project

ref: 6ada1974eeefafcf50eed752374704d263533283 CTU-FEE-B0B35APO-Semestral-project/lib-gui/include/gui_component_text.h -rw-r--r-- 958 bytes
6ada1974 — František Boháček feat: add new font with variable width 3 years ago
                                                                                
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
41
42
43
44
45
46
#ifndef __GUI_COMPONENT_TEXT_H__
#define __GUI_COMPONENT_TEXT_H__

#include "display_utils.h"
#include "gui.h"

typedef struct {
  char *line;
  font_t *font;
  display_pixel_t color;
} text_t;

/**
 * @brief Create text component
 *
 * @param text
 * @param x base x coordinate
 * @param y base y coordinate
 * @param w width
 * @param h height
 * @return component_t
 */
component_t gui_text_create(text_t *text, int16_t x, int16_t y, int16_t w,
                            int16_t h);

/**
 * @brief Render function of gui text component
 *
 * @param container
 * @param component
 * @param gui
 */
void gui_text_render(container_t *container, component_t *component,
                     gui_t *gui);

/**
 * @brief Update function of gui text component
 *
 * @param container
 * @param component
 * @param gui
 */
void gui_text_update(container_t *container, component_t *component,
                     gui_t *gui);

#endif // __GUI_COMPONENT_TEXT_H__
Do not follow this link