Skip to content

Commit dafab9d

Browse files
committed
chore: reduce unnecessary includes with forward decls
1 parent 7a64b89 commit dafab9d

23 files changed

Lines changed: 29 additions & 21 deletions

include/cursor.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#include "gesture.h"
44
#include "server.h"
5-
#include "toplevel.h"
65

76
#include <wlr/types/wlr_pointer.h>
87
#include <wlr/types/wlr_touch.h>

include/ipc.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#pragma once
22

3-
#include "types.h"
4-
53
#include <stdbool.h>
64
#include <sys/socket.h>
75
#include <sys/un.h>

include/master_stack.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#pragma once
22

3-
#include "types.h"
4-
53
#include <stdbool.h>
64
#include <wlr/util/box.h>
75

6+
typedef struct node_t node_t;
7+
typedef struct desktop_t desktop_t;
88
typedef struct output_t output_t;
99

1010
typedef enum {

include/render_unfocused.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include "types.h"
3+
typedef struct client_t client_t;
44

55
void render_unfocused_init(void);
66
void render_unfocused_fini(void);

include/scratchpad.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#pragma once
22

3-
#include "types.h"
4-
53
#include <stdbool.h>
64

5+
typedef struct node_t node_t;
6+
77
void scratchpad_init(void);
88
void scratchpad_fini(void);
99

include/seat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#pragma once
22

3-
#include "input_method.h"
4-
53
#include <wayland-server.h>
64
#include <wlr/types/wlr_seat.h>
75

6+
typedef struct ime_relay_t ime_relay_t;
7+
88
typedef struct seat_t {
99
struct wlr_seat *wlr_seat;
1010
ime_relay_t *input_method_relay;

include/server.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#pragma once
22

33
#include "gesture.h"
4-
#include "input_method.h"
5-
#include "launcher.h"
6-
#include "lock.h"
7-
#include "toplevel.h"
84
#include "types.h"
95
#include "xwayland.h"
106

@@ -34,6 +30,8 @@ enum cursor_mode {
3430
};
3531

3632
typedef struct output_t output_t;
33+
struct ime_relay_t;
34+
typedef struct toplevel_t toplevel_t;
3735

3836
typedef struct server_t {
3937
struct wl_display *wl_display;

include/tabs.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#pragma once
22

3-
#include "types.h"
4-
53
#include <stdbool.h>
64
#include <wlr/types/wlr_scene.h>
75
#include <wlr/util/box.h>
86

7+
typedef struct node_t node_t;
8+
typedef struct desktop_t desktop_t;
9+
910
#define TAB_BAR_HEIGHT 22
1011
#define TAB_BAR_BORDER 1
1112

include/tiling_drag.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#pragma once
22

3-
#include "types.h"
4-
53
#include <stdbool.h>
64

5+
typedef struct node_t node_t;
6+
77
#define TILING_DRAG_THRESHOLD 5
88

99
void tiling_drag_begin(node_t *node);

include/toplevel.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#pragma once
22

33
#include "surface.h"
4-
#include "types.h"
54

65
#include <wayland-server-core.h>
76
#include <wayland-server.h>

0 commit comments

Comments
 (0)