summaryrefslogtreecommitdiff
path: root/atari/gemtk
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2012-11-22 01:19:20 +0100
committerOle Loots <ole@monochrom.net>2012-11-22 01:19:20 +0100
commit407389668b4806de585c5ab26b9e49d1bd92afab (patch)
treecb684a3fd8d1ae336e06795feba5d32d7680f9f1 /atari/gemtk
parent42cb583842ccc33b71cf0f9304ceebde1b51eaa3 (diff)
downloadnetsurf-407389668b4806de585c5ab26b9e49d1bd92afab.tar.gz
netsurf-407389668b4806de585c5ab26b9e49d1bd92afab.tar.bz2
Hotlist now works without windom.
Diffstat (limited to 'atari/gemtk')
-rw-r--r--atari/gemtk/gemtk.h8
-rw-r--r--atari/gemtk/guiwin.c16
2 files changed, 14 insertions, 10 deletions
diff --git a/atari/gemtk/gemtk.h b/atari/gemtk/gemtk.h
index 51844519f..6c590b5a3 100644
--- a/atari/gemtk/gemtk.h
+++ b/atari/gemtk/gemtk.h
@@ -62,6 +62,8 @@ short msg_box_show(short type, const char * msg);
#define GW_FLAG_CUSTOM_TOOLBAR 0x08 // no internal toolbar handling
#define GW_FLAG_CUSTOM_SCROLLING 0x10 // no internal scroller handling
+#define GW_FLAG_DEFAULTS (GW_FLAG_PREPROC_WM | GW_FLAG_RECV_PREPROC_WM)
+
#define GW_STATUS_ICONIFIED 0x01
#define GW_STATUS_SHADED 0x02
@@ -78,8 +80,8 @@ struct guiwin_scroll_info_s {
int y_unit_px;
int x_pos;
int y_pos;
- int x_pos_max;
- int y_pos_max;
+ int x_units;
+ int y_units;
};
enum guwin_area_e {
@@ -110,7 +112,7 @@ bool guiwin_update_slider(GUIWIN *win, short mode);
void guiwin_send_redraw(GUIWIN *win, GRECT *area);
VdiHdl guiwin_get_vdi_handle(GUIWIN *win);
bool guiwin_has_intersection(GUIWIN *win, GRECT *work);
-
+void guiwin_toolbar_redraw(GUIWIN *gw, GRECT *clip);
/*
diff --git a/atari/gemtk/guiwin.c b/atari/gemtk/guiwin.c
index 172585095..aeace7c9c 100644
--- a/atari/gemtk/guiwin.c
+++ b/atari/gemtk/guiwin.c
@@ -314,6 +314,7 @@ short guiwin_dispatch_event(EVMULT_IN *ev_in, EVMULT_OUT *ev_out, short msg[8])
{
GUIWIN *dest;
short retval = 0;
+ bool handler_called = false;
if( (ev_out->emo_events & MU_MESAG) != 0 ) {
DEBUG_PRINT(("guiwin_handle_event_multi_fast: %d\n", msg[0]));
@@ -346,10 +347,12 @@ short guiwin_dispatch_event(EVMULT_IN *ev_in, EVMULT_OUT *ev_out, short msg[8])
retval = preproc_wm(dest, ev_out, msg);
if(((retval == 0)||(dest->flags&GW_FLAG_RECV_PREPROC_WM))) {
retval = dest->handler_func(dest, ev_out, msg);
+ handler_called = true;
}
} else {
if (dest->handler_func) {
retval = dest->handler_func(dest, ev_out, msg);
+ handler_called = true;
}
}
@@ -396,13 +399,13 @@ short guiwin_dispatch_event(EVMULT_IN *ev_in, EVMULT_OUT *ev_out, short msg[8])
short oldevents = ev_out->emo_events;
ev_out->emo_events = MU_MESAG;
dest->handler_func(dest, ev_out, msg_out);
+ handler_called=true;
ev_out->emo_events = oldevents;
retval = 1;
- } else {
- dest->handler_func(dest, ev_out, msg);
}
}
- } else if(ev_out->emo_events & MU_KEYBD) {
+ }
+ if (handler_called==false) {
dest->handler_func(dest, ev_out, msg);
}
}
@@ -457,11 +460,10 @@ GUIWIN * guiwin_add(short handle, uint32_t flags, guiwin_event_handler_f cb)
GUIWIN *guiwin_find(short handle)
{
GUIWIN *g;
- DEBUG_PRINT(("guiwin_find: handle: %d\n", handle));
+ DEBUG_PRINT(("guiwin search handle: %d\n", handle));
for( g = winlist; g != NULL; g=g->next ) {
- DEBUG_PRINT(("guiwin search: %d\n", g->handle));
if(g->handle == handle) {
- DEBUG_PRINT(("guiwin_find: %p\n", g));
+ DEBUG_PRINT(("guiwin found handle: %p\n", g));
return(g);
}
}
@@ -496,7 +498,7 @@ short guiwin_remove(GUIWIN *win)
if (win->next != NULL) {
win->next->prev = win->prev;
}
-
+ DEBUG_PRINT(("guiwin free: %p\n", win));
free(win);
return(0);
}