[gimp] app: make clip rect and clip region parameters const
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: make clip rect and clip region parameters const
- Date: Sun, 2 May 2010 14:06:38 +0000 (UTC)
commit 1f8d2e66e1aec6ca256c03d655d651ed9149e805
Author: Michael Natterer <mitch gimp org>
Date: Sun May 2 16:06:15 2010 +0200
app: make clip rect and clip region parameters const
app/display/gimpcanvas.c | 8 +-
app/display/gimpcanvas.h | 158 +++++++++++++++++++++++-----------------------
2 files changed, 83 insertions(+), 83 deletions(-)
---
diff --git a/app/display/gimpcanvas.c b/app/display/gimpcanvas.c
index 5d3bf02..4942d6f 100644
--- a/app/display/gimpcanvas.c
+++ b/app/display/gimpcanvas.c
@@ -935,9 +935,9 @@ gimp_canvas_draw_drop_zone (GimpCanvas *canvas,
* Sets a rectangular clipping area for the specified style.
**/
void
-gimp_canvas_set_clip_rect (GimpCanvas *canvas,
- GimpCanvasStyle style,
- GdkRectangle *rect)
+gimp_canvas_set_clip_rect (GimpCanvas *canvas,
+ GimpCanvasStyle style,
+ const GdkRectangle *rect)
{
if (! canvas->gc[style])
{
@@ -961,7 +961,7 @@ gimp_canvas_set_clip_rect (GimpCanvas *canvas,
void
gimp_canvas_set_clip_region (GimpCanvas *canvas,
GimpCanvasStyle style,
- GdkRegion *region)
+ const GdkRegion *region)
{
if (! canvas->gc[style])
{
diff --git a/app/display/gimpcanvas.h b/app/display/gimpcanvas.h
index acaa76b..06f5b1c 100644
--- a/app/display/gimpcanvas.h
+++ b/app/display/gimpcanvas.h
@@ -88,86 +88,86 @@ struct _GimpCanvasClass
GType gimp_canvas_get_type (void) G_GNUC_CONST;
-GtkWidget * gimp_canvas_new (GimpDisplayConfig *config);
-
-void gimp_canvas_draw_cursor (GimpCanvas *canvas,
- gint x,
- gint y);
-void gimp_canvas_draw_point (GimpCanvas *canvas,
- GimpCanvasStyle style,
- gint x,
- gint y);
-void gimp_canvas_draw_points (GimpCanvas *canvas,
- GimpCanvasStyle style,
- GdkPoint *points,
- gint num_points);
-void gimp_canvas_draw_line (GimpCanvas *canvas,
- GimpCanvasStyle style,
- gint x1,
- gint y1,
- gint x2,
- gint y2);
-void gimp_canvas_draw_lines (GimpCanvas *canvas,
- GimpCanvasStyle style,
- GdkPoint *points,
- gint num_points);
-void gimp_canvas_draw_rectangle (GimpCanvas *canvas,
- GimpCanvasStyle style,
- gboolean filled,
- gint x,
- gint y,
- gint width,
- gint height);
-void gimp_canvas_draw_arc (GimpCanvas *canvas,
- GimpCanvasStyle style,
- gboolean filled,
- gint x,
- gint y,
- gint width,
- gint height,
- gint angle1,
- gint angle2);
-void gimp_canvas_draw_polygon (GimpCanvas *canvas,
- GimpCanvasStyle style,
- gboolean filled,
- GdkPoint *points,
- gint num_points);
-void gimp_canvas_draw_segments (GimpCanvas *canvas,
- GimpCanvasStyle style,
- GdkSegment *segments,
- gint num_segments);
-void gimp_canvas_draw_text (GimpCanvas *canvas,
- GimpCanvasStyle style,
- gint x,
- gint y,
- const gchar *format,
+GtkWidget * gimp_canvas_new (GimpDisplayConfig *config);
+
+void gimp_canvas_draw_cursor (GimpCanvas *canvas,
+ gint x,
+ gint y);
+void gimp_canvas_draw_point (GimpCanvas *canvas,
+ GimpCanvasStyle style,
+ gint x,
+ gint y);
+void gimp_canvas_draw_points (GimpCanvas *canvas,
+ GimpCanvasStyle style,
+ GdkPoint *points,
+ gint num_points);
+void gimp_canvas_draw_line (GimpCanvas *canvas,
+ GimpCanvasStyle style,
+ gint x1,
+ gint y1,
+ gint x2,
+ gint y2);
+void gimp_canvas_draw_lines (GimpCanvas *canvas,
+ GimpCanvasStyle style,
+ GdkPoint *points,
+ gint num_points);
+void gimp_canvas_draw_rectangle (GimpCanvas *canvas,
+ GimpCanvasStyle style,
+ gboolean filled,
+ gint x,
+ gint y,
+ gint width,
+ gint height);
+void gimp_canvas_draw_arc (GimpCanvas *canvas,
+ GimpCanvasStyle style,
+ gboolean filled,
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ gint angle1,
+ gint angle2);
+void gimp_canvas_draw_polygon (GimpCanvas *canvas,
+ GimpCanvasStyle style,
+ gboolean filled,
+ GdkPoint *points,
+ gint num_points);
+void gimp_canvas_draw_segments (GimpCanvas *canvas,
+ GimpCanvasStyle style,
+ GdkSegment *segments,
+ gint num_segments);
+void gimp_canvas_draw_text (GimpCanvas *canvas,
+ GimpCanvasStyle style,
+ gint x,
+ gint y,
+ const gchar *format,
...) G_GNUC_PRINTF (5, 6);
-void gimp_canvas_draw_rgb (GimpCanvas *canvas,
- GimpCanvasStyle style,
- gint x,
- gint y,
- gint width,
- gint height,
- guchar *rgb_buf,
- gint rowstride,
- gint xdith,
- gint ydith);
-void gimp_canvas_draw_drop_zone (GimpCanvas *canvas,
- cairo_t *cr);
-
-void gimp_canvas_set_clip_rect (GimpCanvas *canvas,
- GimpCanvasStyle style,
- GdkRectangle *rect);
-void gimp_canvas_set_clip_region (GimpCanvas *canvas,
- GimpCanvasStyle style,
- GdkRegion *region);
-void gimp_canvas_set_stipple_index (GimpCanvas *canvas,
- GimpCanvasStyle style,
- guint index);
-void gimp_canvas_set_custom_gc (GimpCanvas *canvas,
- GdkGC *gc);
-void gimp_canvas_set_bg_color (GimpCanvas *canvas,
- GimpRGB *color);
+void gimp_canvas_draw_rgb (GimpCanvas *canvas,
+ GimpCanvasStyle style,
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ guchar *rgb_buf,
+ gint rowstride,
+ gint xdith,
+ gint ydith);
+void gimp_canvas_draw_drop_zone (GimpCanvas *canvas,
+ cairo_t *cr);
+
+void gimp_canvas_set_clip_rect (GimpCanvas *canvas,
+ GimpCanvasStyle style,
+ const GdkRectangle *rect);
+void gimp_canvas_set_clip_region (GimpCanvas *canvas,
+ GimpCanvasStyle style,
+ const GdkRegion *region);
+void gimp_canvas_set_stipple_index (GimpCanvas *canvas,
+ GimpCanvasStyle style,
+ guint index);
+void gimp_canvas_set_custom_gc (GimpCanvas *canvas,
+ GdkGC *gc);
+void gimp_canvas_set_bg_color (GimpCanvas *canvas,
+ GimpRGB *color);
#endif /* __GIMP_CANVAS_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]