NetSurf
scaffolding.h
Go to the documentation of this file.
1/*
2 * Copyright 2005 James Bursa <bursa@users.sourceforge.net>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef NETSURF_GTK_SCAFFOLDING_H
20#define NETSURF_GTK_SCAFFOLDING_H 1
21
22#include <stdbool.h>
23#include "utils/errors.h"
24
25struct bitmap;
26struct hlcache_handle;
27struct gui_window;
29struct nsurl;
30struct nsgtk_pi_window;
31
32
33/**
34 * create a new scaffolding for a window.
35 *
36 * \param gw The gui window to create the new scaffold around.
37 * \return The newly constructed scaffold or NULL on error.
38 */
40
41/**
42 * causes all scaffolding windows to be destroyed.
43 *
44 * \return NSERROR_OK and all scaffolding windows destroyed else
45 * NSERROR_INVALID if download in progress and user continued.
46 */
48
49/**
50 * Update scaffolding window when throbber state changes
51 */
52nserror nsgtk_scaffolding_throbber(struct gui_window* gw, bool active);
53
54/**
55 * open the toolbar context menu
56 */
58
59/**
60 * Position the page-info popup in the right place
61 *
62 * \param gs The scaffolding to position relative to
63 * \param win The page-info window to position
64 */
66 struct nsgtk_pi_window *win);
67
68/**
69 * Position the local-history popup in the right place
70 *
71 * \param gs The scaffolding to position relative to
72 */
74
75/**
76 * open the burger menu
77 */
79
80/**
81 * Obtain the most recently used scaffolding element.
82 *
83 * This allows tabs to be opened in the most recently used window
84 */
86
87/* acessors for gtk elements within a scaffold */
88
89/**
90 * Get the gtk window for a scaffolding.
91 */
93
94/**
95 * Get the gtk notebook from a scaffold.
96 */
97GtkNotebook *nsgtk_scaffolding_notebook(struct nsgtk_scaffolding *g);
98
100
101GtkMenuBar *nsgtk_scaffolding_menu_bar(struct nsgtk_scaffolding *g);
102
104
105
106/**
107 * Iterate through available scaffolding.
108 */
110
111
113
114/**
115 * Set the current active top level gui window.
116 */
118
119/**
120 * update the sensitivity of context sensitive UI elements
121 *
122 * widgets altered in arrays:
123 * main
124 * right click menu
125 * location
126 * popup
127 * current arrays are:
128 * stop
129 * reload
130 * cut
131 * copy
132 * paste
133 * back
134 * forward
135 * nexttab
136 * prevtab
137 * closetab
138 */
140
141/**
142 * Open a context sensitive menu.
143 *
144 * \param g the scaffolding containing the browser window.
145 * \param x The x co-ordinate.
146 * \param y The y co-ordinate.
147 */
148void nsgtk_scaffolding_context_menu(struct nsgtk_scaffolding *g, gdouble x, gdouble y);
149
150/**
151 * set the title in the window
152 *
153 * \param gw The gui window to set title on
154 * \param title The title to set which may be NULL
155 */
156void nsgtk_scaffolding_set_title(struct gui_window *gw, const char *title);
157
158/**
159 * find which scaffolding contains a gtk notebook
160 *
161 * \param notebook The notebook to search for.
162 * \return The scaffolding containing the notebook or NULL if not found
163 */
165
166#endif /* NETSURF_GTK_SCAFFOLDING_H */
Error codes.
nserror
Enumeration of error codes.
Definition: errors.h:29
nserror nsgtk_scaffolding_toolbar_context_menu(struct nsgtk_scaffolding *gs)
open the toolbar context menu
Definition: scaffolding.c:1407
void nsgtk_scaffolding_set_title(struct gui_window *gw, const char *title)
set the title in the window
Definition: scaffolding.c:1239
struct nsgtk_scaffolding * nsgtk_new_scaffolding(struct gui_window *gw)
create a new scaffolding for a window.
Definition: scaffolding.c:1496
nserror nsgtk_scaffolding_burger_menu(struct nsgtk_scaffolding *gs)
open the burger menu
Definition: scaffolding.c:1419
GtkNotebook * nsgtk_scaffolding_notebook(struct nsgtk_scaffolding *g)
Get the gtk notebook from a scaffold.
Definition: scaffolding.c:1316
void nsgtk_scaffolding_set_sensitivity(struct nsgtk_scaffolding *g)
update the sensitivity of context sensitive UI elements
Definition: scaffolding.c:1376
struct gtk_search * nsgtk_scaffolding_search(struct nsgtk_scaffolding *g)
void nsgtk_scaffolding_toggle_search_bar_visibility(struct nsgtk_scaffolding *g)
nserror nsgtk_scaffolding_position_local_history(struct nsgtk_scaffolding *gs)
Position the local-history popup in the right place.
Definition: scaffolding.c:1600
nserror nsgtk_scaffolding_throbber(struct gui_window *gw, bool active)
Update scaffolding window when throbber state changes.
Definition: scaffolding.c:1271
void nsgtk_scaffolding_set_top_level(struct gui_window *g)
Set the current active top level gui window.
Definition: scaffolding.c:1349
GtkMenuBar * nsgtk_scaffolding_menu_bar(struct nsgtk_scaffolding *g)
Definition: scaffolding.c:1323
struct gui_window * nsgtk_scaffolding_top_level(struct nsgtk_scaffolding *g)
Definition: scaffolding.c:1342
GtkWindow * nsgtk_scaffolding_window(struct nsgtk_scaffolding *g)
Get the gtk window for a scaffolding.
Definition: scaffolding.c:1310
nserror nsgtk_scaffolding_destroy_all(void)
causes all scaffolding windows to be destroyed.
Definition: scaffolding.c:1288
nserror nsgtk_scaffolding_position_page_info(struct nsgtk_scaffolding *gs, struct nsgtk_pi_window *win)
Position the page-info popup in the right place.
Definition: scaffolding.c:1593
struct nsgtk_scaffolding * nsgtk_scaffolding_from_notebook(GtkNotebook *notebook)
find which scaffolding contains a gtk notebook
Definition: scaffolding.c:1482
void nsgtk_scaffolding_context_menu(struct nsgtk_scaffolding *g, gdouble x, gdouble y)
Open a context sensitive menu.
Definition: scaffolding.c:1429
struct nsgtk_scaffolding * nsgtk_current_scaffolding(void)
Obtain the most recently used scaffolding element.
Definition: scaffolding.c:1473
struct nsgtk_scaffolding * nsgtk_scaffolding_iterate(struct nsgtk_scaffolding *g)
Iterate through available scaffolding.
Definition: scaffolding.c:1332
struct nsurl nsurl
NetSurf URL object.
Definition: nsurl.h:31
RISC OS wimp toolkit bitmap.
Definition: bitmap.c:68
Graphical user interface browser web search function table.
Definition: searchweb.h:34
first entry in window list
Definition: gui.c:298
High-level cache handle.
Definition: hlcache.c:66
GTK certificate viewing window context.
Definition: page_info.c:47
Core scaffolding structure.
Definition: scaffolding.c:64
GtkNotebook * notebook
tab widget holding displayed pages
Definition: scaffolding.c:78