NetSurf
Functions
scaffolding.h File Reference
#include <stdbool.h>
#include "utils/errors.h"
Include dependency graph for scaffolding.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct nsgtk_scaffoldingnsgtk_new_scaffolding (struct gui_window *gw)
 create a new scaffolding for a window. More...
 
nserror nsgtk_scaffolding_destroy_all (void)
 causes all scaffolding windows to be destroyed. More...
 
nserror nsgtk_scaffolding_throbber (struct gui_window *gw, bool active)
 Update scaffolding window when throbber state changes. More...
 
nserror nsgtk_scaffolding_toolbar_context_menu (struct nsgtk_scaffolding *gs)
 open the toolbar context menu More...
 
nserror nsgtk_scaffolding_position_page_info (struct nsgtk_scaffolding *gs, struct nsgtk_pi_window *win)
 Position the page-info popup in the right place. More...
 
nserror nsgtk_scaffolding_position_local_history (struct nsgtk_scaffolding *gs)
 Position the local-history popup in the right place. More...
 
nserror nsgtk_scaffolding_burger_menu (struct nsgtk_scaffolding *gs)
 open the burger menu More...
 
struct nsgtk_scaffoldingnsgtk_current_scaffolding (void)
 Obtain the most recently used scaffolding element. More...
 
GtkWindow * nsgtk_scaffolding_window (struct nsgtk_scaffolding *g)
 Get the gtk window for a scaffolding. More...
 
GtkNotebook * nsgtk_scaffolding_notebook (struct nsgtk_scaffolding *g)
 Get the gtk notebook from a scaffold. More...
 
struct gtk_searchnsgtk_scaffolding_search (struct nsgtk_scaffolding *g)
 
GtkMenuBar * nsgtk_scaffolding_menu_bar (struct nsgtk_scaffolding *g)
 
struct gui_windownsgtk_scaffolding_top_level (struct nsgtk_scaffolding *g)
 
struct nsgtk_scaffoldingnsgtk_scaffolding_iterate (struct nsgtk_scaffolding *g)
 Iterate through available scaffolding. More...
 
void nsgtk_scaffolding_toggle_search_bar_visibility (struct nsgtk_scaffolding *g)
 
void nsgtk_scaffolding_set_top_level (struct gui_window *g)
 Set the current active top level gui window. More...
 
void nsgtk_scaffolding_set_sensitivity (struct nsgtk_scaffolding *g)
 update the sensitivity of context sensitive UI elements More...
 
void nsgtk_scaffolding_context_menu (struct nsgtk_scaffolding *g, gdouble x, gdouble y)
 Open a context sensitive menu. More...
 
void nsgtk_scaffolding_set_title (struct gui_window *gw, const char *title)
 set the title in the window More...
 
struct nsgtk_scaffoldingnsgtk_scaffolding_from_notebook (GtkNotebook *notebook)
 find which scaffolding contains a gtk notebook More...
 

Function Documentation

◆ nsgtk_current_scaffolding()

struct nsgtk_scaffolding * nsgtk_current_scaffolding ( void  )

Obtain the most recently used scaffolding element.

This allows tabs to be opened in the most recently used window

Definition at line 1473 of file scaffolding.c.

References scaf_current, and scaf_list.

Referenced by gui_window_create(), nsgtk_local_history_present(), nsgtk_page_info(), and nsgtk_show_uri().

Here is the caller graph for this function:

◆ nsgtk_new_scaffolding()

struct nsgtk_scaffolding * nsgtk_new_scaffolding ( struct gui_window gw)

create a new scaffolding for a window.

Parameters
gwThe gui window to create the new scaffold around.
Returns
The newly constructed scaffold or NULL on error.

set this window's size and position to what's in the options, or some sensible default if they are not set yet.

Definition at line 1496 of file scaffolding.c.

References nsgtk_scaffolding::builder, nsgtk_scaffolding::next, nsgtk_scaffolding::notebook, NSERROR_OK, nsgtk_builder_new_from_resname(), nsgtk_menus_create(), nsgtk_notebook_create(), nsgtk_window_tabs_add(), nsgtk_window_tabs_remove(), NSLOG, nsoption_int, nsgtk_scaffolding::prev, scaf_list, scaffolding_window_delete_event(), scaffolding_window_destroy(), nsgtk_scaffolding::tabs_remove_handler_id, nsgtk_scaffolding::top_level, and nsgtk_scaffolding::window.

