vulkan_test2

diff src/wsys.h @ 4:c31c4115d44a

test 2, open window, create queue, etc ...
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 22 Sep 2017 15:26:29 +0300
parents
children f8bd29f124a8
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/wsys.h	Fri Sep 22 15:26:29 2017 +0300
     1.3 @@ -0,0 +1,31 @@
     1.4 +#ifndef WSYS_H_
     1.5 +#define WSYS_H_
     1.6 +
     1.7 +/* pass to wsys_process_events */
     1.8 +enum {
     1.9 +	WSYS_BLOCKING = 0,
    1.10 +	WSYS_NONBLOCK = 1
    1.11 +};
    1.12 +
    1.13 +int wsys_create_window(int xsz, int ysz);
    1.14 +void wsys_destroy_window(void);
    1.15 +
    1.16 +void wsys_set_window_title(const char *title);
    1.17 +void wsys_get_window_size(int *xsz, int *ysz);
    1.18 +
    1.19 +void wsys_display_callback(void (*func)(void));
    1.20 +void wsys_reshape_callback(void (*func)(int, int));
    1.21 +void wsys_keyboard_callback(void (*func)(int, int));
    1.22 +void wsys_mouse_callback(void (*func)(int, int, int, int));
    1.23 +void wsys_motion_callback(void (*func)(int, int));
    1.24 +void wsys_passive_motion_callback(void (*func)(int, int));
    1.25 +
    1.26 +void wsys_swap_buffers(void);
    1.27 +void wsys_redisplay(void);
    1.28 +void wsys_quit(void);
    1.29 +
    1.30 +/* mode: WSYS_BLOCKING or WSYS_NONBLOCK */
    1.31 +int wsys_process_events(int mode);
    1.32 +
    1.33 +
    1.34 +#endif	/* WSYS_H_ */