forked from luakit/luakit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
globalconf.h.in
75 lines (65 loc) · 2.74 KB
/
globalconf.h.in
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* globalconf.h - main config struct
*
* Copyright © 2010 Mason Larobina <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 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 General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef LUAKIT_GLOBALCONF
#define LUAKIT_GLOBALCONF
/** Install location of luakit shared files. This serves as the base path for
* all system Lua module loading paths. */
#define LUAKIT_INSTALL_PATH "/usr/local/share/luakit"
/** Registry key for the Lua registry API to store a private reference counting
* table. This table prevents garbage collection of objects (userdata or
* tables) while in use by C functions or objects.
* \see http://www.lua.org/manual/5.1/manual.html#3.5 */
#define LUAKIT_OBJECT_REGISTRY_KEY "luakit.object.registry"
#include <glib/gtypes.h>
#include <lua.h>
#include "common/signal.h"
/** Global luakit state struct. */
typedef struct {
/** Main Lua VM state.
* \see http://www.lua.org/manual/5.1/manual.html#lua_State */
lua_State *L;
/** User path $XDG_CONFIG_DIR/luakit/ (defaults to ~/.config/luakit/) where
* configuration files should be stored.
* \see http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html */
gchar *config_dir;
/** User path $XDG_DATA_DIR/luakit/ (defaults to ~/.local/share/luakit/)
* where data files should be stored.
* \see http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html */
gchar *data_dir;
/** User path $XDG_CACHE_DIR/luakit/ (defaults to ~/.cache/luakit/) where
* non-essential data files should be stored.
* \see http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html */
gchar *cache_dir;
/** Path to the currently loaded config file. */
gchar *confpath;
/** The luakit executable path. */
gchar *execpath;
/** Print verbose output. */
gboolean verbose;
/** Ignore loading libunqiue bindings (for a single instance session) */
gboolean nounique;
/** Pointer array to all active window userdata objects. */
GPtrArray *windows;
/** Pointer array to all active webview userdata objects. */
GPtrArray *webviews;
} globalconf_t;
globalconf_t globalconf;
#endif
// vim: ft=c:et:sw=4:ts=8:sts=4:tw=80