diff options
author | Paweł Zuzelski <pawelz@pld-linux.org> | 2010-02-13 01:50:58 +0100 |
---|---|---|
committer | Paweł Zuzelski <pawelz@pld-linux.org> | 2010-02-13 01:50:58 +0100 |
commit | 9647a5dc20fadf8468d79e96e497e3fb15f3362d (patch) | |
tree | 427ebde820020723248ced90d8e84ccb11b04f05 | |
parent | 281ad1fc48a8892f3c367fb19b4b7ff7d6190800 (diff) | |
parent | 4dfdace43ff698b1ce37e424ccb6d70d54918f2f (diff) |
Merge remote branch 'Dieterbe/experimental' into experimental
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | src/callbacks.c | 12 | ||||
-rw-r--r-- | src/callbacks.h | 4 | ||||
-rw-r--r-- | src/events.c | 1 | ||||
-rw-r--r-- | src/events.h | 1 | ||||
-rw-r--r-- | src/uzbl-core.c | 1 |
7 files changed, 22 insertions, 0 deletions
@@ -22,6 +22,7 @@ In alphabetical order: Abel Camarillo (00z) - various portability fixes, such as BSD fixes for Makefile and posix shell scripts Aldrik Dunbar (n30n) - scroll % script Andraž 'ruskie' Levstik - font_family patch + Andrea Marchesini <baku@ippolita.net> - resource-request-starting Andy Spencer - security fixes Barak A. Pearlmutter - typo fix Brendan Taylor (bct) - various bugfixes, making misc variables much better using expand(), refactoring some internal var stuff @@ -638,6 +638,8 @@ Events have this format: could not be loaded for the reason described in `reason_of_error`. * `EVENT [uzbl_instance_name] LOAD_PROGRESS percentage` : While the page is loading, gives the `percentage` of the page that has finished loading. +* `EVENT [uzbl_instance_name] REQUEST_STARTING uri`: http resource gets + requested * `EVENT [uzbl_instance_name] TITLE_CHANGED title_name`: When the title of the page (and hence maybe, the window title) changed. `title_name` is the new title. diff --git a/src/callbacks.c b/src/callbacks.c index 6ec48ea..9b90d3c 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -660,6 +660,18 @@ mime_policy_cb(WebKitWebView *web_view, WebKitWebFrame *frame, WebKitNetworkRequ return TRUE; } +void +request_starting_cb(WebKitWebView *web_view, WebKitWebFrame *frame, WebKitWebResource *resource, + WebKitNetworkRequest *request, WebKitNetworkResponse *response, gpointer user_data) { + (void) web_view; + (void) frame; + (void) resource; + (void) response; + (void) user_data; + + send_event(REQUEST_STARTING, webkit_network_request_get_uri(request), NULL); +} + /*@null@*/ WebKitWebView* create_web_view_cb (WebKitWebView *web_view, WebKitWebFrame *frame, gpointer user_data) { (void) web_view; diff --git a/src/callbacks.h b/src/callbacks.h index 43a9192..6ed8986 100644 --- a/src/callbacks.h +++ b/src/callbacks.h @@ -186,6 +186,10 @@ gboolean mime_policy_cb(WebKitWebView *web_view, WebKitWebFrame *frame, WebKitNetworkRequest *request, gchar *mime_type, WebKitWebPolicyDecision *policy_decision, gpointer user_data); +void +request_starting_cb(WebKitWebView *web_view, WebKitWebFrame *frame, WebKitWebResource *resource, + WebKitNetworkRequest *request, WebKitNetworkResponse *response, gpointer user_data); + /*@null@*/ WebKitWebView* create_web_view_cb (WebKitWebView *web_view, WebKitWebFrame *frame, gpointer user_data); diff --git a/src/events.c b/src/events.c index 371c8b8..1028c30 100644 --- a/src/events.c +++ b/src/events.c @@ -19,6 +19,7 @@ const char *event_table[LAST_EVENT] = { "LOAD_COMMIT" , "LOAD_FINISH" , "LOAD_ERROR" , + "REQUEST_STARTING" , "KEY_PRESS" , "KEY_RELEASE" , "DOWNLOAD_REQUEST" , diff --git a/src/events.h b/src/events.h index b02a43c..fe3ff3b 100644 --- a/src/events.h +++ b/src/events.h @@ -6,6 +6,7 @@ /* Event system */ enum event_type { LOAD_START, LOAD_COMMIT, LOAD_FINISH, LOAD_ERROR, + REQUEST_STARTING, KEY_PRESS, KEY_RELEASE, DOWNLOAD_REQ, COMMAND_EXECUTED, LINK_HOVER, TITLE_CHANGED, GEOMETRY_CHANGED, WEBINSPECTOR, NEW_WINDOW, SELECTION_CHANGED, diff --git a/src/uzbl-core.c b/src/uzbl-core.c index 9168597..2b47380 100644 --- a/src/uzbl-core.c +++ b/src/uzbl-core.c @@ -2056,6 +2056,7 @@ create_browser () { "signal::download-requested", (GCallback)download_cb, NULL, "signal::create-web-view", (GCallback)create_web_view_cb, NULL, "signal::mime-type-policy-decision-requested", (GCallback)mime_policy_cb, NULL, + "signal::resource-request-starting", (GCallback)request_starting_cb, NULL, "signal::populate-popup", (GCallback)populate_popup_cb, NULL, "signal::focus-in-event", (GCallback)focus_cb, NULL, "signal::focus-out-event", (GCallback)focus_cb, NULL, |