NetSurf
rootwin.h
Go to the documentation of this file.
1/*
2 * Copyright 2010 Ole Loots <ole@monochrom.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 NS_ATARI_BROWSER_WIN_H
20#define NS_ATARI_BROWSER_WIN_H
21
22#include <atari/gui.h>
23
24#define GEMTK_WM_VISIBLE(gw) (gw->root->handle->status & WS_OPEN)
25#define GEMWIN_VISIBLE(win) (win->status & WS_OPEN)
26
27#define WIDGET_STATUSBAR 0x1
28#define WIDGET_TOOLBAR 0x2
29#define WIDGET_SCROLL 0x4
30#define WIDGET_RESIZE 0x8
31#define WIN_TOP 0x100
32
39};
40
41
42/* -------------------------------------------------------------------------- */
43/* Public module functions: */
44/* -------------------------------------------------------------------------- */
45
46/* Creates an normal Browser window with [toolbar], [statusbar] */
47int window_create(struct gui_window * gw,
48 struct browser_window * bw,
49 struct gui_window * existing,
50 unsigned long flags );
51/* Destroys WinDom part of gui_window */
52int window_destroy(ROOTWIN *rootwin);
53
54/** show the window at specified position and make gw the active tab. */
55void window_open(ROOTWIN *rootwin, struct gui_window *gw, GRECT pos);
56
57void window_snd_redraw(ROOTWIN *rootwin, short x, short y, short w, short h );
58/* Update Shade / Unshade state of the fwd/back buttons*/
59void window_update_back_forward(struct s_gui_win_root * rootwin);
60/* set root browser component: */
62
63/* set focus element */
65 void * element );
66/* Shade / Unshade the forward/back bt. of toolbar, depending on history.*/
68 void * element);
70void window_set_url(ROOTWIN *rootwin, const char * text);
71void window_set_stauts(ROOTWIN *rootwin, char * text);
72void window_set_title(ROOTWIN *rootwin, char * text);
73void window_set_content_size(ROOTWIN *rootwin, int w, int h);
74void window_set_icon(ROOTWIN *rootwin, struct bitmap * bmp );
75void window_set_active_gui_window(ROOTWIN *rootwin, struct gui_window *gw);
77void window_open_search(ROOTWIN *rootwin, bool reformat);
78void window_close_search(ROOTWIN *rootwin);
79void window_scroll_by(ROOTWIN *rootwin, int x, int y);
80void window_schedule_redraw_grect(ROOTWIN *rootwin, GRECT *area);
81void window_process_redraws(ROOTWIN * rootwin);
82void window_place_caret(ROOTWIN *rootwin, short mode, int content_x,
83 int content_y, int h, GRECT *work);
85void window_get_scroll(ROOTWIN *rootwin, int *x, int *y);
86void window_get_grect(ROOTWIN *rootwin, enum browser_area_e which, GRECT *d);
87void window_redraw_favicon(struct s_gui_win_root * rootwin, GRECT *clip);
88void window_unref_gui_window(ROOTWIN *rootwin, struct gui_window *gw);
89bool window_key_input(unsigned short kcode, unsigned short kstate,
90 unsigned short nkc);
91
92
93/* -------------------------------------------------------------------------- */
94/* Public event handlers: */
95/* -------------------------------------------------------------------------- */
96
97#endif
focus_element_type
Definition: gui.h:80
static os_mode mode
The current sprite mode.
Definition: buffer.c:72
const char * type
Definition: filetype.cpp:44
void window_set_content_size(ROOTWIN *rootwin, int w, int h)
Set the dimensions of the scrollable content.
Definition: rootwin.c:481
void window_get_scroll(ROOTWIN *rootwin, int *x, int *y)
Definition: rootwin.c:591
void window_restore_active_gui_window(ROOTWIN *rootwin)
Definition: rootwin.c:404
void window_update_back_forward(struct s_gui_win_root *rootwin)
Definition: rootwin.c:433
browser_area_e
Definition: rootwin.h:33
@ BROWSER_AREA_CONTENT
Definition: rootwin.h:34
@ BROWSER_AREA_URL_INPUT
Definition: rootwin.h:37
@ BROWSER_AREA_STATUSBAR
Definition: rootwin.h:35
@ BROWSER_AREA_TOOLBAR
Definition: rootwin.h:36
@ BROWSER_AREA_SEARCH
Definition: rootwin.h:38
void window_set_active_gui_window(ROOTWIN *rootwin, struct gui_window *gw)
Definition: rootwin.c:564
void window_set_icon(ROOTWIN *rootwin, struct bitmap *bmp)
Definition: rootwin.c:553
bool window_url_widget_has_focus(ROOTWIN *rootwin)
Definition: rootwin.c:531
struct gui_window * window_get_active_gui_window(ROOTWIN *rootwin)
Definition: rootwin.c:586
void window_scroll_by(ROOTWIN *rootwin, int x, int y)
Definition: rootwin.c:459
void window_schedule_redraw_grect(ROOTWIN *rootwin, GRECT *area)
Definition: rootwin.c:807
void window_set_focus(ROOTWIN *rootwin, enum focus_element_type type, void *element)
Definition: rootwin.c:498
void window_unref_gui_window(ROOTWIN *rootwin, struct gui_window *gw)
Definition: rootwin.c:312
void window_set_title(ROOTWIN *rootwin, char *text)
Definition: rootwin.c:454
void window_redraw_favicon(struct s_gui_win_root *rootwin, GRECT *clip)
Redraw the favicon.
Definition: rootwin.c:707
void window_open_search(ROOTWIN *rootwin, bool reformat)
Definition: rootwin.c:649
void window_close_search(ROOTWIN *rootwin)
Definition: rootwin.c:680
bool window_widget_has_focus(ROOTWIN *rootwin, enum focus_element_type t, void *element)
Definition: rootwin.c:542
void window_get_grect(ROOTWIN *rootwin, enum browser_area_e which, GRECT *d)
Definition: rootwin.c:601
void window_place_caret(ROOTWIN *rootwin, short mode, int content_x, int content_y, int h, GRECT *work)
Definition: rootwin.c:875
bool window_key_input(unsigned short kcode, unsigned short kstate, unsigned short nkc)
void window_set_stauts(ROOTWIN *rootwin, char *text)
Definition: rootwin.c:439
int window_create(struct gui_window *gw, struct browser_window *bw, struct gui_window *existing, unsigned long flags)
Definition: rootwin.c:225
void window_set_url(ROOTWIN *rootwin, const char *text)
void window_open(ROOTWIN *rootwin, struct gui_window *gw, GRECT pos)
show the window at specified position and make gw the active tab.
Definition: rootwin.c:375
void window_snd_redraw(ROOTWIN *rootwin, short x, short y, short w, short h)
int window_destroy(ROOTWIN *rootwin)
Definition: rootwin.c:336
void window_process_redraws(ROOTWIN *rootwin)
Definition: rootwin.c:1015
void window_attach_browser(ROOTWIN *rootwin, CMP_BROWSER b)
RISC OS wimp toolkit bitmap.
Definition: bitmap.c:68
Browser window data.
first entry in window list
Definition: gui.c:296
Definition: gui.h:136
static nserror text(const struct redraw_context *ctx, const struct plot_font_style *fstyle, int x, int y, const char *text, size_t length)
Text plotting.
Definition: plot.c:978
static nserror clip(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.
Definition: plot.c:357