Created view widget, now supports creation of webviews from inside lua
[luakit.git] / luakit.h
blob83b22588d20a17abebce7ba2d40f17ff86073bc4
1 /*
2 * luakit.h - luakit main functions
4 * Copyright (C) 2010 Mason Larobina <mason.larobina@gmail.com>
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef LUAKIT_LUAKIT_H
22 #define LUAKIT_LUAKIT_H
24 #define _GNU_SOURCE
26 #include <JavaScriptCore/JavaScript.h>
27 #include <basedir.h>
28 #include <basedir_fs.h>
29 #include <glib/gstdio.h>
30 #include <gtk/gtk.h>
31 #include <lauxlib.h>
32 #include <lua.h>
33 #include <lualib.h>
34 #include <signal.h>
35 #include <stdio.h>
36 #include <stdlib.h>
37 #include <string.h>
38 #include <sys/wait.h>
39 #include <unistd.h>
40 #include <webkit/webkit.h>
42 #include "signal.h"
44 typedef struct {
45 GtkWidget *hbox, *label;
46 /* TODO: Order and placement settings */
47 } Statusbar;
49 typedef struct {
50 /* Root window gtk widgets */
51 GtkWidget *win, *vbox, *nbook;
52 /* List of status bars */
53 GPtrArray *sbars;
54 /* Path to the config file */
55 gchar *confpath;
56 /* Path of the applications executable (argv[0]) */
57 gchar *execpath;
58 /* Lua VM state */
59 lua_State *L;
60 /* global signals */
61 signal_t *signals;
62 /* exit return code */
63 int retval;
64 } Luakit;
66 /* Global config/state object */
67 extern Luakit luakit;
69 Statusbar* new_sbar(void);
70 void destroy(void);
71 void destroy_sbar(Statusbar *s);
73 #endif
74 // vim: ft=c:et:sw=4:ts=8:sts=4:enc=utf-8:tw=80