NetSurf
|
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | s_url_widget |
struct | s_throbber_widget |
struct | s_toolbar |
Enumerations | |
enum | toolbar_textarea { URL_INPUT_TEXT_AREA = 1 } |
Functions | |
void | toolbar_init (void) |
struct s_toolbar * | toolbar_create (struct s_gui_win_root *owner) |
void | toolbar_destroy (struct s_toolbar *tb) |
void | toolbar_exit (void) |
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, 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) |
Receive a specific region of the toolbar. More... | |
OBJECT * | toolbar_get_form (struct s_toolbar *tb) |
struct textarea * | toolbar_get_textarea (struct s_toolbar *tb, enum toolbar_textarea which) |
char * | toolbar_get_url (struct s_toolbar *tb) |
struct nsurl * | toolbar_get_nsurl (struct s_toolbar *tb) |
void | toolbar_set_throbber_state (struct s_toolbar *tb, bool active) |
void | toolbar_set_attached (struct s_toolbar *tb, bool attached) |
void | toolbar_set_visible (struct s_toolbar *tb, short area, bool visible) |
void | toolbar_set_reflow (struct s_toolbar *tb, bool do_reflow) |
void | toolbar_set_width (struct s_toolbar *tb, short w) |
void | toolbar_set_origin (struct s_toolbar *tb, short x, short y) |
void | toolbar_set_dimensions (struct s_toolbar *tb, GRECT *area) |
void | toolbar_set_url (struct s_toolbar *tb, const char *text) |
void | toolbar_redraw (struct s_toolbar *tb, GRECT *clip) |
void | toolbar_throbber_progress (struct s_toolbar *tb) |
void | toolbar_back_click (struct s_toolbar *tb) |
void | toolbar_reload_click (struct s_toolbar *tb) |
void | toolbar_forward_click (struct s_toolbar *tb) |
void | toolbar_home_click (struct s_toolbar *tb) |
void | toolbar_stop_click (struct s_toolbar *tb) |
void | toolbar_favorite_click (struct s_toolbar *tb) |
void | toolbar_crypto_click (struct s_toolbar *tb) |
enum toolbar_textarea |
void toolbar_back_click | ( | struct s_toolbar * | tb | ) |
Definition at line 917 of file toolbar.c.
References gui_window::browser, browser_window_back_available(), browser_window_history_back(), browser_window::bw, gui_window::bw, s_browser::bw, s_toolbar::owner, and window_get_active_gui_window().
Referenced by menu_back().
struct s_toolbar * toolbar_create | ( | struct s_gui_win_root * | owner | ) |
Definition at line 267 of file toolbar.c.
References aes_toolbar, plot_font_style::background, textarea_setup::border_col, textarea_setup::border_width, s_toolbar::btcnt, button_init(), s_toolbar::buttons, s_toolbar_style::font_height_pt, font_style_url, plot_font_style::foreground, s_toolbar::form, textarea_setup::height, s_throbber_widget::index, init, s_throbber_widget::max_index, NSLOG, s_toolbar::owner, textarea_setup::pad_bottom, textarea_setup::pad_left, textarea_setup::pad_right, textarea_setup::pad_top, PLOT_STYLE_SCALE, s_toolbar::reflow, s_throbber_widget::running, s_toolbar::search_visible, textarea_setup::selected_bg, textarea_setup::selected_text, plot_font_style::size, s_toolbar::style, tb_buttons, tb_txt_callback(), textarea_setup::text, s_url_widget::textarea, textarea_create(), TEXTAREA_INTERNAL_CARET, s_toolbar::throbber, THROBBER_INACTIVE_INDEX, THROBBER_MAX_INDEX, toolbar_styles, s_toolbar::url, s_toolbar::visible, and textarea_setup::width.
Referenced by window_create().
void toolbar_destroy | ( | struct s_toolbar * | tb | ) |
Definition at line 337 of file toolbar.c.
References s_toolbar::buttons, s_toolbar::form, s_url_widget::textarea, textarea_destroy(), and s_toolbar::url.
Referenced by window_destroy().
void toolbar_exit | ( | void | ) |
Definition at line 261 of file toolbar.c.
Referenced by gui_quit().
void toolbar_favorite_click | ( | struct s_toolbar * | tb | ) |
Definition at line 1008 of file toolbar.c.
References hotlist_add_url(), hotlist_has_url(), hotlist_remove_url(), nsurl_create(), nsurl_unref(), and toolbar_get_url().
void toolbar_forward_click | ( | struct s_toolbar * | tb | ) |
Definition at line 945 of file toolbar.c.
References gui_window::browser, browser_window_forward_available(), browser_window_history_forward(), browser_window::bw, gui_window::bw, s_browser::bw, s_toolbar::owner, and window_get_active_gui_window().
Referenced by menu_forward().
OBJECT * toolbar_get_form | ( | struct s_toolbar * | tb | ) |
Definition at line 910 of file toolbar.c.
References s_toolbar::form.
Referenced by nsatari_search_set_back_state(), nsatari_search_set_forward_state(), on_window_key_input(), toolbar_set_visible(), and window_open_search().
void toolbar_get_grect | ( | struct s_toolbar * | tb, |
short | which, | ||
GRECT * | dst | ||
) |
Receive a specific region of the toolbar.
tb | - the toolbar pointer |
which | - the area to retrieve: 0 to receive the workarea, all other values must be an resource ID of the TOOLBAR tree. |
dst | - GRECT pointer receiving the area. |
Definition at line 854 of file toolbar.c.
References s_toolbar::form, s_toolbar::reflow, and toolbar_reflow().
Referenced by tb_txt_request_redraw(), toolbar_mouse_input(), toolbar_redraw(), toolbar_set_origin(), toolbar_set_throbber_state(), toolbar_set_url(), toolbar_set_width(), toolbar_throbber_progress(), toolbar_update_buttons(), window_get_grect(), and window_restore_active_gui_window().
Definition at line 896 of file toolbar.c.
References nsurl_create(), and toolbar_get_url().
struct textarea * toolbar_get_textarea | ( | struct s_toolbar * | tb, |
enum toolbar_textarea | which | ||
) |
Definition at line 875 of file toolbar.c.
References s_url_widget::textarea, and s_toolbar::url.
char * toolbar_get_url | ( | struct s_toolbar * | tb | ) |
Definition at line 881 of file toolbar.c.
References s_url_widget::textarea, textarea_get_text(), and s_toolbar::url.
Referenced by toolbar_favorite_click(), and toolbar_get_nsurl().
void toolbar_home_click | ( | struct s_toolbar * | tb | ) |
Definition at line 960 of file toolbar.c.
References atari_warn_user(), gui_window::browser, browser_window_navigate(), browser_window::bw, gui_window::bw, s_browser::bw, BW_NAVIGATE_HISTORY, NSERROR_OK, nsoption_charp, nsurl_create(), nsurl_unref(), s_toolbar::owner, gui_window::url, and window_get_active_gui_window().
Referenced by menu_home().
void toolbar_init | ( | void | ) |
Definition at line 236 of file toolbar.c.
References aes_toolbar, area_full_height, area_navigation_height, area_search_height, init, throbber_form, and toolbar_url_userdraw().
Referenced by gui_init().
bool toolbar_key_input | ( | struct s_toolbar * | tb, |
short | nkc | ||
) |
Definition at line 677 of file toolbar.c.
References atari_warn_user(), BROWSER, gui_window::browser, browser_window_navigate(), s_browser::bw, BW_NAVIGATE_HISTORY, clip(), clip_length, nkc_to_input_key(), NS_KEY_COPY_SELECTION, NS_KEY_CR, NS_KEY_DELETE_LEFT, NS_KEY_ESCAPE, NS_KEY_NL, NS_KEY_PASTE, NS_KEY_SELECT_ALL, NSERROR_OK, nsurl_create(), nsurl_unref(), s_toolbar::owner, PATH_MAX, scrap_txt_read(), scrap_txt_write(), text(), s_url_widget::textarea, textarea_get_text(), textarea_keypress(), toolbar_set_url(), gui_window::url, s_toolbar::url, utf8_from_local_encoding(), window_get_active_gui_window(), and window_set_focus().
Referenced by gui_window_create(), on_window_key_input(), and window_set_focus().
void toolbar_mouse_input | ( | struct s_toolbar * | tb, |
short | obj, | ||
short | mbut | ||
) |
Definition at line 755 of file toolbar.c.
References s_gui_win_root::active_gui_window, aes_event_out, gui_window::browser, BROWSER_MOUSE_CLICK_1, BROWSER_MOUSE_DOUBLE_CLICK, BROWSER_MOUSE_DRAG_1, BROWSER_MOUSE_HOLDING_1, BROWSER_MOUSE_HOVER, BROWSER_MOUSE_PRESS_1, button_off, s_browser::bw, s_tb_button::cb_click, find_button(), s_toolbar::form, nsatari_search_perform(), NSLOG, s_toolbar::owner, gui_window::search, SEARCH_FLAG_FORWARDS, SEARCH_INPUT, s_tb_button::state, s_url_widget::textarea, textarea_mouse_action(), toolbar_get_grect(), toolbar_update_buttons(), s_toolbar::url, URL_WIDGET, window_close_search(), window_get_active_gui_window(), window_process_redraws(), window_schedule_redraw_grect(), window_set_focus(), and window_url_widget_has_focus().
Referenced by handle_event().
void toolbar_redraw | ( | struct s_toolbar * | tb, |
GRECT * | clip | ||
) |
Definition at line 416 of file toolbar.c.
References s_toolbar::area, s_toolbar::attached, clip(), s_toolbar::form, s_throbber_widget::index, plot_set_dimensions(), plot_set_scale(), s_toolbar::reflow, s_url_widget::textarea, textarea_redraw(), s_toolbar::throbber, throbber_form, toolbar_get_grect(), toolbar_rdrw_ctx, toolbar_reflow(), toolbar_url_scale, s_toolbar::url, and rect::x0.
Referenced by toolbar_redraw_cb(), and window_process_redraws().
void toolbar_reload_click | ( | struct s_toolbar * | tb | ) |
Definition at line 932 of file toolbar.c.
References gui_window::browser, browser_window_reload(), browser_window::bw, gui_window::bw, s_browser::bw, s_toolbar::owner, and window_get_active_gui_window().
Referenced by menu_reload().
void toolbar_set_attached | ( | struct s_toolbar * | tb, |
bool | attached | ||
) |
Definition at line 643 of file toolbar.c.
References s_toolbar::attached.
Referenced by window_open().
void toolbar_set_dimensions | ( | struct s_toolbar * | tb, |
GRECT * | area | ||
) |
Definition at line 561 of file toolbar.c.
References s_tb_button::area, s_toolbar::area, s_toolbar::form, s_toolbar::reflow, s_url_widget::textarea, textarea_set_dimensions(), toolbar_reflow(), and s_toolbar::url.
Referenced by window_open().
void toolbar_set_origin | ( | struct s_toolbar * | tb, |
short | x, | ||
short | y | ||
) |
Definition at line 548 of file toolbar.c.
References s_toolbar::area, s_toolbar::reflow, and toolbar_get_grect().
Referenced by on_resized().
void toolbar_set_reflow | ( | struct s_toolbar * | tb, |
bool | do_reflow | ||
) |
Definition at line 638 of file toolbar.c.
References s_toolbar::reflow.
void toolbar_set_throbber_state | ( | struct s_toolbar * | tb, |
bool | active | ||
) |
Definition at line 600 of file toolbar.c.
References gui_window::active, s_throbber_widget::index, s_toolbar::owner, s_toolbar::reflow, s_throbber_widget::running, s_toolbar::throbber, THROBBER_INACTIVE_INDEX, THROBBER_MIN_INDEX, toolbar_get_grect(), and window_schedule_redraw_grect().
Referenced by gui_window_start_throbber(), and gui_window_stop_throbber().
void toolbar_set_url | ( | struct s_toolbar * | tb, |
const char * | text | ||
) |
Definition at line 584 of file toolbar.c.
References s_tb_button::area, s_toolbar::attached, gui_window::browser, s_browser::bw, NSLOG, s_toolbar::owner, text(), s_url_widget::textarea, textarea_set_text(), toolbar_get_grect(), toolbar_update_buttons(), s_toolbar::url, s_toolbar::visible, window_get_active_gui_window(), and window_schedule_redraw_grect().
Referenced by gui_window_set_url(), toolbar_key_input(), and window_restore_active_gui_window().
void toolbar_set_visible | ( | struct s_toolbar * | tb, |
short | area, | ||
bool | visible | ||
) |
Definition at line 616 of file toolbar.c.
References s_toolbar::reflow, s_toolbar::search_visible, toolbar_get_form(), and s_toolbar::visible.
Referenced by window_close_search(), and window_open_search().
void toolbar_set_width | ( | struct s_toolbar * | tb, |
short | w | ||
) |
Definition at line 528 of file toolbar.c.
References s_toolbar::area, s_toolbar::form, s_toolbar::reflow, s_url_widget::textarea, textarea_set_dimensions(), toolbar_get_grect(), toolbar_reflow(), and s_toolbar::url.
Referenced by on_resized().
void toolbar_stop_click | ( | struct s_toolbar * | tb | ) |
Definition at line 992 of file toolbar.c.
References gui_window::browser, browser_window_stop(), browser_window::bw, gui_window::bw, s_browser::bw, s_toolbar::owner, and window_get_active_gui_window().
Referenced by menu_stop().
bool toolbar_text_input | ( | struct s_toolbar * | tb, |
char * | text | ||
) |
void toolbar_throbber_progress | ( | struct s_toolbar * | tb | ) |
Definition at line 649 of file toolbar.c.
References s_throbber_widget::index, s_toolbar::owner, s_toolbar::reflow, s_throbber_widget::running, s_toolbar::throbber, THROBBER_MAX_INDEX, THROBBER_MIN_INDEX, toolbar_get_grect(), and window_schedule_redraw_grect().
Referenced by throbber_advance().
void toolbar_update_buttons | ( | struct s_toolbar * | tb, |
struct browser_window * | bw, | ||
short | idx | ||
) |
Definition at line 458 of file toolbar.c.
References s_tb_button::area, s_toolbar::attached, browser_window_back_available(), browser_window_forward_available(), browser_window_reload_available(), browser_window_stop_available(), button_off, button_on, find_button(), NSLOG, s_toolbar::owner, s_tb_button::state, toolbar_get_grect(), and window_schedule_redraw_grect().
Referenced by toolbar_mouse_input(), toolbar_set_url(), and window_update_back_forward().