35 lines
716 B
C
35 lines
716 B
C
/// A normal window
|
|
#define OUTPUT_WINDOW 0
|
|
/// A desktop layer (wallpaper)
|
|
#define OUTPUT_LAYER 1
|
|
|
|
#define DEFAULT_WIDTH 400
|
|
#define DEFAULT_HEIGHT 400
|
|
|
|
|
|
struct client_state;
|
|
|
|
struct surface;
|
|
struct surface_list;
|
|
struct client_state;
|
|
|
|
#define EVENT_NONE 0
|
|
#define EVENT_DRAW 1
|
|
#define EVENT_EXIT 2
|
|
|
|
struct event {
|
|
int type;
|
|
union {
|
|
/// EVENT_DRAW
|
|
struct {
|
|
int width, height;
|
|
struct surface *surface;
|
|
} draw;
|
|
} data;
|
|
};
|
|
|
|
void wayland_init(struct client_state *state, int output_type);
|
|
void commit(struct client_state *state);
|
|
struct event wait_for_event(struct client_state *state);
|
|
void swap_buffers(struct client_state *state, struct surface *surface);
|
|
|