summaryrefslogtreecommitdiff
path: root/atari/browser.c
diff options
context:
space:
mode:
Diffstat (limited to 'atari/browser.c')
-rwxr-xr-xatari/browser.c78
1 files changed, 38 insertions, 40 deletions
diff --git a/atari/browser.c b/atari/browser.c
index c8efe3dd0..0c043b358 100755
--- a/atari/browser.c
+++ b/atari/browser.c
@@ -40,8 +40,6 @@
#include "content/hlcache.h"
#include "content/urldb.h"
#include "css/css.h"
-#include "render/box.h"
-#include "render/form.h"
#include "utils/log.h"
#include "utils/messages.h"
@@ -58,9 +56,9 @@
#include "atari/ctxmenu.h"
#include "cflib.h"
-extern struct gui_window *input_window;
-
-extern long atari_plot_flags;
+extern struct gui_window *input_window;
+
+extern long atari_plot_flags;
extern int atari_plot_vdi_handle;
static void browser_process_scroll( struct gui_window * gw, LGRECT bwrect );
@@ -253,7 +251,7 @@ static void __CDECL browser_evnt_mbutton( COMPONENT * c, long buff[8], void * da
int sy_origin = (my + gw->browser->scroll.current.y);
short rel_cur_x, rel_cur_y;
- short prev_x=sx_origin, prev_y=sy_origin;
+ short prev_x=sx_origin, prev_y=sy_origin;
bool dragmode = 0;
/* Detect left mouse button state and compare with event state: */
@@ -271,14 +269,14 @@ static void __CDECL browser_evnt_mbutton( COMPONENT * c, long buff[8], void * da
BROWSER_MOUSE_DRAG_ON|BROWSER_MOUSE_DRAG_1,
rel_cur_x, rel_cur_y);
prev_x = rel_cur_x;
- prev_y = rel_cur_y;
+ prev_y = rel_cur_y;
dragmode = true;
- } else {
- if( dragmode == false ){
+ } else {
+ if( dragmode == false ){
browser_window_mouse_track( gw->browser->bw,BROWSER_MOUSE_PRESS_1,
- rel_cur_x, rel_cur_y);
- }
- }
+ rel_cur_x, rel_cur_y);
+ }
+ }
if( browser_redraw_required( gw ) ){
browser_redraw( gw );
}
@@ -726,7 +724,7 @@ void browser_redraw_caret( struct gui_window * gw, LGRECT * area )
/* restore old clip area: */
plot_clip( &old_clip );
/* restore the mouse */
- v_show_c ( app.graf.handle, 1);
+ v_show_c ( app.graf.handle, 1);
b->caret.current.g_x = caret.g_x + gw->browser->scroll.current.x;
b->caret.current.g_y = caret.g_y + gw->browser->scroll.current.y;
b->caret.current.g_w = caret.g_w;
@@ -748,7 +746,7 @@ void browser_redraw( struct gui_window * gw )
}
browser_get_rect(gw, BR_CONTENT, &bwrect);
-
+
plot_set_dimensions(bwrect.g_x, bwrect.g_y, bwrect.g_w, bwrect.g_h);
clip.x0 = 0;
clip.y0 = 0;
@@ -764,26 +762,26 @@ void browser_redraw( struct gui_window * gw )
}
if ((b->redraw.areas_used > 0) && b->bw->current_content != NULL ) {
- if( (atari_plot_flags & PLOT_FLAG_OFFSCREEN) == 0 ) {
+ if( (atari_plot_flags & PLOT_FLAG_OFFSCREEN) == 0 ) {
int i;
GRECT area;
- GRECT fbwork;
+ GRECT fbwork;
short wf_top[4];
todo[0] = bwrect.g_x;
todo[1] = bwrect.g_y;
todo[2] = todo[0] + bwrect.g_w-1;
todo[3] = todo[1] + bwrect.g_h-1;
- vs_clip(atari_plot_vdi_handle, 1, (short*)&todo[0]);
-
- wind_get( 0, WF_TOP, &wf_top[0], &wf_top[1],
- &wf_top[2], &wf_top[3] );
-
- if( wf_top[0] == gw->root->handle->handle
- && wf_top[1] == _AESapid ){
- /* The window is on top, so there is no need to walk the */
- /* AES rectangle list. */
- for( i=0; i<b->redraw.areas_used; i++ ){
+ vs_clip(atari_plot_vdi_handle, 1, (short*)&todo[0]);
+
+ wind_get( 0, WF_TOP, &wf_top[0], &wf_top[1],
+ &wf_top[2], &wf_top[3] );
+
+ if( wf_top[0] == gw->root->handle->handle
+ && wf_top[1] == _AESapid ){
+ /* The window is on top, so there is no need to walk the */
+ /* AES rectangle list. */
+ for( i=0; i<b->redraw.areas_used; i++ ){
fbwork.g_x = todo[0] - bwrect.g_x;
fbwork.g_y = todo[1] - bwrect.g_y;
if( fbwork.g_x < 0 ){
@@ -809,13 +807,13 @@ void browser_redraw( struct gui_window * gw )
redraw_area.y1 = area.g_y + area.g_h;
browser_redraw_content( gw, 0, 0, &redraw_area );
} else {
- /* the area should be kept scheduled for later redraw,*/
- /* but because this is onscreen plotter, it doesn't */
+ /* the area should be kept scheduled for later redraw,*/
+ /* but because this is onscreen plotter, it doesn't */
/* make much sense anyway... */
}
- }
- } else {
- /* walk the AES rectangle list: */
+ }
+ } else {
+ /* walk the AES rectangle list: */
if( wind_get(gw->root->handle->handle, WF_FIRSTXYWH,
&todo[0], &todo[1], &todo[2], &todo[3] )!=0 ) {
while (todo[2] && todo[3]) {
@@ -847,8 +845,8 @@ void browser_redraw( struct gui_window * gw )
redraw_area.y1 = area.g_y + area.g_h;
browser_redraw_content( gw, 0, 0, &redraw_area );
} else {
- /* the area should be kept scheduled for later redraw,*/
- /* but because this is onscreen plotter, it doesn't */
+ /* the area should be kept scheduled for later redraw,*/
+ /* but because this is onscreen plotter, it doesn't */
/* make much sense anyway... */
}
@@ -858,13 +856,13 @@ void browser_redraw( struct gui_window * gw )
break;
}
}
- }
- }
+ }
+ }
vs_clip(atari_plot_vdi_handle, 0, (short*)&todo);
- } else {
+ } else {
- /* its save to do a complete redraw without knowledge about GEM windows :) */
- /* walk the redraw requests: */
+ /* its save to do a complete redraw without knowledge about GEM windows :) */
+ /* walk the redraw requests: */
int i;
for( i=0; i<b->redraw.areas_used; i++ ){
struct redraw_context ctx = {
@@ -874,12 +872,12 @@ void browser_redraw( struct gui_window * gw )
};
browser_window_redraw( b->bw, -b->scroll.current.x,
-b->scroll.current.y, &b->redraw.areas[i], &ctx );
- }
+ }
GRECT area;
area.g_x = bwrect.g_x;
area.g_y = bwrect.g_y;
area.g_w = bwrect.g_w;
- area.g_h = bwrect.g_h;
+ area.g_h = bwrect.g_h;
//plot_blit( plotter, &area );
}
b->redraw.areas_used = 0;