summaryrefslogtreecommitdiff
path: root/atari
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2013-01-10 21:07:36 +0100
committerOle Loots <ole@monochrom.net>2013-01-10 21:07:36 +0100
commit3ce968e36cdaf9e289464c158f08e0633c08da61 (patch)
treeb9ea1f8e0511439fffd6b770bd2960a03e6953c7 /atari
parent26cc21c5c078f411d3b08d71b27e49f0f55a832a (diff)
downloadnetsurf-3ce968e36cdaf9e289464c158f08e0633c08da61.tar.gz
netsurf-3ce968e36cdaf9e289464c158f08e0633c08da61.tar.bz2
Prepared for toolbar context menu, fixed declarations.
Diffstat (limited to 'atari')
-rw-r--r--atari/toolbar.c7
-rw-r--r--atari/toolbar.h4
2 files changed, 7 insertions, 4 deletions
diff --git a/atari/toolbar.c b/atari/toolbar.c
index d8c131f20..bdcbae0a5 100644
--- a/atari/toolbar.c
+++ b/atari/toolbar.c
@@ -619,7 +619,7 @@ bool toolbar_key_input(struct s_toolbar *tb, short nkc)
}
-void toolbar_mouse_input(struct s_toolbar *tb, short obj)
+void toolbar_mouse_input(struct s_toolbar *tb, short obj, short button)
{
LOG((""));
GRECT work;
@@ -639,6 +639,9 @@ void toolbar_mouse_input(struct s_toolbar *tb, short obj)
if (!window_url_widget_has_focus(tb->owner)) {
window_set_focus(tb->owner, URL_WIDGET, (void*)&tb->url );
}
+ if (button & 2) {
+ // TODO: open a context popup
+ }
/* url widget has focus and mouse button is still pressed... */
else if (mb & 1) {
@@ -717,7 +720,7 @@ void toolbar_get_grect(struct s_toolbar *tb, short which, GRECT *dst)
}
-struct text_area *toolbar_get_textarea(struct s_toolbar *tb,
+struct textarea *toolbar_get_textarea(struct s_toolbar *tb,
enum toolbar_textarea which)
{
return(tb->url.textarea);
diff --git a/atari/toolbar.h b/atari/toolbar.h
index 54a73eece..1e552d520 100644
--- a/atari/toolbar.h
+++ b/atari/toolbar.h
@@ -55,11 +55,11 @@ void toolbar_set_dimensions(struct s_toolbar *tb, GRECT *area);
void toolbar_set_url(struct s_toolbar *tb, const char *text);
bool toolbar_text_input(struct s_toolbar *tb, char *text);
bool toolbar_key_input(struct s_toolbar *tb, short nkc);
-void toolbar_mouse_input(struct s_toolbar *tb, short obj);
+void toolbar_mouse_input(struct s_toolbar *tb, short obj, short mbut);
void toolbar_update_buttons(struct s_toolbar *tb, struct browser_window *bw,
short idx);
void toolbar_get_grect(struct s_toolbar *tb, short which, GRECT *g);
-struct text_area *toolbar_get_textarea(struct s_toolbar *tb,
+struct textarea *toolbar_get_textarea(struct s_toolbar *tb,
enum toolbar_textarea which);
void toolbar_set_throbber_state(struct s_toolbar *tb, bool active);
void toolbar_set_attached(struct s_toolbar *tb, bool attached);