mirror of
https://github.com/wizbright/waybox.git
synced 2025-11-15 06:59:52 -05:00
Cleanup
This commit is contained in:
parent
43fcf1ebf1
commit
8bc4352eb8
9 changed files with 62 additions and 124 deletions
|
|
@ -6,12 +6,19 @@
|
|||
|
||||
#include "waybox/server.h"
|
||||
|
||||
enum wb_cursor_mode {
|
||||
WB_CURSOR_PASSTHROUGH,
|
||||
WB_CURSOR_MOVE,
|
||||
WB_CURSOR_RESIZE,
|
||||
};
|
||||
|
||||
struct wb_cursor {
|
||||
struct wlr_cursor *cursor;
|
||||
struct wlr_xcursor_manager *xcursor_manager;
|
||||
|
||||
struct wb_server *server;
|
||||
|
||||
enum wb_cursor_mode cursor_mode;
|
||||
struct wl_listener cursor_motion;
|
||||
struct wl_listener cursor_motion_absolute;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,21 +7,21 @@
|
|||
#include "waybox/server.h"
|
||||
|
||||
struct wb_seat {
|
||||
struct wlr_seat * seat;
|
||||
struct wlr_seat *seat;
|
||||
|
||||
struct wl_list keyboards;
|
||||
};
|
||||
|
||||
struct wb_keyboard {
|
||||
struct wl_list link;
|
||||
struct wb_server * server;
|
||||
struct wlr_input_device * device;
|
||||
struct wb_server *server;
|
||||
struct wlr_input_device *device;
|
||||
|
||||
struct wl_listener modifiers;
|
||||
struct wl_listener key;
|
||||
};
|
||||
|
||||
struct wb_server;
|
||||
struct wb_seat * wb_seat_create(struct wb_server * server);
|
||||
void wb_seat_destroy(struct wb_seat * seat);
|
||||
struct wb_seat *wb_seat_create(struct wb_server *server);
|
||||
void wb_seat_destroy(struct wb_seat *seat);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
#ifndef SERVER_H
|
||||
#define SERVER_H
|
||||
|
||||
//#ifndef _POSIX_C_SOURCE
|
||||
//#define _POSIX_C_SOURCE 200809L
|
||||
//#endif
|
||||
#ifdef _POSIX_C_SOURCE
|
||||
#undef _POSIX_C_SOURCE
|
||||
#endif
|
||||
#define _POSIX_C_SOURCE 200112L
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <wlr/backend.h>
|
||||
#include <wlr/render/wlr_renderer.h>
|
||||
|
|
@ -27,24 +26,18 @@
|
|||
#include "waybox/cursor.h"
|
||||
#include "waybox/seat.h"
|
||||
|
||||
enum wb_cursor_mode {
|
||||
WB_CURSOR_PASSTHROUGH,
|
||||
WB_CURSOR_MOVE,
|
||||
WB_CURSOR_RESIZE,
|
||||
};
|
||||
|
||||
struct wb_server {
|
||||
struct wl_display *wl_display;
|
||||
struct wl_event_loop *wl_event_loop;
|
||||
|
||||
struct wlr_backend *backend;
|
||||
struct wlr_compositor *compositor;
|
||||
struct wlr_renderer *renderer;
|
||||
|
||||
struct wlr_output_layout *layout;
|
||||
struct wb_cursor *cursor;
|
||||
struct wb_seat * seat;
|
||||
struct wb_seat *seat;
|
||||
|
||||
enum wb_cursor_mode cursor_mode;
|
||||
struct wb_view *grabbed_view;
|
||||
double grab_x, grab_y;
|
||||
int grab_width, grab_height;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue