wmail: fixed memory leaks in skip-names.
[dockapps.git] / wmix / include / config.h
blobedb571afb8c2453135ed010089412cca376985b1
1 /* WMix -- a mixer using the OSS mixer API
2 * Copyright (C)2014 Christophe CURIS for the WindowMaker Team
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 /* include/config.h: functions related to setting the configuration */
20 #ifndef WMIX_CONFIG_H
21 #define WMIX_CONFIG_H
23 #define EXCLUDE_MAX_COUNT 100
25 /* Global Configuration */
26 extern struct _Config {
27 char *file; /* full path to config file name */
28 char *display_name; /* X Display to connect to */
29 char *mixer_device; /* device file to use for controlling Mixer volumes */
31 int api; /* Sound API (0 = ALSA, 1 = OSS) */
32 unsigned int verbose : 1; /* be Verbose when starting */
33 unsigned int osd : 1; /* show OSD? */
34 unsigned int mousewheel : 1; /* mousewheel enabled? */
35 unsigned int scrolltext : 1; /* scroll channel names? */
36 unsigned int mmkeys : 1; /* grab multimedia keys for volume control */
38 unsigned int wheel_button_up; /* up button */
39 unsigned int wheel_button_down; /* down button */
41 float scrollstep; /* scroll mouse step adjustment */
42 char *osd_color; /* osd color */
43 char *osd_monitor_name; /* monitor name to display osd on */
44 int osd_monitor_number; /* monitor number to display osd on */
46 char *exclude_channel[EXCLUDE_MAX_COUNT + 1]; /* Devices to exclude from GUI's list */
47 } config;
49 /* Default color for OSD */
50 extern const char default_osd_color[];
52 /* Sets the default values in the config */
53 void config_init(void);
55 /* Release memory associated with configuration (this concern only stuff needed during startup) */
56 void config_release(void);
58 /* Sets configuration from command line */
59 void parse_cli_options(int argc, char **argv);
61 /* Read configuration from file */
62 void config_read(void);
64 /* Set some default values based on configuration choices */
65 void config_set_defaults();
67 #endif /* WMIX_CONFIG_H */