[go: up one dir, main page]

File: configsys.h

package info (click to toggle)
tilda 1.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,860 kB
  • ctags: 481
  • sloc: ansic: 5,730; makefile: 115; xml: 48; sh: 35
file content (48 lines) | stat: -rw-r--r-- 1,898 bytes parent folder | download | duplicates (2)
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
/* vim: set ts=8 sts=8 sw=8 noexpandtab textwidth=112: */
/*
 * This is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Library General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef CONFIGSYS_H
#define CONFIGSYS_H

#include <glib.h>

#define DEFAULT_WORD_CHARS  "-A-Za-z0-9,./?%&#:_"

/* Initialize and free the config system's private variables */
gint config_init (const gchar *config_file);
gint config_free (const gchar *config_file);

/* Write to disk (generally discouraged) */
gint config_write (const gchar *config_file);

/* Set values in the config system */
gint config_setint     (const gchar *key, const gint val);
gint config_setstr     (const gchar *key, const gchar *val);
gint config_setbool    (const gchar *key, const gboolean val);
gint config_setnint    (const gchar *key, const gint val, const guint idx);
gint config_setdouble  (const gchar *key, const gdouble val);
gint config_setndouble (const gchar *key, const gdouble vat, const guint idx);

/* Get values from the config system */
gint     config_getint     (const gchar *key);
gchar*   config_getstr     (const gchar *key);
gboolean config_getbool    (const gchar *key);
glong    config_getnint    (const gchar *key, const guint idx);
gdouble  config_getdouble  (const gchar *key);
gdouble  config_getndouble (const gchar *key, const guint idx);

#endif /* CONFIGSYS_H */