]> git.mdlowis.com Git - proto/labwc.git/commitdiff
action: Inline private/action.h into action.c
authorJohn Lindgren <john@jlindgren.net>
Tue, 22 Nov 2022 16:59:54 +0000 (11:59 -0500)
committerJohan Malm <johanmalm@users.noreply.github.com>
Fri, 25 Nov 2022 22:32:22 +0000 (22:32 +0000)
There is no need for a header since the types defined in it are
used only in action.c.

include/action.h
include/private/action.h [deleted file]
src/action.c

index 126e5b541c1fbe92e58a3345fd2cac1a27b45543..ab9741ab2eb48dd67c7e21ff25c4d7e3d3a00380 100644 (file)
@@ -2,9 +2,10 @@
 #ifndef __LABWC_ACTION_H
 #define __LABWC_ACTION_H
 
+#include <wayland-util.h>
+
 struct view;
 struct server;
-struct wl_list;
 
 struct action {
        struct wl_list link; /*
diff --git a/include/private/action.h b/include/private/action.h
deleted file mode 100644 (file)
index 1bb89ac..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_PRIVATE_ACTION_H
-#define __LABWC_PRIVATE_ACTION_H
-
-/* Don't include ourself as search path starts at current directory */
-#include "../action.h"
-
-enum action_arg_type {
-       LAB_ACTION_ARG_STR = 0,
-};
-
-struct action_arg {
-       struct wl_list link;        /* struct action.args */
-
-       char *key;                  /* May be NULL if there is just one arg */
-       enum action_arg_type type;
-};
-
-struct action_arg_str {
-       struct action_arg base;
-       char *value;
-};
-
-#endif /* __LABWC_PRIVATE_ACTION_H */
index c1e38d7dd1fadc50146095642547196c1b7fb0e3..4f3171e19a216d9c6bf2c4e399ed233a9fe9b06f 100644 (file)
@@ -6,17 +6,33 @@
 #include <strings.h>
 #include <unistd.h>
 #include <wlr/util/log.h>
+#include "action.h"
 #include "common/list.h"
 #include "common/mem.h"
 #include "common/spawn.h"
 #include "debug.h"
 #include "labwc.h"
 #include "menu/menu.h"
-#include "private/action.h"
 #include "ssd.h"
 #include "view.h"
 #include "workspaces.h"
 
+enum action_arg_type {
+       LAB_ACTION_ARG_STR = 0,
+};
+
+struct action_arg {
+       struct wl_list link;        /* struct action.args */
+
+       char *key;                  /* May be NULL if there is just one arg */
+       enum action_arg_type type;
+};
+
+struct action_arg_str {
+       struct action_arg base;
+       char *value;
+};
+
 enum action_type {
        ACTION_TYPE_INVALID = 0,
        ACTION_TYPE_NONE,