when devving, --verbose is useful + without --config theres a change that $HOME/...
[uzbl-mobile] / uzbl.h
diff --git a/uzbl.h b/uzbl.h
index 91421bd..a6a3a6e 100644 (file)
--- a/uzbl.h
+++ b/uzbl.h
@@ -71,10 +71,10 @@ typedef struct {
     GtkWidget*     vbox;
     GtkWidget*     mainbar;
     GtkWidget*     mainbar_label;
-    GtkScrollbar*  scbar_v;   /* Horizontal and Vertical Scrollbar */
-    GtkScrollbar*  scbar_h;   /* (These are still hidden) */
-    GtkAdjustment* bar_v; /* Information about document length */
-    GtkAdjustment* bar_h; /* and scrolling position */
+    GtkScrollbar*  scbar_v;   // Horizontal and Vertical Scrollbar
+    GtkScrollbar*  scbar_h;   // (These are still hidden)
+    GtkAdjustment* bar_v; // Information about document length
+    GtkAdjustment* bar_h; // and scrolling position
     WebKitWebView* web_view;
     gchar*         main_title;
 
@@ -93,12 +93,6 @@ typedef struct {
     gchar          *socket_path;
     /* stores (key)"variable name" -> (value)"pointer to this var*/
     GHashTable     *proto_var;
-    /* command parsing regexes */
-    GRegex         *set_regex;
-    GRegex         *act_regex;
-    GRegex         *keycmd_regex;
-    GRegex         *get_regex;
-    GRegex         *bind_regex;
     gchar          *sync_stdout;
 } Communication;
 
@@ -172,6 +166,8 @@ typedef struct {
     guint    mode;  
     gchar*   base_url;
     gchar*   html_endmarker;
+    gchar*   insert_indicator;
+    gchar*   cmd_indicator;
     GString* html_buffer;
     guint    html_timeout;  
 
@@ -247,9 +243,15 @@ setup_signal(int signe, sigfunc *shandler);
 static gboolean
 set_var_value(gchar *name, gchar *val);
 
+static void
+print(WebKitWebView *page, GArray *argv);
+
 static gboolean
 new_window_cb (WebKitWebView *web_view, WebKitWebFrame *frame, WebKitNetworkRequest *request, WebKitWebNavigationAction *navigation_action, WebKitWebPolicyDecision *policy_decision, gpointer user_data);
 
+static gboolean
+mime_policy_cb(WebKitWebView *web_view, WebKitWebFrame *frame, WebKitNetworkRequest *request, gchar *mime_type,  WebKitWebPolicyDecision *policy_decision, gpointer user_data);
+
 WebKitWebView*
 create_web_view_cb (WebKitWebView  *web_view, WebKitWebFrame *frame, gpointer user_data);
 
@@ -305,11 +307,23 @@ static void
 new_window_load_uri (const gchar * uri);
 
 static void
+chain (WebKitWebView *page, GArray *argv);
+
+static void
+keycmd (WebKitWebView *page, GArray *argv);
+
+static void
+keycmd_nl (WebKitWebView *page, GArray *argv);
+
+static void
+keycmd_bs (WebKitWebView *page, GArray *argv);
+
+static void
 close_uzbl (WebKitWebView *page, GArray *argv);
 
 static gboolean
 run_command(const gchar *command, const guint npre,
-            const gchar **args, const gboolean sync, char **stdout);
+            const gchar **args, const gboolean sync, char **output_stdout);
 
 static void
 spawn(WebKitWebView *web_view, GArray *argv);
@@ -327,9 +341,6 @@ static void
 parse_command(const char *cmd, const char *param);
 
 static void
-runcmd(WebKitWebView *page, GArray *argv);
-
-static void
 parse_cmd_line(const char *ctl_line);
 
 static gchar*
@@ -418,11 +429,26 @@ static void
 set_var(WebKitWebView *page, GArray *argv);
 
 static void
+act_bind(WebKitWebView *page, GArray *argv);
+
+static void
+act_dump_config();
+
+static void
 render_html();
 
 static void
 set_timeout(int seconds);
 
+static void
+dump_var_hash(gpointer k, gpointer v, gpointer ud);
+
+static void
+dump_key_hash(gpointer k, gpointer v, gpointer ud);
+
+static void
+dump_config();
+
 
 /* Command callbacks */
 static void