#ifndef BADWOLF_H_INCLUDED #define BADWOLF_H_INCLUDED #include #include const gchar *homepage; const gchar *version; struct Window { GtkWidget *main_window; GtkWidget *notebook; GtkWidget *new_tab; }; struct Client { GtkWidget *box; GtkWidget *toolbar; GtkWidget *javascript; GtkWidget *location; WebKitWebView *webView; struct Window *window; GtkWidget *statusbar; GtkWidget *statuslabel; GtkWidget *search; }; /* badwolf_ensure_uri_scheme: tries to add a scheme on a pseudo-URL missing a scheme * - gchar text: pseudo-URL missing a scheme * - gboolean try_file: when TRUE check try first if it can be a file:// path * * When `text` isn't exploitable (ie. NULL), returns "about:blank", * when the URL seems to be valid, return it, * if try_file is TRUE, check if it can be file:// path, * some other checks might be added. * In the end use the fallback (`http://` for now, might get configuration), * might get some safeguard. */ gchar *badwolf_ensure_uri_scheme(gchar *text, gboolean try_file); GtkWidget *badwolf_new_tab_box(const gchar *title, struct Client *browser); void webView_tab_label_change(struct Client *browser, const gchar *title); struct Client * new_browser(struct Window *window, gchar *target_url, WebKitWebView *related_web_view); int badwolf_new_tab(GtkNotebook *notebook, struct Client *browser); gint badwolf_get_tab_position(GtkContainer *notebook, GtkWidget *child); #endif /* BADWOLF_H_INCLUDED */