From 3295d71a2fd0a4ecfde065b4aab5933ae4238612 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 23 Aug 2009 15:59:41 +0000 Subject: First attempt at Amiga printing support. Doesn't quite work - a column on the left will print, but the rest of the page is an unexpected pastel pink. svn path=/trunk/netsurf/; revision=9410 --- !NetSurf/Resources/de/Messages | 1 + !NetSurf/Resources/en/Messages | 1 + !NetSurf/Resources/fr/Messages | 1 + !NetSurf/Resources/it/Messages | 1 + !NetSurf/Resources/nl/Messages | 1 + Makefile.sources | 2 +- amiga/gui.c | 21 +---- amiga/gui.h | 1 - amiga/history_local.c | 2 +- amiga/menu.c | 53 +++++++------ amiga/menu.h | 4 +- amiga/options.h | 6 +- amiga/plotters.c | 26 +++++-- amiga/plotters.h | 3 +- amiga/print.c | 169 +++++++++++++++++++++++++++++++++++++++++ amiga/print.h | 24 ++++++ amiga/thumbnail.c | 2 +- 17 files changed, 266 insertions(+), 52 deletions(-) create mode 100644 amiga/print.c create mode 100755 amiga/print.h diff --git a/!NetSurf/Resources/de/Messages b/!NetSurf/Resources/de/Messages index cba55ec15..39bcce133 100644 --- a/!NetSurf/Resources/de/Messages +++ b/!NetSurf/Resources/de/Messages @@ -248,6 +248,7 @@ PDFNS:PDF... IFF:IFF... OpenFile:Open local file... About:About... +PrintNS:Print # Edit menu # diff --git a/!NetSurf/Resources/en/Messages b/!NetSurf/Resources/en/Messages index b39add773..506a56376 100644 --- a/!NetSurf/Resources/en/Messages +++ b/!NetSurf/Resources/en/Messages @@ -248,6 +248,7 @@ PDFNS:PDF... IFF:IFF... OpenFile:Open local file... About:About... +PrintNS:Print # Edit menu # diff --git a/!NetSurf/Resources/fr/Messages b/!NetSurf/Resources/fr/Messages index ee8b1aa31..73d7552b8 100644 --- a/!NetSurf/Resources/fr/Messages +++ b/!NetSurf/Resources/fr/Messages @@ -248,6 +248,7 @@ PDFNS:PDF... IFF:IFF... OpenFile:Open local file... About:About... +PrintNS:Print # Edit menu # diff --git a/!NetSurf/Resources/it/Messages b/!NetSurf/Resources/it/Messages index 3e01d1134..abd826922 100755 --- a/!NetSurf/Resources/it/Messages +++ b/!NetSurf/Resources/it/Messages @@ -250,6 +250,7 @@ PDFNS:PDF... IFF:IFF... OpenFile:Apri file locale... About:Informazioni... +PrintNS:Print # Edit menu # diff --git a/!NetSurf/Resources/nl/Messages b/!NetSurf/Resources/nl/Messages index dd6680929..f9a45204c 100644 --- a/!NetSurf/Resources/nl/Messages +++ b/!NetSurf/Resources/nl/Messages @@ -248,6 +248,7 @@ PDFNS:PDF... IFF:IFF... OpenFile:Open local file... About:About... +PrintNS:Print # Edit menu # diff --git a/Makefile.sources b/Makefile.sources index 41f0638a0..938b82716 100644 --- a/Makefile.sources +++ b/Makefile.sources @@ -84,7 +84,7 @@ S_AMIGA := compat.c gui.c tree.c history.c hotlist.c schedule.c \ plotters.c object.c menu.c save_pdf.c arexx.c version.c \ cookies.c context_menu.c clipboard.c save_complete.c \ fetch_file.c fetch_mailto.c search.c history_local.c \ - download.c iff_dr2d.c sslcert.c gui_options.c \ + download.c iff_dr2d.c sslcert.c gui_options.c print.c \ stringview/stringview.c stringview/urlhistory.c S_AMIGA := $(addprefix amiga/,$(S_AMIGA)) diff --git a/amiga/gui.c b/amiga/gui.c index 57159e2c8..deaca9e98 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -596,7 +596,7 @@ void gui_init2(int argc, char** argv) if(notalreadyrunning) { ami_openscreen(); - ami_init_layers(&browserglob); + ami_init_layers(&browserglob, 0, 0); } if(argc) // argc==0 is started from wb @@ -2238,19 +2238,6 @@ void gui_window_set_title(struct gui_window *g, const char *title) } } -void ami_clearclipreg(struct RastPort *rp) -{ - struct Region *reg = NULL; - - reg = InstallClipRegion(rp->Layer,NULL); - if(reg) DisposeRegion(reg); - - browserglob.rect.MinX = 0; - browserglob.rect.MinY = 0; - browserglob.rect.MaxX = scrn->Width-1; - browserglob.rect.MaxY = scrn->Height-1; -} - /** * Redraw an area of the browser window - Amiga-specific function * @@ -2318,7 +2305,7 @@ void ami_do_redraw_limits(struct gui_window *g, struct content *c,int x0, int y0 current_redraw_browser = NULL; - ami_clearclipreg(&browserglob.rp); + ami_clearclipreg(&browserglob); BltBitMapRastPort(browserglob.bm,x0-sx,y0-sy,g->shared->win->RPort, xoffset+x0-sx,yoffset+y0-sy,x1-x0,y1-y0,0x0C0); @@ -2462,7 +2449,7 @@ void ami_do_redraw(struct gui_window_2 *g) g->bw->scale,0xFFFFFF); } - ami_clearclipreg(&browserglob.rp); + ami_clearclipreg(&browserglob); BltBitMapRastPort(browserglob.bm,0,0,g->win->RPort,bbox->Left,bbox->Top, bbox->Width,bbox->Height,0x0C0); } @@ -2918,7 +2905,7 @@ void gui_window_new_content(struct gui_window *g) c = g->shared->bw->current_content; else return; - ami_clearclipreg(&browserglob.rp); + ami_clearclipreg(&browserglob); g->shared->new_content = true; g->scrollx = 0; g->scrolly = 0; diff --git a/amiga/gui.h b/amiga/gui.h index 801be5751..25a3706aa 100755 --- a/amiga/gui.h +++ b/amiga/gui.h @@ -119,7 +119,6 @@ void ami_update_pointer(struct Window *win, gui_pointer_shape shape); void ami_close_all_tabs(struct gui_window_2 *gwin); void ami_quit_netsurf(void); void ami_get_theme_filename(char *filename,char *themestring); -void ami_clearclipreg(struct RastPort *rp); void ami_do_redraw(struct gui_window_2 *g); STRPTR ami_locale_langs(void); diff --git a/amiga/history_local.c b/amiga/history_local.c index b9f2c6f0a..87a296b16 100755 --- a/amiga/history_local.c +++ b/amiga/history_local.c @@ -167,7 +167,7 @@ void ami_history_redraw(struct history_window *hw) // currp = &glob.rp; - ami_clearclipreg(&browserglob.rp); + ami_clearclipreg(&browserglob); ami_history_update_extent(hw); BltBitMapRastPort(browserglob.bm, 0, 0, hw->win->RPort, diff --git a/amiga/menu.c b/amiga/menu.c index 09b0590e8..77b347fa7 100755 --- a/amiga/menu.c +++ b/amiga/menu.c @@ -47,6 +47,7 @@ #include "amiga/clipboard.h" #include "content/fetch.h" #include "amiga/gui_options.h" +#include "amiga/print.h" BOOL menualreadyinit; const char * const netsurf_version; @@ -87,27 +88,29 @@ void ami_init_menulabs(void) menulab[12] = ami_utf8_easy((char *)messages_get("CloseTab")); menulab[13] = ami_utf8_easy((char *)messages_get("CloseWindow")); menulab[14] = NM_BARLABEL; - menulab[15] = ami_utf8_easy((char *)messages_get("About")); - menulab[16] = ami_utf8_easy((char *)messages_get("Quit")); - menulab[17] = ami_utf8_easy((char *)messages_get("Edit")); - menulab[18] = ami_utf8_easy((char *)messages_get("CopyNS")); - menulab[19] = ami_utf8_easy((char *)messages_get("PasteNS")); - menulab[20] = ami_utf8_easy((char *)messages_get("SelectAllNS")); - menulab[21] = ami_utf8_easy((char *)messages_get("ClearNS")); - menulab[22] = ami_utf8_easy((char *)messages_get("Browser")); - menulab[23] = ami_utf8_easy((char *)messages_get("FindTextNS")); - menulab[24] = NM_BARLABEL; - menulab[25] = ami_utf8_easy((char *)messages_get("normal")); - menulab[26] = ami_utf8_easy((char *)messages_get("HistLocalNS")); - menulab[27] = ami_utf8_easy((char *)messages_get("HistGlobalNS")); - menulab[28] = NM_BARLABEL; - menulab[29] = ami_utf8_easy((char *)messages_get("ShowCookies")); + menulab[15] = ami_utf8_easy((char *)messages_get("PrintNS")); + menulab[16] = NM_BARLABEL; + menulab[17] = ami_utf8_easy((char *)messages_get("About")); + menulab[18] = ami_utf8_easy((char *)messages_get("Quit")); + menulab[19] = ami_utf8_easy((char *)messages_get("Edit")); + menulab[20] = ami_utf8_easy((char *)messages_get("CopyNS")); + menulab[21] = ami_utf8_easy((char *)messages_get("PasteNS")); + menulab[22] = ami_utf8_easy((char *)messages_get("SelectAllNS")); + menulab[23] = ami_utf8_easy((char *)messages_get("ClearNS")); + menulab[24] = ami_utf8_easy((char *)messages_get("Browser")); + menulab[25] = ami_utf8_easy((char *)messages_get("FindTextNS")); + menulab[26] = NM_BARLABEL; + menulab[27] = ami_utf8_easy((char *)messages_get("normal")); + menulab[28] = ami_utf8_easy((char *)messages_get("HistLocalNS")); + menulab[29] = ami_utf8_easy((char *)messages_get("HistGlobalNS")); menulab[30] = NM_BARLABEL; - menulab[31] = ami_utf8_easy((char *)messages_get("Redraw")); - menulab[32] = ami_utf8_easy((char *)messages_get("Hotlist")); - menulab[33] = ami_utf8_easy((char *)messages_get("HotlistAdd")); - menulab[34] = ami_utf8_easy((char *)messages_get("HotlistShowNS")); - menulab[35] = NM_BARLABEL; + menulab[31] = ami_utf8_easy((char *)messages_get("ShowCookies")); + menulab[32] = NM_BARLABEL; + menulab[33] = ami_utf8_easy((char *)messages_get("Redraw")); + menulab[34] = ami_utf8_easy((char *)messages_get("Hotlist")); + menulab[35] = ami_utf8_easy((char *)messages_get("HotlistAdd")); + menulab[36] = ami_utf8_easy((char *)messages_get("HotlistShowNS")); + menulab[37] = NM_BARLABEL; menulab[AMI_MENU_HOTLIST_MAX] = ami_utf8_easy((char *)messages_get("Settings")); menulab[AMI_MENU_HOTLIST_MAX+1] = ami_utf8_easy((char *)messages_get("SettingsEdit")); @@ -139,6 +142,8 @@ struct NewMenu *ami_create_menu(ULONG type) { NM_ITEM,0,"K",0,0,0,}, // close tab { NM_ITEM,0,0,0,0,0,}, // close window { NM_ITEM,NM_BARLABEL,0,0,0,0,}, + { NM_ITEM,0,"P",0,0,0,}, // print + { NM_ITEM,NM_BARLABEL,0,0,0,0,}, { NM_ITEM,0,"?",0,0,0,}, // about { NM_ITEM,0,"Q",0,0,0,}, // quit {NM_TITLE,0,0,0,0,0,}, // edit @@ -563,7 +568,11 @@ void ami_menupick(ULONG code,struct gui_window_2 *gwin,struct MenuItem *item) ami_close_all_tabs(gwin); break; - case 9: // about + case 9: // print + ami_print(gwin->bw->current_content); + break; + + case 11: // about ami_update_pointer(gwin->win,GUI_POINTER_WAIT); TimedDosRequesterTags( @@ -585,7 +594,7 @@ void ami_menupick(ULONG code,struct gui_window_2 *gwin,struct MenuItem *item) ami_update_pointer(gwin->win,GUI_POINTER_DEFAULT); break; - case 10: // quit + case 12: // quit ami_quit_netsurf(); break; } diff --git a/amiga/menu.h b/amiga/menu.h index 6a3f93212..5ba50fc2a 100755 --- a/amiga/menu.h +++ b/amiga/menu.h @@ -28,10 +28,10 @@ /* Maximum number of menu items - first value is number of static items * (ie. everything not intially defined as NM_IGNORE) */ -#define AMI_MENU_MAX 44 + AMI_HOTLIST_ITEMS +#define AMI_MENU_MAX 46 + AMI_HOTLIST_ITEMS /* Where the hotlist entries start */ -#define AMI_MENU_HOTLIST 36 +#define AMI_MENU_HOTLIST 38 /* Where the hotlist entries end */ #define AMI_MENU_HOTLIST_MAX AMI_MENU_HOTLIST+AMI_HOTLIST_ITEMS diff --git a/amiga/options.h b/amiga/options.h index 199f4cfd0..7e3c412b7 100644 --- a/amiga/options.h +++ b/amiga/options.h @@ -41,6 +41,7 @@ extern char *option_download_dir; extern bool option_faster_scroll; extern bool option_scale_quality; extern bool option_ask_overwrite; +extern int option_printer_unit; #define EXTRA_OPTION_DEFINE \ bool option_verbose_log = false; \ @@ -64,6 +65,7 @@ char *option_download_dir = 0; \ bool option_faster_scroll = true; \ bool option_scale_quality = false; \ bool option_ask_overwrite = false; \ +int option_printer_unit = 0; \ #define EXTRA_OPTION_TABLE \ { "verbose_log", OPTION_BOOL, &option_verbose_log}, \ @@ -86,5 +88,7 @@ bool option_ask_overwrite = false; \ { "download_dir", OPTION_STRING, &option_download_dir }, \ { "faster_scroll", OPTION_BOOL, &option_faster_scroll}, \ { "scale_quality", OPTION_BOOL, &option_scale_quality}, \ -{ "ask_overwrite", OPTION_BOOL, &option_ask_overwrite}, +{ "ask_overwrite", OPTION_BOOL, &option_ask_overwrite}, \ +{ "printer_unit", OPTION_INTEGER, &option_printer_unit}, + #endif diff --git a/amiga/plotters.c b/amiga/plotters.c index e6a8004e2..f83051484 100755 --- a/amiga/plotters.c +++ b/amiga/plotters.c @@ -107,17 +107,20 @@ void ami_cairo_set_dashed(cairo_t *cr) } #endif -void ami_init_layers(struct gui_globals *gg) +void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height) { /* init shared bitmaps * * Height is set to screen width to give enough space for thumbnails * * Also applies to the further gfx/layers functions and memory below */ + if(!width) width = scrn->Width; + if(!height) height = scrn->Width; + gg->layerinfo = NewLayerInfo(); gg->areabuf = AllocVec(100,MEMF_PRIVATE | MEMF_CLEAR); - gg->tmprasbuf = AllocVec(scrn->Width*scrn->Width,MEMF_PRIVATE | MEMF_CLEAR); + gg->tmprasbuf = AllocVec(width*height,MEMF_PRIVATE | MEMF_CLEAR); - gg->bm = p96AllocBitMap(scrn->Width,scrn->Width,32, + gg->bm = p96AllocBitMap(width, height, 32, BMF_INTERLEAVED, NULL, RGBFB_A8R8G8B8); if(!gg->bm) warn_user("NoMemory",""); @@ -128,7 +131,7 @@ void ami_init_layers(struct gui_globals *gg) SetDrMd(&gg->rp,BGBACKFILL); gg->rp.Layer = CreateUpfrontLayer(gg->layerinfo,gg->rp.BitMap,0,0, - scrn->Width-1,scrn->Width-1,LAYERSIMPLE,NULL); + width-1, height-1, LAYERSIMPLE, NULL); InstallLayerHook(gg->rp.Layer,LAYERS_NOBACKFILL); @@ -141,7 +144,7 @@ void ami_init_layers(struct gui_globals *gg) if((!gg->tmprasbuf) || (!gg->rp.TmpRas)) warn_user("NoMemory",""); - InitTmpRas(gg->rp.TmpRas,gg->tmprasbuf,scrn->Width*scrn->Width); + InitTmpRas(gg->rp.TmpRas, gg->tmprasbuf, width*height); #ifdef NS_AMIGA_CAIRO gg->surface = cairo_amigaos_surface_create(gg->rp.BitMap); @@ -178,6 +181,19 @@ bool ami_clg(colour c) return true; } +void ami_clearclipreg(struct gui_globals *gg) +{ + struct Region *reg = NULL; + + reg = InstallClipRegion(gg->rp.Layer,NULL); + if(reg) DisposeRegion(reg); + + gg->rect.MinX = 0; + gg->rect.MinY = 0; + gg->rect.MaxX = scrn->Width-1; + gg->rect.MaxY = scrn->Height-1; +} + bool ami_rectangle(int x0, int y0, int x1, int y1, const plot_style_t *style) { if (style->fill_type != PLOT_OP_TYPE_NONE) { diff --git a/amiga/plotters.h b/amiga/plotters.h index fb0583e2f..5c734efd8 100755 --- a/amiga/plotters.h +++ b/amiga/plotters.h @@ -60,8 +60,9 @@ bool ami_flush(void); bool ami_path(const float *p, unsigned int n, colour fill, float width, colour c, const float transform[6]); -void ami_init_layers(struct gui_globals *gg); +void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height); void ami_free_layers(struct gui_globals *gg); +void ami_clearclipreg(struct gui_globals *gg); struct gui_globals *glob; #endif diff --git a/amiga/print.c b/amiga/print.c new file mode 100644 index 000000000..8d9c915b7 --- /dev/null +++ b/amiga/print.c @@ -0,0 +1,169 @@ +/* + * Copyright 2009 Chris Young + * + * This file is part of NetSurf, http://www.netsurf-browser.org/ + * + * NetSurf is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * NetSurf is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "desktop/printer.h" +#include "amiga/plotters.h" +#include "render/font.h" +#include "amiga/gui.h" +#include "amiga/options.h" + +#include +#include +#include +#include + +bool ami_print_begin(struct print_settings *ps); +bool ami_print_next_page(void); +void ami_print_end(void); +bool ami_print_dump(void); +static VOID ami_print_hook(struct Hook *hook, APTR dummy, + struct DRPSourceMsg * drpm); + +const struct printer amiprinter = { + &amiplot, + ami_print_begin, + ami_print_next_page, + ami_print_end, +}; + +struct ami_printer_info +{ + struct gui_globals *gg; + struct IODRPTagsReq *PReq; + struct PrinterData *PD; + struct PrinterExtendedData *PED; + struct MsgPort *msgport; + int page; +}; + +struct Hook phook = +{ + {NULL, NULL}, + (HOOKFUNC)ami_print_hook, + NULL, NULL +}; + +struct ami_printer_info ami_print_info; + +void ami_print(struct content *c) +{ + struct print_settings *ps; + + if(!(ami_print_info.msgport = AllocSysObjectTags(ASOT_PORT, + ASO_NoTrack,FALSE, + TAG_DONE))) return; + + if(!(ami_print_info.PReq = + (struct IODRPTagsReq *)AllocSysObjectTags(ASOT_IOREQUEST, + ASOIOR_Size, sizeof(struct IODRPTagsReq), + ASOIOR_ReplyPort, ami_print_info.msgport, + ASO_NoTrack, FALSE, + TAG_DONE))) return; + + if(OpenDevice("printer.device", option_printer_unit, + (struct IORequest *)ami_print_info.PReq, 0)) return; + + ami_print_info.PD = (struct PrinterData *)ami_print_info.PReq->io_Device; + ami_print_info.PED = &ami_print_info.PD->pd_SegmentData->ps_PED; + + ps = print_make_settings(PRINT_DEFAULT, c->url, &nsfont); + ps->page_width = ami_print_info.PED->ped_MaxXDots; + ps->page_height = ami_print_info.PED->ped_MaxYDots; + + print_basic_run(c, &amiprinter, ps); + + CloseDevice(ami_print_info.PReq); + FreeSysObject(ASOT_IOREQUEST,ami_print_info.PReq); + FreeSysObject(ASOT_PORT,ami_print_info.msgport); +} + +bool ami_print_begin(struct print_settings *ps) +{ + ami_print_info.gg = AllocVec(sizeof(struct gui_globals), + MEMF_PRIVATE | MEMF_CLEAR); + if(!ami_print_info.gg) return false; + + ami_init_layers(ami_print_info.gg, + ami_print_info.PED->ped_MaxXDots, + ami_print_info.PED->ped_MaxYDots); + + glob = ami_print_info.gg; + ami_print_info.page = 0; + + return true; +} + +bool ami_print_next_page(void) +{ + bool ret = true; + + if(ami_print_info.page > 0) ret = ami_print_dump(); + ami_print_info.page++; + + return ret; +} + +void ami_print_end(void) +{ + ami_print_dump(); + ami_free_layers(ami_print_info.gg); + FreeVec(ami_print_info.gg); + glob = &browserglob; +} + +bool ami_print_dump(void) +{ + static struct TagItem tags[] = { + {DRPA_SourceHook, (Tag)&phook}, + {DRPA_AspectX, 1}, + {DRPA_AspectY, 1}, + {TAG_DONE, 0} + }; + + ami_print_info.PReq->io_Command = PRD_DUMPRPORTTAGS; + ami_print_info.PReq->io_Flags = 0; + ami_print_info.PReq->io_Error = 0; + ami_print_info.PReq->io_RastPort = NULL; + ami_print_info.PReq->io_ColorMap = NULL; + ami_print_info.PReq->io_Modes = 0; + ami_print_info.PReq->io_SrcX = 0; + ami_print_info.PReq->io_SrcY = 0; + ami_print_info.PReq->io_SrcWidth = ami_print_info.PED->ped_MaxXDots; + ami_print_info.PReq->io_SrcHeight = ami_print_info.PED->ped_MaxYDots; + ami_print_info.PReq->io_DestCols = ami_print_info.PED->ped_MaxXDots; + ami_print_info.PReq->io_DestRows = ami_print_info.PED->ped_MaxYDots; + ami_print_info.PReq->io_Special = 0; + ami_print_info.PReq->io_TagList = tags; + + DoIO(ami_print_info.PReq); + + return true; +} + +static VOID ami_print_hook(struct Hook *hook, APTR dummy, + struct DRPSourceMsg * drpm) +{ + struct RenderInfo ri; + + ri.Memory = drpm->buf; + ri.BytesPerRow = drpm->width; + ri.RGBFormat = RGBFB_A8R8G8B8; + + p96ReadPixelArray(&ri, 0, 0, &ami_print_info.gg->rp, drpm->x, drpm->y, + drpm->width, drpm->height); +} diff --git a/amiga/print.h b/amiga/print.h new file mode 100755 index 000000000..88c1791a6 --- /dev/null +++ b/amiga/print.h @@ -0,0 +1,24 @@ +/* + * Copyright 2009 Chris Young + * + * This file is part of NetSurf, http://www.netsurf-browser.org/ + * + * NetSurf is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * NetSurf is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef AMIGA_PRINT_H +#define AMIGA_PRINT_H +struct content; + +void ami_print(struct content *c); +#endif diff --git a/amiga/thumbnail.c b/amiga/thumbnail.c index 24396719e..6e82f68dd 100755 --- a/amiga/thumbnail.c +++ b/amiga/thumbnail.c @@ -39,7 +39,7 @@ bool thumbnail_create(struct content *content, struct bitmap *bitmap, bitmap->nativebmwidth = bitmap->width; bitmap->nativebmheight = bitmap->height; - ami_clearclipreg(&browserglob.rp); + ami_clearclipreg(&browserglob); plot = amiplot; content_redraw(content, 0, 0, content->width, content->width, 0, 0, content->width, content->width, 1.0, 0xFFFFFF); -- cgit v1.2.3