From: bernie Date: Thu, 26 Jan 2006 00:36:48 +0000 (+0000) Subject: Const correctness for some new functions. X-Git-Tag: 1.0.0~752 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=ca8daf282873c035853a69a1fa444810d0cb5de1;p=bertos.git Const correctness for some new functions. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@489 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/gfx/bitmap.c b/gfx/bitmap.c index 36c5d00e..8aef8a84 100755 --- a/gfx/bitmap.c +++ b/gfx/bitmap.c @@ -16,6 +16,9 @@ /*#* *#* $Log$ + *#* Revision 1.3 2006/01/26 00:36:48 bernie + *#* Const correctness for some new functions. + *#* *#* Revision 1.2 2006/01/24 21:55:43 aleph *#* gfx_blit_P(): use RASTER_SIZE() to calculate raster size *#* @@ -102,7 +105,7 @@ void gfx_blit_P(Bitmap *bm, const pgm_uint8_t *raster) * \param dst Bitmap where the operation writes * */ -void gfx_blit(Bitmap *dst, Rect *rect, Bitmap *src, coord_t srcx, coord_t srcy) +void gfx_blit(Bitmap *dst, const Rect *rect, const Bitmap *src, coord_t srcx, coord_t srcy) { coord_t dxmin, dymin, dxmax, dymax; coord_t dx, dy, sx, sy; diff --git a/gfx/gfx.h b/gfx/gfx.h index 73422409..80c477ab 100755 --- a/gfx/gfx.h +++ b/gfx/gfx.h @@ -14,6 +14,9 @@ /*#* *#* $Log$ + *#* Revision 1.7 2006/01/26 00:36:48 bernie + *#* Const correctness for some new functions. + *#* *#* Revision 1.6 2006/01/23 23:13:04 bernie *#* RECT_WIDTH(), RECT_HEIGHT(), RASTER_SIZE(): New macros. *#* @@ -147,7 +150,7 @@ typedef struct Bitmap /* Function prototypes */ extern void gfx_bitmapInit (Bitmap *bm, uint8_t *raster, coord_t w, coord_t h); extern void gfx_bitmapClear(Bitmap *bm); -extern void gfx_blit (Bitmap *dst, Rect *rect, Bitmap *src, coord_t srcx, coord_t srcy); +extern void gfx_blit (Bitmap *dst, const Rect *rect, const Bitmap *src, coord_t srcx, coord_t srcy); extern void gfx_line (Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2); extern void gfx_rectDraw (Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2); extern void gfx_rectFillC (Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2, uint8_t color); diff --git a/gfx/win.c b/gfx/win.c index 3d6db455..4bee65f6 100755 --- a/gfx/win.c +++ b/gfx/win.c @@ -20,6 +20,9 @@ /*#* *#* $Log$ + *#* Revision 1.2 2006/01/26 00:36:48 bernie + *#* Const correctness for some new functions. + *#* *#* Revision 1.1 2006/01/23 23:14:29 bernie *#* Implement simple, but impressive windowing system. *#* @@ -112,7 +115,7 @@ void win_raise(Window *w) * \see win_move() * \see win_resize() */ -void win_setGeometry(Window *w, Rect *new_geom) +void win_setGeometry(Window *w, const Rect *new_geom) { // requires C99? // memcpy(&w->geom, new_geom, sizeof(w->geom)); diff --git a/gfx/win.h b/gfx/win.h index d60041aa..14a01681 100755 --- a/gfx/win.h +++ b/gfx/win.h @@ -20,6 +20,9 @@ /*#* *#* $Log$ + *#* Revision 1.2 2006/01/26 00:36:48 bernie + *#* Const correctness for some new functions. + *#* *#* Revision 1.1 2006/01/23 23:14:29 bernie *#* Implement simple, but impressive windowing system. *#* @@ -78,7 +81,7 @@ void win_compose(Window *w); void win_open(Window *w, Window *parent); void win_close(Window *w); void win_raise(Window *w); -void win_setGeometry(Window *w, Rect *new_geom); +void win_setGeometry(Window *w, const Rect *new_geom); void win_move(Window *w, coord_t left, coord_t top); void win_resize(Window *w, coord_t width, coord_t height); void win_create(Window *w, Bitmap *bm);