diff options
| author | Allusive_ <[email protected]> | 2023-08-01 09:00:18 +1000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-01 09:00:18 +1000 |
| commit | 0147e7dd165f837662a480938e2083a5ac707586 (patch) | |
| tree | 3e38624c86c7119703cddb524ac01278491c8a3f /src/options.h | |
| parent | Add files via upload (diff) | |
| download | compfy-0147e7dd165f837662a480938e2083a5ac707586.tar.xz compfy-0147e7dd165f837662a480938e2083a5ac707586.zip | |
Add files via upload
Diffstat (limited to 'src/options.h')
| -rw-r--r-- | src/options.h | 37 |
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: |