Mon 14 Oct 23:06:38 CEST 2024

This commit is contained in:
sbosse 2024-10-14 23:08:25 +02:00
parent 96b735904c
commit de81192b71

26
kernel/window.h Normal file
View File

@ -0,0 +1,26 @@
#ifndef WINDOW_H
#define WINDOW_H
#include "event_queue.h"
#include "graphics.h"
extern struct window window_root;
struct window * window_create_root();
struct window * window_create( struct window *parent, int x, int y, int w, int h );
struct window * window_addref( struct window *w );
void window_delete( struct window *w );
int window_width( struct window *w );
int window_height( struct window *w );
struct graphics * window_graphics( struct window *w );
int window_post_events( struct window *w, struct event *e, int size );
int window_read_events( struct window *w, struct event *e, int size );
int window_read_events_nonblock( struct window *w, struct event *e, int size );
int window_write_graphics( struct window *w, int *cmd, int size );
void window_event_post_root( uint16_t type, uint16_t code, int16_t x, int16_t y );
#endif