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
|
2018-12-20 16:57:32 -05:00
|
|
|
*/
|
2018-12-21 11:25:28 -05:00
|
|
|
void get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
|
2018-12-21 17:49:42 -05:00
|
|
|
bool fading_enable, bool conv_kern_hasneg, win_option_mask_t *winopt_mask);
|
2018-12-21 11:25:28 -05:00
|
|
|
|
|
|
|
// vim: set noet sw=8 ts=8:
|