pid_t primary_client_pid;
};
-#define LAB_NR_LAYERS (4)
-
-struct output {
- struct wl_list link; /* server.outputs */
- struct server *server;
- struct wlr_output *wlr_output;
- struct wlr_output_state pending;
- struct wlr_scene_output *scene_output;
- struct wlr_scene_tree *layer_tree[LAB_NR_LAYERS];
- struct wlr_scene_tree *layer_popup_tree;
- struct wlr_scene_tree *osd_tree;
- struct wlr_scene_tree *session_lock_tree;
- struct wlr_scene_buffer *workspace_osd;
-
- struct osd_scene {
- struct wl_array items; /* struct osd_scene_item */
- struct wlr_scene_tree *tree;
- } osd_scene;
-
- /* In output-relative scene coordinates */
- struct wlr_box usable_area;
-
- struct wl_list regions; /* struct region.link */
-
- struct wl_listener destroy;
- struct wl_listener frame;
- struct wl_listener request_state;
-
- bool gamma_lut_changed;
-};
-
-#undef LAB_NR_LAYERS
-
struct constraint {
struct seat *seat;
struct wlr_pointer_constraint_v1 *constraint;
/* Possibly returns VIEW_EDGE_CENTER if <topMaximize> is yes */
enum view_edge edge_from_cursor(struct seat *seat, struct output **dest_output);
-void output_init(struct server *server);
-void output_finish(struct server *server);
-void output_manager_init(struct server *server);
-struct output *output_from_wlr_output(struct server *server,
- struct wlr_output *wlr_output);
-struct output *output_from_name(struct server *server, const char *name);
-struct output *output_nearest_to(struct server *server, int lx, int ly);
-struct output *output_nearest_to_cursor(struct server *server);
-
-/**
- * output_get_adjacent() - get next output, in a given direction,
- * from a given output
- *
- * @output: reference output
- * @edge: direction in which to look for the nearest output
- * @wrap: if true, wrap around at layout edge
- *
- * Note: if output is NULL, the output nearest the cursor will be used as the
- * reference instead.
- */
-struct output *output_get_adjacent(struct output *output,
- enum view_edge edge, bool wrap);
-
-bool output_is_usable(struct output *output);
-void output_update_usable_area(struct output *output);
-void output_update_all_usable_areas(struct server *server, bool layout_changed);
-bool output_get_tearing_allowance(struct output *output);
-struct wlr_box output_usable_area_in_layout_coords(struct output *output);
-void handle_output_power_manager_set_mode(struct wl_listener *listener,
- void *data);
-void output_enable_adaptive_sync(struct output *output, bool enabled);
-
-/**
- * output_max_scale() - get maximum scale factor of all usable outputs.
- * Used when loading/rendering resources (e.g. icons) that may be
- * displayed on any output.
- */
-float output_max_scale(struct server *server);
-
void handle_tearing_new_object(struct wl_listener *listener, void *data);
void server_init(struct server *server);
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef LABWC_OUTPUT_H
+#define LABWC_OUTPUT_H
+
+#include <wlr/types/wlr_output.h>
+
+enum view_edge;
+
+#define LAB_NR_LAYERS (4)
+
+struct output {
+ struct wl_list link; /* server.outputs */
+ struct server *server;
+ struct wlr_output *wlr_output;
+ struct wlr_output_state pending;
+ struct wlr_scene_output *scene_output;
+ struct wlr_scene_tree *layer_tree[LAB_NR_LAYERS];
+ struct wlr_scene_tree *layer_popup_tree;
+ struct wlr_scene_tree *osd_tree;
+ struct wlr_scene_tree *session_lock_tree;
+ struct wlr_scene_buffer *workspace_osd;
+
+ struct osd_scene {
+ struct wl_array items; /* struct osd_scene_item */
+ struct wlr_scene_tree *tree;
+ } osd_scene;
+
+ /* In output-relative scene coordinates */
+ struct wlr_box usable_area;
+
+ struct wl_list regions; /* struct region.link */
+
+ struct wl_listener destroy;
+ struct wl_listener frame;
+ struct wl_listener request_state;
+
+ bool gamma_lut_changed;
+};
+
+#undef LAB_NR_LAYERS
+
+void output_init(struct server *server);
+void output_finish(struct server *server);
+void output_manager_init(struct server *server);
+struct output *output_from_wlr_output(struct server *server,
+ struct wlr_output *wlr_output);
+struct output *output_from_name(struct server *server, const char *name);
+struct output *output_nearest_to(struct server *server, int lx, int ly);
+struct output *output_nearest_to_cursor(struct server *server);
+
+/**
+ * output_get_adjacent() - get next output, in a given direction,
+ * from a given output
+ *
+ * @output: reference output
+ * @edge: direction in which to look for the nearest output
+ * @wrap: if true, wrap around at layout edge
+ *
+ * Note: if output is NULL, the output nearest the cursor will be used as the
+ * reference instead.
+ */
+struct output *output_get_adjacent(struct output *output,
+ enum view_edge edge, bool wrap);
+
+bool output_is_usable(struct output *output);
+void output_update_usable_area(struct output *output);
+void output_update_all_usable_areas(struct server *server, bool layout_changed);
+bool output_get_tearing_allowance(struct output *output);
+struct wlr_box output_usable_area_in_layout_coords(struct output *output);
+void handle_output_power_manager_set_mode(struct wl_listener *listener,
+ void *data);
+void output_enable_adaptive_sync(struct output *output, bool enabled);
+
+/**
+ * output_max_scale() - get maximum scale factor of all usable outputs.
+ * Used when loading/rendering resources (e.g. icons) that may be
+ * displayed on any output.
+ */
+float output_max_scale(struct server *server);
+
+#endif // LABWC_OUTPUT_H
#include "magnifier.h"
#include "menu/menu.h"
#include "osd.h"
+#include "output.h"
#include "output-virtual.h"
#include "regions.h"
#include "ssd.h"
#include <wlr/util/transform.h>
#include "labwc.h"
#include "magnifier.h"
+#include "output.h"
#include "output-state.h"
struct wlr_surface *
#include "input/ime.h"
#include "labwc.h"
#include "node.h"
+#include "output.h"
#include "ssd.h"
#include "view.h"
#include "workspaces.h"
#include "layers.h"
#include "node.h"
#include "osd.h"
+#include "output.h"
#include "ssd.h"
#include "view.h"
#include "window-rules.h"
#include "common/macros.h"
#include "config/rcxml.h"
#include "labwc.h"
+#include "output.h"
#include "view.h"
#include "node.h"
#include <wlr/types/wlr_foreign_toplevel_management_v1.h>
#include "common/macros.h"
#include "labwc.h"
+#include "output.h"
#include "view.h"
#include "foreign-toplevel-internal.h"
#include "labwc.h"
#include "layers.h"
#include "menu/menu.h"
+#include "output.h"
#include "regions.h"
#include "resistance.h"
#include "resize-outlines.h"
#include <assert.h>
#include "common/mem.h"
#include "node.h"
+#include "output.h"
#include "view.h"
#define SAME_CLIENT(wlr_obj1, wlr_obj2) \
#include "edges.h"
#include "input/keyboard.h"
#include "labwc.h"
+#include "output.h"
#include "regions.h"
#include "resize-indicator.h"
#include "snap.h"
#include "config/rcxml.h"
#include "labwc.h"
#include "node.h"
+#include "output.h"
#define LAB_LAYERSHELL_VERSION 4
#include <wlr/util/transform.h>
#include "common/box.h"
#include "labwc.h"
+#include "output.h"
#include "theme.h"
static bool magnify_on;
#include "common/spawn.h"
#include "common/string-helpers.h"
#include "labwc.h"
+#include "output.h"
#include "workspaces.h"
#include "view.h"
#include "node.h"
#include "labwc.h"
#include "desktop-entry.h"
#include "osd.h"
+#include "output.h"
/* includes '%', terminating 's' and NULL byte, 8 is enough for %-9999s */
#define LAB_FIELD_SINGLE_FMT_MAX_LEN 8
#include "common/buf.h"
#include "common/font.h"
#include "common/lab-scene-rect.h"
-#include "common/macros.h"
#include "common/scaled-font-buffer.h"
#include "common/scaled-icon-buffer.h"
#include "common/scene-helpers.h"
#include "config/rcxml.h"
#include "labwc.h"
#include "node.h"
+#include "output.h"
#include "theme.h"
#include "view.h"
#include "window-rules.h"
#include "output-state.h"
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_output_management_v1.h>
-#include "labwc.h"
+#include <wlr/util/log.h>
+#include "output.h"
void
output_state_init(struct output *output)
#include <wlr/types/wlr_output.h>
#include "common/string-helpers.h"
#include "labwc.h"
+#include "output.h"
static struct wlr_output *fallback_output = NULL;
*/
#define _POSIX_C_SOURCE 200809L
+#include "output.h"
#include <assert.h>
#include <strings.h>
#include <wlr/backend/drm.h>
#include <assert.h>
#include "common/lab-scene-rect.h"
#include "labwc.h"
+#include "output.h"
#include "view.h"
#include "theme.h"
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
-#include <stdio.h>
-#include "common/macros.h"
#include "common/mem.h"
#include "labwc.h"
+#include "output.h"
#include "ssd.h"
#include "view.h"
#include "common/mem.h"
#include "input/keyboard.h"
#include "labwc.h"
+#include "output.h"
#include "view.h"
bool
#include "input/keyboard.h"
#include "input/key-state.h"
#include "labwc.h"
+#include "output.h"
#include "view.h"
static void
#include "layers.h"
#include "magnifier.h"
#include "menu/menu.h"
+#include "output.h"
#include "output-state.h"
#include "output-virtual.h"
#include "regions.h"
#include "common/mem.h"
#include "labwc.h"
#include "node.h"
+#include "output.h"
struct session_lock_output {
struct wlr_scene_tree *tree;
// SPDX-License-Identifier: GPL-2.0-only
#include "snap.h"
#include <assert.h>
-#include <limits.h>
#include <wlr/util/box.h>
#include "common/border.h"
-#include "common/macros.h"
#include "edges.h"
#include "labwc.h"
+#include "output.h"
#include "snap-constraints.h"
#include "view.h"
#include <assert.h>
#include <pixman.h>
-#include "common/mem.h"
#include "common/scene-helpers.h"
#include "config/rcxml.h"
#include "labwc.h"
+#include "output.h"
#include "ssd-internal.h"
#include "theme.h"
#include "view.h"
// SPDX-License-Identifier: GPL-2.0-only
#include "view.h"
#include <assert.h>
-#include <stdio.h>
#include <strings.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_security_context_v1.h>
#include "buffer.h"
#include "common/box.h"
#include "common/list.h"
-#include "common/macros.h"
#include "common/match.h"
#include "common/mem.h"
-#include "common/parse-bool.h"
#include "common/scene-helpers.h"
#include "foreign-toplevel.h"
#include "input/keyboard.h"
#include "labwc.h"
#include "menu/menu.h"
#include "osd.h"
+#include "output.h"
#include "output-state.h"
#include "placement.h"
#include "regions.h"
#include <stdlib.h>
#include <string.h>
#include <strings.h>
-#include "config.h"
#include "buffer.h"
#include "common/font.h"
#include "common/graphic-helpers.h"
#include "common/mem.h"
#include "input/keyboard.h"
#include "labwc.h"
+#include "output.h"
#include "protocols/cosmic-workspaces.h"
#include "protocols/ext-workspace.h"
#include "view.h"
-#include "xwayland.h"
#define COSMIC_WORKSPACES_VERSION 1
#define EXT_WORKSPACES_VERSION 1
#include "common/mem.h"
#include "labwc.h"
#include "node.h"
+#include "output.h"
#include "view.h"
struct xdg_popup {
#include "labwc.h"
#include "menu/menu.h"
#include "node.h"
+#include "output.h"
#include "snap-constraints.h"
#include "view.h"
#include "view-impl-common.h"
#include "foreign-toplevel.h"
#include "labwc.h"
#include "node.h"
+#include "output.h"
#include "ssd.h"
#include "view.h"
#include "view-impl-common.h"