2015-07-27 04:17:12 -04:00
|
|
|
#ifndef ROFI_XRMOPTIONS_H
|
|
|
|
#define ROFI_XRMOPTIONS_H
|
2014-05-22 15:56:57 -04:00
|
|
|
|
2015-02-15 15:15:16 -05:00
|
|
|
// 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,
|
2015-02-17 04:31:59 -05:00
|
|
|
xrm_Boolean = 3,
|
|
|
|
xrm_Char = 4
|
2015-02-15 15:15:16 -05:00
|
|
|
} XrmOptionType;
|
|
|
|
|
2014-05-27 02:31:59 -04:00
|
|
|
/**
|
|
|
|
* @param display Handler of the display to fetch the settings from.
|
|
|
|
*
|
|
|
|
* Parse the rofi related X resource options of the
|
|
|
|
* connected X server.
|
|
|
|
*/
|
2015-02-03 02:21:59 -05:00
|
|
|
void config_parse_xresource_options ( Display *display );
|
2014-02-02 04:54:01 -05:00
|
|
|
|
2015-02-17 04:31:59 -05:00
|
|
|
/**
|
|
|
|
* Parse commandline options.
|
|
|
|
*/
|
2015-03-11 13:32:37 -04:00
|
|
|
void config_parse_cmd_options ( void );
|
2015-02-17 04:31:59 -05:00
|
|
|
/**
|
|
|
|
* Parse dynamic commandline options.
|
|
|
|
*/
|
2015-03-11 13:32:37 -04:00
|
|
|
void config_parse_cmd_options_dynamic ( void );
|
2015-02-15 15:15:16 -05:00
|
|
|
/**
|
|
|
|
* @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 );
|
|
|
|
|
2014-05-27 02:31:59 -04:00
|
|
|
/**
|
|
|
|
* Free any allocated memory.
|
|
|
|
*/
|
2015-02-03 02:21:59 -05:00
|
|
|
void config_xresource_free ( void );
|
2014-05-22 15:56:57 -04:00
|
|
|
|
2014-05-27 02:31:59 -04:00
|
|
|
/**
|
|
|
|
* Dump the settings in a Xresources compatible way to
|
|
|
|
* stdout.
|
|
|
|
*/
|
2014-05-22 15:56:57 -04:00
|
|
|
void xresource_dump ( void );
|
2014-05-27 02:31:59 -04:00
|
|
|
|
2015-02-17 04:31:59 -05:00
|
|
|
/**
|
|
|
|
* Add option to the dynamic option parser.
|
|
|
|
*/
|
2015-10-16 02:42:01 -04:00
|
|
|
void config_parser_add_option ( XrmOptionType type, const char *key, void **value, const char *comment );
|
2015-10-15 16:33:44 -04:00
|
|
|
void print_options ( void );
|
2015-11-14 13:59:56 -05:00
|
|
|
void print_help_msg ( const char *option, const char *type, const char*text, const char *def, int isatty );
|
2015-12-10 12:20:04 -05:00
|
|
|
void print_xresources_theme ( void );
|
2014-02-02 04:54:01 -05:00
|
|
|
#endif
|