#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <webkit/webkit.h>
void main(int argc, char *argv[]) {
gtk_init(NULL, NULL);
GtkWindow *main_window = (GtkWindow *)gtk_window_new(GTK_WINDOW_TOPLEVEL);
WebKitWebView *webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
g_signal_connect(main_window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
WebKitWebSettings *settings = webkit_web_settings_new();
gchar *true_settings[] = {"enable-fullscreen", "enable-accelerated-compositing", "enable-spatial-navigation", "enable-page-cache", "enable-html5-local-storage", "enable-html5-database", "enable-file-access-from-file-uris", "javascript-can-access-clipboard", "enable-webaudio", "enable-dom-paste", "enable-webgl", NULL},
*false_settings[] = {"resizable-text-areas", "auto-resize-window", "enable-java-applet","tab-key-cycles-through-elements","enable-default-context-menu", NULL}, **p;
for(p=(gchar **)true_settings;*p;p++) g_object_set(G_OBJECT(settings), *p, TRUE, NULL);
for(p=(gchar **)false_settings;*p;p++) g_object_set(G_OBJECT(settings), *p, FALSE, NULL);
g_object_set(G_OBJECT(settings), "default-encoding", "utf-8", NULL);
webkit_web_view_set_settings (WEBKIT_WEB_VIEW(webView), settings);
gtk_container_add(GTK_CONTAINER(main_window), GTK_WIDGET(webView));
webkit_web_view_load_uri(webView, argc>1?argv[1]:"about:blank");
gtk_window_fullscreen(main_window);
gint screenw=0, screenh=0;
gdk_window_get_size(gdk_screen_get_root_window(gdk_screen_get_default()), &screenw, &screenh);
gtk_window_set_default_size(main_window, screenw, screenh);
gtk_widget_show_all(GTK_WIDGET(main_window));
gtk_window_set_resizable(main_window, FALSE);
gtk_main();
}