NetSurf
|
Go to the source code of this file.
Functions | |
nserror | nsgtk_toolbar_create (GtkBuilder *builder, struct browser_window *(*get_bw)(void *ctx), void *get_bw_ctx, bool want_location_focus, struct nsgtk_toolbar **toolbar) |
create a control toolbar More... | |
nserror | nsgtk_toolbar_update (struct nsgtk_toolbar *tb) |
Update the toolbar items being shown based on current settings. More... | |
nserror | nsgtk_toolbar_restyle (struct nsgtk_toolbar *tb) |
Update toolbar style and size based on current settings. More... | |
nserror | nsgtk_toolbar_throbber (struct nsgtk_toolbar *tb, bool active) |
Start or stop a throbber in a toolbar. More... | |
nserror | nsgtk_toolbar_page_info_change (struct nsgtk_toolbar *tb) |
Page info has changed state. More... | |
nserror | nsgtk_toolbar_set_url (struct nsgtk_toolbar *tb, nsurl *url) |
Update the toolbar url entry. More... | |
nserror | nsgtk_toolbar_set_websearch_image (struct nsgtk_toolbar *tb, GdkPixbuf *pixbuf) |
set the websearch image More... | |
nserror | nsgtk_toolbar_item_activate (struct nsgtk_toolbar *tb, nsgtk_toolbar_button itemid) |
activate the handler for a toolbar item More... | |
nserror | nsgtk_toolbar_show (struct nsgtk_toolbar *tb, bool show) |
set the toolbar to be shown or hidden More... | |
nserror | nsgtk_toolbar_position_page_info (struct nsgtk_toolbar *tb, struct nsgtk_pi_window *win) |
position the page info window appropriately More... | |
nserror | nsgtk_toolbar_position_local_history (struct nsgtk_toolbar *tb) |
position the local history window appropriately More... | |
void | nsgtk_toolbar_customization_init (struct nsgtk_scaffolding *g) |
Initialise customization of toolbar entries. More... | |
nserror nsgtk_toolbar_create | ( | GtkBuilder * | builder, |
struct browser_window *(*)(void *ctx) | get_bw, | ||
void * | get_bw_ctx, | ||
bool | want_location_focus, | ||
struct nsgtk_toolbar ** | toolbar | ||
) |
create a control toolbar
[in] | builder | The gtk builder object the toolbar is being created from |
[out] | toolbar | a pointer to receive the result. |
Definition at line 3447 of file toolbar.c.
References BACK_BUTTON, nsgtk_toolbar::get_bw, nsgtk_toolbar::get_ctx, nsgtk_toolbar::items, LFS_IDLE, LFS_WANT, nsgtk_toolbar::loc_focus, NSERROR_NOMEM, NSERROR_OK, nsgtk_toolbar_update(), PLACEHOLDER_BUTTON, nsgtk_toolbar::throb_frame, toolbar_destroy_cb(), toolbar_item_create(), toolbar_popup_context_menu_cb(), and nsgtk_toolbar::widget.
Referenced by gui_window_create().
void nsgtk_toolbar_customization_init | ( | struct nsgtk_scaffolding * | g | ) |
Initialise customization of toolbar entries.
nserror nsgtk_toolbar_item_activate | ( | struct nsgtk_toolbar * | tb, |
nsgtk_toolbar_button | itemid | ||
) |
activate the handler for a toolbar item
This allows the same action to be performed for menu enties as if the user had clicked the toolbar widget.
toolbar | A toolbar returned from a creation |
itemid | the id of the item to activate |
Definition at line 3740 of file toolbar.c.
References BACK_BUTTON, nsgtk_toolbar_item::button, nsgtk_toolbar_item::clicked, nsgtk_toolbar::items, NSERROR_BAD_PARAMETER, NSERROR_INVALID, NSERROR_OK, PLACEHOLDER_BUTTON, and nsgtk_toolbar::widget.
Referenced by nsgtk_window_item_activate().
nserror nsgtk_toolbar_page_info_change | ( | struct nsgtk_toolbar * | tb | ) |
Page info has changed state.
toolbar | A toolbar returned from a creation |
Definition at line 3607 of file toolbar.c.
References browser_window_get_page_info_state(), nsgtk_toolbar_item::button, browser_window::bw, nsgtk_toolbar::get_bw, nsgtk_toolbar::get_ctx, GTK_ENTRY_ICON_PRIMARY, nsgtk_toolbar::items, NSERROR_INVALID, NSERROR_OK, nsgtk_entry_set_icon_from_icon_name(), PAGE_STATE_INSECURE, PAGE_STATE_INTERNAL, PAGE_STATE_LOCAL, PAGE_STATE_SECURE, PAGE_STATE_SECURE_ISSUES, PAGE_STATE_SECURE_OVERRIDE, and URL_BAR_ITEM.
Referenced by page_info_change().
nserror nsgtk_toolbar_position_local_history | ( | struct nsgtk_toolbar * | tb | ) |
position the local history window appropriately
tb | The toolbar to position relative to |
Definition at line 3874 of file toolbar.c.
References HISTORY_BUTTON, NSERROR_OK, nsgtk_local_history_set_position(), and nsgtk_toolbar_get_icon_window_position().
Referenced by nsgtk_window_position_local_history().
nserror nsgtk_toolbar_position_page_info | ( | struct nsgtk_toolbar * | tb, |
struct nsgtk_pi_window * | win | ||
) |
position the page info window appropriately
tb | The toolbar to position relative to |
win | The page-info window to position |
Definition at line 3857 of file toolbar.c.
References NSERROR_OK, nsgtk_page_info_set_position(), nsgtk_toolbar_get_icon_window_position(), and URL_BAR_ITEM.
Referenced by nsgtk_window_position_page_info().
nserror nsgtk_toolbar_restyle | ( | struct nsgtk_toolbar * | tb | ) |
Update toolbar style and size based on current settings.
toolbar | A toolbar returned from a creation |
Definition at line 3505 of file toolbar.c.
References NSERROR_OK, nsoption_int, nsgtk_toolbar::offset, and nsgtk_toolbar::widget.
Referenced by customisation_toolbar_update(), nsgtk_toolbar_update(), and nsgtk_window_update_all().
nserror nsgtk_toolbar_set_url | ( | struct nsgtk_toolbar * | tb, |
nsurl * | url | ||
) |
Update the toolbar url entry.
toolbar | A toolbar returned from a creation |
url | The URL to set |
Definition at line 3662 of file toolbar.c.
References nsgtk_toolbar_item::button, nsgtk_toolbar::items, LFS_IDLE, LFS_LAST, nsgtk_toolbar::loc_focus, NSERROR_INVALID, NSERROR_OK, nsoption_bool, nsurl_access(), nsurl_get_utf8(), and URL_BAR_ITEM.
Referenced by gui_window_set_url().
nserror nsgtk_toolbar_set_websearch_image | ( | struct nsgtk_toolbar * | tb, |
GdkPixbuf * | pixbuf | ||
) |
set the websearch image
toolbar | A toolbar returned from a creation |
pixbuf | The pixel buffer data to use to set the web search icon |
Definition at line 3713 of file toolbar.c.
References nsgtk_toolbar_item::button, GTK_ENTRY_ICON_PRIMARY, nsgtk_toolbar::items, NSERROR_INVALID, NSERROR_OK, nsgtk_entry_set_icon_from_icon_name(), nsgtk_entry_set_icon_from_pixbuf(), NSGTK_STOCK_INFO, and WEBSEARCH_ITEM.
Referenced by gui_search_web_provider_update().
nserror nsgtk_toolbar_show | ( | struct nsgtk_toolbar * | tb, |
bool | show | ||
) |
set the toolbar to be shown or hidden
toolbar | A toolbar returned from a creation |
show | true to show the toolbar and false to hide it. |
Definition at line 3771 of file toolbar.c.
References NSERROR_OK, and nsgtk_toolbar::widget.
Referenced by gui_window_create(), and nsgtk_window_toolbar_show().
nserror nsgtk_toolbar_throbber | ( | struct nsgtk_toolbar * | tb, |
bool | active | ||
) |
Start or stop a throbber in a toolbar.
toolbar | A toolbar returned from a creation |
active | True if the throbber animation should play. |
Definition at line 3550 of file toolbar.c.
References BACK_BUTTON, browser_window_history_back_available(), browser_window_history_forward_available(), nsgtk_toolbar_item::button, browser_window::bw, FORWARD_BUTTON, nsgtk_toolbar::get_bw, nsgtk_toolbar::get_ctx, nsgtk_toolbar::items, LFS_IDLE, LFS_LAST, LFS_THROB, LFS_WANT, nsgtk_toolbar::loc_focus, next_throbber_frame(), NSERROR_OK, nsgtk_local_history_hide(), nsgtk_schedule(), RELOAD_BUTTON, RELOADSTOP_BUTTON, set_item_action(), set_item_sensitivity(), set_throbber_frame(), STOP_BUTTON, nsgtk_toolbar::throb_frame, THROBBER_FRAME_TIME, and THROBBER_ITEM.
Referenced by throbber().
nserror nsgtk_toolbar_update | ( | struct nsgtk_toolbar * | tb | ) |
Update the toolbar items being shown based on current settings.
toolbar | A toolbar returned from a creation |
Definition at line 3783 of file toolbar.c.
References apply_user_button_customisation(), NSERROR_OK, nsgtk_toolbar_restyle(), populate_gtk_toolbar_widget(), and toolbar_connect_signals().
Referenced by nsgtk_toolbar_create(), and nsgtk_window_toolbar_update().