]> git.mdlowis.com Git - proto/labwc.git/commitdiff
tree-wide: use forward declarations for wlr types
authorJohn Lindgren <john@jlindgren.net>
Sun, 7 Sep 2025 00:06:32 +0000 (20:06 -0400)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Sun, 7 Sep 2025 10:34:30 +0000 (19:34 +0900)
40 files changed:
include/config/keybind.h
include/input/cursor.h
include/input/ime.h
include/input/tablet-pad.h
include/input/tablet.h
include/labwc.h
include/layers.h
include/node.h
include/session-lock.h
include/theme.h
src/action.c
src/desktop.c
src/edges.c
src/input/cursor.c
src/input/gestures.c
src/input/ime.c
src/input/keyboard.c
src/input/tablet-pad.c
src/input/tablet.c
src/input/touch.c
src/interactive.c
src/layers.c
src/magnifier.c
src/menu/menu.c
src/node.c
src/osd/osd.c
src/output-virtual.c
src/output.c
src/overlay.c
src/regions.c
src/seat.c
src/session-lock.c
src/ssd/ssd-button.c
src/ssd/ssd-titlebar.c
src/ssd/ssd.c
src/view.c
src/workspaces.c
src/xdg-popup.c
src/xdg.c
src/xwayland.c

index 3d923530f6f8d9d3ccc61a774e590fcafeddbff4..bef3e189d55f6856b156165a23f90a299da7dd37 100644 (file)
@@ -2,7 +2,8 @@
 #ifndef LABWC_KEYBIND_H
 #define LABWC_KEYBIND_H
 
-#include <wlr/types/wlr_keyboard.h>
+#include <stdbool.h>
+#include <wayland-util.h>
 #include <xkbcommon/xkbcommon.h>
 
 #define MAX_KEYSYMS 32
index e6cfb4487f5f3fe17a16b1312b5e18776466173a..5afa831bfb4402009548d6b586457a751d2825ee 100644 (file)
@@ -2,13 +2,15 @@
 #ifndef LABWC_CURSOR_H
 #define LABWC_CURSOR_H
 
-#include <wlr/types/wlr_cursor.h>
+#include <wayland-server-protocol.h>
 #include "common/edge.h"
 #include "common/node-type.h"
 
 struct view;
 struct seat;
 struct server;
+struct wlr_input_device;
+struct wlr_cursor;
 struct wlr_surface;
 struct wlr_scene_node;
 
index ebf30c36099cc66cee8b79b25c27b36957b669f4..046e09260ff0b42a80e0a6fde6bb4dd52de4d5c7 100644 (file)
@@ -3,10 +3,10 @@
 #ifndef LABWC_IME_H
 #define LABWC_IME_H
 
-#include <wlr/types/wlr_text_input_v3.h>
-#include <wlr/types/wlr_input_method_v2.h>
+#include <wayland-server-core.h>
 
 struct keyboard;
