diff options
author | Ole Loots <ole@monochrom.net> | 2013-01-11 02:12:30 +0100 |
---|---|---|
committer | Ole Loots <ole@monochrom.net> | 2013-01-11 02:12:30 +0100 |
commit | adcbbbe88033e245732b73bd6319c0cb9b4da9b3 (patch) | |
tree | 4e52b45db9be0da17aeb625570f084fb9695fbf4 /atari/gemtk | |
parent | cca5bb43049548daee486b1490ef79101f4c93d1 (diff) | |
download | netsurf-adcbbbe88033e245732b73bd6319c0cb9b4da9b3.tar.gz netsurf-adcbbbe88033e245732b73bd6319c0cb9b4da9b3.tar.bz2 |
Started to move the search form into the browser window.
Diffstat (limited to 'atari/gemtk')
-rw-r--r-- | atari/gemtk/gemtk.h | 2 | ||||
-rw-r--r-- | atari/gemtk/guiwin.c | 5 | ||||
-rw-r--r-- | atari/gemtk/utils.c | 19 |
3 files changed, 23 insertions, 3 deletions
diff --git a/atari/gemtk/gemtk.h b/atari/gemtk/gemtk.h index 2bd3553f5..e5d7c76a4 100644 --- a/atari/gemtk/gemtk.h +++ b/atari/gemtk/gemtk.h @@ -44,6 +44,8 @@ bool rc_intersect_ro(GRECT *a, GRECT *b); */ int keybd2ascii( int keybd, int shift); +/** set VDI clip area by passing an GRECT */ +void gemtk_clip_grect(VdiHdl vh, GRECT *rect); #ifndef POINT_WITHIN # define POINT_WITHIN(_x,_y, r) ((_x >= r.g_x) && (_x <= r.g_x + r.g_w ) \ diff --git a/atari/gemtk/guiwin.c b/atari/gemtk/guiwin.c index ad12499b1..17c577ec0 100644 --- a/atari/gemtk/guiwin.c +++ b/atari/gemtk/guiwin.c @@ -348,6 +348,7 @@ static short preproc_mu_button(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8]) slid = guiwin_get_scroll_info(gw); + // adjust form position (considering window and scroll position): gw->form[gw->form_idx].ob_x = content_area.g_x - (slid->x_pos * slid->x_unit_px); gw->form[gw->form_idx].ob_y = content_area.g_y - @@ -368,6 +369,10 @@ static short preproc_mu_button(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8]) if (type == G_FTEXT || type == G_FBOXTEXT) { + // edit field handling, this causes ugly redraws when the + // form is scrolled and larger than the window in which + // it is attached. + // report mouse click to the tree: retval = form_button(gw->form, gw->form_focus_obj, ev_out->emo_mclicks, &nextobj); diff --git a/atari/gemtk/utils.c b/atari/gemtk/utils.c index 3fc668a06..bd136dd99 100644 --- a/atari/gemtk/utils.c +++ b/atari/gemtk/utils.c @@ -54,13 +54,26 @@ typedef struct { char *unshift; char *shift; char *capslock; -} MY_KEYTAB; +} KEYTAB; int keybd2ascii( int keybd, int shift) { - MY_KEYTAB *key; - key = (MY_KEYTAB *)Keytbl( (char*)-1, (char*)-1, (char*)-1); + KEYTAB *key; + key = (KEYTAB *)Keytbl( (char*)-1, (char*)-1, (char*)-1); return (shift)?key->shift[keybd>>8]:key->unshift[keybd>>8]; } +void gemtk_clip_grect(VdiHdl vh, GRECT *rect) +{ + short pxy[4]; + + pxy[0] = rect->g_x; + pxy[1] = rect->g_y; + pxy[2] = pxy[0] + rect->g_w-1; + pxy[3] = pxy[1] + rect->g_h-1; + + vs_clip_pxy(vh, pxy); +} + + |