From 3ce968e36cdaf9e289464c158f08e0633c08da61 Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Thu, 10 Jan 2013 21:07:36 +0100 Subject: Prepared for toolbar context menu, fixed declarations. --- atari/toolbar.c | 7 +++++-- atari/toolbar.h | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'atari') 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); -- cgit v1.2.3