summaryrefslogtreecommitdiff
path: root/src/view.c
diff options
context:
space:
mode:
authorportix <none@none>2012-12-19 18:32:40 +0100
committerportix <none@none>2012-12-19 18:32:40 +0100
commit992d7456cbc3b8e1c7fc1d29310b404ddcb378a4 (patch)
tree9099933dff7b445e630962a5654bf55514e5f50e /src/view.c
parent6e20ff1abc60aeca0eed71a60033f0ccef1f0997 (diff)
downloaddwb-992d7456cbc3b8e1c7fc1d29310b404ddcb378a4.zip
New commands reload_bookmarks, reload_quickmarks; new signal function connectWebView; new signal tabButtonPress
Diffstat (limited to 'src/view.c')
-rw-r--r--src/view.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/view.c b/src/view.c
index 9c39c40b..1b6f8703 100644
--- a/src/view.c
+++ b/src/view.c
@@ -880,6 +880,16 @@ view_motion_notify_cb(WebKitWebView *web, GdkEventButton *e, GList *gl)
static gboolean
view_tab_button_press_cb(GtkWidget *tabevent, GdkEventButton *e, GList *gl)
{
+ if (EMIT_SCRIPT(TAB_BUTTON_PRESS))
+ {
+ char *json = util_create_json(8,
+ UINTEGER, "time", e->time, UINTEGER, "type", e->type,
+ DOUBLE, "x", e->x, DOUBLE, "y", e->y,
+ UINTEGER, "state", e->state, UINTEGER, "button", e->button,
+ DOUBLE, "xRoot", e->x_root, DOUBLE, "yRoot", e->y_root);
+ ScriptSignal signal = { SCRIPTS_WV(gl), { G_OBJECT(tabevent) }, SCRIPTS_SIG_META(json, TAB_BUTTON_PRESS, 1) };
+ SCRIPTS_EMIT_RETURN(signal, json, true);
+ }
if (e->button == 1 && e->type == GDK_BUTTON_PRESS)
{
dwb_focus_view(gl);