diff options
Diffstat (limited to 'amiga')
-rw-r--r-- | amiga/dt_anim.c | 8 | ||||
-rw-r--r-- | amiga/dt_picture.c | 8 | ||||
-rw-r--r-- | amiga/dt_sound.c | 10 | ||||
-rwxr-xr-x | amiga/gui.c | 14 | ||||
-rwxr-xr-x | amiga/history_local.c | 6 | ||||
-rw-r--r-- | amiga/icon.c | 8 | ||||
-rw-r--r-- | amiga/plugin_hack.c | 10 | ||||
-rwxr-xr-x | amiga/thumbnail.c | 7 | ||||
-rwxr-xr-x | amiga/tree.c | 6 |
9 files changed, 52 insertions, 25 deletions
diff --git a/amiga/dt_anim.c b/amiga/dt_anim.c index afc1e1108..54f9867d6 100644 --- a/amiga/dt_anim.c +++ b/amiga/dt_anim.c @@ -61,7 +61,8 @@ static bool amiga_dt_anim_convert(struct content *c); static void amiga_dt_anim_reformat(struct content *c, int width, int height); static void amiga_dt_anim_destroy(struct content *c); static bool amiga_dt_anim_redraw(struct content *c, - struct content_redraw_data *data, const struct rect *clip); + struct content_redraw_data *data, const struct rect *clip, + const struct redraw_context *ctx); static void amiga_dt_anim_open(struct content *c, struct browser_window *bw, struct content *page, struct box *box, struct object_params *params); @@ -250,7 +251,8 @@ void amiga_dt_anim_destroy(struct content *c) } bool amiga_dt_anim_redraw(struct content *c, - struct content_redraw_data *data, const struct rect *clip) + struct content_redraw_data *data, const struct rect *clip, + const struct redraw_context *ctx) { amiga_dt_anim_content *plugin = (amiga_dt_anim_content *) c; @@ -263,7 +265,7 @@ bool amiga_dt_anim_redraw(struct content *c, if (data->repeat_y) flags |= BITMAPF_REPEAT_Y; - return plot.bitmap(data->x, data->y, data->width, data->height, + return ctx->plot->bitmap(data->x, data->y, data->width, data->height, c->bitmap, data->background_colour, flags); } diff --git a/amiga/dt_picture.c b/amiga/dt_picture.c index 589642197..ebf8ba3fe 100644 --- a/amiga/dt_picture.c +++ b/amiga/dt_picture.c @@ -54,7 +54,8 @@ static nserror amiga_dt_picture_create(const content_handler *handler, static bool amiga_dt_picture_convert(struct content *c); static void amiga_dt_picture_destroy(struct content *c); static bool amiga_dt_picture_redraw(struct content *c, - struct content_redraw_data *data, const struct rect *clip); + struct content_redraw_data *data, const struct rect *clip, + const struct redraw_context *ctx); static nserror amiga_dt_picture_clone(const struct content *old, struct content **newc); static content_type amiga_dt_picture_content_type(lwc_string *mime_type); @@ -220,7 +221,8 @@ void amiga_dt_picture_destroy(struct content *c) } bool amiga_dt_picture_redraw(struct content *c, - struct content_redraw_data *data, const struct rect *clip) + struct content_redraw_data *data, const struct rect *clip, + const struct redraw_context *ctx) { LOG(("amiga_dt_picture_redraw")); bitmap_flags_t flags = BITMAPF_NONE; @@ -230,7 +232,7 @@ bool amiga_dt_picture_redraw(struct content *c, if (data->repeat_y) flags |= BITMAPF_REPEAT_Y; - return plot.bitmap(data->x, data->y, data->width, data->height, + return ctx->plot->bitmap(data->x, data->y, data->width, data->height, c->bitmap, data->background_colour, flags); } diff --git a/amiga/dt_sound.c b/amiga/dt_sound.c index 6d35f3061..5f5c68d0c 100644 --- a/amiga/dt_sound.c +++ b/amiga/dt_sound.c @@ -50,7 +50,8 @@ static nserror amiga_dt_sound_create(const content_handler *handler, static bool amiga_dt_sound_convert(struct content *c); static void amiga_dt_sound_destroy(struct content *c); static bool amiga_dt_sound_redraw(struct content *c, - struct content_redraw_data *data, const struct rect *clip); + struct content_redraw_data *data, const struct rect *clip, + const struct redraw_context *ctx); static void amiga_dt_sound_open(struct content *c, struct browser_window *bw, struct content *page, struct box *box, struct object_params *params); @@ -193,7 +194,8 @@ void amiga_dt_sound_destroy(struct content *c) } bool amiga_dt_sound_redraw(struct content *c, - struct content_redraw_data *data, const struct rect *clip) + struct content_redraw_data *data, const struct rect *clip, + const struct redraw_context *ctx) { plot_style_t pstyle = { .fill_type = PLOT_OP_TYPE_SOLID, @@ -206,10 +208,10 @@ bool amiga_dt_sound_redraw(struct content *c, /* this should be some sort of play/stop control */ - plot.rectangle(data->x, data->y, data->x + data->width, + ctx->plot->rectangle(data->x, data->y, data->x + data->width, data->y + data->height, &pstyle); - return plot.text(data->x, data->y+20, + return ctx->plot->text(data->x, data->y+20, lwc_string_data(content__get_mime_type(c)), lwc_string_length(content__get_mime_type(c)), plot_style_font); diff --git a/amiga/gui.c b/amiga/gui.c index 0d99b9848..38b2b5c46 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -3194,6 +3194,10 @@ void ami_do_redraw_limits(struct gui_window *g, struct browser_window *bw, struct rect clip; struct RastPort *temprp; int posx, posy; + struct redraw_context ctx = { + .interactive = true, + .plot = &amiplot + }; if(!g) return; if(browser_window_redraw_ready(bw) == false) return; @@ -3228,7 +3232,6 @@ void ami_do_redraw_limits(struct gui_window *g, struct browser_window *bw, if((x1-x0)+(xoffset+x0-sx)>(width)) x1 = (width-(x0-sx)+x0); if((y1-y0)+(yoffset+y0-sy)>(height)) y1 = (height-(y0-sy)+y0); - plot = amiplot; glob = &browserglob; if(option_direct_render == false) @@ -3252,7 +3255,7 @@ void ami_do_redraw_limits(struct gui_window *g, struct browser_window *bw, posy = bbox->Top - sy; } - if(browser_window_redraw(bw, posx, posy, &clip)) + if(browser_window_redraw(bw, posx, posy, &clip, &ctx)) { ami_clearclipreg(&browserglob); @@ -3404,8 +3407,11 @@ void ami_do_redraw(struct gui_window_2 *g) else { struct rect clip; + struct redraw_context ctx = { + .interactive = true, + .plot = &amiplot + }; - plot = amiplot; glob = &browserglob; if(option_direct_render == false) @@ -3425,7 +3431,7 @@ void ami_do_redraw(struct gui_window_2 *g) clip.y1 = bbox->Top + bbox->Height; } - if(browser_window_redraw(g->bw, clip.x0 - hcurrent, clip.y0 - vcurrent, &clip)) + if(browser_window_redraw(g->bw, clip.x0 - hcurrent, clip.y0 - vcurrent, &clip, &ctx)) { ami_clearclipreg(&browserglob); diff --git a/amiga/history_local.c b/amiga/history_local.c index b23748606..cba981c3b 100755 --- a/amiga/history_local.c +++ b/amiga/history_local.c @@ -157,6 +157,10 @@ void ami_history_redraw(struct history_window *hw) { struct IBox *bbox; ULONG xs,ys; + struct redraw_context ctx = { + .interactive = true, + .plot = &amiplot + }; GetAttr(SPACE_AreaBox,hw->objects[GID_BROWSER],(ULONG *)&bbox); GetAttr(SCROLLER_Top,hw->objects[OID_HSCROLL],(ULONG *)&xs); @@ -168,7 +172,7 @@ void ami_history_redraw(struct history_window *hw) RectFill(glob->rp, 0, 0, bbox->Width - 1, bbox->Height - 1); history_redraw_rectangle(history_current, xs, ys, - bbox->Width + xs, bbox->Height + ys, 0, 0); + bbox->Width + xs, bbox->Height + ys, 0, 0, &ctx); glob = &browserglob; diff --git a/amiga/icon.c b/amiga/icon.c index 74cef1b26..5205956f5 100644 --- a/amiga/icon.c +++ b/amiga/icon.c @@ -64,7 +64,8 @@ static nserror amiga_icon_create(const content_handler *handler, static bool amiga_icon_convert(struct content *c); static void amiga_icon_destroy(struct content *c); static bool amiga_icon_redraw(struct content *c, - struct content_redraw_data *data, const struct rect *clip); + struct content_redraw_data *data, const struct rect *clip, + const struct redraw_context *ctx); static nserror amiga_icon_clone(const struct content *old, struct content **newc); static content_type amiga_icon_content_type(lwc_string *mime_type); @@ -286,7 +287,8 @@ void amiga_icon_destroy(struct content *c) */ bool amiga_icon_redraw(struct content *c, - struct content_redraw_data *data, const struct rect *clip) + struct content_redraw_data *data, const struct rect *clip, + const struct redraw_context *ctx) { bitmap_flags_t flags = BITMAPF_NONE; @@ -295,7 +297,7 @@ bool amiga_icon_redraw(struct content *c, if (data->repeat_y) flags |= BITMAPF_REPEAT_Y; - return plot.bitmap(data->x, data->y, data->width, data->height, + return ctx->plot->bitmap(data->x, data->y, data->width, data->height, c->bitmap, data->background_colour, flags); } diff --git a/amiga/plugin_hack.c b/amiga/plugin_hack.c index c10eb0772..72cba5e60 100644 --- a/amiga/plugin_hack.c +++ b/amiga/plugin_hack.c @@ -46,7 +46,8 @@ static bool amiga_plugin_hack_convert(struct content *c); static void amiga_plugin_hack_reformat(struct content *c, int width, int height); static void amiga_plugin_hack_destroy(struct content *c); static bool amiga_plugin_hack_redraw(struct content *c, - struct content_redraw_data *data, const struct rect *clip); + struct content_redraw_data *data, const struct rect *clip, + const struct redraw_context *ctx); static void amiga_plugin_hack_open(struct content *c, struct browser_window *bw, struct content *page, struct box *box, struct object_params *params); @@ -143,7 +144,8 @@ void amiga_plugin_hack_destroy(struct content *c) } bool amiga_plugin_hack_redraw(struct content *c, - struct content_redraw_data *data, const struct rect *clip) + struct content_redraw_data *data, const struct rect *clip, + const struct redraw_context *ctx) { plot_style_t pstyle = { .fill_type = PLOT_OP_TYPE_SOLID, @@ -154,10 +156,10 @@ bool amiga_plugin_hack_redraw(struct content *c, LOG(("amiga_plugin_hack_redraw")); - plot.rectangle(data->x, data->y, data->x + data->width, + ctx->plot->rectangle(data->x, data->y, data->x + data->width, data->y + data->height, &pstyle); - return plot.text(data->x, data->y+20, + return ctx->plot->text(data->x, data->y+20, lwc_string_data(content__get_mime_type(c)), lwc_string_length(content__get_mime_type(c)), plot_style_font); diff --git a/amiga/thumbnail.c b/amiga/thumbnail.c index be15877de..af0375ba8 100755 --- a/amiga/thumbnail.c +++ b/amiga/thumbnail.c @@ -42,6 +42,10 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap, struct BitScaleArgs bsa; int plot_width; int plot_height; + struct redraw_context ctx = { + .interactive = false, + .plot = &amiplot + }; plot_width = MIN(content_get_width(content), 1024); plot_height = ((plot_width * bitmap->height) + (bitmap->width / 2)) / @@ -55,9 +59,8 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap, bitmap->nativebmheight = bitmap->height; ami_clearclipreg(&browserglob); current_redraw_browser = curbw; - plot = amiplot; - thumbnail_redraw(content, plot_width, plot_height); + thumbnail_redraw(content, plot_width, plot_height, &ctx); current_redraw_browser = NULL; diff --git a/amiga/tree.c b/amiga/tree.c index c474a99bd..efd8f450c 100755 --- a/amiga/tree.c +++ b/amiga/tree.c @@ -1235,6 +1235,10 @@ void ami_tree_redraw_request(int x, int y, int width, int height, void *data) struct treeview_window *twin = data; struct IBox *bbox; int pos_x, pos_y; + struct redraw_context ctx = { + .interactive = true, + .plot = &amiplot + }; if(!twin->win) return; // if(tree_get_redraw(twin->tree) == false) return; @@ -1249,7 +1253,7 @@ void ami_tree_redraw_request(int x, int y, int width, int height, void *data) if(x - pos_x + width > bbox->Width) width = bbox->Width - (x - pos_x); if(y - pos_y + height > bbox->Height) height = bbox->Height - (y - pos_y); - tree_draw(twin->tree, -pos_x, -pos_y, x, y, width, height); + tree_draw(twin->tree, -pos_x, -pos_y, x, y, width, height, &ctx); BltBitMapRastPort(twin->globals.bm, x - pos_x, y - pos_y, twin->win->RPort, bbox->Left + x - pos_x, bbox->Top + y - pos_y, width, height, 0x0C0); |