mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 22:53:34 +00:00
40 lines
1.3 KiB
C
40 lines
1.3 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/10/04 17:55:21 by maldavid #+# #+# */
|
|
/* Updated: 2022/12/18 03:51:19 by maldavid ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include <stdio.h>
|
|
#include "../includes/mlx.h"
|
|
|
|
int update(void *mlx)
|
|
{
|
|
static int i = 0;
|
|
|
|
puts("dude");
|
|
i++;
|
|
if (i > 1000000)
|
|
mlx_loop_end(mlx);
|
|
return (0);
|
|
}
|
|
|
|
int main(void)
|
|
{
|
|
void *win_ptr;
|
|
void *mlx_ptr;
|
|
|
|
mlx_ptr = mlx_init();
|
|
win_ptr = mlx_new_window(mlx_ptr, 400, 400, "My window");
|
|
mlx_loop_hook(mlx_ptr, update, mlx_ptr);
|
|
mlx_loop(mlx_ptr);
|
|
mlx_destroy_window(mlx_ptr, win_ptr);
|
|
mlx_destroy_display(mlx_ptr);
|
|
return (0);
|
|
}
|