Referenced by gui_window_create().

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

◆ nsgtk_scaffolding_burger_menu()

nserror nsgtk_scaffolding_burger_menu ( struct nsgtk_scaffolding gs)

open the burger menu

Definition at line 1419 of file scaffolding.c.

References nsgtk_burger_menu::burger_menu, nsgtk_scaffolding::burger_menu, NSERROR_OK, and nsgtk_menu_popup_at_pointer().

Referenced by openmenu_button_clicked_cb().

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

◆ nsgtk_scaffolding_context_menu()

void nsgtk_scaffolding_context_menu ( struct nsgtk_scaffolding g,
gdouble  x,
gdouble  y 
)

Open a context sensitive menu.

Parameters
gthe scaffolding containing the browser window.
xThe x co-ordinate.
yThe y co-ordinate.

Definition at line 1429 of file scaffolding.c.

References browser_window_get_features(), browser_window::bw, COPY_BUTTON, nsgtk_popup_menu::copy_menuitem, current_menu_features, CUT_BUTTON, nsgtk_popup_menu::cut_menuitem, browser_window_features::link, nsgtk_link_menu::link_menu, nsgtk_scaffolding::link_menu, nsgtk_scaffolding::menus, nsgtk_get_browser_window(), nsgtk_menu_popup_at_pointer(), nsgtk_scaffolding_update_edit_actions_sensitivity(), PASTE_BUTTON, nsgtk_popup_menu::paste_menuitem, nsgtk_popup_menu::popup_menu, nsgtk_scaffolding::popup_menu, nsgtk_menu::sensitivity, nsgtk_scaffolding::top_level, browser_window::x, and browser_window::y.

Referenced by nsgtk_window_button_press_event().

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

◆ nsgtk_scaffolding_destroy_all()

nserror nsgtk_scaffolding_destroy_all ( void  )

causes all scaffolding windows to be destroyed.

Returns
NSERROR_OK and all scaffolding windows destroyed else NSERROR_INVALID if download in progress and user continued.

Definition at line 1288 of file scaffolding.c.

References nsgtk_scaffolding::next, NSERROR_INVALID, NSERROR_OK, nsgtk_check_for_downloads(), scaf_list, and nsgtk_scaffolding::window.

Referenced by quit_button_clicked_cb().

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

◆ nsgtk_scaffolding_from_notebook()

struct nsgtk_scaffolding * nsgtk_scaffolding_from_notebook ( GtkNotebook *  notebook)

find which scaffolding contains a gtk notebook

Parameters
notebookThe notebook to search for.
Returns
The scaffolding containing the notebook or NULL if not found

Definition at line 1482 of file scaffolding.c.

References nsgtk_scaffolding::next, nsgtk_scaffolding::notebook, and scaf_list.

Referenced by nsgtk_tab_switch_page_after().

Here is the caller graph for this function:

◆ nsgtk_scaffolding_iterate()

struct nsgtk_scaffolding * nsgtk_scaffolding_iterate ( struct nsgtk_scaffolding g)

Iterate through available scaffolding.

Definition at line 1332 of file scaffolding.c.

References nsgtk_scaffolding::next, and scaf_list.

◆ nsgtk_scaffolding_menu_bar()

GtkMenuBar * nsgtk_scaffolding_menu_bar ( struct nsgtk_scaffolding g)

Definition at line 1323 of file scaffolding.c.

References nsgtk_bar_submenu::bar_menu, and nsgtk_scaffolding::menu_bar.

Referenced by nsgtk_tab_switch_page_after().

Here is the caller graph for this function:

◆ nsgtk_scaffolding_notebook()

GtkNotebook * nsgtk_scaffolding_notebook ( struct nsgtk_scaffolding g)

Get the gtk notebook from a scaffold.

Definition at line 1316 of file scaffolding.c.

References nsgtk_scaffolding::notebook.

Referenced by nsgtk_tab_add(), and nsgtk_window_update_all().

Here is the caller graph for this function:

◆ nsgtk_scaffolding_position_local_history()

nserror nsgtk_scaffolding_position_local_history ( struct nsgtk_scaffolding gs)

Position the local-history popup in the right place.

Parameters
gsThe scaffolding to position relative to

Definition at line 1600 of file scaffolding.c.

