waybox/include/waybox/output.h

48 lines
1,013 B
C

#ifndef OUTPUT_H
#define OUTPUT_H
#ifndef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L
#endif
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <wlr/backend.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/render/wlr_texture.h>
#include <wlr/types/wlr_compositor.h>
#include "waybox/server.h"
struct wb_output {
struct wlr_output *wlr_output;
struct wb_server *server;
struct wl_listener destroy;
struct wl_listener frame;
struct wl_list link;
};
struct wb_view {
struct wl_list link;
struct wb_server *server;
struct wlr_xdg_surface *xdg_surface;
struct wl_listener map;
struct wl_listener unmap;
struct wl_listener destroy;
struct wl_listener request_move;
struct wl_listener request_resize;
bool mapped;
int x, y;
};
void output_frame_notify(struct wl_listener* listener, void *data);
void output_destroy_notify(struct wl_listener* listener, void *data);
void new_output_notify(struct wl_listener* listener, void *data);
#endif // output.h