From 2d1481fafc6fd98c5ca8fc46562b725441a0f594 Mon Sep 17 00:00:00 2001 From: John Tytgat Date: Sun, 28 Sep 2008 22:37:13 +0000 Subject: 'unsigned long' -> 'colour' where it made sense. svn path=/trunk/netsurf/; revision=5459 --- content/content.c | 8 ++++---- content/content.h | 4 ++-- css/css.c | 6 +++--- image/bmp.c | 4 ++-- image/bmp.h | 4 ++-- image/gif.c | 4 ++-- image/gif.h | 4 ++-- image/ico.c | 4 ++-- image/ico.h | 4 ++-- image/jpeg.c | 4 ++-- image/jpeg.h | 4 ++-- image/mng.c | 4 ++-- image/mng.h | 4 ++-- image/png.c | 4 ++-- image/png.h | 4 ++-- image/rsvg.c | 4 ++-- image/rsvg.h | 4 ++-- image/svg.c | 2 +- image/svg.h | 2 +- render/html.h | 2 +- render/html_redraw.c | 2 +- render/textplain.c | 2 +- render/textplain.h | 2 +- riscos/image.c | 6 +++--- riscos/image.h | 3 ++- riscos/plugin.c | 2 +- riscos/plugin.h | 2 +- 27 files changed, 50 insertions(+), 49 deletions(-) diff --git a/content/content.c b/content/content.c index b2a6abaa3..935f3657f 100644 --- a/content/content.c +++ b/content/content.c @@ -256,11 +256,11 @@ struct handler_entry { bool (*redraw)(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour); + float scale, colour background_colour); bool (*redraw_tiled)(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y); void (*open)(struct content *c, struct browser_window *bw, struct content *page, unsigned int index, @@ -1000,7 +1000,7 @@ void content_quit(void) bool content_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour) + float scale, colour background_colour) { assert(c != 0); // LOG(("%p %s", c, c->url)); @@ -1025,7 +1025,7 @@ bool content_redraw(struct content *c, int x, int y, bool content_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y) { int x0, y0, x1, y1; diff --git a/content/content.h b/content/content.h index d444f6ed8..75be8cfb1 100644 --- a/content/content.h +++ b/content/content.h @@ -299,11 +299,11 @@ void content_quit(void); bool content_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour); + float scale, colour background_colour); bool content_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y); bool content_add_user(struct content *c, void (*callback)(content_msg msg, struct content *c, diff --git a/css/css.c b/css/css.c index b848f84e3..462c4d5e4 100644 --- a/css/css.c +++ b/css/css.c @@ -1589,7 +1589,7 @@ void css_dump_style(FILE *stream, const struct css_style * const style) else if (style->z == CSS_COLOR_NONE) \ fprintf(stream, s ": none; "); \ else \ - fprintf(stream, s ": #%.6lx; ", style->z); \ + fprintf(stream, s ": #%.6x; ", style->z); \ } #define DUMP_KEYWORD(z, s, n) \ @@ -1748,7 +1748,7 @@ void css_dump_style(FILE *stream, const struct css_style * const style) else if (style->border[i].color == CSS_COLOR_NOT_SET) ; else - fprintf(stream, " #%.6lx", + fprintf(stream, " #%.6x", style->border[i].color); fprintf(stream, "; "); } @@ -2137,7 +2137,7 @@ void css_dump_style(FILE *stream, const struct css_style * const style) else if (style->outline.color.value == CSS_COLOR_NOT_SET) fprintf(stream, " ."); else - fprintf(stream, " #%.6lx", style->outline.color.value); + fprintf(stream, " #%.6x", style->outline.color.value); break; case CSS_OUTLINE_COLOR_NOT_SET: break; diff --git a/image/bmp.c b/image/bmp.c index 12ba78261..408eb5861 100644 --- a/image/bmp.c +++ b/image/bmp.c @@ -114,7 +114,7 @@ bool nsbmp_convert(struct content *c, int iwidth, int iheight) bool nsbmp_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour) + float scale, colour background_colour) { if (!c->data.bmp.bmp->decoded) @@ -129,7 +129,7 @@ bool nsbmp_redraw(struct content *c, int x, int y, bool nsbmp_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y) { diff --git a/image/bmp.h b/image/bmp.h index 5bb044785..905f9b40f 100644 --- a/image/bmp.h +++ b/image/bmp.h @@ -46,11 +46,11 @@ void nsbmp_destroy(struct content *c); bool nsbmp_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour); + float scale, colour background_colour); bool nsbmp_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y); void *nsbmp_bitmap_create(int width, int height, unsigned int bmp_state); diff --git a/image/gif.c b/image/gif.c index 08e16d84e..a353d2e9c 100644 --- a/image/gif.c +++ b/image/gif.c @@ -154,7 +154,7 @@ void nsgif_invalidate(void *bitmap, void *private_word) bool nsgif_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour) + float scale, colour background_colour) { if (c->data.gif.current_frame != c->data.gif.gif->decoded_frame) if (nsgif_get_frame(c) != GIF_OK) @@ -168,7 +168,7 @@ bool nsgif_redraw(struct content *c, int x, int y, bool nsgif_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y) { if (c->data.gif.current_frame != c->data.gif.gif->decoded_frame) diff --git a/image/gif.h b/image/gif.h index 3be974f9e..571818ea2 100644 --- a/image/gif.h +++ b/image/gif.h @@ -43,11 +43,11 @@ void nsgif_destroy(struct content *c); bool nsgif_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour); + float scale, colour background_colour); bool nsgif_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y); void *nsgif_bitmap_create(int width, int height); diff --git a/image/ico.c b/image/ico.c index aaa889eca..fba45a942 100644 --- a/image/ico.c +++ b/image/ico.c @@ -101,7 +101,7 @@ bool nsico_convert(struct content *c, int iwidth, int iheight) bool nsico_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour) + float scale, colour background_colour) { struct bmp_image *bmp = ico_find(c->data.ico.ico, width, height); if (!bmp->decoded) @@ -116,7 +116,7 @@ bool nsico_redraw(struct content *c, int x, int y, bool nsico_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y) { struct bmp_image *bmp = ico_find(c->data.ico.ico, width, height); diff --git a/image/ico.h b/image/ico.h index 886b8654b..435981470 100644 --- a/image/ico.h +++ b/image/ico.h @@ -41,11 +41,11 @@ void nsico_destroy(struct content *c); bool nsico_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour); + float scale, colour background_colour); bool nsico_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y); #endif /* WITH_BMP */ diff --git a/image/jpeg.c b/image/jpeg.c index 7fc0b02e8..8ed0ee299 100644 --- a/image/jpeg.c +++ b/image/jpeg.c @@ -236,7 +236,7 @@ void nsjpeg_term_source(j_decompress_ptr cinfo) bool nsjpeg_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour) + float scale, colour background_colour) { return plot.bitmap(x, y, width, height, c->bitmap, background_colour, c); @@ -250,7 +250,7 @@ bool nsjpeg_redraw(struct content *c, int x, int y, bool nsjpeg_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y) { return plot.bitmap_tile(x, y, width, height, diff --git a/image/jpeg.h b/image/jpeg.h index ffe040943..ec2a4ecc1 100644 --- a/image/jpeg.h +++ b/image/jpeg.h @@ -40,11 +40,11 @@ void nsjpeg_destroy(struct content *c); bool nsjpeg_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour); + float scale, colour background_colour); bool nsjpeg_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y); #endif /* WITH_JPEG */ diff --git a/image/mng.c b/image/mng.c index 6daf662ea..42d542ade 100644 --- a/image/mng.c +++ b/image/mng.c @@ -495,7 +495,7 @@ void nsmng_destroy(struct content *c) { bool nsmng_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour) + float scale, colour background_colour) { bool ret; @@ -522,7 +522,7 @@ bool nsmng_redraw(struct content *c, int x, int y, bool nsmng_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y) { bool ret; diff --git a/image/mng.h b/image/mng.h index 765919e36..20a0462b0 100644 --- a/image/mng.h +++ b/image/mng.h @@ -48,11 +48,11 @@ void nsmng_destroy(struct content *c); bool nsmng_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour); + float scale, colour background_colour); bool nsmng_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y); #endif /* WITH_MNG */ diff --git a/image/png.c b/image/png.c index 31a9048df..e67253790 100644 --- a/image/png.c +++ b/image/png.c @@ -266,7 +266,7 @@ void nspng_destroy(struct content *c) bool nspng_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour) + float scale, colour background_colour) { if (c->bitmap != NULL) { return plot.bitmap(x, y, width, height, c->bitmap, @@ -278,7 +278,7 @@ bool nspng_redraw(struct content *c, int x, int y, bool nspng_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y) { if (c->bitmap != NULL) { diff --git a/image/png.h b/image/png.h index 00f41adf3..1e241ebcd 100644 --- a/image/png.h +++ b/image/png.h @@ -46,10 +46,10 @@ void nspng_destroy(struct content *c); bool nspng_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour); + float scale, colour background_colour); bool nspng_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y); #endif diff --git a/image/rsvg.c b/image/rsvg.c index c25870aa9..fe9ce648e 100644 --- a/image/rsvg.c +++ b/image/rsvg.c @@ -180,7 +180,7 @@ bool rsvg_convert(struct content *c, int iwidth, int iheight) bool rsvg_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour) + float scale, colour background_colour) { plot.bitmap(x, y, width, height, c->bitmap, background_colour, c); return true; @@ -188,7 +188,7 @@ bool rsvg_redraw(struct content *c, int x, int y, int width, int height, bool rsvg_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y) { return true; diff --git a/image/rsvg.h b/image/rsvg.h index 77f5dcfcb..d271c7aaa 100644 --- a/image/rsvg.h +++ b/image/rsvg.h @@ -47,11 +47,11 @@ void rsvg_destroy(struct content *c); bool rsvg_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour); + float scale, colour background_colour); bool rsvg_redraw_tiled(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour, + float scale, colour background_colour, bool repeat_x, bool repeat_y); #endif /* WITH_RSVG */ diff --git a/image/svg.c b/image/svg.c index c15a1892b..a1d0abce5 100644 --- a/image/svg.c +++ b/image/svg.c @@ -88,7 +88,7 @@ bool svg_convert(struct content *c, int w, int h) bool svg_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour) + float scale, colour background_colour) { float transform[6]; struct svgtiny_diagram *diagram = c->data.svg.diagram; diff --git a/image/svg.h b/image/svg.h index 00b628b80..ec9c789c2 100644 --- a/image/svg.h +++ b/image/svg.h @@ -38,6 +38,6 @@ void svg_destroy(struct content *c); bool svg_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour); + float scale, colour background_colour); #endif diff --git a/render/html.h b/render/html.h index 574205f32..f1ab9d86d 100644 --- a/render/html.h +++ b/render/html.h @@ -189,7 +189,7 @@ void html_close(struct content *c); bool html_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour); + float scale, colour background_colour); /* redraw a short text string, complete with highlighting diff --git a/render/html_redraw.c b/render/html_redraw.c index 5d9263983..72ba53dc3 100644 --- a/render/html_redraw.c +++ b/render/html_redraw.c @@ -113,7 +113,7 @@ bool html_redraw_debug = false; bool html_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour) + float scale, colour background_colour) { struct box *box; bool result, want_knockout; diff --git a/render/textplain.c b/render/textplain.c index 9503b3dad..a5a148617 100644 --- a/render/textplain.c +++ b/render/textplain.c @@ -326,7 +326,7 @@ void textplain_destroy(struct content *c) bool textplain_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour) + float scale, colour background_colour) { struct browser_window *bw = current_redraw_browser; char *utf8_data = c->data.textplain.utf8_data; diff --git a/render/textplain.h b/render/textplain.h index ec7162765..972405fe6 100644 --- a/render/textplain.h +++ b/render/textplain.h @@ -54,7 +54,7 @@ void textplain_destroy(struct content *c); bool textplain_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour); + float scale, colour background_colour); /* access to lines for text selection and searching */ #define textplain_line_count(c) ((c)->data.textplain.physical_line_count) diff --git a/riscos/image.c b/riscos/image.c index 7826ad7e4..9b3eaa5db 100644 --- a/riscos/image.c +++ b/riscos/image.c @@ -30,7 +30,7 @@ static bool image_redraw_tinct(osspriteop_id header, int x, int y, int req_width, int req_height, int width, int height, - unsigned long background_colour, bool repeatx, bool repeaty, + colour background_colour, bool repeatx, bool repeaty, bool alpha, unsigned int tinct_options); static bool image_redraw_os(osspriteop_id header, int x, int y, int req_width, int req_height, int width, int height); @@ -54,7 +54,7 @@ static bool image_redraw_os(osspriteop_id header, int x, int y, */ bool image_redraw(osspriteop_area *area, int x, int y, int req_width, int req_height, int width, int height, - unsigned long background_colour, + colour background_colour, bool repeatx, bool repeaty, bool background, image_type type) { unsigned int tinct_options; @@ -115,7 +115,7 @@ bool image_redraw(osspriteop_area *area, int x, int y, int req_width, */ bool image_redraw_tinct(osspriteop_id header, int x, int y, int req_width, int req_height, int width, int height, - unsigned long background_colour, bool repeatx, bool repeaty, + colour background_colour, bool repeatx, bool repeaty, bool alpha, unsigned int tinct_options) { _kernel_oserror *error; diff --git a/riscos/image.h b/riscos/image.h index 0997b793d..f0bf2fdf9 100644 --- a/riscos/image.h +++ b/riscos/image.h @@ -20,6 +20,7 @@ #define _NETSURF_RISCOS_IMAGE_H_ #include +#include "css/css.h" #include "oslib/osspriteop.h" struct osspriteop_area; @@ -32,7 +33,7 @@ typedef enum { bool image_redraw(osspriteop_area *area, int x, int y, int req_width, int req_height, int width, int height, - unsigned long background_colour, + colour background_colour, bool repeatx, bool repeaty, bool background, image_type type); #endif diff --git a/riscos/plugin.c b/riscos/plugin.c index 1e4279f18..d973e7472 100644 --- a/riscos/plugin.c +++ b/riscos/plugin.c @@ -250,7 +250,7 @@ void plugin_destroy(struct content *c) bool plugin_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour) + float scale, colour background_colour) { /* do nothing */ LOG(("plugin_redraw")); diff --git a/riscos/plugin.h b/riscos/plugin.h index ca73fedc2..39c2d1b3d 100644 --- a/riscos/plugin.h +++ b/riscos/plugin.h @@ -59,7 +59,7 @@ void plugin_destroy(struct content *c); bool plugin_redraw(struct content *c, int x, int y, int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1, - float scale, unsigned long background_colour); + float scale, colour background_colour); void plugin_open(struct content *c, struct browser_window *bw, struct content *page, unsigned int index, struct box *box, struct object_params *params); -- cgit v1.2.3