mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-09 15:19:11 +02:00
This is a major release and includes BREAKING changes! Breaking Changes: * More intuitive switch of focus, next, prev and exchange (#20, 40 in Bugs.md) Cagebreak will probably still feel broadly the same though. * Remove -r flag - This is replaced by output configuration. * Socket disabled by default - The socket is enabled by invoking Cagebreak with the -e flag. * Socket permissions restricted to the user of the Cagebreak process (700) This may require modification of scripts interacting with the socket with different UIDs than the UID of the Cagebreak process. * Rename "Current frame" indicator to "Current tile" Changelog: * Move to wlr_scene * Add events displaying change over the socket * this enables scripting tools * Add support for scaling outputs (thanks to Oliver Friedmann) * Remove -r flag * Add rotation to output configuration * Add cursor enable|disable flag * Add input keyboard configuration * Custom path flag for configuration file * Restrict socket permissions to the user running cagebreak (700) * Fix Issue #31 (resolve some terminology) 38 in Bugs.md * Fix Issue #30 - 39 in Bugs.md * Fix Issue #20 - 40 in Bugs.md * Fix Issue #12 - 41 in Bugs.md (dump + events over socket) * Fix Bugs found via scan-build static analysis (42 - 45 in Bugs.md) * Fix Issue #33 - 46 in Bugs.md * Fix Issue #32 - 47 in Bugs.md * Fix Issue #16 - 48 in Bugs.md * Fix Issue #3 - 49 in Bugs.md (disabling keybinding interpretation for specific keyboards is now possible) * Fix Issue #26 - 50 in Bugs.md * Fix Issue #7 - 51 in Bugs.md (Change cursor to square while Cagebreak is waiting for a key) * Fix config bug for some commands - 52 in Bugs.md * Fix Issue #35 - 53 in Bugs.md (update to wlroots 0.16.1) * Improve FAQ.md (related to some Issues) * Disable outputs when unable to set any mode (crashed previously) * Add Code of Conduct * Print version number on startup
67 lines
1.7 KiB
C
67 lines
1.7 KiB
C
// Copyright 2020 - 2023, project-repo and the cagebreak contributors
|
|
// SPDX -License-Identifier: MIT
|
|
|
|
#ifndef CG_OUTPUT_H
|
|
#define CG_OUTPUT_H
|
|
|
|
#include <wayland-server-core.h>
|
|
#include <wlr/util/box.h>
|
|
|
|
struct cg_server;
|
|
struct cg_view;
|
|
struct wlr_output;
|
|
struct wlr_surface;
|
|
|
|
struct cg_output {
|
|
struct cg_server *server;
|
|
struct wlr_output *wlr_output;
|
|
struct wlr_scene_rect *bg;
|
|
|
|
struct wl_listener mode;
|
|
struct wl_listener commit;
|
|
struct wl_listener destroy;
|
|
struct wl_listener frame;
|
|
struct cg_workspace **workspaces;
|
|
struct wl_list messages;
|
|
int curr_workspace;
|
|
int priority;
|
|
struct cg_view *last_scanned_out_view;
|
|
|
|
struct wl_list link; // cg_server::outputs
|
|
};
|
|
|
|
struct cg_output_priorities {
|
|
char *ident;
|
|
int priority;
|
|
struct wl_list link;
|
|
};
|
|
|
|
enum output_status { OUTPUT_ENABLE, OUTPUT_DISABLE, OUTPUT_DEFAULT };
|
|
|
|
struct cg_output_config {
|
|
enum output_status status;
|
|
struct wlr_box pos;
|
|
char *output_name;
|
|
float refresh_rate;
|
|
float scale;
|
|
int priority;
|
|
int angle; // enum wl_output_transform, -1 signifies "unspecified"
|
|
struct wl_list link; // cg_server::output_config
|
|
};
|
|
|
|
typedef void (*cg_surface_iterator_func_t)(struct cg_output *output,
|
|
struct wlr_surface *surface,
|
|
struct wlr_box *box,
|
|
void *user_data);
|
|
|
|
void
|
|
handle_new_output(struct wl_listener *listener, void *data);
|
|
void
|
|
output_configure(struct cg_server *server, struct cg_output *output);
|
|
void
|
|
output_set_window_title(struct cg_output *output, const char *title);
|
|
void
|
|
output_make_workspace_fullscreen(struct cg_output *output, int ws);
|
|
int
|
|
output_get_num(const struct cg_output *output);
|
|
#endif
|