summaryrefslogtreecommitdiff
path: root/atari/gemtk
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2012-12-04 01:32:43 +0100
committerOle Loots <ole@monochrom.net>2012-12-04 01:32:43 +0100
commit25db04a890e7493998abede078c6e0cc7a7fd734 (patch)
tree07680062fe1d79acde38d3b7b96ddd2f7caae8c8 /atari/gemtk
parent2c5b24d717613211ea4d9c805c19c12436397ec0 (diff)
downloadnetsurf-25db04a890e7493998abede078c6e0cc7a7fd734.tar.gz
netsurf-25db04a890e7493998abede078c6e0cc7a7fd734.tar.bz2
Dragged scrolling/mouse click events works fine now.
Diffstat (limited to 'atari/gemtk')
-rw-r--r--atari/gemtk/guiwin.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/atari/gemtk/guiwin.c b/atari/gemtk/guiwin.c
index 54d043e0d..1f962320d 100644
--- a/atari/gemtk/guiwin.c
+++ b/atari/gemtk/guiwin.c
@@ -471,8 +471,12 @@ void guiwin_scroll(GUIWIN *gw, short orientation, int units, bool refresh)
vis_units = g.g_h/slid->y_unit_px;
newpos = slid->y_pos = MIN(slid->y_units-vis_units,
MAX(0, slid->y_pos+units));
+ if(newpos < 0){
+ newpos = slid->y_pos = 0;
+ }
if(oldpos == newpos)
return;
+
if (units>=vis_units || guiwin_has_intersection(gw, &g_ro)) {
// send complete redraw
redraw = &g_ro;
@@ -502,6 +506,11 @@ void guiwin_scroll(GUIWIN *gw, short orientation, int units, bool refresh)
vis_units = g.g_w/slid->x_unit_px;
newpos = slid->x_pos = MIN(slid->x_units-vis_units,
MAX(0, slid->x_pos+units));
+
+ if(newpos < 0){
+ newpos = slid->x_pos = 0;
+ }
+
if(oldpos == newpos)
return;
if (units>=vis_units || guiwin_has_intersection(gw, &g_ro)) {
@@ -635,11 +644,30 @@ struct guiwin_scroll_info_s *guiwin_get_scroll_info(GUIWIN *win) {
return(&win->scroll_info);
}
+void guiwin_request_redraw(GUIWIN *win, GRECT *area)
+{
+
+}
+
void guiwin_send_redraw(GUIWIN *win, GRECT *area)
{
short msg[8];
GRECT work;
+ EVMULT_IN event_in = {
+ .emi_flags = MU_MESAG | MU_TIMER | MU_KEYBD | MU_BUTTON,
+ .emi_bclicks = 258,
+ .emi_bmask = 3,
+ .emi_bstate = 0,
+ .emi_m1leave = MO_ENTER,
+ .emi_m1 = {0,0,0,0},
+ .emi_m2leave = 0,
+ .emi_m2 = {0,0,0,0},
+ .emi_tlow = 0,
+ .emi_thigh = 0
+ };
+ EVMULT_OUT event_out;
+
if(area == NULL) {
guiwin_get_grect(win, GUIWIN_AREA_WORK, &work);
area = &work;
@@ -654,7 +682,10 @@ void guiwin_send_redraw(GUIWIN *win, GRECT *area)
msg[6] = area->g_w;
msg[7] = area->g_h;
- appl_write(gl_apid, 16, &msg);
+ event_out.emo_events = MU_MESAG;
+ win->handler_func(win, &event_out, msg);
+
+ //appl_write(gl_apid, 16, &msg);
}