aboutsummaryrefslogtreecommitdiff
path: root/src/options.h
diff options
context:
space:
mode:
authorallusive-dev <[email protected]>2023-09-19 17:47:33 +1000
committerallusive-dev <[email protected]>2023-09-19 17:47:33 +1000
commita93aba600b1c5d019b680b9f4ff3fa85d5d43a60 (patch)
tree77f8152222655657472a70e0bfa413a0495dd555 /src/options.h
parentreset (diff)
downloadcompfy-a93aba600b1c5d019b680b9f4ff3fa85d5d43a60.tar.xz
compfy-a93aba600b1c5d019b680b9f4ff3fa85d5d43a60.zip
Fixed broken files/code and other errors
Diffstat (limited to 'src/options.h')
-rw-r--r--src/options.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/options.h b/src/options.h
new file mode 100644
index 0000000..08aa15e
--- /dev/null
+++ b/src/options.h
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: MPL-2.0
+// Copyright (c) Yuxuan Shui <[email protected]>
+#pragma once
+
+/// Parse command line options
+
+#include <stdbool.h>
+#include <xcb/render.h> // for xcb_render_fixed_t
+
+#include "compiler.h"
+#include "config.h"
+#include "types.h"
+#include "win.h" // for wintype_t
+
+typedef struct session session_t;
+
+/// Get config options that are needed to parse the rest of the options
+/// Return true if we should quit
+bool get_early_config(int argc, char *const *argv, char **config_file, bool *all_xerrors,
+ bool *fork, int *exit_code);
+
+/**
+ * Process arguments and configuration files.
+ *
+ * Parameters:
+ * shadow_enable = Carry overs from parse_config
+ * fading_enable
+ * conv_kern_hasneg
+ * winopt_mask
+ * Returns:
+ * Whether configuration are processed successfully.
+ */
+bool must_use get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
+ bool fading_enable, bool conv_kern_hasneg,
+ win_option_mask_t *winopt_mask);
+
+// vim: set noet sw=8 ts=8: