47#include "atari/res/netsurf.rsh"
48#include "atari/gemtk/gemtk.h"
89 .background_images =
true,
93static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out,
short msg[8])
97 static bool prev_url =
false;
102 if ((ev_out->emo_events & MU_MESAG) != 0) {
108 NSLOG(netsurf, INFO,
"WM_REDRAW");
116 NSLOG(netsurf, INFO,
"WM_SIZED");
125 gemtk_wm_send_msg(tmp->
root->
win, WM_TOPPED, 0, 0, 0, 0);
135 NSLOG(netsurf, INFO,
"WM_TOPPED");
146 NSLOG(netsurf, INFO,
"WM_CLOSED initiated destroy for bw %p",
165 if ((ev_out->emo_events & MU_KEYBD) != 0) {
168 uint16_t nkc = gem_to_norm( (
short)ev_out->emo_kmeta,
169 (
short)ev_out->emo_kreturn);
170 NSLOG(netsurf, INFO,
"rootwin MU_KEYBD input, nkc: %x\n", nkc);
175 if ((ev_out->emo_events & MU_BUTTON) != 0) {
177 "rootwin MU_BUTTON input, x: %d, y: %d\n",
178 ev_out->emo_mouse.p_x,
179 ev_out->emo_mouse.p_x);
182 if (POINT_WITHIN(ev_out->emo_mouse.p_x, ev_out->emo_mouse.p_y,
187 if ((ev_out->emo_events & (MU_M1)) != 0) {
189 short ghandle = wind_find(ev_out->emo_mouse.p_x, ev_out->emo_mouse.p_y);
196 if (POINT_WITHIN(ev_out->emo_mouse.p_x, ev_out->emo_mouse.p_y,
202 if (POINT_WITHIN(ev_out->emo_mouse.p_x, ev_out->emo_mouse.p_y,
228 unsigned long inflags)
234 struct gemtk_wm_scroll_info_s *slid;
239 flags = CLOSER | MOVER | NAME | FULLER | SMALLER;
241 flags |= (UPARROW | DNARROW | LFARROW | RTARROW | VSLIDE | HSLIDE);
251 if (gw->
root == NULL)
266 GEMTK_WM_FLAG_PREPROC_WM | GEMTK_WM_FLAG_RECV_PREPROC_WM,
handle_event);
270 gemtk_wm_set_user_data(gw->
root->
win, (
void*)data);
271 slid = gemtk_wm_get_scroll_info(gw->
root->
win);
272 slid->y_unit_px = 32;
273 slid->x_unit_px = 32;
317 NSLOG(netsurf, INFO,
"window: %p, gui_window: %p", rootwin, gw);
322 if(w->
root == rootwin && w != gw) {
323 NSLOG(netsurf, INFO,
"activating next tab %p", w);
341 assert(rootwin != NULL);
343 NSLOG(netsurf, INFO,
"%p", rootwin);
345 if (gemtk_wm_get_user_data(rootwin->
win) != NULL) {
346 free(gemtk_wm_get_user_data(rootwin->
win));
352 if(w->
root == rootwin) {
353 assert(rootwin == NULL);
365 free(rootwin->
title);
367 gemtk_wm_remove(rootwin->
win);
383 wind_open(rootwin->
aes_handle, pos.g_x, pos.g_y, pos.g_w, pos.g_h );
384 wind_set_str(rootwin->
aes_handle, WF_NAME, (
char *)
"");
392 gemtk_wm_get_grect(rootwin->
win, GEMTK_WM_AREA_TOOLBAR, &g);
409 NSLOG(netsurf, INFO,
"rootwin %p", rootwin);
424 gemtk_wm_set_toolbar_size(rootwin->
win, tb_area.g_h);
441 assert(rootwin != NULL);
461 struct gemtk_wm_scroll_info_s *slid = gemtk_wm_get_scroll_info(
root->win);
469 int xunits = sx / slid->x_unit_px;
470 int yunits = sy / slid->y_unit_px;
472 gemtk_wm_scroll(
root->win, GEMTK_WM_VSLIDER, yunits - slid->y_pos,
false);
473 gemtk_wm_scroll(
root->win, GEMTK_WM_HSLIDER, xunits - slid->x_pos,
false);
474 gemtk_wm_update_slider(
root->win, GEMTK_WM_VH_SLIDER);
484 struct gemtk_wm_scroll_info_s *slid = gemtk_wm_get_scroll_info(rootwin->
win);
488 slid->x_units = (
width/slid->x_unit_px);
489 slid->y_units = (
height/slid->y_unit_px);
490 if(slid->x_units < slid->x_pos)
492 if(slid->y_units < slid->y_pos)
494 gemtk_wm_update_slider(rootwin->
win, GEMTK_WM_VH_SLIDER);
501 assert(rootwin != NULL);
504 NSLOG(netsurf, INFO,
"Set focus: %p (%d)\n", element,
type);
520 gemtk_wm_set_toolbar_edit_obj(rootwin->
win, TOOLBAR_TB_SRCH, 0);
533 assert(rootwin != NULL);
545 assert(rootwin != NULL);
546 if( element == NULL ) {
557 if (rootwin->
icon != NULL) {
558 if (gemtk_wm_get_state(rootwin->
win) & GEMTK_WM_STATUS_ICONIFIED) {
568 NSLOG(netsurf, INFO,
"gw %p", gw);
572 NSLOG(netsurf, INFO,
"nothing to do...");
580 if (old_gw != NULL) {
581 NSLOG(netsurf, INFO,
"restoring window...");
593 struct gemtk_wm_scroll_info_s *slid;
595 slid = gemtk_wm_get_scroll_info(rootwin->
win);
597 *x = slid->x_pos * slid->x_unit_px;
598 *y = slid->y_pos * slid->y_unit_px;
617 gemtk_wm_get_grect(rootwin->
win, GEMTK_WM_AREA_WORK, d);
620 d->g_y += tb_area.g_h;
621 d->g_h -= tb_area.g_h;
656 NSLOG(netsurf, INFO,
"rootwin %p", rootwin);
668 gemtk_wm_set_toolbar_size(rootwin->
win, area.g_h);
699 gemtk_wm_set_toolbar_size(rootwin->
win, area.g_h);
709 GRECT work, visible,
clip;
715 gemtk_wm_clear(rootwin->
win);
716 gemtk_wm_get_grect(rootwin->
win, GEMTK_WM_AREA_WORK, &work);
718 if (clip_ro == NULL) {
722 if(!rc_intersect(&work, &
clip)) {
730 if (rootwin->
icon == NULL) {
733 OBJECT * tree = gemtk_obj_get_tree(ICONIFY);
734 tree->ob_x = work.g_x;
735 tree->ob_y = work.g_y;
736 tree->ob_width = work.g_w;
737 tree->ob_height = work.g_h;
739 wind_get_grect(rootwin->
aes_handle, WF_FIRSTXYWH, &visible);
740 while (visible.g_h > 0 && visible.g_w > 0) {
742 if (rc_intersect(&
clip, &visible)) {
744 objc_draw(tree, 0, 8, visible.g_x, visible.g_y, visible.g_w,
750 wind_get_grect(rootwin->
aes_handle, WF_NEXTXYWH, &visible);
759 if (work.g_w > work.g_h) {
760 xoff = ((work.g_w-work.g_h)/2);
769 wind_get_grect(rootwin->
aes_handle, WF_FIRSTXYWH, &visible);
770 while (visible.g_h > 0 && visible.g_w > 0) {
772 if (rc_intersect(&
clip, &visible)) {
777 pxy[0] = visible.g_x;
778 pxy[1] = visible.g_y;
779 pxy[2] = pxy[0] + visible.g_w-1;
780 pxy[3] = pxy[1] + visible.g_h-1;
781 vs_clip(plot_vdi_handle, 1, (
short*)&pxy);
796 wind_get_grect(rootwin->
aes_handle, WF_NEXTXYWH, &visible);
814 gemtk_wm_get_grect(rootwin->
win, GEMTK_WM_AREA_WORK, &work);
815 if(!rc_intersect(area, &work))
825 struct gemtk_wm_scroll_info_s * slid,
829 struct rect redraw_area;
830 GRECT content_area_rel;
831 float oldscale = 1.0;
837 content_area->g_x, content_area->g_y,
838 content_area->g_w, content_area->g_h);
842 content_area_rel.g_x =
clip->g_x - content_area->g_x;
843 content_area_rel.g_y =
clip->g_y - content_area->g_y;
844 content_area_rel.g_w =
clip->g_w;
845 content_area_rel.g_h =
clip->g_h;
847 if (content_area_rel.g_x < 0) {
848 content_area_rel.g_w += content_area_rel.g_x;
849 content_area_rel.g_x = 0;
852 if (content_area_rel.g_y < 0) {
853 content_area_rel.g_h += content_area_rel.g_y;
854 content_area_rel.g_y = 0;
859 redraw_area.
x0 = content_area_rel.g_x;
860 redraw_area.
y0 = content_area_rel.g_y;
861 redraw_area.
x1 = content_area_rel.g_x + content_area_rel.g_w;
862 redraw_area.
y1 = content_area_rel.g_y + content_area_rel.g_h;
876 int content_y,
int h, GRECT *work)
879 VdiHdl vh = gemtk_wm_get_vdi_handle(rootwin->
win);
881 GRECT mywork, caret_pos;
883 int scroll_x, scroll_y;
885 struct gemtk_wm_scroll_info_s *slid;
886 short colors[2] = {G_BLACK, G_WHITE};
887 bool render_required =
false;
902 slid = gemtk_wm_get_scroll_info(rootwin->
win);
904 scroll_x = slid->x_pos * slid->x_unit_px;
905 scroll_y = slid->y_pos * slid->y_unit_px;
912 pxy[2] = pxy[0] + work->g_w - 1;
913 pxy[3] = pxy[1] + work->g_h - 1;
917 if (caret->
symbol.fd_addr != NULL
920 caret_pos.g_x = work->g_x + (caret->
dimensions.g_x - scroll_x);
921 caret_pos.g_y = work->g_y + (caret->
dimensions.g_y - scroll_y);
925 if (rc_intersect(work, &caret_pos)) {
932 pxy[4] = caret_pos.g_x;
933 pxy[5] = caret_pos.g_y;
934 pxy[6] = pxy[4] + caret_pos.g_w-1;
935 pxy[7] = pxy[5] + caret_pos.g_h-1;
937 vrt_cpyfm(vh, MD_XOR, pxy, &caret->
symbol, &screen, colors);
942 caret->
state &= ~CARET_STATE_VISIBLE;
947 if (caret->
symbol.fd_addr == NULL) {
950 render_required =
true;
957 render_required =
true;
968 if (render_required) {
971 assert(caret->
symbol.fd_nplanes == 1);
972 assert(caret->
symbol.fd_w == 16);
975 fd_addr = (uint16_t*)caret->
symbol.fd_addr;
976 for(i = 0; i<caret->symbol.fd_h; i++) {
983 caret_pos.g_x = work->g_x + (content_x - scroll_x);
984 caret_pos.g_y = work->g_y + (content_y - scroll_y);
988 if (rc_intersect(work, &caret_pos) &&
redraw_active ==
false) {
995 pxy[4] = caret_pos.g_x;
996 pxy[5] = caret_pos.g_y;
997 pxy[6] = pxy[4] + caret_pos.g_w-1;
998 pxy[7] = pxy[5] + caret_pos.g_h-1;
1004 vrt_cpyfm(vh, MD_XOR, pxy, &caret->
symbol, &screen, colors);
1012 vs_clip(gemtk_wm_get_vdi_handle(rootwin->
win), 0, pxy);
1017 GRECT visible_ro, tb_area, content_area;
1019 short scroll_x=0, scroll_y=0;
1020 bool caret_rdrw_required =
false;
1021 struct gemtk_wm_scroll_info_s *slid =NULL;
1050 wind_get_grect(rootwin->
aes_handle, WF_FIRSTXYWH, &visible_ro);
1051 while (visible_ro.g_w > 0 && visible_ro.g_h > 0) {
1061 GRECT rdrw_area_ro = {
1070 if (!rc_intersect(&visible_ro, &rdrw_area_ro)) {
1073 GRECT rdrw_area = rdrw_area_ro;
1075 if (rc_intersect(&tb_area, &rdrw_area)) {
1079 rdrw_area = rdrw_area_ro;
1080 if (rc_intersect(&content_area, &rdrw_area)) {
1083 slid = gemtk_wm_get_scroll_info(rootwin->
win);
1085 scroll_x = slid->x_pos * slid->x_unit_px;
1086 scroll_y = slid->y_pos * slid->y_unit_px;
1096 caret_pos.g_x = content_area.g_x +
1098 caret_pos.g_y = content_area.g_y +
1103 if (gemtk_rc_intersect_ro(&caret_pos, &content_area)) {
1104 caret_rdrw_required =
true;
1110 wind_get_grect(rootwin->
aes_handle, WF_NEXTXYWH, &visible_ro);
1125 caret_h, &content_area);
1141 struct gemtk_wm_scroll_info_s *slid;
1149 slid = gemtk_wm_get_scroll_info(rootwin->
win);
1154 sx = slid->x_pos * slid->x_unit_px;
1155 sy = slid->y_pos * slid->y_unit_px;
1162 short dummy, mbut, mx, my;
1166 struct gemtk_wm_scroll_info_s *slid;
1199 slid = gemtk_wm_get_scroll_info(rootwin->
win);
1203 short rel_cur_x, rel_cur_y;
1204 short prev_x=sx_origin, prev_y=sy_origin;
1205 bool dragmode =
false;
1208 graf_mkstate(&rel_cur_x, &rel_cur_y, &mbut, &dummy);
1211 rel_cur_x = (rel_cur_x - cwork.g_x);
1212 rel_cur_y = (rel_cur_y - cwork.g_y);
1215 rel_cur_x + slid->x_pos * slid->x_unit_px,
1216 rel_cur_y + slid->y_pos * slid->y_unit_px);
1219 if( abs(prev_x-rel_cur_x) > 5 || abs(prev_y-rel_cur_y) > 5 ) {
1222 rel_cur_x + slid->x_pos * slid->x_unit_px,
1223 rel_cur_y + slid->y_pos * slid->y_unit_px);
1228 if( dragmode ==
false ) {
1230 rel_cur_x + slid->x_pos * slid->x_unit_px,
1231 rel_cur_y + slid->y_pos * slid->y_unit_px);
1243 graf_mkstate(&rel_cur_x, &rel_cur_y, &mbut, &dummy);
1244 rel_cur_x = (rel_cur_x - cwork.g_x);
1245 rel_cur_y = (rel_cur_y - cwork.g_y);
1246 }
while( mbut & 1 );
1248 rel_cur_x + slid->x_pos * slid->x_unit_px,
1249 rel_cur_y + slid->y_pos * slid->y_unit_px);
1258 sx_origin + slid->x_pos * slid->x_unit_px,
1259 sy_origin + slid->y_pos * slid->y_unit_px);
1262 sx_origin + slid->x_pos * slid->x_unit_px,
1263 sy_origin + slid->y_pos * slid->y_unit_px);
1279 unsigned char ascii = (nkc & 0xFF);
1297 struct gemtk_wm_scroll_info_s *slid = gemtk_wm_get_scroll_info(w);
1301 gemtk_wm_scroll(w, GEMTK_WM_HSLIDER, -(g.g_w/slid->x_unit_px),
1307 gemtk_wm_scroll(w, GEMTK_WM_HSLIDER, (g.g_w/slid->x_unit_px),
1313 gemtk_wm_scroll(w, GEMTK_WM_VSLIDER, -(g.g_h/slid->y_unit_px),
1319 gemtk_wm_scroll(w, GEMTK_WM_VSLIDER, (g.g_h/slid->y_unit_px),
1325 gemtk_wm_scroll(w, GEMTK_WM_HSLIDER, -1,
false);
1330 gemtk_wm_scroll(w, GEMTK_WM_HSLIDER, 1,
false);
1335 gemtk_wm_scroll(w, GEMTK_WM_VSLIDER, -1,
false);
1340 gemtk_wm_scroll(w, GEMTK_WM_VSLIDER, 1,
false);
1352 gemtk_wm_update_slider(w, GEMTK_WM_VSLIDER|GEMTK_WM_HSLIDER);
1378 obj[TOOLBAR_BT_SEARCH_FWD].ob_state &= ~OS_DISABLED;
1379 obj[TOOLBAR_BT_SEARCH_BACK].ob_state &= ~OS_DISABLED;
1381 gemtk_obj_screen_rect(obj, TOOLBAR_BT_SEARCH_FWD));
1383 gemtk_obj_screen_rect(obj, TOOLBAR_BT_SEARCH_BACK));
1386 return((done==
true) ? 1 : 0);
1392 GRECT
clip = {msg[4], msg[5], msg[6], msg[7]};
1396 if(gemtk_wm_get_state(rootwin->
win) & GEMTK_WM_STATUS_ICONIFIED) {
1418 wind_get_grect(rootwin->
aes_handle, WF_CURRXYWH, &g);
1419 gemtk_wm_get_grect(rootwin->
win, GEMTK_WM_AREA_WORK, &work);
1421 if (rootwin->
loc.g_w != g.g_w || rootwin->
loc.g_h != g.g_h) {
1430 if (rootwin->
loc.g_x != g.g_x || rootwin->
loc.g_y != g.g_y) {
1440 char file[DD_NAMEMAX];
1441 char name[DD_NAMEMAX];
1447 short mx,my,bmstat,mkstat;
1450 graf_mkstate(&mx, &my, &bmstat, &mkstat);
1457 if(gemtk_wm_get_state(rootwin->
win) & GEMTK_WM_STATUS_ICONIFIED)
1460 dd_hdl = gemtk_dd_open( msg[7], DD_OK);
1463 memset( ext, 0, 32);
1464 strcpy( ext,
"ARGS");
1465 dd_msg = gemtk_dd_sexts( dd_hdl, ext);
1468 dd_msg = gemtk_dd_rtry( dd_hdl, (
char*)&name[0], (
char*)&file[0], (
char*)&ext[0], &size);
1471 if( !strncmp( ext,
"ARGS", 4) && dd_msg > 0) {
1472 gemtk_dd_reply(dd_hdl, DD_OK);
1473 buff = (
char*)malloc(
sizeof(
char)*(size+1));
1475 if (Fread(dd_hdl, size, buff ) == size) {
1478 bool processed =
false;
1483 NSLOG(netsurf, INFO,
1484 "file: %s, ext: %s, size: %ld dropped at: %d,%d\n",
1494 mx = mx - content_area.g_x;
1495 my = my - content_area.g_y;
1496 if((mx < 0 || mx > content_area.g_w)
1497 || (my < 0 || my > content_area.g_h))
1503 if(processed ==
true) {
1511 NSLOG(netsurf, INFO,
1512 "utf8_from_local_encoding failed");
1523 if(processed ==
false) {
1525 if(gemtk_msg_box_show(GEMTK_MSG_BOX_CONFIRM,
"Open File?") > 0) {
1526 nsurl * ns_url = NULL;
1528 if ((tmp_url != NULL)
1544 gemtk_dd_close( dd_hdl);
1551 if (msg != WM_REDRAW) {
1552 ud = gemtk_wm_get_user_data(win);
static struct MinList * window_list
char * local_file_to_url(const char *filename)
void gui_set_input_gui_window(struct gui_window *gw)
#define CARET_STATE_VISIBLE
#define CARET_STATE_ENABLED
struct s_gem_cursors gem_cursors
void gem_set_cursor(MFORM_EX *cursor)
long nkc_to_input_key(short nkc, long *ucs4_out)
Convert NKC to netsurf input key code and/or to ucs4 (depends on keycode).
const struct plotter_table atari_plotters
atari plottr operation table
float plot_set_scale(float scale)
set scale of plotter.
VdiHdl plot_get_vdi_handle(void)
void plot_set_abs_clipping(const GRECT *area)
Subsequent calls to plot_clip will be clipped by the absolute clip.
bool plot_set_dimensions(const struct redraw_context *ctx, int x, int y, int w, int h)
Set plot origin and canvas size.
Browser window creation and manipulation interface.
nserror browser_window_navigate(struct browser_window *bw, struct nsurl *url, struct nsurl *referrer, enum browser_window_nav_flags flags, char *post_urlenc, struct fetch_multipart_data *post_multipart, struct hlcache_handle *parent)
Start fetching a page in a browser window.
bool browser_window_redraw(struct browser_window *bw, int x, int y, const struct rect *clip, const struct redraw_context *ctx)
Redraw an area of a window.
float browser_window_get_scale(struct browser_window *bw)
Gets the scale of a browser window.
bool browser_window_has_content(struct browser_window *bw)
Find out if a browser window is currently showing a content.
void browser_window_mouse_click(struct browser_window *bw, browser_mouse_state mouse, int x, int y)
Handle mouse clicks in a browser window.
void browser_window_destroy(struct browser_window *bw)
Close and destroy a browser window.
void browser_window_reformat(struct browser_window *bw, bool background, int width, int height)
Reformat a browser window contents to a new width or height.
bool browser_window_drop_file_at_point(struct browser_window *bw, int x, int y, char *file)
Drop a file onto a browser window at a particular point, or determine if a file may be dropped onto t...
@ BW_NAVIGATE_HISTORY
this will form a new history node (don't set for back/reload/etc)
void browser_window_mouse_track(struct browser_window *bw, browser_mouse_state mouse, int x, int y)
Handle non-click mouse action in a browser window.
static os_mode mode
The current sprite mode.
nserror
Enumeration of error codes.
@ NSERROR_BAD_ENCODING
The character set is unknown.
static struct directory * root
nserror utf8_from_local_encoding(const char *string, size_t len, char **result)
int init_mfdb(int bpp, int w, int h, uint32_t flags, MFDB *out)
setup an MFDB struct and allocate memory for it when it is needed.
Atari bitmap handling implementation.
#define MFDB_FLAG_ZEROMEM
#define MFDB_FLAG_NOALLOC
struct s_search_form_session * nsatari_search_session_create(OBJECT *obj, struct gui_window *gw)
void nsatari_search_session_destroy(struct s_search_form_session *s)
Core mouse and pointer states.
browser_mouse_state
Mouse state: 1 is primary mouse button.
@ BROWSER_MOUSE_PRESS_1
primary button pressed
@ BROWSER_MOUSE_CLICK_1
button 1 clicked.
@ BROWSER_MOUSE_MOD_2
2nd modifier key pressed (eg.
@ BROWSER_MOUSE_MOD_3
3rd modifier key pressed (eg.
@ BROWSER_MOUSE_MOD_1
1st modifier key pressed (eg.
@ BROWSER_MOUSE_DRAG_1
start of button 1 drag
@ BROWSER_MOUSE_DRAG_ON
a drag operation was started and a mouse button is still pressed
Target independent plotting interface.
Interface to key press operations.
bool browser_window_key_press(struct browser_window *bw, uint32_t key)
Handle key presses in a browser window.
#define NSLOG(catname, level, logmsg, args...)
NetSurf URL handling (interface).
nserror nsurl_create(const char *const url_s, nsurl **url)
Create a NetSurf URL object from a URL string.
void nsurl_unref(nsurl *url)
Drop a reference to a NetSurf URL object.
struct nsurl nsurl
NetSurf URL object.
NS_ATARI_SYSINFO atari_sysinfo
void redraw_slots_init(struct s_redrw_slots *slots, short size)
void redraw_slots_free(struct s_redrw_slots *slots)
void redraw_slot_schedule_grect(struct s_redrw_slots *slots, GRECT *area, bool force)
static bool on_content_keypress(struct gui_window *gw, unsigned short nkc)
void window_get_scroll(ROOTWIN *rootwin, int *x, int *y)
void window_restore_active_gui_window(ROOTWIN *rootwin)
void window_update_back_forward(struct s_gui_win_root *rootwin)
void window_set_active_gui_window(ROOTWIN *rootwin, struct gui_window *gw)
static void on_redraw(ROOTWIN *rootwin, short msg[8])
struct gui_window * input_window
void window_set_icon(ROOTWIN *rootwin, struct bitmap *bmp)
static void on_content_mouse_move(ROOTWIN *rootwin, GRECT *content_area)
struct gui_window * window_get_active_gui_window(ROOTWIN *rootwin)
void window_set_focus(struct s_gui_win_root *rootwin, enum focus_element_type type, void *element)
void window_schedule_redraw_grect(ROOTWIN *rootwin, GRECT *area)
static bool redraw_active
void window_scroll_by(ROOTWIN *root, int sx, int sy)
static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
static void window_redraw_content(ROOTWIN *rootwin, GRECT *content_area, GRECT *clip, struct gemtk_wm_scroll_info_s *slid, struct browser_window *bw)
void window_unref_gui_window(ROOTWIN *rootwin, struct gui_window *gw)
static void toolbar_redraw_cb(GUIWIN *win, uint16_t msg, GRECT *clip)
void window_redraw_favicon(ROOTWIN *rootwin, GRECT *clip_ro)
Redraw the favicon.
void window_set_title(struct s_gui_win_root *rootwin, char *title)
void window_set_content_size(ROOTWIN *rootwin, int width, int height)
Set the dimensions of the scrollable content.
int window_create(struct gui_window *gw, struct browser_window *bw, struct gui_window *existing, unsigned long inflags)
static const struct redraw_context rootwin_rdrw_ctx
bool gui_window_get_scroll(struct gui_window *w, int *sx, int *sy)
void window_open_search(ROOTWIN *rootwin, bool reformat)
void window_close_search(ROOTWIN *rootwin)
void window_get_grect(ROOTWIN *rootwin, enum browser_area_e which, GRECT *d)
static void on_resized(ROOTWIN *rootwin)
void window_place_caret(ROOTWIN *rootwin, short mode, int content_x, int content_y, int h, GRECT *work)
static short on_window_key_input(ROOTWIN *rootwin, unsigned short nkc)
bool window_url_widget_has_focus(struct s_gui_win_root *rootwin)
static void on_file_dropped(ROOTWIN *rootwin, short msg[8])
void window_open(ROOTWIN *rootwin, struct gui_window *gw, GRECT pos)
show the window at specified position and make gw the active tab.
void window_set_stauts(struct s_gui_win_root *rootwin, char *text)
bool window_widget_has_focus(struct s_gui_win_root *rootwin, enum focus_element_type t, void *element)
int window_destroy(ROOTWIN *rootwin)
void window_process_redraws(ROOTWIN *rootwin)
static void on_content_mouse_click(ROOTWIN *rootwin)
void sb_set_text(CMP_STATUSBAR sb, const char *text)
CMP_STATUSBAR sb_create(struct gui_window *gw)
void sb_attach(CMP_STATUSBAR sb, struct gui_window *gw)
void sb_destroy(CMP_STATUSBAR s)
Interface to utility string handling.
short aes_max_win_title_len
RISC OS wimp toolkit bitmap.
struct browser_window * bw
first entry in window list
struct gui_window * next
list for cleanup
struct s_search_form_session * search
struct s_gui_win_root * root
struct s_browser * browser
struct browser_window * bw
The 'content' window that is rendered in the gui_window.
nserror(* clip)(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.
nserror(* bitmap)(const struct redraw_context *ctx, struct bitmap *bitmap, int x, int y, int width, int height, colour bg, bitmap_flags_t flags)
Plot a bitmap.
const struct plotter_table * plot
Current plot operation table.
bool interactive
Redraw to show interactive features.
struct s_gui_win_root * rootwin
struct browser_window * bw
enum focus_element_type type
struct s_redrw_slots redraw_slots
struct s_focus_info focus
struct gui_window * active_gui_window
struct rect areas[MAX_REDRW_SLOTS]
short volatile areas_used
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.
static nserror clip(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.