References nsgtk_window_position_local_history(), and nsgtk_scaffolding::top_level.

Referenced by nsgtk_local_history_present().

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

◆ nsgtk_scaffolding_position_page_info()

nserror nsgtk_scaffolding_position_page_info ( struct nsgtk_scaffolding gs,
struct nsgtk_pi_window win 
)

Position the page-info popup in the right place.

Parameters
gsThe scaffolding to position relative to
winThe page-info window to position

Definition at line 1593 of file scaffolding.c.

References nsgtk_window_position_page_info(), and nsgtk_scaffolding::top_level.

Referenced by nsgtk_page_info().

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

◆ nsgtk_scaffolding_search()

struct gtk_search * nsgtk_scaffolding_search ( struct nsgtk_scaffolding g)

◆ nsgtk_scaffolding_set_sensitivity()

void nsgtk_scaffolding_set_sensitivity ( struct nsgtk_scaffolding g)

update the sensitivity of context sensitive UI elements

widgets altered in arrays: main right click menu location popup current arrays are: stop reload cut copy paste back forward nexttab prevtab closetab

Definition at line 1376 of file scaffolding.c.

References SENSITIVITY.

Referenced by nsgtk_scaffolding_enable_edit_actions_sensitivity(), nsgtk_scaffolding_update_edit_actions_sensitivity(), nsgtk_window_tabs_add(), nsgtk_window_tabs_remove(), and scaffolding_update_context().

Here is the caller graph for this function:

◆ nsgtk_scaffolding_set_title()

void nsgtk_scaffolding_set_title ( struct gui_window gw,
const char *  title 
)

set the title in the window

Parameters
gwThe gui window to set title on
titleThe title to set which may be NULL

Definition at line 1239 of file scaffolding.c.

References nsgtk_get_scaffold(), SLEN, nsgtk_scaffolding::top_level, and nsgtk_scaffolding::window.

Referenced by gui_window_set_title(), and nsgtk_scaffolding_set_top_level().

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

◆ nsgtk_scaffolding_set_top_level()

void nsgtk_scaffolding_set_top_level ( struct gui_window g)

Set the current active top level gui window.

Definition at line 1349 of file scaffolding.c.

References browser_window_get_title(), browser_window::bw, nsgtk_get_browser_window(), nsgtk_get_scaffold(), nsgtk_scaffolding_set_title(), scaf_current, scaffolding_update_context(), and nsgtk_scaffolding::top_level.

Referenced by nsgtk_tab_switch_page_after().

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

◆ nsgtk_scaffolding_throbber()

nserror nsgtk_scaffolding_throbber ( struct gui_window gw,
bool  active 
)

Update scaffolding window when throbber state changes.

Definition at line 1271 of file scaffolding.c.

References nsgtk_scaffolding::menus, NSERROR_OK, nsgtk_get_scaffold(), RELOAD_BUTTON, scaffolding_update_context(), nsgtk_menu::sensitivity, and STOP_BUTTON.

Referenced by throbber().

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

◆ nsgtk_scaffolding_toggle_search_bar_visibility()

void nsgtk_scaffolding_toggle_search_bar_visibility ( struct nsgtk_scaffolding g)

◆ nsgtk_scaffolding_toolbar_context_menu()

nserror nsgtk_scaffolding_toolbar_context_menu ( struct nsgtk_scaffolding gs)

open the toolbar context menu

Definition at line 1407 of file scaffolding.c.

References NSERROR_OK, nsgtk_menu_popup_at_pointer(), nsgtk_popup_menu::popup_menu, nsgtk_scaffolding::popup_menu, and popup_menu_hide().

Referenced by toolbar_popup_context_menu_cb().

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

◆ nsgtk_scaffolding_top_level()

struct gui_window * nsgtk_scaffolding_top_level ( struct nsgtk_scaffolding g)

Definition at line 1342 of file scaffolding.c.

References nsgtk_scaffolding::top_level.

◆ nsgtk_scaffolding_window()

GtkWindow * nsgtk_scaffolding_window ( struct nsgtk_scaffolding g)

Get the gtk window for a scaffolding.

Definition at line 1310 of file scaffolding.c.

References nsgtk_scaffolding::window.

Referenced by gui_download_window_create(), gui_window_file_gadget_open(), nsgtk_page_info(), and nsgtk_show_uri().

Here is the caller graph for this function: