Clean up options/config file parsing
* Pass a options_t, not session_t * Slightly improve error handling when setting vsync method via dbus The goal here is to limit the scope of what a given function can access. And session_t contains basically everything, so don't pass it around. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@ -2,9 +2,15 @@
|
||||
// Copyright (c) Yuxuan Shui <yshuiv7@gmail.com>
|
||||
#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;
|
||||
|
||||
@ -15,5 +21,15 @@ bool get_early_config(int argc, char *const *argv, char **config_file, bool *all
|
||||
|
||||
/**
|
||||
* Process arguments and configuration files.
|
||||
*
|
||||
* Parameters:
|
||||
* shadow_enable = Carry overs from parse_config
|
||||
* fading_enable
|
||||
* conv_kern_hasneg
|
||||
* winopt_mask
|
||||
*/
|
||||
void get_cfg(session_t *ps, int argc, char *const *argv);
|
||||
void 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:
|
||||
|
Reference in New Issue
Block a user