Rename mouse functions to clickFUNCTION()
This commit is contained in:
parent
82abf5154f
commit
2d1e422368
10
config.def.h
10
config.def.h
|
@ -136,9 +136,9 @@ static Key keys[] = {
|
||||||
/* target can be OnDoc, OnLink, OnImg, OnMedia, OnEdit, OnBar, OnSel, OnAny */
|
/* target can be OnDoc, OnLink, OnImg, OnMedia, OnEdit, OnBar, OnSel, OnAny */
|
||||||
static Button buttons[] = {
|
static Button buttons[] = {
|
||||||
/* target event mask button function argument stop event */
|
/* target event mask button function argument stop event */
|
||||||
{ OnLink, 0, 2, linkopenembed, { 0 }, 1 },
|
{ OnLink, 0, 2, clicknewwindow, { .b = 0 }, 1 },
|
||||||
{ OnLink, MODKEY, 2, linkopen, { 0 }, 1 },
|
{ OnLink, MODKEY, 2, clicknewwindow, { .b = 1 }, 1 },
|
||||||
{ OnLink, MODKEY, 1, linkopen, { 0 }, 1 },
|
{ OnLink, MODKEY, 1, clicknewwindow, { .b = 1 }, 1 },
|
||||||
{ OnAny, 0, 8, navigate, { .i = -1 }, 1 },
|
{ OnAny, 0, 8, clicknavigate, { .i = -1 }, 1 },
|
||||||
{ OnAny, 0, 9, navigate, { .i = +1 }, 1 },
|
{ OnAny, 0, 9, clicknavigate, { .i = +1 }, 1 },
|
||||||
};
|
};
|
||||||
|
|
21
surf.c
21
surf.c
|
@ -164,6 +164,7 @@ static void mousetargetchanged(WebKitWebView *v, WebKitHitTestResult *h,
|
||||||
static void loadchanged(WebKitWebView *v, WebKitLoadEvent e, Client *c);
|
static void loadchanged(WebKitWebView *v, WebKitLoadEvent e, Client *c);
|
||||||
static void loaduri(Client *c, const Arg *arg);
|
static void loaduri(Client *c, const Arg *arg);
|
||||||
static void navigate(Client *c, const Arg *a);
|
static void navigate(Client *c, const Arg *a);
|
||||||
|
static void clicknavigate(Client *c, const Arg *a, WebKitHitTestResult *h);
|
||||||
static Client *newclient(Client *c);
|
static Client *newclient(Client *c);
|
||||||
static WebKitWebView *newview(Client *c, WebKitWebView *rv);
|
static WebKitWebView *newview(Client *c, WebKitWebView *rv);
|
||||||
static void showview(WebKitWebView *v, Client *c);
|
static void showview(WebKitWebView *v, Client *c);
|
||||||
|
@ -175,8 +176,7 @@ static GdkFilterReturn processx(GdkXEvent *xevent, GdkEvent *event,
|
||||||
gpointer d);
|
gpointer d);
|
||||||
static gboolean winevent(GtkWidget *w, GdkEvent *e, Client *c);
|
static gboolean winevent(GtkWidget *w, GdkEvent *e, Client *c);
|
||||||
static void progresschanged(WebKitWebView *v, GParamSpec *ps, Client *c);
|
static void progresschanged(WebKitWebView *v, GParamSpec *ps, Client *c);
|
||||||
static void linkopen(Client *c, const Arg *arg);
|
static void clicknewwindow(Client *c, const Arg *a, WebKitHitTestResult *h);
|
||||||
static void linkopenembed(Client *c, const Arg *arg);
|
|
||||||
static void reload(Client *c, const Arg *arg);
|
static void reload(Client *c, const Arg *arg);
|
||||||
static void scroll_h(Client *c, const Arg *a);
|
static void scroll_h(Client *c, const Arg *a);
|
||||||
static void scroll_v(Client *c, const Arg *a);
|
static void scroll_v(Client *c, const Arg *a);
|
||||||
|
@ -868,6 +868,12 @@ navigate(Client *c, const Arg *a)
|
||||||
webkit_web_view_go_forward(c->view);
|
webkit_web_view_go_forward(c->view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
clicknavigate(Client *c, const Arg *a, WebKitHitTestResult *h)
|
||||||
|
{
|
||||||
|
navigate(c, a);
|
||||||
|
}
|
||||||
|
|
||||||
Client *
|
Client *
|
||||||
newclient(Client *rc)
|
newclient(Client *rc)
|
||||||
{
|
{
|
||||||
|
@ -1171,15 +1177,12 @@ progresschanged(WebKitWebView *v, GParamSpec *ps, Client *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
linkopen(Client *c, const Arg *arg)
|
clicknewwindow(Client *c, const Arg *a, WebKitHitTestResult *h)
|
||||||
{
|
{
|
||||||
newwindow(NULL, arg, 1);
|
Arg arg;
|
||||||
}
|
|
||||||
|
|
||||||
void
|
arg.v = webkit_hit_test_result_get_link_uri(h);
|
||||||
linkopenembed(Client *c, const Arg *arg)
|
newwindow(c, &arg, a->b);
|
||||||
{
|
|
||||||
newwindow(NULL, arg, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue