NetSurf
gui.h
Go to the documentation of this file.
1/*
2 * Copyright 2008 Vincent Sanders <vince@simtec.co.uk>
3 * Copyright 2009 Mark Benjamin <netsurf-browser.org.MarkBenjamin@dfgh.net>
4 *
5 * This file is part of NetSurf, http://www.netsurf-browser.org/
6 *
7 * NetSurf is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * NetSurf is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef NETSURF_WINDOWS_GUI_H
21#define NETSURF_WINDOWS_GUI_H
22
23struct gui_window;
24
25/**
26 * win32 application instance handle.
27 *
28 * This handle is set in the main windows entry point.
29 */
30extern HINSTANCE hinst;
31
32/**
33 * path to where all user config files are held.
34 */
35extern char *G_config_path;
36
37/**
38 * resource search path vector.
39 */
40extern char **G_resource_pathv;
41
42/* bounding box */
43typedef struct bbox_s {
44 int x0;
45 int y0;
46 int x1;
47 int y1;
49
50/**
51 * Run the win32 message loop with scheduling
52 */
53void win32_run(void);
54
55/**
56 * cause the main message loop to exit
57 */
58void win32_set_quit(bool q);
59
60/**
61 * Warn the user of an event.
62 *
63 * \param[in] warning A warning looked up in the message translation table
64 * \param[in] detail Additional text to be displayed or NULL.
65 * \return NSERROR_OK on success or error code if there was a
66 * faliure displaying the message to the user.
67 */
68nserror win32_warning(const char *warning, const char *detail);
69
70/**
71 * Warn the user of an unexpected nserror.
72 *
73 * \param[in] error The nserror to report
74 * \param[in] detail Additional text to be displayed or NULL.
75 * \return NSERROR_OK on success or error code if there was a
76 * faliure displaying the message to the user.
77 */
78nserror win32_report_nserror(nserror error, const char *detail);
79
80/**
81 * add a modeless dialog to the special handling list
82 */
83nserror nsw32_add_dialog(HWND hwndDlg);
84
85/**
86 * remove a modeless dialog from the special handling list
87 */
88nserror nsw32_del_dialog(HWND hwndDlg);
89
90
91#endif
nserror
Enumeration of error codes.
Definition: errors.h:29
struct nsfb_bbox_s bbox_t
Definition: gui.h:28
Definition: gui.h:43
int x0
Definition: gui.h:44
int y1
Definition: gui.h:47
int y0
Definition: gui.h:45
int x1
Definition: gui.h:46
first entry in window list
Definition: gui.c:298
char ** G_resource_pathv
resource search path vector.
Definition: gui.c:48
char * G_config_path
path to where all user config files are held.
Definition: gui.c:51
nserror nsw32_del_dialog(HWND hwndDlg)
remove a modeless dialog from the special handling list
Definition: gui.c:79
nserror win32_warning(const char *warning, const char *detail)
Warn the user of an event.
Definition: gui.c:173
nserror nsw32_add_dialog(HWND hwndDlg)
add a modeless dialog to the special handling list
Definition: gui.c:63
void win32_run(void)
Run the win32 message loop with scheduling.
Definition: gui.c:130
nserror win32_report_nserror(nserror error, const char *detail)
Warn the user of an unexpected nserror.
Definition: gui.c:187
void win32_set_quit(bool q)
cause the main message loop to exit
Definition: gui.c:124
HINSTANCE hinst
win32 application instance handle.
Definition: gui.c:45