summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2012-12-06 01:38:49 +0100
committerOle Loots <ole@monochrom.net>2012-12-06 01:38:49 +0100
commitc4b09a8439c3465354aa7c8545ed54d099eb17fa (patch)
tree923cd2da4e94f30eff985d42eac74ba7c624854c
parent5d2ac2ecace0971ce2737f4169b62b56a2ca3a2a (diff)
downloadnetsurf-c4b09a8439c3465354aa7c8545ed54d099eb17fa.tar.gz
netsurf-c4b09a8439c3465354aa7c8545ed54d099eb17fa.tar.bz2
Removed global_evnt.c module.
-rw-r--r--atari/Makefile.target4
-rwxr-xr-xatari/browser.c1
-rw-r--r--atari/deskmenu.c8
-rwxr-xr-xatari/gui.c17
-rwxr-xr-xatari/misc.c2
-rwxr-xr-xatari/rootwin.c19
-rwxr-xr-xatari/statusbar.c2
-rw-r--r--atari/toolbar.c6
8 files changed, 22 insertions, 37 deletions
diff --git a/atari/Makefile.target b/atari/Makefile.target
index 9faa52d66..616fa5ab8 100644
--- a/atari/Makefile.target
+++ b/atari/Makefile.target
@@ -76,6 +76,7 @@ LDFLAGS += -L$(GCCSDK_INSTALL_ENV)/lib
S_ATARI := gui.c \
findfile.c \
filetype.c \
+ font.c \
misc.c \
bitmap.c \
schedule.c \
@@ -86,14 +87,13 @@ S_ATARI := gui.c \
treeview.c \
hotlist.c \
history.c\
- search.c font.c \
+ search.c \
redrawslots.c \
encoding.c \
rootwin.c \
toolbar.c \
statusbar.c \
browser.c \
- global_evnt.c \
osspec.c \
system_colour.c \
ctxmenu.c \
diff --git a/atari/browser.c b/atari/browser.c
index fb0e6739c..83fcb43c3 100755
--- a/atari/browser.c
+++ b/atari/browser.c
@@ -47,7 +47,6 @@
#include "atari/gui.h"
#include "atari/rootwin.h"
#include "atari/misc.h"
-#include "atari/global_evnt.h"
#include "atari/res/netsurf.rsh"
#include "atari/redrawslots.h"
#include "atari/browser.h"
diff --git a/atari/deskmenu.c b/atari/deskmenu.c
index 568d7a9e4..646a09c05 100644
--- a/atari/deskmenu.c
+++ b/atari/deskmenu.c
@@ -7,8 +7,7 @@
#include "desktop/browser.h"
#include "desktop/browser_private.h"
#include "desktop/options.h"
-#include "desktop/save_complete.h"
-
+#include "desktop/save_complete.h"
#include "atari/res/netsurf.rsh"
#include "atari/gemtk/gemtk.h"
#include "atari/deskmenu.h"
@@ -19,8 +18,9 @@
#include "atari/search.h"
#include "atari/misc.h"
#include "atari/gui.h"
-#include "atari/findfile.h"
#include "atari/browser.h"
+#include "atari/findfile.h"
+
#include "atari/rootwin.h"
typedef void __CDECL (*menu_evnt_func)(short item, short title, void * data);
@@ -364,7 +364,7 @@ static void __CDECL menu_stop(short item, short title, void *data)
if( input_window == NULL )
return;
- assert(input_window->root);
+ assert(input_window && input_window->root);
toolbar_stop_click(input_window->root->toolbar);
}
diff --git a/atari/gui.c b/atari/gui.c
index e4fd08ce0..165fff65a 100755
--- a/atari/gui.c
+++ b/atari/gui.c
@@ -68,7 +68,6 @@
#include "atari/hotlist.h"
#include "atari/history.h"
#include "atari/login.h"
-#include "atari/global_evnt.h"
#include "atari/encoding.h"
#include "atari/res/netsurf.rsh"
#include "atari/plot/plot.h"
@@ -140,7 +139,7 @@ void gui_poll(bool active)
struct gui_window * g;
if( !active ) {
- if(input_window->root->redraw_slots.areas_used > 0){
+ if(input_window && input_window->root->redraw_slots.areas_used > 0){
window_process_redraws(input_window->root);
}
/* this suits for stuff with lower priority */
@@ -380,15 +379,6 @@ void gui_window_update_box(struct gui_window *gw, const struct rect *rect)
area.g_w = rect->x1 - rect->x0;
area.g_h = rect->y1 - rect->y0;
window_schedule_redraw_grect(gw->root, &area);
-/*
- int x0 = rect->x0 - b->scroll.current.x;
- int y0 = rect->y0 - b->scroll.current.y;
- int w,h;
- */
- //w = rect->x1 - rect->x0;
- //h = rect->y1 - rect->y0;
-
- //browser_schedule_redraw_rect( gw, x0, y0, w, h );
}
bool gui_window_get_scroll(struct gui_window *w, int *sx, int *sy)
@@ -443,7 +433,6 @@ void gui_window_update_extent(struct gui_window *gw)
);
window_update_back_forward(gw->root);
GRECT area;
- printf("update extent\n");
guiwin_get_grect(gw->root->win, GUIWIN_AREA_CONTENT, &area);
window_schedule_redraw_grect(gw->root, &area);
}
@@ -645,7 +634,6 @@ gui_window_set_icon(struct gui_window *g, hlcache_handle *icon)
bmp_icon = (icon != NULL) ? content_get_bitmap(icon) : NULL;
g->icon = bmp_icon;
-
if(input_window == g){
window_set_icon(g->root, bmp_icon);
}
@@ -885,8 +873,6 @@ void gui_quit(void)
struct gui_window * gw = window_list;
struct gui_window * tmp = window_list;
- unbind_global_events();
-
while( gw ) {
tmp = gw->next;
browser_window_destroy(gw->browser->bw);
@@ -1091,7 +1077,6 @@ static void gui_init2(int argc, char** argv)
menu_register( _AESapid, (char*)" NetSurf ");
}
guiwin_init();
- bind_global_events();
global_history_init();
hotlist_init();
toolbar_init();
diff --git a/atari/misc.c b/atari/misc.c
index 60678dc59..d0d4cd5c0 100755
--- a/atari/misc.c
+++ b/atari/misc.c
@@ -39,7 +39,7 @@
#include "content/fetch.h"
#include "atari/gui.h"
#include "atari/toolbar.h"
-#include "atari/browser.h"
+
#include "atari/misc.h"
#include "atari/encoding.h"
#include "atari/gemtk/gemtk.h"
diff --git a/atari/rootwin.c b/atari/rootwin.c
index 5dcb47f61..3a2af1c10 100755
--- a/atari/rootwin.c
+++ b/atari/rootwin.c
@@ -45,12 +45,12 @@
#include "atari/gemtk/gemtk.h"
#include "atari/gui.h"
#include "atari/rootwin.h"
-#include "atari/browser.h"
+
#include "atari/misc.h"
#include "atari/plot/plot.h"
-#include "atari/global_evnt.h"
+
#include "atari/res/netsurf.rsh"
-#include "atari/browser.h"
+
#include "atari/toolbar.h"
#include "atari/statusbar.h"
#include "atari/search.h"
@@ -58,6 +58,7 @@
#include "atari/encoding.h"
#include "atari/redrawslots.h"
#include "atari/toolbar.h"
+#include "atari/browser.h"
#include "atari/gemtk/gemtk.h"
extern struct gui_window *input_window;
@@ -116,12 +117,6 @@ static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
on_resized(data->rootwin);
break;
- case WM_ICONIFY:
- if( input_window->root == data->rootwin) {
- input_window = NULL;
- }
- break;
-
case WM_TOPPED:
case WM_NEWTOP:
case WM_UNICONIFY:
@@ -132,6 +127,7 @@ static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
// TODO: this needs to iterate through all gui windows and
// check if the rootwin is this window...
if (data->rootwin->active_gui_window != NULL) {
+ printf("destroy...\n");
browser_window_destroy(
data->rootwin->active_gui_window->browser->bw);
}
@@ -490,6 +486,7 @@ void window_set_icon(ROOTWIN *rootwin, struct bitmap * bmp )
if (rootwin->icon != NULL) {
short info, dummy;
if (guiwin_get_state(rootwin->win) & GW_STATUS_ICONIFIED) {
+ printf("set & redraw\n");
window_redraw_favicon(rootwin, NULL);
}
}
@@ -550,6 +547,8 @@ void window_redraw_favicon(ROOTWIN *rootwin, GRECT *clip)
assert(rootwin);
+ printf("window_redraw_favicon: root: %p, win: %p\n", rootwin, rootwin->win);
+
guiwin_clear(rootwin->win);
guiwin_get_grect(rootwin->win, GUIWIN_AREA_WORK, &work);
@@ -562,6 +561,7 @@ void window_redraw_favicon(ROOTWIN *rootwin, GRECT *clip)
}
if (rootwin->icon == NULL) {
+ printf("window_redraw_favicon OBJCTREE\n");
OBJECT * tree = get_tree(ICONIFY);
tree->ob_x = work.g_x;
tree->ob_y = work.g_y;
@@ -570,6 +570,7 @@ void window_redraw_favicon(ROOTWIN *rootwin, GRECT *clip)
objc_draw(tree, 0, 8, clip->g_x, clip->g_y, clip->g_w, clip->g_h);
} else {
// TODO: consider the clipping rectangle
+ printf("window_redraw_favicon image %p\n", rootwin->icon);
struct rect work_clip = { 0,0,work.g_w,work.g_h };
int xoff=0;
if (work.g_w > work.g_h) {
diff --git a/atari/statusbar.c b/atari/statusbar.c
index d76cf6365..bf241e2dc 100755
--- a/atari/statusbar.c
+++ b/atari/statusbar.c
@@ -40,7 +40,7 @@
#include "atari/statusbar.h"
#include "atari/rootwin.h"
#include "atari/misc.h"
-#include "atari/global_evnt.h"
+
#include "atari/res/netsurf.rsh"
#include "atari/plot/plot.h"
#include "atari/osspec.h"
diff --git a/atari/toolbar.c b/atari/toolbar.c
index 40cee808f..c6bd74568 100644
--- a/atari/toolbar.c
+++ b/atari/toolbar.c
@@ -43,10 +43,10 @@
#include "atari/gui.h"
#include "atari/toolbar.h"
#include "atari/rootwin.h"
-#include "atari/browser.h"
+
#include "atari/clipboard.h"
#include "atari/misc.h"
-#include "atari/global_evnt.h"
+#include "atari/browser.h"
#include "atari/plot/plot.h"
#include "cflib.h"
#include "atari/res/netsurf.rsh"
@@ -54,7 +54,7 @@
#include "desktop/textarea.h"
#include "desktop/textinput.h"
#include "content/hlcache.h"
-#include "atari/browser.h"
+
#define TB_BUTTON_WIDTH 32
#define THROBBER_WIDTH 32