formatting, focus, toplevel handlers to separate file

This commit is contained in:
2026-04-28 18:46:46 +07:00
parent bcd2422950
commit 66fc7d0bf5
19 changed files with 381 additions and 343 deletions
+9
View File
@@ -0,0 +1,9 @@
#pragma once
void absinthe_toplevel_map(struct wl_listener *listener, void *data);
void absinthe_toplevel_unmap(struct wl_listener *listener, void *data);
void absinthe_toplevel_destroy(struct wl_listener *listener, void *data);
void absinthe_toplevel_request_move(struct wl_listener *listener, void *data);
void absinthe_toplevel_request_resize(struct wl_listener *listener, void *data);
void absinthe_toplevel_request_maximize(struct wl_listener *listener, void *data);
void absinthe_toplevel_request_fullscreen(struct wl_listener *listener, void *data);
+7 -12
View File
@@ -1,21 +1,16 @@
#pragma once
#include "types.h"
bool absinthe_toplevel_is_x11(struct absinthe_toplevel *toplevel);
struct absinthe_toplevel *absinthe_toplevel_at(struct absinthe_server *server, double lx, double ly,
struct wlr_surface **surface, double *sx, double *sy);
bool absinthe_toplevel_is_unmanaged(struct absinthe_toplevel *toplevel);
void absinthe_toplevel_map(struct wl_listener *listener, void *data);
void absinthe_toplevel_unmap(struct wl_listener *listener, void *data);
void absinthe_toplevel_destroy(struct wl_listener *listener, void *data);
void absinthe_toplevel_request_move(struct wl_listener *listener, void *data);
void absinthe_toplevel_request_resize(struct wl_listener *listener, void *data);
void absinthe_toplevel_request_maximize(struct wl_listener *listener, void *data);
void absinthe_toplevel_request_fullscreen(struct wl_listener *listener, void *data);
struct absinthe_toplevel *absinthe_toplevel_at(struct absinthe_server *server, double lx, double ly, struct wlr_surface **surface, double *sx, double *sy);
void absinthe_toplevel_update_geometry(struct absinthe_toplevel *toplevel);
void absinthe_toplevel_update_borders_geometry(struct absinthe_toplevel *toplevel);
void absinthe_toplevel_set_position(struct absinthe_toplevel *toplevel, int32_t x, int32_t y);
void absinthe_toplevel_set_size(struct absinthe_toplevel *toplevel, int32_t width, int32_t height);
void absinthe_toplevel_set_fullscreen(struct absinthe_toplevel *toplevel, bool fullscreen);
void absinthe_toplevel_set_border_color(struct absinthe_toplevel *toplevel, const float color[4]);
void absinthe_toplevel_update_borders_geometry(struct absinthe_toplevel *toplevel);
+1 -1
View File
@@ -6,7 +6,7 @@ void focus_toplevel(struct absinthe_toplevel *toplevel);
struct absinthe_toplevel *focus_get_topmost(struct absinthe_server *server);
void focus_logical_next(struct absinthe_toplevel *toplevel);
void focus_after_unmap(struct absinthe_toplevel *toplevel);
void focus_next(struct absinthe_server *server, bool tiled);
void focus_prev(struct absinthe_server *server, bool tiled);
+6 -7
View File
@@ -1,20 +1,19 @@
#pragma once
#include <linux/input-event-codes.h>
#include <wayland-server-core.h>
#include <wlr/backend.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/render/allocator.h>
#include <wlr/types/wlr_xdg_shell.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_keyboard.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_seat.h>
#include <wlr/types/wlr_keyboard.h>
#include <wlr/types/wlr_output_management_v1.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_seat.h>
#include <wlr/types/wlr_xdg_decoration_v1.h>
#include <wlr/types/wlr_xdg_shell.h>
#ifdef XWAYLAND
#include <wlr/xwayland.h>