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

ref: deff0227a3d5004e863c2005fa0bf02183809dfb CTU-FEE-B0B35APO-Semestral-project/lib-pheripherals/include/xwin_sdl.h -rw-r--r-- 871 bytes
deff0227 — František Boháček feat: implement device mount using system 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
47
48
#ifndef __XWIN_SDL_H__
#define __XWIN_SDL_H__

#include <SDL.h>
#include <stdbool.h>
#include <stdint.h>

/**
 * @brief Init SDL window
 *
 * @param w width
 * @param h height
 * @return int
 */
int xwin_init(uint16_t w, uint16_t h);

/**
 * @brief Close SDL window
 *
 */
void xwin_close();

/**
 * @brief Redraw SDL window with img data in format rgb888 stacked together
 *
 * @param w width of img
 * @param h height of img
 * @param img data with rgb888 stacked together
 */
void xwin_redraw(uint16_t w, uint16_t h, uint8_t *img);

/**
 * @brief Poll event to show OS window is responsive
 *
 * @param event
 * @return true event was polled
 * @return false no event found
 */
bool xwin_poll_event(SDL_Event *event);

/**
 * @brief Save image of the window to file
 *
 * @param output_name where to save the image
 */
void xwin_save_image(char *output_name);

#endif
Do not follow this link