summaryrefslogtreecommitdiffstats
path: root/include/xrmoptions.h
blob: cdd7453ae6d5897fe76a016324eabde4e05a03ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef ROFI_XRMOPTIONS_H
#define ROFI_XRMOPTIONS_H

// Big thanks to Sean Pringle for this code.
// This maps xresource options to config structure.
typedef enum
{
    xrm_String  = 0,
    xrm_Number  = 1,
    xrm_SNumber = 2,
    xrm_Boolean = 3,
    xrm_Char    = 4
} XrmOptionType;

/**
 * @param display Handler of the display to fetch the settings from.
 *
 * Parse the rofi related X resource options of the
 * connected X server.
 */
void config_parse_xresource_options ( Display *display );

/**
 * Parse commandline options.
 */
void config_parse_cmd_options ( void );
/**
 * Parse dynamic commandline options.
 */
void config_parse_cmd_options_dynamic ( void );
/**
 * @param display Handler of the display to fetch the settings from.
 *
 * Parse the rofi related X resource options of the
 * connected X server.
 */
void config_parse_xresource_options_dynamic ( Display *display );

/**
 * Free any allocated memory.
 */
void config_xresource_free ( void );

/**
 * Dump the settings in a Xresources compatible way to
 * stdout.
 */
void xresource_dump ( void );

/**
 * Add option to the dynamic option parser.
 */
void config_parser_add_option ( XrmOptionType type, const char *key, void **value, const char *comment );
void print_options ( void );
#endif