2020-08-03 20:56:38 +01:00
|
|
|
#ifndef __LABWC_H
|
|
|
|
|
#define __LABWC_H
|
2020-12-30 10:29:21 +00:00
|
|
|
#include "config.h"
|
2019-11-19 21:00:26 +00:00
|
|
|
#include <getopt.h>
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
#include <stdio.h>
|
2020-09-28 20:41:41 +01:00
|
|
|
#include <stdlib.h>
|
2019-11-19 21:00:26 +00:00
|
|
|
#include <time.h>
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
#include <wayland-server-core.h>
|
|
|
|
|
#include <wlr/backend.h>
|
|
|
|
|
#include <wlr/render/wlr_renderer.h>
|
|
|
|
|
#include <wlr/types/wlr_compositor.h>
|
2020-09-28 20:41:41 +01:00
|
|
|
#include <wlr/types/wlr_cursor.h>
|
2019-11-19 21:00:26 +00:00
|
|
|
#include <wlr/types/wlr_data_device.h>
|
2021-08-05 12:18:10 +01:00
|
|
|
#include <wlr/types/wlr_foreign_toplevel_management_v1.h>
|
2019-11-19 21:00:26 +00:00
|
|
|
#include <wlr/types/wlr_input_device.h>
|
|
|
|
|
#include <wlr/types/wlr_keyboard.h>
|
2020-10-02 21:19:56 +01:00
|
|
|
#include <wlr/types/wlr_keyboard_group.h>
|
2020-10-31 15:09:13 +00:00
|
|
|
#include <wlr/types/wlr_layer_shell_v1.h>
|
2019-11-19 21:00:26 +00:00
|
|
|
#include <wlr/types/wlr_matrix.h>
|
|
|
|
|
#include <wlr/types/wlr_output.h>
|
2021-01-09 22:51:20 +00:00
|
|
|
#include <wlr/types/wlr_output_damage.h>
|
2021-02-27 23:15:02 -05:00
|
|
|
#include <wlr/types/wlr_output_management_v1.h>
|
2019-11-19 21:00:26 +00:00
|
|
|
#include <wlr/types/wlr_output_layout.h>
|
|
|
|
|
#include <wlr/types/wlr_pointer.h>
|
|
|
|
|
#include <wlr/types/wlr_seat.h>
|
2020-05-13 20:51:13 +01:00
|
|
|
#include <wlr/types/wlr_server_decoration.h>
|
2020-09-28 20:41:41 +01:00
|
|
|
#include <wlr/types/wlr_xcursor_manager.h>
|
2020-05-13 20:51:13 +01:00
|
|
|
#include <wlr/types/wlr_xdg_decoration_v1.h>
|
2020-09-28 20:41:41 +01:00
|
|
|
#include <wlr/types/wlr_xdg_shell.h>
|
2019-11-19 21:00:26 +00:00
|
|
|
#include <wlr/util/log.h>
|
2020-12-30 10:29:21 +00:00
|
|
|
#if HAVE_XWAYLAND
|
2019-11-19 21:00:26 +00:00
|
|
|
#include <wlr/xwayland.h>
|
2020-12-30 10:29:21 +00:00
|
|
|
#endif
|
2019-11-19 21:00:26 +00:00
|
|
|
#include <xkbcommon/xkbcommon.h>
|
2020-08-03 20:56:38 +01:00
|
|
|
#include "config/keybind.h"
|
2020-09-28 20:41:41 +01:00
|
|
|
#include "config/rcxml.h"
|
2020-06-18 20:18:01 +01:00
|
|
|
|
2019-11-19 21:00:26 +00:00
|
|
|
#define XCURSOR_DEFAULT "left_ptr"
|
|
|
|
|
#define XCURSOR_SIZE 24
|
|
|
|
|
#define XCURSOR_MOVE "grabbing"
|
|
|
|
|
|
2020-10-21 20:30:06 +01:00
|
|
|
enum input_mode {
|
|
|
|
|
LAB_INPUT_STATE_PASSTHROUGH = 0,
|
|
|
|
|
LAB_INPUT_STATE_MOVE,
|
|
|
|
|
LAB_INPUT_STATE_RESIZE,
|
2020-10-19 22:14:17 +01:00
|
|
|
LAB_INPUT_STATE_MENU,
|
2019-11-19 21:00:26 +00:00
|
|
|
};
|
|
|
|
|
|
2020-10-02 21:19:56 +01:00
|
|
|
struct input {
|
|
|
|
|
struct wlr_input_device *wlr_input_device;
|
|
|
|
|
struct seat *seat;
|
|
|
|
|
struct wl_listener destroy;
|
|
|
|
|
struct wl_list link; /* seat::inputs */
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct seat {
|
|
|
|
|
struct wlr_seat *seat;
|
|
|
|
|
struct server *server;
|
|
|
|
|
struct wlr_keyboard_group *keyboard_group;
|
|
|
|
|
struct wlr_cursor *cursor;
|
|
|
|
|
struct wlr_xcursor_manager *xcursor_manager;
|
|
|
|
|
|
2020-10-31 15:09:13 +00:00
|
|
|
/* if set, views cannot receive focus */
|
|
|
|
|
struct wlr_layer_surface_v1 *focused_layer;
|
|
|
|
|
|
2020-10-02 21:19:56 +01:00
|
|
|
struct wl_list inputs;
|
|
|
|
|
struct wl_listener new_input;
|
|
|
|
|
|
|
|
|
|
struct wl_listener cursor_motion;
|
|
|
|
|
struct wl_listener cursor_motion_absolute;
|
|
|
|
|
struct wl_listener cursor_button;
|
|
|
|
|
struct wl_listener cursor_axis;
|
|
|
|
|
struct wl_listener cursor_frame;
|
|
|
|
|
|
|
|
|
|
struct wl_listener request_cursor;
|
|
|
|
|
struct wl_listener request_set_selection;
|
|
|
|
|
|
|
|
|
|
struct wl_listener keyboard_key;
|
|
|
|
|
struct wl_listener keyboard_modifiers;
|
|
|
|
|
};
|
|
|
|
|
|
2019-12-27 20:48:58 +00:00
|
|
|
struct server {
|
2019-11-19 21:00:26 +00:00
|
|
|
struct wl_display *wl_display;
|
|
|
|
|
struct wlr_renderer *renderer;
|
2020-09-29 19:53:46 +01:00
|
|
|
struct wlr_backend *backend;
|
2019-11-19 21:00:26 +00:00
|
|
|
|
|
|
|
|
struct wlr_xdg_shell *xdg_shell;
|
2020-09-30 17:18:20 +01:00
|
|
|
struct wlr_layer_shell_v1 *layer_shell;
|
|
|
|
|
|
2019-11-19 21:00:26 +00:00
|
|
|
struct wl_listener new_xdg_surface;
|
2020-09-30 17:18:20 +01:00
|
|
|
struct wl_listener new_layer_surface;
|
|
|
|
|
|
2020-05-13 20:51:13 +01:00
|
|
|
struct wl_listener xdg_toplevel_decoration;
|
2020-12-30 10:29:21 +00:00
|
|
|
#if HAVE_XWAYLAND
|
2019-11-19 21:00:26 +00:00
|
|
|
struct wlr_xwayland *xwayland;
|
|
|
|
|
struct wl_listener new_xwayland_surface;
|
2020-12-30 10:29:21 +00:00
|
|
|
#endif
|
2020-10-02 21:19:56 +01:00
|
|
|
|
2019-11-19 21:00:26 +00:00
|
|
|
struct wl_list views;
|
2020-09-04 20:25:20 +01:00
|
|
|
struct wl_list unmanaged_surfaces;
|
2019-11-19 21:00:26 +00:00
|
|
|
|
2020-10-02 21:19:56 +01:00
|
|
|
struct seat seat;
|
2020-05-18 20:54:25 +01:00
|
|
|
|
|
|
|
|
/* cursor interactive */
|
2020-10-21 20:30:06 +01:00
|
|
|
enum input_mode input_mode;
|
2019-12-27 20:48:58 +00:00
|
|
|
struct view *grabbed_view;
|
2019-11-19 21:00:26 +00:00
|
|
|
double grab_x, grab_y;
|
2020-05-12 20:37:05 +01:00
|
|
|
struct wlr_box grab_box;
|
2019-11-19 21:00:26 +00:00
|
|
|
uint32_t resize_edges;
|
2021-08-16 07:16:56 +01:00
|
|
|
struct wlr_texture *osd;
|
2019-11-19 21:00:26 +00:00
|
|
|
|
|
|
|
|
struct wl_list outputs;
|
|
|
|
|
struct wl_listener new_output;
|
2020-10-02 21:19:56 +01:00
|
|
|
struct wlr_output_layout *output_layout;
|
2020-05-25 13:42:40 +01:00
|
|
|
|
2021-02-27 23:15:02 -05:00
|
|
|
struct wl_listener output_layout_change;
|
|
|
|
|
struct wlr_output_manager_v1 *output_manager;
|
|
|
|
|
struct wl_listener output_manager_apply;
|
|
|
|
|
struct wlr_output_configuration_v1 *pending_output_config;
|
|
|
|
|
|
2021-08-05 12:18:10 +01:00
|
|
|
struct wlr_foreign_toplevel_manager_v1 *foreign_toplevel_manager;
|
|
|
|
|
|
2020-09-04 20:25:20 +01:00
|
|
|
/* Set when in cycle (alt-tab) mode */
|
2020-05-25 13:42:40 +01:00
|
|
|
struct view *cycle_view;
|
2020-10-19 22:14:17 +01:00
|
|
|
|
2021-02-21 21:54:40 +00:00
|
|
|
struct theme *theme;
|
2020-10-19 22:14:17 +01:00
|
|
|
struct menu *rootmenu;
|
2019-11-19 21:00:26 +00:00
|
|
|
};
|
|
|
|
|
|
2019-12-27 20:48:58 +00:00
|
|
|
struct output {
|
2021-07-12 16:44:30 +01:00
|
|
|
struct wl_list link; /* server::outputs */
|
2019-12-27 20:48:58 +00:00
|
|
|
struct server *server;
|
2019-11-19 21:00:26 +00:00
|
|
|
struct wlr_output *wlr_output;
|
2021-01-09 22:51:20 +00:00
|
|
|
struct wlr_output_damage *damage;
|
2020-09-30 17:18:20 +01:00
|
|
|
struct wl_list layers[4];
|
2021-07-12 21:39:09 +01:00
|
|
|
struct wlr_box usable_area;
|
|
|
|
|
|
2020-09-29 19:53:46 +01:00
|
|
|
struct wl_listener destroy;
|
2021-01-09 22:51:20 +00:00
|
|
|
struct wl_listener damage_frame;
|
|
|
|
|
struct wl_listener damage_destroy;
|
2019-11-19 21:00:26 +00:00
|
|
|
};
|
|
|
|
|
|
2020-12-30 10:29:21 +00:00
|
|
|
enum view_type {
|
|
|
|
|
LAB_XDG_SHELL_VIEW,
|
|
|
|
|
#if HAVE_XWAYLAND
|
|
|
|
|
LAB_XWAYLAND_VIEW,
|
|
|
|
|
#endif
|
|
|
|
|
};
|
2019-11-19 21:00:26 +00:00
|
|
|
|
2020-09-02 20:20:52 +01:00
|
|
|
struct view_impl {
|
|
|
|
|
void (*configure)(struct view *view, struct wlr_box geo);
|
2020-09-02 21:00:28 +01:00
|
|
|
void (*close)(struct view *view);
|
2021-03-13 21:07:11 +00:00
|
|
|
void (*for_each_popup_surface)(struct view *view,
|
2021-01-09 22:51:20 +00:00
|
|
|
wlr_surface_iterator_func_t iterator, void *data);
|
2020-09-29 20:48:50 +01:00
|
|
|
void (*for_each_surface)(struct view *view,
|
|
|
|
|
wlr_surface_iterator_func_t iterator, void *data);
|
2021-08-05 12:18:10 +01:00
|
|
|
const char *(*get_string_prop)(struct view *view, const char *prop);
|
2020-09-03 20:50:35 +01:00
|
|
|
void (*map)(struct view *view);
|
2020-12-23 18:52:46 +00:00
|
|
|
void (*move)(struct view *view, double x, double y);
|
2020-09-03 20:50:35 +01:00
|
|
|
void (*unmap)(struct view *view);
|
2021-02-27 17:10:53 -05:00
|
|
|
void (*maximize)(struct view *view, bool maximize);
|
2020-09-02 20:20:52 +01:00
|
|
|
};
|
|
|
|
|
|
2020-09-15 20:41:01 +01:00
|
|
|
struct border {
|
|
|
|
|
int top;
|
|
|
|
|
int right;
|
|
|
|
|
int bottom;
|
|
|
|
|
int left;
|
|
|
|
|
};
|
|
|
|
|
|
2019-12-27 20:48:58 +00:00
|
|
|
struct view {
|
2020-09-02 20:20:52 +01:00
|
|
|
struct server *server;
|
2019-11-19 21:00:26 +00:00
|
|
|
enum view_type type;
|
2020-09-02 20:20:52 +01:00
|
|
|
const struct view_impl *impl;
|
2019-11-19 21:00:26 +00:00
|
|
|
struct wl_list link;
|
2020-09-02 20:20:52 +01:00
|
|
|
|
|
|
|
|
union {
|
|
|
|
|
struct wlr_xdg_surface *xdg_surface;
|
2020-12-30 10:29:21 +00:00
|
|
|
#if HAVE_XWAYLAND
|
2020-09-02 20:20:52 +01:00
|
|
|
struct wlr_xwayland_surface *xwayland_surface;
|
2020-12-30 10:29:21 +00:00
|
|
|
#endif
|
2020-09-02 20:20:52 +01:00
|
|
|
};
|
2019-11-19 21:00:26 +00:00
|
|
|
struct wlr_surface *surface;
|
2020-08-31 08:12:44 +01:00
|
|
|
|
|
|
|
|
bool mapped;
|
|
|
|
|
bool been_mapped;
|
2020-09-07 19:47:11 +01:00
|
|
|
bool minimized;
|
2021-02-27 17:10:53 -05:00
|
|
|
bool maximized;
|
2020-09-15 20:41:01 +01:00
|
|
|
|
|
|
|
|
/* geometry of the wlr_surface contained within the view */
|
2020-08-31 08:12:44 +01:00
|
|
|
int x, y, w, h;
|
2020-09-15 20:41:01 +01:00
|
|
|
|
2021-02-28 18:12:10 +00:00
|
|
|
/* geometry before maximize */
|
|
|
|
|
struct wlr_box unmaximized_geometry;
|
|
|
|
|
|
2020-09-15 20:41:01 +01:00
|
|
|
/*
|
2021-02-27 16:55:10 +00:00
|
|
|
* margin refers to the space between the extremities of the
|
|
|
|
|
* wlr_surface and the max extents of the server-side decorations.
|
|
|
|
|
* For xdg-shell views with CSD, this margin is zero.
|
2020-09-15 20:41:01 +01:00
|
|
|
*/
|
|
|
|
|
struct border margin;
|
|
|
|
|
|
2021-02-27 16:55:10 +00:00
|
|
|
/*
|
|
|
|
|
* padding refers to the space between the extremities of the
|
|
|
|
|
* wlr_surface and the parts of the surface that is considered the
|
|
|
|
|
* window.
|
|
|
|
|
* This is only used for xdg-shell views with CSD where the padding
|
|
|
|
|
* area is typically invisible except for client-side drop-shawdows.
|
|
|
|
|
*/
|
|
|
|
|
struct border padding;
|
|
|
|
|
|
2020-12-22 21:08:17 +00:00
|
|
|
struct {
|
|
|
|
|
bool update_x, update_y;
|
|
|
|
|
double x, y;
|
|
|
|
|
uint32_t width, height;
|
|
|
|
|
uint32_t configure_serial;
|
|
|
|
|
} pending_move_resize;
|
|
|
|
|
|
2021-03-21 21:46:16 +00:00
|
|
|
struct {
|
|
|
|
|
bool enabled;
|
|
|
|
|
struct wl_list parts;
|
|
|
|
|
struct wlr_box box; /* remember geo so we know when to update */
|
|
|
|
|
} ssd;
|
2021-08-07 09:35:53 +01:00
|
|
|
struct wlr_texture *title;
|
2020-08-31 08:12:44 +01:00
|
|
|
|
2021-08-05 12:18:10 +01:00
|
|
|
struct wlr_foreign_toplevel_handle_v1 *toplevel_handle;
|
2021-08-05 12:52:42 +01:00
|
|
|
struct wl_listener toplevel_handle_request_maximize;
|
2021-08-05 13:00:34 +01:00
|
|
|
struct wl_listener toplevel_handle_request_minimize;
|
2021-08-05 12:18:10 +01:00
|
|
|
|
2019-11-19 21:00:26 +00:00
|
|
|
struct wl_listener map;
|
|
|
|
|
struct wl_listener unmap;
|
|
|
|
|
struct wl_listener destroy;
|
2020-08-31 08:12:44 +01:00
|
|
|
struct wl_listener commit;
|
2019-11-19 21:00:26 +00:00
|
|
|
struct wl_listener request_move;
|
|
|
|
|
struct wl_listener request_resize;
|
2021-08-16 07:16:56 +01:00
|
|
|
struct wl_listener request_configure; /* xwayland only */
|
2021-02-27 17:10:53 -05:00
|
|
|
struct wl_listener request_maximize;
|
2021-08-05 12:18:10 +01:00
|
|
|
struct wl_listener set_title;
|
2021-03-02 20:37:23 +00:00
|
|
|
struct wl_listener new_popup; /* xdg-shell only */
|
|
|
|
|
struct wl_listener new_subsurface; /* xdg-shell only */
|
2019-11-19 21:00:26 +00:00
|
|
|
};
|
|
|
|
|
|
2020-12-30 10:29:21 +00:00
|
|
|
#if HAVE_XWAYLAND
|
2020-09-04 20:25:20 +01:00
|
|
|
struct xwayland_unmanaged {
|
2020-09-08 20:18:12 +01:00
|
|
|
struct server *server;
|
2020-09-04 20:25:20 +01:00
|
|
|
struct wlr_xwayland_surface *xwayland_surface;
|
|
|
|
|
struct wl_list link;
|
|
|
|
|
int lx, ly;
|
|
|
|
|
|
|
|
|
|
struct wl_listener request_configure;
|
|
|
|
|
struct wl_listener commit;
|
|
|
|
|
struct wl_listener map;
|
|
|
|
|
struct wl_listener unmap;
|
|
|
|
|
struct wl_listener destroy;
|
|
|
|
|
};
|
2020-12-30 10:29:21 +00:00
|
|
|
#endif
|
2020-09-04 20:25:20 +01:00
|
|
|
|
2021-03-02 20:37:23 +00:00
|
|
|
struct view_child {
|
|
|
|
|
struct wlr_surface *surface;
|
|
|
|
|
struct view *parent;
|
|
|
|
|
struct wl_listener commit;
|
|
|
|
|
struct wl_listener new_subsurface;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct view_subsurface {
|
|
|
|
|
struct view_child view_child;
|
|
|
|
|
struct wlr_subsurface *subsurface;
|
|
|
|
|
struct wl_listener destroy;
|
|
|
|
|
};
|
|
|
|
|
|
2021-01-09 22:51:20 +00:00
|
|
|
struct xdg_popup {
|
2021-03-02 20:37:23 +00:00
|
|
|
struct view_child view_child;
|
2021-01-09 22:51:20 +00:00
|
|
|
struct wlr_xdg_popup *wlr_popup;
|
|
|
|
|
|
|
|
|
|
struct wl_listener destroy;
|
|
|
|
|
struct wl_listener map;
|
|
|
|
|
struct wl_listener unmap;
|
|
|
|
|
struct wl_listener new_popup;
|
|
|
|
|
};
|
|
|
|
|
|
2021-03-02 20:37:23 +00:00
|
|
|
void xdg_popup_create(struct view *view, struct wlr_xdg_popup *wlr_popup);
|
|
|
|
|
|
2020-05-13 20:51:13 +01:00
|
|
|
void xdg_toplevel_decoration(struct wl_listener *listener, void *data);
|
2021-03-02 20:37:23 +00:00
|
|
|
|
2019-12-26 21:37:31 +00:00
|
|
|
void xdg_surface_new(struct wl_listener *listener, void *data);
|
|
|
|
|
|
2020-12-30 10:29:21 +00:00
|
|
|
#if HAVE_XWAYLAND
|
2020-09-04 20:32:41 +01:00
|
|
|
void xwayland_surface_new(struct wl_listener *listener, void *data);
|
2020-09-08 20:18:12 +01:00
|
|
|
void xwayland_unmanaged_create(struct server *server,
|
2020-10-02 21:19:56 +01:00
|
|
|
struct wlr_xwayland_surface *xsurface);
|
2020-12-30 10:29:21 +00:00
|
|
|
#endif
|
2019-12-26 21:37:31 +00:00
|
|
|
|
2021-03-02 20:37:23 +00:00
|
|
|
void view_child_init(struct view_child *child, struct view *view,
|
|
|
|
|
struct wlr_surface *wlr_surface);
|
|
|
|
|
void view_child_finish(struct view_child *child);
|
|
|
|
|
void subsurface_create(struct view *view, struct wlr_subsurface *wlr_subsurface);
|
|
|
|
|
|
2020-12-22 20:35:06 +00:00
|
|
|
void view_move_resize(struct view *view, struct wlr_box geo);
|
2020-12-23 18:52:46 +00:00
|
|
|
void view_move(struct view *view, double x, double y);
|
2021-08-05 13:00:34 +01:00
|
|
|
void view_minimize(struct view *view, bool minimized);
|
2021-08-05 12:18:10 +01:00
|
|
|
/* view_wlr_output - return the output that a view is mostly on */
|
|
|
|
|
struct wlr_output *view_wlr_output(struct view *view);
|
2021-07-09 21:39:20 +01:00
|
|
|
void view_center(struct view *view);
|
2021-02-27 17:10:53 -05:00
|
|
|
void view_maximize(struct view *view, bool maximize);
|
2021-08-02 16:49:41 +01:00
|
|
|
void view_toggle_maximize(struct view *view);
|
2020-09-29 20:48:50 +01:00
|
|
|
void view_for_each_surface(struct view *view,
|
|
|
|
|
wlr_surface_iterator_func_t iterator, void *user_data);
|
2021-03-13 21:07:11 +00:00
|
|
|
void view_for_each_popup_surface(struct view *view,
|
2021-01-09 22:51:20 +00:00
|
|
|
wlr_surface_iterator_func_t iterator, void *data);
|
2021-07-20 20:24:39 +01:00
|
|
|
void view_move_to_edge(struct view *view, const char *direction);
|
2021-08-05 12:18:10 +01:00
|
|
|
void view_update_title(struct view *view);
|
|
|
|
|
|
|
|
|
|
void foreign_toplevel_handle_create(struct view *view);
|
2020-09-11 20:48:28 +01:00
|
|
|
|
2021-05-27 02:11:11 +03:00
|
|
|
void desktop_set_focus_view_only(struct seat *seat, struct view *view);
|
2020-10-08 20:08:41 +01:00
|
|
|
void desktop_focus_view(struct seat *seat, struct view *view);
|
2020-09-11 20:48:28 +01:00
|
|
|
|
|
|
|
|
/**
|
2020-10-31 14:46:33 +00:00
|
|
|
* desktop_cycle_view - return view to 'cycle' to
|
|
|
|
|
* @current: reference point for finding next view to cycle to
|
|
|
|
|
* Note: If !current, the server->views second focusable view is returned
|
2020-09-11 20:48:28 +01:00
|
|
|
*/
|
2020-10-31 14:46:33 +00:00
|
|
|
struct view *desktop_cycle_view(struct server *server, struct view *current);
|
2021-07-12 21:46:10 +01:00
|
|
|
struct view *topmost_mapped_view(struct server *server);
|
2020-10-31 14:32:31 +00:00
|
|
|
void desktop_focus_topmost_mapped_view(struct server *server);
|
2021-08-16 07:16:56 +01:00
|
|
|
bool isfocusable(struct view *view);
|
2021-07-12 16:44:30 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* desktop_view_at - find view or layer-surface at co-ordinate (lx, ly)
|
|
|
|
|
* Note: If surface points to layer-surface, view will be set to NULL
|
|
|
|
|
*/
|
2020-09-11 20:48:28 +01:00
|
|
|
struct view *desktop_view_at(struct server *server, double lx, double ly,
|
2021-07-12 16:44:30 +01:00
|
|
|
struct wlr_surface **surface, double *sx, double *sy, int *view_area);
|
2019-12-26 21:37:31 +00:00
|
|
|
|
2020-10-02 21:19:56 +01:00
|
|
|
void cursor_init(struct seat *seat);
|
2020-10-06 21:31:01 +01:00
|
|
|
|
2020-10-02 21:19:56 +01:00
|
|
|
void keyboard_init(struct seat *seat);
|
2020-10-06 21:31:01 +01:00
|
|
|
|
2020-10-02 21:19:56 +01:00
|
|
|
void seat_init(struct server *server);
|
|
|
|
|
void seat_finish(struct server *server);
|
2020-10-08 20:22:52 +01:00
|
|
|
void seat_focus_surface(struct seat *seat, struct wlr_surface *surface);
|
2020-10-31 15:09:13 +00:00
|
|
|
void seat_set_focus_layer(struct seat *seat, struct wlr_layer_surface_v1 *layer);
|
2020-09-04 20:25:20 +01:00
|
|
|
|
2020-10-21 20:30:06 +01:00
|
|
|
void interactive_begin(struct view *view, enum input_mode mode,
|
2021-02-27 17:10:53 -05:00
|
|
|
uint32_t edges);
|
2020-05-29 21:27:34 +01:00
|
|
|
|
2020-10-02 21:19:56 +01:00
|
|
|
void output_init(struct server *server);
|
2021-01-09 22:51:20 +00:00
|
|
|
void output_damage_surface(struct output *output, struct wlr_surface *surface,
|
|
|
|
|
double lx, double ly, bool whole);
|
2021-03-01 18:15:02 +00:00
|
|
|
void scale_box(struct wlr_box *box, float scale);
|
2021-02-27 23:15:02 -05:00
|
|
|
void output_manager_init(struct server *server);
|
2021-07-12 16:44:30 +01:00
|
|
|
struct output *output_from_wlr_output(struct server *server, struct wlr_output *wlr_output);
|
2021-07-21 22:04:54 +01:00
|
|
|
struct wlr_box output_usable_area_in_layout_coords(struct output *output);
|
|
|
|
|
struct wlr_box output_usable_area_from_cursor_coords(struct server *server);
|
2021-02-27 23:15:02 -05:00
|
|
|
|
2021-01-09 22:51:20 +00:00
|
|
|
void damage_all_outputs(struct server *server);
|
|
|
|
|
void damage_view_whole(struct view *view);
|
|
|
|
|
void damage_view_part(struct view *view);
|
2020-10-02 21:19:56 +01:00
|
|
|
|
2020-06-03 18:39:46 +01:00
|
|
|
void server_init(struct server *server);
|
|
|
|
|
void server_start(struct server *server);
|
|
|
|
|
void server_finish(struct server *server);
|
2019-12-26 21:37:31 +00:00
|
|
|
|
2020-09-25 19:37:51 +01:00
|
|
|
void action(struct server *server, const char *action, const char *command);
|
2020-06-18 20:18:01 +01:00
|
|
|
|
2021-08-16 07:16:56 +01:00
|
|
|
/* update onscreen display 'alt-tab' texture */
|
|
|
|
|
void osd_update(struct server *server);
|
2020-06-03 18:39:46 +01:00
|
|
|
|
2020-08-03 20:56:38 +01:00
|
|
|
#endif /* __LABWC_H */
|