RT
Data Structures | Macros | Typedefs | Functions
libui.h File Reference
#include <SDL.h>
#include <stdbool.h>
Include dependency graph for libui.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  s_pxl
 
struct  s_img
 
struct  s_sdl
 
struct  s_data_thr
 
struct  s_thr_pool
 

Macros

#define THR_C   10
 
#define BATCH_SIZE   16
 
#define C_MASK   0xFF000000
 
#define P_TIME_LEN   80
 
#define GUI_FPS   60
 

Typedefs

typedef struct s_pxl t_pxl
 
typedef struct s_data_thr t_data_thr
 
typedef struct s_thr_pool t_thr_pool
 
typedef struct s_img t_img
 
typedef struct s_sdl t_sdl
 

Functions

void error_sdl (t_sdl *sdl)
 
t_sdlinit_sdl (int width, int height)
 
void exit_sdl (t_sdl *sdl)
 
void render_sdl (t_sdl *sdl, int(*f)(int, int, void *), void *d)
 
void loop_sdl (t_sdl *sdl, void *arg)
 Loop waiting for events to happen. More...
 
void save_screenshot (t_sdl *sdl, char *arg)
 
void init_mthr_sdl (t_sdl *sdl, int(*do_pxl)(int, int, void *), void *data, void(*prep_render)(t_sdl *))
 
void render_mthr_sdl (t_sdl *sdl)
 
void apply_simple_filter (t_sdl *sdl, uint32_t(*fun)(uint32_t))
 
void push_render_time (t_sdl *sdl, float time_frame_ms)
 
void push_gui_time (t_sdl *sdl, long new_frame)
 
void mthr_task (t_data_thr *data_thr, void *(*func)(void *))
 
int init_pool (t_sdl *sdl, int(*do_pxl)(int, int, void *), void *prg_d, uint16_t thr_count)
 
int pool_render (t_thr_pool *pool)
 
int destroy_pool (t_thr_pool *pool)
 

Macro Definition Documentation

◆ BATCH_SIZE

#define BATCH_SIZE   16

◆ C_MASK

#define C_MASK   0xFF000000

◆ GUI_FPS

#define GUI_FPS   60

◆ P_TIME_LEN

#define P_TIME_LEN   80

◆ THR_C

#define THR_C   10

Typedef Documentation

◆ t_data_thr

typedef struct s_data_thr t_data_thr

◆ t_img

typedef struct s_img t_img

◆ t_pxl

typedef struct s_pxl t_pxl

◆ t_sdl

typedef struct s_sdl t_sdl

◆ t_thr_pool

typedef struct s_thr_pool t_thr_pool

Function Documentation

◆ apply_simple_filter()

void apply_simple_filter ( t_sdl sdl,
uint32_t(*)(uint32_t)  fun 
)

◆ destroy_pool()

int destroy_pool ( t_thr_pool pool)

◆ error_sdl()

void error_sdl ( t_sdl sdl)

◆ exit_sdl()

void exit_sdl ( t_sdl sdl)

◆ init_mthr_sdl()

void init_mthr_sdl ( t_sdl sdl,
int(*)(int, int, void *)  do_pxl,
void *  data,
void(*)(t_sdl *)  prep_render 
)

◆ init_pool()

int init_pool ( t_sdl sdl,
int(*)(int, int, void *)  do_pxl,
void *  prg_d,
uint16_t  thr_count 
)

◆ init_sdl()

t_sdl* init_sdl ( int  width,
int  height 
)

◆ loop_sdl()

void loop_sdl ( t_sdl sdl,
void *  arg 
)

Loop waiting for events to happen.

Parameters
sdl
arg

◆ mthr_task()

void mthr_task ( t_data_thr data_thr,
void *(*)(void *)  func 
)

◆ pool_render()

int pool_render ( t_thr_pool pool)

◆ push_gui_time()

void push_gui_time ( t_sdl sdl,
long  new_frame 
)

◆ push_render_time()

void push_render_time ( t_sdl sdl,
float  time_frame_ms 
)

◆ render_mthr_sdl()

void render_mthr_sdl ( t_sdl sdl)

◆ render_sdl()

void render_sdl ( t_sdl sdl,
int(*)(int, int, void *)  f,
void *  d 
)

◆ save_screenshot()

void save_screenshot ( t_sdl sdl,
char *  arg 
)