Added str_replace function. To be used for adding variables to user agent.
[uzbl-mobile] / uzbl.h
1 typedef struct {
2     char* name;
3     char* param;
4 } Action;
5
6
7 void
8 eprint(const char *errstr, ...);
9
10 char *
11 estrdup(const char *str);
12
13 char *
14 itos(int val);
15
16 static gboolean
17 new_window_cb (WebKitWebView *web_view, WebKitWebFrame *frame, WebKitNetworkRequest *request, WebKitWebNavigationAction *navigation_action, WebKitWebPolicyDecision *policy_decision, gpointer user_data);
18
19 WebKitWebView*
20 create_web_view_cb (WebKitWebView  *web_view, WebKitWebFrame *frame, gpointer user_data);
21
22 static gboolean
23 download_cb (WebKitWebView *web_view, GObject *download, gpointer user_data);
24
25 static void
26 toggle_status_cb (WebKitWebView* page, const char *param);
27
28 static void
29 link_hover_cb (WebKitWebView* page, const gchar* title, const gchar* link, gpointer data);
30
31 static void
32 title_change_cb (WebKitWebView* web_view, WebKitWebFrame* web_frame, const gchar* title, gpointer data);
33
34 static void
35 progress_change_cb (WebKitWebView* page, gint progress, gpointer data);
36
37 static void
38 load_commit_cb (WebKitWebView* page, WebKitWebFrame* frame, gpointer data);
39
40 static void
41 destroy_cb (GtkWidget* widget, gpointer data);
42
43 static void
44 log_history_cb ();
45
46 static void
47 commands_hash(void);
48
49 void
50 free_action(gpointer act);
51
52 Action*
53 new_action(const gchar *name, const gchar *param);
54
55 static bool
56 file_exists (const char * filename);
57
58 void
59 set_insert_mode(WebKitWebView *page, const gchar *param);
60
61 static void
62 load_uri (WebKitWebView * web_view, const gchar *param);
63
64 static void
65 new_window_load_uri (const gchar * uri);
66
67 static void
68 close_uzbl (WebKitWebView *page, const char *param);
69
70 static gboolean
71 run_command(const char *command, const char *args);
72
73 static void
74 spawn(WebKitWebView *web_view, const char *param);
75
76 static void
77 parse_command(const char *cmd, const char *param);
78
79 static void
80 parse_line(char *line);
81
82 void
83 build_stream_name(int type);
84
85 static void
86 control_fifo(GIOChannel *gio, GIOCondition condition);
87
88 static void
89 create_fifo();
90
91 static void
92 create_socket();
93
94 static void
95 control_socket(GIOChannel *chan);
96  
97
98 static void
99 update_title (void);
100  
101 static gboolean
102 key_press_cb (WebKitWebView* page, GdkEventKey* event);
103
104 static GtkWidget*
105 create_browser ();
106
107 static GtkWidget*
108 create_mainbar ();
109
110 static
111 GtkWidget* create_window ();
112
113 static void
114 add_binding (const gchar *key, const gchar *act);
115
116 static void
117 settings_init ();
118
119 static void
120 search_text (WebKitWebView *page, const char *param);
121
122 static void
123 run_js (WebKitWebView * web_view, const gchar *param);
124
125 static char *
126 str_replace (const char* search, const char* replace, const char* string);
127
128 /* vi: set et ts=4: */