-static void progresschange(WebKitWebView *view, GParamSpec *pspec, Client *c);
-static void linkopen(Client *c, const Arg *arg);
-static void linkopenembed(Client *c, const Arg *arg);
-static void reload(Client *c, const Arg *arg);
-static void scroll_h(Client *c, const Arg *arg);
-static void scroll_v(Client *c, const Arg *arg);
-static void scroll(GtkAdjustment *a, const Arg *arg);
-static void setatom(Client *c, int a, const char *v);
-static void setup(void);
-static void sigchld(int unused);
-static void source(Client *c, const Arg *arg);
-static void spawn(Client *c, const Arg *arg);
-static void stop(Client *c, const Arg *arg);
-static void titlechange(WebKitWebView *view, GParamSpec *pspec, Client *c);
-static void titlechangeleave(void *a, void *b, Client *c);
-static void toggle(Client *c, const Arg *arg);
-static void togglecookiepolicy(Client *c, const Arg *arg);
-static void togglegeolocation(Client *c, const Arg *arg);
-static void togglescrollbars(Client *c, const Arg *arg);
-static void togglestyle(Client *c, const Arg *arg);
-static void updatetitle(Client *c);
-static void updatewinid(Client *c);
-static void usage(void);
-static void windowobjectcleared(GtkWidget *w, WebKitWebFrame *frame,
- JSContextRef js, JSObjectRef win, Client *c);
-static void zoom(Client *c, const Arg *arg);
+static gboolean winevent(GtkWidget *w, GdkEvent *e, Client *c);
+static void showview(WebKitWebView *v, Client *c);
+static GtkWidget *createwindow(Client *c);
+static void loadchanged(WebKitWebView *v, WebKitLoadEvent e, Client *c);
+static void progresschanged(WebKitWebView *v, GParamSpec *ps, Client *c);
+static void titlechanged(WebKitWebView *view, GParamSpec *ps, Client *c);
+static void mousetargetchanged(WebKitWebView *v, WebKitHitTestResult *h,
+ guint modifiers, Client *c);
+static gboolean permissionrequested(WebKitWebView *v,
+ WebKitPermissionRequest *r, Client *c);
+static gboolean decidepolicy(WebKitWebView *v, WebKitPolicyDecision *d,
+ WebKitPolicyDecisionType dt, Client *c);
+static void decidenavigation(WebKitPolicyDecision *d, Client *c);
+static void decidenewwindow(WebKitPolicyDecision *d, Client *c);
+static void decideresource(WebKitPolicyDecision *d, Client *c);
+static void insecurecontent(WebKitWebView *v, WebKitInsecureContentEvent e,
+ Client *c);
+static void downloadstarted(WebKitWebContext *wc, WebKitDownload *d,
+ Client *c);
+static void responsereceived(WebKitDownload *d, GParamSpec *ps, Client *c);
+static void download(Client *c, WebKitURIResponse *r);
+static void closeview(WebKitWebView *v, Client *c);
+static void destroywin(GtkWidget* w, Client *c);
+
+/* Hotkeys */
+static void pasteuri(GtkClipboard *clipboard, const char *text, gpointer d);
+static void reload(Client *c, const Arg *a);
+static void print(Client *c, const Arg *a);
+static void clipboard(Client *c, const Arg *a);
+static void zoom(Client *c, const Arg *a);
+static void scroll(Client *c, const Arg *a);
+static void navigate(Client *c, const Arg *a);
+static void stop(Client *c, const Arg *a);
+static void toggle(Client *c, const Arg *a);
+static void togglefullscreen(Client *c, const Arg *a);
+static void togglecookiepolicy(Client *c, const Arg *a);
+static void toggleinspector(Client *c, const Arg *a);
+static void find(Client *c, const Arg *a);
+
+/* Buttons */
+static void clicknavigate(Client *c, const Arg *a, WebKitHitTestResult *h);
+static void clicknewwindow(Client *c, const Arg *a, WebKitHitTestResult *h);
+static void clickexternplayer(Client *c, const Arg *a, WebKitHitTestResult *h);
+
+static char winid[64];
+static char togglestats[11];
+static char pagestats[2];
+static Atom atoms[AtomLast];
+static Window embed;
+static int showxid;
+static int cookiepolicy;
+static Display *dpy;
+static Client *clients;
+static GdkDevice *gdkkb;
+static char *stylefile;
+static const char *useragent;
+static Parameter *curconfig;
+char *argv0;