micro-wm/include/main.h

65 lines
1.4 KiB
C

#ifndef _MAIN_H
#define _MAIN_H
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <assert.h>
#include <wayland-server-core.h>
#include <wlr/backend.h>
#include <wlr/render/allocator.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/render/allocator.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/types/wlr_keyboard.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_seat.h>
#include <wlr/types/wlr_xdg_shell.h>
#include <wlr/util/log.h>
#include "config.h"
#include "die.h"
struct server {
struct wl_display *wl_display;
struct wlr_backend *backend;
struct wlr_renderer *renderer;
struct wlr_allocator *alloc;
struct wlr_xdg_shell *xdg_shell;
struct wl_listener new_xdg_surface;
struct wl_list views;
struct wlr_cursor *cursor;
struct wl_listener cursor_motion;
struct wl_listener cursor_button;
struct wlr_output_layout *output_layout;
struct wl_list outputs;
struct wl_listener new_output;
};
struct output {
struct wlr_output *wlr_output;
struct server *server;
struct wl_listener destroy;
struct wl_listener frame;
struct wl_list link;
};
struct keyboard {
struct wlr_input_device *device;
struct server *server;
struct wl_listener modifiers;
struct wl_listener key;
struct wl_list link;
};
#endif