-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmlx.h
58 lines (47 loc) · 2.78 KB
/
mlx.h
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
49
50
51
52
53
54
55
56
57
58
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* mlx.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: pollivie <pollivie.student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/14 12:41:43 by pollivie #+# #+# */
/* Updated: 2024/08/14 12:41:44 by pollivie ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef MLX_H
#define MLX_H
#include "mlx_int.h"
void *mlx_init(void);
int mlx_loop(void *mlx_ptr);
int mlx_loop_end(void *mlx_ptr);
int mlx_destroy_display(void *mlx_ptr);
int mlx_do_sync(void *mlx_ptr);
int mlx_get_screen_size(void *mlx_ptr, int *sizex, int *sizey);
void *mlx_new_window(void *mlx_ptr, int size_x, int size_y, char *title);
int mlx_clear_window(void *mlx_ptr, void *win_ptr);
int mlx_put_image_to_window(void *mlx_ptr, void *win_ptr, void *img_ptr, int x, int y);
int mlx_destroy_window(void *mlx_ptr, void *win_ptr);
void *mlx_new_image(void *mlx_ptr, int width, int height);
int mlx_pixel_put(void *mlx_ptr, void *win_ptr, int x, int y, int color);
char *mlx_get_data_addr(void *img_ptr, int *bits_per_pixel, int *size_line, int *endian);
int mlx_destroy_image(void *mlx_ptr, void *img_ptr);
int mlx_mouse_hook(void *win_ptr, int (*funct_ptr)(), void *param);
int mlx_key_hook(void *win_ptr, int (*funct_ptr)(), void *param);
int mlx_expose_hook(void *win_ptr, int (*funct_ptr)(), void *param);
int mlx_loop_hook(void *mlx_ptr, int (*funct_ptr)(), void *param);
int mlx_get_color_value(void *mlx_ptr, int color);
int mlx_string_put(void *mlx_ptr, void *win_ptr, int x, int y, int color, char *string);
void mlx_set_font(void *mlx_ptr, void *win_ptr, char *name);
void *mlx_xpm_to_image(void *mlx_ptr, char **xpm_data, int *width, int *height);
void *mlx_xpm_file_to_image(void *mlx_ptr, char *filename, int *width, int *height);
int mlx_hook(void *win_ptr, int x_event, int x_mask, int (*funct)(), void *param);
int mlx_do_key_autorepeatoff(void *mlx_ptr);
int mlx_do_key_autorepeaton(void *mlx_ptr);
int mlx_mouse_get_pos(void *mlx_ptr, void *win_ptr, int *x, int *y);
int mlx_mouse_move(void *mlx_ptr, void *win_ptr, int x, int y);
int mlx_mouse_hide(void *mlx_ptr, void *win_ptr);
int mlx_mouse_show(void *mlx_ptr, void *win_ptr);
int mlx_fps_show(void *mlx_ptr);
int mlx_fps_hide(void *mlx_ptr);
#endif