NetSurf
Data Structures | Enumerations | Functions
toolbar.h File Reference
#include <stdbool.h>
#include <stdint.h>
Include dependency graph for toolbar.h:
This graph shows which files directly or indirectly include this file:

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_toolbartoolbar_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 textareatoolbar_get_textarea (struct s_toolbar *tb, enum toolbar_textarea which)
 
char * toolbar_get_url (struct s_toolbar *tb)
 
struct nsurltoolbar_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)
 

Enumeration Type Documentation

◆ toolbar_textarea

Enumerator
URL_INPUT_TEXT_AREA 

Definition at line 28 of file toolbar.h.

Function Documentation

◆ toolbar_back_click()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_create()

struct s_toolbar * toolbar_create ( struct s_gui_win_root owner)

◆ toolbar_crypto_click()

void toolbar_crypto_click ( struct s_toolbar tb)

Definition at line 1036 of file toolbar.c.

◆ toolbar_destroy()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_exit()

void toolbar_exit ( void  )

Definition at line 261 of file toolbar.c.

Referenced by gui_quit().

Here is the caller graph for this function:

◆ toolbar_favorite_click()

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().

Here is the call graph for this function:

◆ toolbar_forward_click()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_get_form()

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().

Here is the caller graph for this function:

◆ toolbar_get_grect()

void toolbar_get_grect ( struct s_toolbar tb,
short  which,
GRECT *  dst 
)

Receive a specific region of the toolbar.

Parameters
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_get_nsurl()

struct nsurl * toolbar_get_nsurl ( struct s_toolbar tb)

Definition at line 896 of file toolbar.c.

References nsurl_create(), and toolbar_get_url().

Here is the call graph for this function:

◆ toolbar_get_textarea()

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.

◆ toolbar_get_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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_home_click()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_init()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_key_input()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_mouse_input()

void toolbar_mouse_input ( struct s_toolbar tb,
short  obj,
short  mbut 
)

◆ toolbar_redraw()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_reload_click()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_set_attached()

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().

Here is the caller graph for this function:

◆ toolbar_set_dimensions()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_set_origin()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_set_reflow()

void toolbar_set_reflow ( struct s_toolbar tb,
bool  do_reflow 
)

Definition at line 638 of file toolbar.c.

References s_toolbar::reflow.

◆ toolbar_set_throbber_state()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_set_url()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_set_visible()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_set_width()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_stop_click()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_text_input()

bool toolbar_text_input ( struct s_toolbar tb,
char *  text 
)

Definition at line 668 of file toolbar.c.

References NSLOG.

◆ toolbar_throbber_progress()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toolbar_update_buttons()

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().

Here is the call graph for this function:
Here is the caller graph for this function: