2018-12-20 16:57:32 -05:00
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
// Copyright (c) Yuxuan Shui <yshuiv7@gmail.com>
|
|
|
|
#pragma once
|
|
|
|
|
2018-12-21 11:25:28 -05:00
|
|
|
/// Parse command line options
|
|
|
|
|
2018-12-20 16:57:32 -05:00
|
|
|
#include <stdbool.h>
|
2018-12-21 11:25:28 -05:00
|
|
|
#include <xcb/render.h> // for xcb_render_fixed_t
|
2018-12-20 16:57:32 -05:00
|
|
|
|
|
|
|
#include "compiler.h"
|
2018-12-21 11:25:28 -05:00
|
|
|
#include "config.h"
|
|
|
|
#include "types.h"
|
|
|
|
#include "win.h" // for wintype_t
|
2018-12-20 16:57:32 -05:00
|
|
|
|
|
|
|
typedef struct session session_t;
|
|
|
|
|
2018-12-20 18:58:47 -05:00
|
|
|
/// 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,
|
2019-02-07 20:27:46 -05:00
|
|
|
bool *fork, int *exit_code);
|
2018-12-20 18:58:47 -05:00
|
|
|
|
2018-12-20 16:57:32 -05:00
|
|
|
/**
|
|
|
|
* Process arguments and configuration files.
|
2018-12-21 11:25:28 -05:00
|
|
|
*
|
|
|
|
* Parameters:
|
|
|
|
* shadow_enable = Carry overs from parse_config
|
|
|
|
* fading_enable
|
|
|
|
* conv_kern_hasneg
|
|
|
|
* winopt_mask
|
2019-11-09 23:59:55 -05:00
|
|
|
* Returns:
|
|
|
|
* Whether configuration are processed successfully.
|
2018-12-20 16:57:32 -05:00
|
|
|
*/
|
2019-11-09 23:59:55 -05:00
|
|
|
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);
|
2024-02-19 18:30:53 -05:00
|
|
|
void options_postprocess_c2_lists(struct c2_state *state, struct x_connection *c,
|
|
|
|
struct options *option);
|
2024-02-19 19:18:39 -05:00
|
|
|
void options_destroy(struct options *options);
|
2018-12-21 11:25:28 -05:00
|
|
|
|
|
|
|
// vim: set noet sw=8 ts=8:
|