2018-12-21 05:57:32 +08:00
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
// Copyright (c) Yuxuan Shui <yshuiv7@gmail.com>
|
|
|
|
#pragma once
|
|
|
|
|
2018-12-22 00:25:28 +08:00
|
|
|
/// Parse command line options
|
|
|
|
|
2018-12-21 05:57:32 +08:00
|
|
|
#include <stdbool.h>
|
2018-12-22 00:25:28 +08:00
|
|
|
#include <xcb/render.h> // for xcb_render_fixed_t
|
2018-12-21 05:57:32 +08:00
|
|
|
|
|
|
|
#include "compiler.h"
|
2018-12-22 00:25:28 +08:00
|
|
|
#include "config.h"
|
|
|
|
#include "types.h"
|
|
|
|
#include "win.h" // for wintype_t
|
2018-12-21 05:57:32 +08:00
|
|
|
|
|
|
|
typedef struct session session_t;
|
|
|
|
|
2018-12-21 07:58:47 +08: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-08 09:27:46 +08:00
|
|
|
bool *fork, int *exit_code);
|
2018-12-21 07:58:47 +08:00
|
|
|
|
2018-12-21 05:57:32 +08:00
|
|
|
/**
|
|
|
|
* Process arguments and configuration files.
|
2018-12-22 00:25:28 +08:00
|
|
|
*
|
|
|
|
* Parameters:
|
|
|
|
* shadow_enable = Carry overs from parse_config
|
|
|
|
* fading_enable
|
|
|
|
* conv_kern_hasneg
|
|
|
|
* winopt_mask
|
2018-12-21 05:57:32 +08:00
|
|
|
*/
|
2018-12-22 00:25:28 +08:00
|
|
|
void get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
|
2018-12-22 06:49:42 +08:00
|
|
|
bool fading_enable, bool conv_kern_hasneg, win_option_mask_t *winopt_mask);
|
2018-12-22 00:25:28 +08:00
|
|
|
|
|
|
|
// vim: set noet sw=8 ts=8:
|