+struct wlr_keyboard_key_event;
 
 /*
  * The relay structure manages the relationship between text-inputs and
index 3ada763418882d1a7a63513dc40527a228132612..e8be74f5391d9d19d74d3e63e97132906df0db9e 100644 (file)
@@ -3,7 +3,6 @@
 #define LABWC_TABLET_PAD_H
 
 #include <wayland-server-core.h>
-#include <wlr/types/wlr_tablet_v2.h>
 
 struct seat;
 struct wlr_device;
index 094dad9a6bffcc5218f72249772dfa883a103c25..eb3234f4d80bc35dd3f5b0bd1e557ddf0a408e7f 100644 (file)
@@ -3,7 +3,6 @@
 #define LABWC_TABLET_H
 
 #include <wayland-server-core.h>
-#include <wlr/types/wlr_tablet_v2.h>
 #include "config/types.h"
 
 struct seat;
index 2509292e9bcfdb34e839cf36260ef422399a3be7..72dbe687fde70f051a8e76e19dfc75216f8be122 100644 (file)
@@ -2,6 +2,7 @@
 #ifndef LABWC_H
 #define LABWC_H
 #include "config.h"
+#include <wlr/util/box.h>
 #include <wlr/util/log.h>
 #include "common/set.h"
 #include "input/cursor.h"
index b995fc8b713b6688b171d5ecb3d492a8043b5c21..da1bdb86ee97d79c3f92a3c06559000eadd61f1e 100644 (file)
@@ -1,8 +1,9 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 #ifndef LABWC_LAYERS_H
 #define LABWC_LAYERS_H
-#include <wayland-server.h>
-#include <wlr/types/wlr_layer_shell_v1.h>
+
+#include <wayland-server-core.h>
+#include <wlr/util/box.h>
 
 struct server;
 struct output;
index 7e8b6b504c2e97e878a021cfdae5c66d0fce06dd..52ebed96651409250638d106611a80b7ef61c81d 100644 (file)
@@ -1,9 +1,12 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 #ifndef LABWC_NODE_DESCRIPTOR_H
 #define LABWC_NODE_DESCRIPTOR_H
-#include <wlr/types/wlr_scene.h>
+
+#include <wayland-server-core.h>
 #include "common/node-type.h"
 
+struct wlr_scene_node;
+
 struct node_descriptor {
        enum lab_node_type type;
        struct view *view;
index 715c859f89a9071a5c998d1827ce362792d12f3e..207f039305bf50956ec549bdfd89e280fb81956b 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef LABWC_SESSION_LOCK_H
 #define LABWC_SESSION_LOCK_H
 
-#include <wlr/types/wlr_session_lock_v1.h>
+#include <wayland-server-core.h>
 
 struct output;
 struct server;
index 0df661e5eb3608c36cc27cf5f066c6ba9bca3089..797b5072dcd8294942745507056a82bdfcd62594 100644 (file)
@@ -9,7 +9,7 @@
 #define LABWC_THEME_H
 
 #include <cairo.h>
-#include <wlr/render/wlr_renderer.h>
+#include <stdbool.h>
 #include "common/node-type.h"
 
 struct lab_img;
index d02bf541d676e5c7038e6f6edca44f98a66b351e..60c57b33b76530e288e70cccdb4893c509935029 100644 (file)
@@ -6,6 +6,7 @@
 #include <string.h>
 #include <strings.h>
 #include <unistd.h>
+#include <wlr/types/wlr_cursor.h>
 #include <wlr/types/wlr_scene.h>
 #include <wlr/util/log.h>
 #include "action-prompt-codes.h"
index 7bfb2cbbbfe0cdbddf4a8b9d2cc7354ad41ad64b..099c493bdbb7e47fd755f56ff61173be7a0f55ae 100644 (file)
@@ -1,6 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #include "config.h"
 #include <assert.h>
+#include <wlr/types/wlr_cursor.h>
+#include <wlr/types/wlr_layer_shell_v1.h>
+#include <wlr/types/wlr_output_layout.h>
+#include <wlr/types/wlr_scene.h>
 #include <wlr/types/wlr_seat.h>
 #include <wlr/types/wlr_subcompositor.h>
 #include <wlr/types/wlr_xdg_shell.h>
index bdd1ef45feb55932424d4d696b145d0d4b7420af..56fb8bfa0ca08d6a387606a102a412d4449f9b8c 100644 (file)
@@ -3,6 +3,8 @@
 #include <assert.h>
 #include <limits.h>
 #include <pixman.h>
+#include <wlr/types/wlr_output_layout.h>
+#include <wlr/types/wlr_scene.h>
 #include <wlr/util/box.h>
 #include "common/border.h"
 #include "common/box.h"
index a24235cc7f2790f37997e573bcb7357c3a47c0a4..36a9046b2d7690191127742030dc24dfdf2f274c 100644 (file)
@@ -4,8 +4,10 @@
 #include <assert.h>
 #include <time.h>
 #include <wlr/backend/libinput.h>
+#include <wlr/types/wlr_cursor.h>
 #include <wlr/types/wlr_cursor_shape_v1.h>
 #include <wlr/types/wlr_data_device.h>
+#include <wlr/types/wlr_layer_shell_v1.h>
 #include <wlr/types/wlr_pointer_constraints_v1.h>
 #include <wlr/types/wlr_primary_selection.h>
 #include <wlr/types/wlr_relative_pointer_v1.h>
index 5a0365fe5b236067805a394e2c694421e1d3acbc..b40da82ca2cd72d6b7db7cc970550b8fee6c7de3 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #include "input/gestures.h"
+#include <wlr/types/wlr_cursor.h>
 #include <wlr/types/wlr_pointer_gestures_v1.h>
 #include "common/macros.h"
 #include "labwc.h"
index 18fb252f2eca8a7e390a7a77f1b3f496ab1761c2..92d88ffe0d8d39408ea4a8870c237f5d22a43fc3 100644 (file)
@@ -3,7 +3,12 @@
 
 #include "input/ime.h"
 #include <assert.h>
+#include <wlr/types/wlr_input_method_v2.h>
 #include <wlr/types/wlr_layer_shell_v1.h>
+#include <wlr/types/wlr_output_layout.h>
+#include <wlr/types/wlr_scene.h>
+#include <wlr/types/wlr_seat.h>
+#include <wlr/types/wlr_text_input_v3.h>
 #include <wlr/types/wlr_virtual_keyboard_v1.h>
 #include <wlr/types/wlr_xdg_shell.h>
 #include "common/mem.h"
index 3ca616e156b414237782f4e7f61028f9aac6fd24..ae92e73f76d69ea3b931b14ab7ec3e3a0ef07404 100644 (file)
@@ -6,6 +6,7 @@
 #include <wlr/backend/session.h>
 #include <wlr/interfaces/wlr_keyboard.h>
 #include <wlr/types/wlr_keyboard_group.h>
+#include <wlr/types/wlr_seat.h>
 #include "action.h"
 #include "common/macros.h"
 #include "config/keybind.h"
index 5d9e6dd9b066460ffd7339728342294db2d0dac9..230b6e6b105626015b4b7c4018a70fefb1b33446 100644 (file)
@@ -4,6 +4,7 @@
 #include <wlr/backend/libinput.h>
 #include <wlr/types/wlr_compositor.h>
 #include <wlr/types/wlr_tablet_pad.h>
+#include <wlr/types/wlr_tablet_v2.h>
 #include <wlr/util/log.h>
 #include "common/macros.h"
 #include "common/mem.h"
index 4b12579a39fe8f2c5d11a6d1ad68773a2f4ec9d0..319c06b3c92e32a81fc70d1cd32907da496f8572 100644 (file)
@@ -2,7 +2,9 @@
 #include "input/tablet.h"
 #include <stdlib.h>
 #include <linux/input-event-codes.h>
+#include <wlr/types/wlr_cursor.h>
 #include <wlr/types/wlr_tablet_tool.h>
+#include <wlr/types/wlr_tablet_v2.h>
 #include <wlr/util/log.h>
 #include <wlr/types/wlr_scene.h>
 #include "common/macros.h"
index 9f4f1eca4cb0992c2dd2ab19366ae932ea01c19f..d6557014debfc0272c0c0eea2f97e57167b17d3d 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #include "input/touch.h"
 #include <wayland-util.h>
+#include <wlr/types/wlr_cursor.h>
 #include <wlr/types/wlr_scene.h>
 #include <wlr/types/wlr_seat.h>
 #include <wlr/types/wlr_touch.h>
index 2dc4faa156889afe80282f304bf63d83a46312bd..f66a66b3f4e0980ecc78a123311cc96a9c42fcbb 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #include <assert.h>
+#include <wlr/types/wlr_cursor.h>
 #include "config/rcxml.h"
 #include "edges.h"
 #include "input/keyboard.h"
index c8f8e953a9277c3f4738daed3c90c5442dd411a2..f26208efa6ec217088cb1cee7deb685d0836f666 100644 (file)
 #include <stdbool.h>
 #include <stdlib.h>
 #include <strings.h>
+#include <wlr/types/wlr_cursor.h>
 #include <wlr/types/wlr_fractional_scale_v1.h>
 #include <wlr/types/wlr_layer_shell_v1.h>
+#include <wlr/types/wlr_scene.h>
 #include <wlr/types/wlr_xdg_shell.h>
 #include <wlr/util/log.h>
 #include "common/macros.h"
index 3764ad16bfc2ef96a90a71ed80c79573334532b9..424865c968c7f46f5050fe91a8eafd8b681befbc 100644 (file)
@@ -4,6 +4,7 @@
 #include <assert.h>
 #include <wlr/render/allocator.h>
 #include <wlr/render/swapchain.h>
+#include <wlr/types/wlr_cursor.h>
 #include <wlr/types/wlr_output.h>
 #include <wlr/types/wlr_scene.h>
 #include <wlr/util/transform.h>
index 5cbd5804d646bfaa46e1c09e6f21a0f069ffc3d8..e7a7b90c2fe2fa868f235e7d7e83d912ec817089 100644 (file)
@@ -9,7 +9,7 @@
 #include <string.h>
 #include <strings.h>
 #include <unistd.h>
-#include <wayland-server-core.h>
+#include <wlr/types/wlr_scene.h>
 #include <wlr/types/wlr_xdg_shell.h>
 #include <wlr/util/log.h>
 #include "action.h"
index e5132e7c2e016e9d160fb0ba4b45e1eba040b3a2..046fa5e286fcfcdaa9bf2649bb9dd2e84adb3c56 100644 (file)
@@ -2,6 +2,7 @@
 #include "node.h"
 #include <assert.h>
 #include <stdlib.h>
+#include <wlr/types/wlr_scene.h>
 #include "common/mem.h"
 #include "ssd.h"
 
index 8500eaf1e8057840ee500cf77ef82b2bd5d372f1..df1b7ad9e75f771deaeb62db66fc17317343ff11 100644 (file)
@@ -3,6 +3,7 @@
 #include <assert.h>
 #include <wlr/types/wlr_scene.h>
 #include <wlr/util/box.h>
+#include <wlr/util/log.h>
 #include "common/array.h"
 #include "common/lab-scene-rect.h"
 #include "common/scene-helpers.h"
index 164be7b6f6ef63666b2af56e140db3ee6cd54849..f3a40e10428d04e880c0c23bda218d9b1f6be3ee 100644 (file)
@@ -4,6 +4,7 @@
 #include <stdlib.h>
 #include <wlr/backend/headless.h>
 #include <wlr/types/wlr_output.h>
+#include <wlr/types/wlr_output_layout.h>
 #include "common/string-helpers.h"
 #include "labwc.h"
 #include "output.h"
index c561f0f7fe7158527ae32b2353ec8ecdbe5bc9d1..98da25ade53e1979d58a8d624642af549802941f 100644 (file)
@@ -12,6 +12,7 @@
 #include <strings.h>
 #include <wlr/backend/drm.h>
 #include <wlr/backend/wayland.h>
+#include <wlr/types/wlr_cursor.h>
 #include <wlr/types/wlr_gamma_control_v1.h>
 #include <wlr/types/wlr_output.h>
 #include <wlr/types/wlr_output_management_v1.h>
index 4cf6c4fd6630b3263262646a3028f918b42f1e41..508a531a73f0f3e5fe7742b0292be67f1ad2252c 100644 (file)
@@ -1,6 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #include "overlay.h"
 #include <assert.h>
+#include <wlr/types/wlr_cursor.h>
+#include <wlr/types/wlr_output_layout.h>
 #include <wlr/types/wlr_scene.h>
 #include "common/lab-scene-rect.h"
 #include "config/rcxml.h"
index bb0ecb2384e3c3ffd1357f259f7b0018a8cec5ae..a5170d4fd492fae39590ffe6fb8d020481e2e276 100644 (file)
@@ -6,6 +6,7 @@
 #include <float.h>
 #include <math.h>
 #include <string.h>
+#include <wlr/types/wlr_cursor.h>
 #include <wlr/util/box.h>
 #include "common/list.h"
 #include "common/mem.h"
index 25d8fc577ebf05cf4e663cb59b22b058f364f7b3..05f5a006bdaf5936ec735516984b54f9aa5d1b9c 100644 (file)
@@ -3,6 +3,7 @@
 #include <stdbool.h>
 #include <strings.h>
 #include <wlr/backend/libinput.h>
+#include <wlr/types/wlr_cursor.h>
 #include <wlr/types/wlr_input_device.h>
 #include <wlr/types/wlr_keyboard.h>
 #include <wlr/types/wlr_keyboard_group.h>
index 277233cc49e2694e16d1c62ff93d4771ca67cbbe..a370241e189630c3d54e86063961703d42b3bf0c 100644 (file)
@@ -2,6 +2,9 @@
 #define _POSIX_C_SOURCE 200809L
 #include "session-lock.h"
 #include <assert.h>
+#include <wlr/types/wlr_output_layout.h>
+#include <wlr/types/wlr_scene.h>
+#include <wlr/types/wlr_session_lock_v1.h>
 #include "common/mem.h"
 #include "labwc.h"
 #include "node.h"
index af209f8932b143fc56e8056a5ec8669cb310d8aa..50131a12d9297a87a5d07f7b7b3da319f30d56f2 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
 #include <assert.h>
+#include <wlr/types/wlr_scene.h>
 #include "config/rcxml.h"
 #include "common/list.h"
 #include "common/mem.h"
index b9f95202a67c3f8a5049f09b331f2badb1489dfc..595a203d5299a0fe7b42b5c5a50abd63e9301ef4 100644 (file)
@@ -4,6 +4,7 @@
 #include <assert.h>
 #include <string.h>
 #include <wlr/render/pixman.h>
+#include <wlr/types/wlr_scene.h>
 #include "buffer.h"
 #include "common/mem.h"
 #include "common/string-helpers.h"
index ca3f10a9606d67cadb38dafd7f7004f6798ef3a4..0e900a65852ea24307a16618948f60140391496b 100644 (file)
@@ -9,6 +9,7 @@
 #include "ssd.h"
 #include <assert.h>
 #include <strings.h>
+#include <wlr/types/wlr_cursor.h>
 #include <wlr/types/wlr_scene.h>
 #include "common/mem.h"
 #include "config/rcxml.h"
index 1f93d14011677d2f9264892a5188c0042910125e..ef871313c4bf1cb5aa7abf17885229852b1a0cd4 100644 (file)
@@ -2,6 +2,7 @@
 #include "view.h"
 #include <assert.h>
 #include <strings.h>
+#include <wlr/types/wlr_cursor.h>
 #include <wlr/types/wlr_keyboard_group.h>
 #include <wlr/types/wlr_output_layout.h>
 #include <wlr/types/wlr_scene.h>
index 5345f69d8e0c8ad86164603013faddee9d169c6a..43f19b1860070e07339260be6464711902c019cd 100644 (file)
@@ -8,6 +8,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <strings.h>
+#include <wlr/types/wlr_output_layout.h>
 #include <wlr/types/wlr_scene.h>
 #include "buffer.h"
 #include "common/font.h"
index 722a32ff261d32a6ccc962550ceefdf2c3660a35..aded80b52a442717f33ad8eeecc8f67d5cccc3a8 100644 (file)
@@ -7,6 +7,7 @@
  *     - keeping non-layer-shell xdg-popups outside the layers.c code
  */
 
+#include <wlr/types/wlr_scene.h>
 #include <wlr/types/wlr_xdg_shell.h>
 #include "common/macros.h"
 #include "common/mem.h"
index f25a0e8419308be5c6168f735739757279223307..1e09dd99c8731a7f10e53cbf1e64a21ed9514e03 100644 (file)
--- a/src/xdg.c
+++ b/src/xdg.c
@@ -1,7 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
 #include <assert.h>
+#include <wlr/types/wlr_cursor.h>
 #include <wlr/types/wlr_fractional_scale_v1.h>
+#include <wlr/types/wlr_scene.h>
 #include <wlr/types/wlr_xdg_activation_v1.h>
 #include <wlr/types/wlr_xdg_shell.h>
 #include <wlr/types/wlr_xdg_toplevel_icon_v1.h>
index 2127bd52715d99651f7027f509ea41532c6879ef..0604dcafe99df94a0cdd5cf68784b1fab1f0028b 100644 (file)
@@ -4,6 +4,8 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <wlr/types/wlr_compositor.h>
+#include <wlr/types/wlr_output_layout.h>
+#include <wlr/types/wlr_scene.h>
 #include <wlr/types/wlr_seat.h>
 #include <wlr/types/wlr_xcursor_manager.h>
 #include <wlr/xwayland.h>