first
This commit is contained in:
commit
2a017bb895
10 changed files with 613 additions and 0 deletions
9
include/die.h
Normal file
9
include/die.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifndef _DIE_H
|
||||
#define _DIE_H
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void die(const char *msg, int flag);
|
||||
#endif
|
67
include/server.h
Normal file
67
include/server.h
Normal file
|
@ -0,0 +1,67 @@
|
|||
#ifndef _SERVER_H
|
||||
#define _SERVER_H
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/backend.h>
|
||||
#include <wlr/backend/libinput.h>
|
||||
#include <wlr/render/allocator.h>
|
||||
#include <wlr/render/wlr_renderer.h>
|
||||
#include <wlr/types/wlr_compositor.h>
|
||||
#include <wlr/types/wlr_cursor.h>
|
||||
#include <wlr/types/wlr_data_control_v1.h>
|
||||
#include <wlr/types/wlr_data_device.h>
|
||||
#include <wlr/types/wlr_export_dmabuf_v1.h>
|
||||
#include <wlr/types/wlr_gamma_control_v1.h>
|
||||
#include <wlr/types/wlr_idle.h>
|
||||
#include <wlr/types/wlr_idle_inhibit_v1.h>
|
||||
#include <wlr/types/wlr_idle_notify_v1.h>
|
||||
#include <wlr/types/wlr_input_device.h>
|
||||
#include <wlr/types/wlr_input_inhibitor.h>
|
||||
#include <wlr/types/wlr_keyboard.h>
|
||||
#include <wlr/types/wlr_layer_shell_v1.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include <wlr/types/wlr_output_management_v1.h>
|
||||
#include <wlr/types/wlr_pointer.h>
|
||||
#include <wlr/types/wlr_presentation_time.h>
|
||||
#include <wlr/types/wlr_primary_selection.h>
|
||||
#include <wlr/types/wlr_primary_selection_v1.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/types/wlr_screencopy_v1.h>
|
||||
#include <wlr/types/wlr_seat.h>
|
||||
#include <wlr/types/wlr_server_decoration.h>
|
||||
#include <wlr/types/wlr_session_lock_v1.h>
|
||||
#include <wlr/types/wlr_single_pixel_buffer_v1.h>
|
||||
#include <wlr/types/wlr_subcompositor.h>
|
||||
#include <wlr/types/wlr_viewporter.h>
|
||||
#include <wlr/types/wlr_virtual_keyboard_v1.h>
|
||||
#include <wlr/types/wlr_xcursor_manager.h>
|
||||
#include <wlr/types/wlr_xdg_activation_v1.h>
|
||||
#include <wlr/types/wlr_xdg_decoration_v1.h>
|
||||
#include <wlr/types/wlr_xdg_output_v1.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include "structs.h"
|
||||
#include "config.h"
|
||||
#include "die.h"
|
||||
|
||||
struct server {
|
||||
struct wl_display *wl_display;
|
||||
struct wl_event_loop *wl_event_loop;
|
||||
struct wlr_allocator *alloc;
|
||||
|
||||
struct wlr_backend *backend;
|
||||
struct wlr_compositor *compositor;
|
||||
struct wlr_renderer *renderer;
|
||||
|
||||
/* Monitors */
|
||||
struct wl_list outputs;
|
||||
};
|
||||
|
||||
|
||||
void createmon(struct wl_listener *listener, void *data);
|
||||
static struct wl_listener new_output = {.notify = createmon};
|
||||
|
||||
void server_init(struct server *server);
|
||||
#endif
|
13
include/structs.h
Normal file
13
include/structs.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef _STRUCTS_H
|
||||
#define _STRUCTS_H
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
int id;
|
||||
int x;
|
||||
int y;
|
||||
int res_x;
|
||||
int res_y;
|
||||
} MonitorRule;
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue