]> git.mdlowis.com Git - proto/labwc.git/commitdiff
include: reduce unnecessary #includes
authorJohn Lindgren <john@jlindgren.net>
Wed, 3 Sep 2025 03:02:27 +0000 (23:02 -0400)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Sun, 7 Sep 2025 10:34:30 +0000 (19:34 +0900)
15 files changed:
include/common/nodename.h
include/config/rcxml.h
include/img/img.h
include/input/ime.h
include/input/tablet.h
include/placement.h
include/resistance.h
include/scaled-buffer/scaled-img-buffer.h
include/snap.h
include/ssd.h
src/action.c
src/config/rcxml.c
src/input/ime.c
src/osd/osd-field.c
src/resize-outlines.c

index f05c1283761378df3e288a104f5655a812b35b65..89a4fb1a91963cafc894466e54cb192e0c84aee4 100644 (file)
@@ -4,7 +4,6 @@
 
 #include <libxml/parser.h>
 #include <libxml/tree.h>
-#include <stdio.h>
 
 /**
  * nodename - give xml node an ascii name
index 42b60f10f158a1eb79dcc75f60e2f020ccf2c526..33c493767b27dcabd84f4d43e1ecbbf03d5e440e 100644 (file)
@@ -8,7 +8,6 @@
 #include <libxml/tree.h>
 
 #include "common/border.h"
-#include "common/buf.h"
 #include "common/font.h"
 #include "common/node-type.h"
 #include "config/types.h"
@@ -42,6 +41,8 @@ enum tiling_events_mode {
                (LAB_TILING_EVENTS_REGION | LAB_TILING_EVENTS_EDGE),
 };
 
+struct buf;
+
 struct button_map_entry {
        uint32_t from;
        uint32_t to;
index f299335ed68ca53e9e003c5e738de9289266e8a0..82c695b6e9008d9b53e9de8a0e3f8153a8970394 100644 (file)
@@ -4,7 +4,6 @@
 
 #include <cairo.h>
 #include <stdbool.h>
-#include <stdint.h>
 #include <wayland-util.h>
 
 enum lab_img_type {
index fcd292cee0c9aea87ed984f47109b38fac1aeabf..ebf30c36099cc66cee8b79b25c27b36957b669f4 100644 (file)
@@ -5,7 +5,6 @@
 
 #include <wlr/types/wlr_text_input_v3.h>
 #include <wlr/types/wlr_input_method_v2.h>
-#include "labwc.h"
 
 struct keyboard;
 
index e6c1373ef5f4e5e6ead9c1eb542cf528a4b4c0b3..094dad9a6bffcc5218f72249772dfa883a103c25 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <wayland-server-core.h>
 #include <wlr/types/wlr_tablet_v2.h>
-#include "config/tablet-tool.h"
+#include "config/types.h"
 
 struct seat;
 struct wlr_device;
index 99f1ca28fac31cc59dd7e693ab59e476abb8b50f..5210117e69338e399e63552ba7363186e85d7fb5 100644 (file)
@@ -4,7 +4,8 @@
 
 #include <stdbool.h>
 #include <wlr/util/box.h>
-#include "view.h"
+
+struct view;
 
 bool placement_find_best(struct view *view, struct wlr_box *geometry);
 
index 6a155cebb4a344957c69c2e33c1bf2278d4c43bf..0a6c2783207c7e3d8182b7c3d989b7c557c6c6fb 100644 (file)
@@ -1,7 +1,11 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 #ifndef LABWC_RESISTANCE_H
 #define LABWC_RESISTANCE_H
-#include "labwc.h"
+
+#include <stdbool.h>
+#include <wlr/util/box.h>
+
+struct view;
 
 /**
  * resistance_unsnap_apply() - Apply resistance when dragging a
index 48cbd9c48cae87081f0d12ab9c90350128446510..23fb9e1797038f1e2b6773cdbf56b21d537f09cd 100644 (file)
@@ -2,8 +2,6 @@
 #ifndef LABWC_SCALED_IMG_BUFFER_H
 #define LABWC_SCALED_IMG_BUFFER_H
 
-#include <stdbool.h>
-
 struct wlr_scene_tree;
 struct wlr_scene_node;
 struct wlr_scene_buffer;
index f5c2e22939a22e0a7d09dd5162dcb3db67451565..09bf6bafa2f82b31f49cf07bf71db352006ce4b4 100644 (file)
@@ -2,9 +2,9 @@
 #ifndef LABWC_SNAP_H
 #define LABWC_SNAP_H
 
-#include "common/border.h"
-#include "view.h"
+#include "common/edge.h"
 
+struct view;
 struct wlr_box;
 
 void snap_move_to_edge(struct view *view,
index 7ae9ff1ad4040e932715aed236deab9b592f555f..1340c8dc91fc43c1c57c33ef4694006d64bc6a32 100644 (file)
@@ -2,7 +2,6 @@
 #ifndef LABWC_SSD_H
 #define LABWC_SSD_H
 
-#include "common/border.h"
 #include "common/node-type.h"
 #include "config/types.h"
 
index 69e4e66bf40e3ca8e0c3cff10b583f41936ad0d3..d02bf541d676e5c7038e6f6edca44f98a66b351e 100644 (file)
@@ -9,6 +9,7 @@
 #include <wlr/types/wlr_scene.h>
 #include <wlr/util/log.h>
 #include "action-prompt-codes.h"
+#include "common/buf.h"
 #include "common/macros.h"
 #include "common/list.h"
 #include "common/mem.h"
index a2b31922001ffe0e32bfb78ae296c0c18f2dd138..08a70edf10f45f06f01f019ae6d2281161b4b64a 100644 (file)
@@ -16,6 +16,7 @@
 #include <wlr/util/box.h>
 #include <wlr/util/log.h>
 #include "action.h"
+#include "common/buf.h"
 #include "common/dir.h"
 #include "common/list.h"
 #include "common/macros.h"
index fb88ee155d7ee8682a70fb7360ebb7de75117824..36bc8252c89c7446767fe1396faed29fb24686cd 100644 (file)
@@ -8,6 +8,7 @@
 #include <wlr/types/wlr_xdg_shell.h>
 #include "common/mem.h"
 #include "input/keyboard.h"
+#include "labwc.h"
 #include "node.h"
 #include "output.h"
 #include "view.h"
index c27b9379d5dd85decb8509b7240f93aa6684f900..c8f796d1001f1ad5520e8a5e4639a52599a4c7e9 100644 (file)
@@ -2,6 +2,7 @@
 #include <assert.h>
 #include <ctype.h>
 #include <wlr/util/log.h>
+#include "common/buf.h"
 #include "common/mem.h"
 #include "config/rcxml.h"
 #include "view.h"
index a32351ac752b2d749c1e534a808829a811c2c7f2..fdb8baa1524eb86d6440463d0f87523877f63cc4 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "resize-outlines.h"
 #include <wlr/types/wlr_scene.h>
+#include "common/border.h"
 #include "common/lab-scene-rect.h"
 #include "labwc.h"
 #include "resize-indicator.h"