gtk+ r19372 - in trunk: . gdk gdk/directfb gdk/quartz gdk/win32 gdk/x11



Author: mitch
Date: Tue Jan 15 15:32:37 2008
New Revision: 19372
URL: http://svn.gnome.org/viewvc/gtk+?rev=19372&view=rev

Log:
2008-01-15  Michael Natterer  <mitch imendio com>

	* gdk/gdkdisplay.h
	* gdk/gdkdrawable.h
	* gdk/gdkevents.h
	* gdk/gdkpango.h
	* gdk/gdkregion.h
	* gdk/gdkrgb.h
	* gdk/gdkwindow.h: made more struct pointer and array parameters
	const. GDK should now be constified as far as possible without
	breaking source compatibility. Includes some minor cleanup like
	indentation and s/nfoo/n_foo/ (bug #508544).

	* gdk/gdkdisplay.c
	* gdk/gdkdraw.c
	* gdk/gdkevents.c
	* gdk/gdkpango.c
	* gdk/gdkregion-generic.c
	* gdk/gdkrgb.c
	* gdk/directfb/gdkdisplay-directfb.c
	* gdk/directfb/gdkwindow-directfb.c
	* gdk/quartz/gdkdisplay-quartz.c
	* gdk/quartz/gdkwindow-quartz.c
	* gdk/win32/gdkdisplay-win32.c
	* gdk/win32/gdkwindow-win32.c
	* gdk/x11/gdkdisplay-x11.c
	* gdk/x11/gdkwindow-x11.c: changed accordingly.



Modified:
   trunk/ChangeLog
   trunk/gdk/directfb/gdkdisplay-directfb.c
   trunk/gdk/directfb/gdkwindow-directfb.c
   trunk/gdk/gdkdisplay.c
   trunk/gdk/gdkdisplay.h
   trunk/gdk/gdkdraw.c
   trunk/gdk/gdkdrawable.h
   trunk/gdk/gdkevents.c
   trunk/gdk/gdkevents.h
   trunk/gdk/gdkpango.c
   trunk/gdk/gdkpango.h
   trunk/gdk/gdkregion-generic.c
   trunk/gdk/gdkregion.h
   trunk/gdk/gdkrgb.c
   trunk/gdk/gdkrgb.h
   trunk/gdk/gdkwindow.h
   trunk/gdk/quartz/gdkdisplay-quartz.c
   trunk/gdk/quartz/gdkwindow-quartz.c
   trunk/gdk/win32/gdkdisplay-win32.c
   trunk/gdk/win32/gdkwindow-win32.c
   trunk/gdk/x11/gdkdisplay-x11.c
   trunk/gdk/x11/gdkwindow-x11.c

Modified: trunk/gdk/directfb/gdkdisplay-directfb.c
==============================================================================
--- trunk/gdk/directfb/gdkdisplay-directfb.c	(original)
+++ trunk/gdk/directfb/gdkdisplay-directfb.c	Tue Jan 15 15:32:37 2008
@@ -250,11 +250,11 @@
 }
 
 void
-gdk_display_store_clipboard (GdkDisplay *display,
-                             GdkWindow  *clipboard_window,
-                             guint32     time_,
-                             GdkAtom    *targets,
-                             gint        n_targets)
+gdk_display_store_clipboard (GdkDisplay    *display,
+                             GdkWindow     *clipboard_window,
+                             guint32        time_,
+                             const GdkAtom *targets,
+                             gint           n_targets)
 {
 
 	g_warning("gdk_display_store_clipboard Unimplemented function \n");

Modified: trunk/gdk/directfb/gdkwindow-directfb.c
==============================================================================
--- trunk/gdk/directfb/gdkwindow-directfb.c	(original)
+++ trunk/gdk/directfb/gdkwindow-directfb.c	Tue Jan 15 15:32:37 2008
@@ -1707,9 +1707,9 @@
 }
 
 void
-gdk_window_set_geometry_hints (GdkWindow      *window,
-                               GdkGeometry    *geometry,
-                               GdkWindowHints  geom_mask)
+gdk_window_set_geometry_hints (GdkWindow         *window,
+                               const GdkGeometry *geometry,
+                               GdkWindowHints     geom_mask)
 {
   g_return_if_fail (GDK_IS_WINDOW (window));
 

Modified: trunk/gdk/gdkdisplay.c
==============================================================================
--- trunk/gdk/gdkdisplay.c	(original)
+++ trunk/gdk/gdkdisplay.c	Tue Jan 15 15:32:37 2008
@@ -251,8 +251,8 @@
  * Since: 2.2
  **/
 void
-gdk_display_put_event (GdkDisplay *display,
-		       GdkEvent   *event)
+gdk_display_put_event (GdkDisplay     *display,
+		       const GdkEvent *event)
 {
   g_return_if_fail (GDK_IS_DISPLAY (display));
   g_return_if_fail (event != NULL);

Modified: trunk/gdk/gdkdisplay.h
==============================================================================
--- trunk/gdk/gdkdisplay.h	(original)
+++ trunk/gdk/gdkdisplay.h	Tue Jan 15 15:32:37 2008
@@ -122,10 +122,10 @@
 
 GList *     gdk_display_list_devices       (GdkDisplay  *display);
 
-GdkEvent* gdk_display_get_event  (GdkDisplay *display);
-GdkEvent* gdk_display_peek_event (GdkDisplay *display);
-void      gdk_display_put_event  (GdkDisplay *display,
-				  GdkEvent   *event);
+GdkEvent* gdk_display_get_event  (GdkDisplay     *display);
+GdkEvent* gdk_display_peek_event (GdkDisplay     *display);
+void      gdk_display_put_event  (GdkDisplay     *display,
+				  const GdkEvent *event);
 
 void gdk_display_add_client_message_filter (GdkDisplay   *display,
 					    GdkAtom       message_type,
@@ -172,12 +172,12 @@
 gboolean gdk_display_request_selection_notification  (GdkDisplay *display,
 						      GdkAtom     selection);
 
-gboolean gdk_display_supports_clipboard_persistence (GdkDisplay *display);
-void     gdk_display_store_clipboard                (GdkDisplay *display,
-						     GdkWindow  *clipboard_window,
-						     guint32     time_,
-						     GdkAtom    *targets,
-						     gint        n_targets);
+gboolean gdk_display_supports_clipboard_persistence (GdkDisplay    *display);
+void     gdk_display_store_clipboard                (GdkDisplay    *display,
+						     GdkWindow     *clipboard_window,
+						     guint32        time_,
+						     const GdkAtom *targets,
+						     gint           n_targets);
 
 gboolean gdk_display_supports_shapes           (GdkDisplay    *display);
 gboolean gdk_display_supports_input_shapes     (GdkDisplay    *display);

Modified: trunk/gdk/gdkdraw.c
==============================================================================
--- trunk/gdk/gdkdraw.c	(original)
+++ trunk/gdk/gdkdraw.c	Tue Jan 15 15:32:37 2008
@@ -467,22 +467,23 @@
  *     necessary.
  * @points: an array of #GdkPoint structures specifying the points making 
  *     up the polygon.
- * @npoints: the number of points.
+ * @n_points: the number of points.
  * 
  * Draws an outlined or filled polygon.
  **/
 void
-gdk_draw_polygon (GdkDrawable *drawable,
-		  GdkGC       *gc,
-		  gboolean     filled,
-		  GdkPoint    *points,
-		  gint         npoints)
+gdk_draw_polygon (GdkDrawable    *drawable,
+		  GdkGC          *gc,
+		  gboolean        filled,
+		  const GdkPoint *points,
+		  gint            n_points)
 {
   g_return_if_fail (GDK_IS_DRAWABLE (drawable));
   g_return_if_fail (GDK_IS_GC (gc));
 
   GDK_DRAWABLE_GET_CLASS (drawable)->draw_polygon (drawable, gc, filled,
-                                                   points, npoints);
+                                                   (GdkPoint *) points,
+                                                   n_points);
 }
 
 /* gdk_draw_string
@@ -741,17 +742,17 @@
  **/
 void
 gdk_draw_pixbuf (GdkDrawable     *drawable,
-		  GdkGC           *gc,
-		  GdkPixbuf       *pixbuf,
-		  gint             src_x,
-		  gint             src_y,
-		  gint             dest_x,
-		  gint             dest_y,
-		  gint             width,
-		  gint             height,
-		  GdkRgbDither     dither,
-		  gint             x_dither,
-		  gint             y_dither)
+                 GdkGC           *gc,
+                 const GdkPixbuf *pixbuf,
+                 gint             src_x,
+                 gint             src_y,
+                 gint             dest_x,
+                 gint             dest_y,
+                 gint             width,
+                 gint             height,
+                 GdkRgbDither     dither,
+                 gint             x_dither,
+                 gint             y_dither)
 {
   g_return_if_fail (GDK_IS_DRAWABLE (drawable));
   g_return_if_fail (gc == NULL || GDK_IS_GC (gc));
@@ -765,7 +766,8 @@
   if (height == -1)
     height = gdk_pixbuf_get_height (pixbuf);
 
-  GDK_DRAWABLE_GET_CLASS (drawable)->draw_pixbuf (drawable, gc, pixbuf,
+  GDK_DRAWABLE_GET_CLASS (drawable)->draw_pixbuf (drawable, gc,
+                                                  (GdkPixbuf *) pixbuf,
 						  src_x, src_y, dest_x, dest_y,
                                                   width, height,
 						  dither, x_dither, y_dither);
@@ -776,26 +778,27 @@
  * @drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
  * @gc: a #GdkGC.
  * @points: an array of #GdkPoint structures.
- * @npoints: the number of points to be drawn.
+ * @n_points: the number of points to be drawn.
  * 
  * Draws a number of points, using the foreground color and other 
  * attributes of the #GdkGC.
  **/
 void
-gdk_draw_points (GdkDrawable *drawable,
-		 GdkGC       *gc,
-		 GdkPoint    *points,
-		 gint         npoints)
+gdk_draw_points (GdkDrawable    *drawable,
+		 GdkGC          *gc,
+		 const GdkPoint *points,
+		 gint            n_points)
 {
   g_return_if_fail (GDK_IS_DRAWABLE (drawable));
-  g_return_if_fail ((points != NULL) && (npoints > 0));
+  g_return_if_fail ((points != NULL) && (n_points > 0));
   g_return_if_fail (GDK_IS_GC (gc));
-  g_return_if_fail (npoints >= 0);
+  g_return_if_fail (n_points >= 0);
 
-  if (npoints == 0)
+  if (n_points == 0)
     return;
 
-  GDK_DRAWABLE_GET_CLASS (drawable)->draw_points (drawable, gc, points, npoints);
+  GDK_DRAWABLE_GET_CLASS (drawable)->draw_points (drawable, gc,
+                                                  (GdkPoint *) points, n_points);
 }
 
 /**
@@ -804,27 +807,28 @@
  * @gc: a #GdkGC.
  * @segs: an array of #GdkSegment structures specifying the start and 
  *   end points of the lines to be drawn.
- * @nsegs: the number of line segments to draw, i.e. the size of the 
+ * @n_segs: the number of line segments to draw, i.e. the size of the 
  *   @segs array.
  * 
  * Draws a number of unconnected lines.
  **/
 void
-gdk_draw_segments (GdkDrawable *drawable,
-		   GdkGC       *gc,
-		   GdkSegment  *segs,
-		   gint         nsegs)
+gdk_draw_segments (GdkDrawable      *drawable,
+		   GdkGC            *gc,
+		   const GdkSegment *segs,
+		   gint              n_segs)
 {
   g_return_if_fail (GDK_IS_DRAWABLE (drawable));
 
-  if (nsegs == 0)
+  if (n_segs == 0)
     return;
 
   g_return_if_fail (segs != NULL);
   g_return_if_fail (GDK_IS_GC (gc));
-  g_return_if_fail (nsegs >= 0);
+  g_return_if_fail (n_segs >= 0);
 
-  GDK_DRAWABLE_GET_CLASS (drawable)->draw_segments (drawable, gc, segs, nsegs);
+  GDK_DRAWABLE_GET_CLASS (drawable)->draw_segments (drawable, gc,
+                                                    (GdkSegment *) segs, n_segs);
 }
 
 /**
@@ -832,7 +836,7 @@
  * @drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
  * @gc: a #GdkGC.
  * @points: an array of #GdkPoint structures specifying the endpoints of the
- * @npoints: the size of the @points array.
+ * @n_points: the size of the @points array.
  * 
  * Draws a series of lines connecting the given points.
  * The way in which joins between lines are draw is determined by the
@@ -840,30 +844,31 @@
  * gdk_gc_set_line_attributes().
  **/
 void
-gdk_draw_lines (GdkDrawable *drawable,
-		GdkGC       *gc,
-		GdkPoint    *points,
-		gint         npoints)
+gdk_draw_lines (GdkDrawable    *drawable,
+		GdkGC          *gc,
+		const GdkPoint *points,
+		gint            n_points)
 {
   g_return_if_fail (GDK_IS_DRAWABLE (drawable));
   g_return_if_fail (points != NULL);
   g_return_if_fail (GDK_IS_GC (gc));
-  g_return_if_fail (npoints >= 0);
+  g_return_if_fail (n_points >= 0);
 
-  if (npoints == 0)
+  if (n_points == 0)
     return;
 
-  GDK_DRAWABLE_GET_CLASS (drawable)->draw_lines (drawable, gc, points, npoints);
+  GDK_DRAWABLE_GET_CLASS (drawable)->draw_lines (drawable, gc,
+                                                 (GdkPoint *) points, n_points);
 }
 
 static void
-real_draw_glyphs (GdkDrawable      *drawable,
-		  GdkGC	           *gc,
-		  PangoMatrix      *matrix,
-		  PangoFont        *font,
-		  gdouble           x,
-		  gdouble           y,
-		  PangoGlyphString *glyphs)
+real_draw_glyphs (GdkDrawable       *drawable,
+		  GdkGC	            *gc,
+		  const PangoMatrix *matrix,
+		  PangoFont         *font,
+		  gdouble            x,
+		  gdouble            y,
+		  PangoGlyphString  *glyphs)
 {
   cairo_t *cr;
 
@@ -948,13 +953,13 @@
  * Since: 2.6
  **/
 void
-gdk_draw_glyphs_transformed (GdkDrawable      *drawable,
-			     GdkGC	      *gc,
-			     PangoMatrix      *matrix,
-			     PangoFont        *font,
-			     gint              x,
-			     gint              y,
-			     PangoGlyphString *glyphs)
+gdk_draw_glyphs_transformed (GdkDrawable       *drawable,
+			     GdkGC	       *gc,
+			     const PangoMatrix *matrix,
+			     PangoFont         *font,
+			     gint               x,
+			     gint               y,
+			     PangoGlyphString  *glyphs)
 {
   g_return_if_fail (GDK_IS_DRAWABLE (drawable));
   g_return_if_fail (GDK_IS_GC (gc));
@@ -979,10 +984,10 @@
  * Since: 2.6
  **/
 void
-gdk_draw_trapezoids (GdkDrawable    *drawable,
-		     GdkGC	    *gc,
-		     GdkTrapezoid   *trapezoids,
-		     gint            n_trapezoids)
+gdk_draw_trapezoids (GdkDrawable        *drawable,
+		     GdkGC	        *gc,
+		     const GdkTrapezoid *trapezoids,
+		     gint                n_trapezoids)
 {
   cairo_t *cr;
   int i;

Modified: trunk/gdk/gdkdrawable.h
==============================================================================
--- trunk/gdk/gdkdrawable.h	(original)
+++ trunk/gdk/gdkdrawable.h	Tue Jan 15 15:32:37 2008
@@ -109,7 +109,7 @@
 			  GdkGC	       *gc,
 			  GdkSegment   *segs,
 			  gint		nsegs);
- void (*draw_lines)     (GdkDrawable  *drawable,
+  void (*draw_lines)     (GdkDrawable  *drawable,
 			  GdkGC        *gc,
 			  GdkPoint     *points,
 			  gint          npoints);
@@ -276,8 +276,8 @@
 void gdk_draw_polygon   (GdkDrawable      *drawable,
 			 GdkGC            *gc,
 			 gboolean          filled,
-			 GdkPoint         *points,
-			 gint              npoints);
+			 const GdkPoint   *points,
+			 gint              n_points);
 #if !defined (GDK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
 /* Used by gtk_default_draw_string () */
 void gdk_draw_string    (GdkDrawable      *drawable,
@@ -325,19 +325,19 @@
 			 gint              height);
 void gdk_draw_points    (GdkDrawable      *drawable,
 			 GdkGC            *gc,
-			 GdkPoint         *points,
-			 gint              npoints);
+			 const GdkPoint   *points,
+			 gint              n_points);
 void gdk_draw_segments  (GdkDrawable      *drawable,
 			 GdkGC            *gc,
-			 GdkSegment       *segs,
-			 gint              nsegs);
+			 const GdkSegment *segs,
+			 gint              n_segs);
 void gdk_draw_lines     (GdkDrawable      *drawable,
 			 GdkGC            *gc,
-			 GdkPoint         *points,
-			 gint              npoints);
+			 const GdkPoint   *points,
+			 gint              n_points);
 void gdk_draw_pixbuf    (GdkDrawable      *drawable,
 			 GdkGC            *gc,
-			 GdkPixbuf        *pixbuf,
+			 const GdkPixbuf  *pixbuf,
 			 gint              src_x,
 			 gint              src_y,
 			 gint              dest_x,
@@ -380,17 +380,17 @@
                                        const GdkColor  *foreground,
                                        const GdkColor  *background);
 
-void gdk_draw_glyphs_transformed (GdkDrawable      *drawable,
-				  GdkGC	           *gc,
-				  PangoMatrix      *matrix,
-				  PangoFont        *font,
-				  gint              x,
-				  gint              y,
-				  PangoGlyphString *glyphs);
-void gdk_draw_trapezoids         (GdkDrawable      *drawable,
-				  GdkGC	           *gc,
-				  GdkTrapezoid     *trapezoids,
-				  gint              n_trapezoids);
+void gdk_draw_glyphs_transformed (GdkDrawable        *drawable,
+				  GdkGC	             *gc,
+				  const PangoMatrix  *matrix,
+				  PangoFont          *font,
+				  gint                x,
+				  gint                y,
+				  PangoGlyphString   *glyphs);
+void gdk_draw_trapezoids         (GdkDrawable        *drawable,
+				  GdkGC	             *gc,
+				  const GdkTrapezoid *trapezoids,
+				  gint                n_trapezoids);
 
 #ifndef GDK_DISABLE_DEPRECATED
 #define gdk_draw_pixmap                gdk_draw_drawable

Modified: trunk/gdk/gdkevents.c
==============================================================================
--- trunk/gdk/gdkevents.c	(original)
+++ trunk/gdk/gdkevents.c	Tue Jan 15 15:32:37 2008
@@ -237,7 +237,7 @@
  * queue if event->any.window is %NULL. See gdk_display_put_event().
  **/
 void
-gdk_event_put (GdkEvent *event)
+gdk_event_put (const GdkEvent *event)
 {
   GdkDisplay *display;
   
@@ -332,7 +332,7 @@
 }
 
 static gboolean
-gdk_event_is_allocated (GdkEvent *event)
+gdk_event_is_allocated (const GdkEvent *event)
 {
   if (event_hash)
     return g_hash_table_lookup (event_hash, event) != NULL;
@@ -351,7 +351,7 @@
  * gdk_event_free().
  **/
 GdkEvent*
-gdk_event_copy (GdkEvent *event)
+gdk_event_copy (const GdkEvent *event)
 {
   GdkEventPrivate *new_private;
   GdkEvent *new_event;
@@ -499,7 +499,7 @@
  * Return value: time stamp field from @event
  **/
 guint32
-gdk_event_get_time (GdkEvent *event)
+gdk_event_get_time (const GdkEvent *event)
 {
   if (event)
     switch (event->type)
@@ -570,8 +570,8 @@
  * Return value: %TRUE if there was a state field in the event 
  **/
 gboolean
-gdk_event_get_state (GdkEvent        *event,
-                     GdkModifierType *state)
+gdk_event_get_state (const GdkEvent        *event,
+                     GdkModifierType       *state)
 {
   g_return_val_if_fail (state != NULL, FALSE);
   
@@ -646,9 +646,9 @@
  * Return value: %TRUE if the event delivered event window coordinates
  **/
 gboolean
-gdk_event_get_coords (GdkEvent *event,
-		      gdouble  *x_win,
-		      gdouble  *y_win)
+gdk_event_get_coords (const GdkEvent *event,
+		      gdouble        *x_win,
+		      gdouble        *y_win)
 {
   gdouble x = 0, y = 0;
   gboolean fetched = TRUE;
@@ -705,9 +705,9 @@
  * Return value: %TRUE if the event delivered root window coordinates
  **/
 gboolean
-gdk_event_get_root_coords (GdkEvent *event,
-			   gdouble  *x_root,
-			   gdouble  *y_root)
+gdk_event_get_root_coords (const GdkEvent *event,
+			   gdouble        *x_root,
+			   gdouble        *y_root)
 {
   gdouble x = 0, y = 0;
   gboolean fetched = TRUE;
@@ -770,9 +770,9 @@
  * Return value: %TRUE if the specified axis was found, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_axis (GdkEvent   *event,
-		    GdkAxisUse  axis_use,
-		    gdouble    *value)
+gdk_event_get_axis (const GdkEvent *event,
+		    GdkAxisUse      axis_use,
+		    gdouble        *value)
 {
   gdouble *axes;
   GdkDevice *device;
@@ -856,7 +856,7 @@
  * Since: 2.12
  **/
 void
-gdk_event_request_motions (GdkEventMotion *event)
+gdk_event_request_motions (const GdkEventMotion *event)
 {
   g_return_if_fail (event != NULL);
   if (event->type == GDK_MOTION_NOTIFY && event->is_hint)
@@ -904,7 +904,7 @@
  * Since: 2.2
  **/
 GdkScreen *
-gdk_event_get_screen (GdkEvent *event)
+gdk_event_get_screen (const GdkEvent *event)
 {
   if (gdk_event_is_allocated (event))
     {

Modified: trunk/gdk/gdkevents.h
==============================================================================
--- trunk/gdk/gdkevents.h	(original)
+++ trunk/gdk/gdkevents.h	Tue Jan 15 15:32:37 2008
@@ -511,32 +511,32 @@
 
 GdkEvent* gdk_event_peek                (void);
 GdkEvent* gdk_event_get_graphics_expose (GdkWindow 	*window);
-void      gdk_event_put	 		(GdkEvent  	*event);
+void      gdk_event_put	 		(const GdkEvent *event);
 
 GdkEvent* gdk_event_new                 (GdkEventType    type);
-GdkEvent* gdk_event_copy     		(GdkEvent 	*event);
+GdkEvent* gdk_event_copy     		(const GdkEvent *event);
 void	  gdk_event_free     		(GdkEvent 	*event);
 
-guint32   gdk_event_get_time            (GdkEvent        *event);
-gboolean  gdk_event_get_state           (GdkEvent        *event,
+guint32   gdk_event_get_time            (const GdkEvent  *event);
+gboolean  gdk_event_get_state           (const GdkEvent  *event,
                                          GdkModifierType *state);
-gboolean  gdk_event_get_coords		(GdkEvent	 *event,
+gboolean  gdk_event_get_coords		(const GdkEvent  *event,
 					 gdouble	 *x_win,
 					 gdouble	 *y_win);
-gboolean  gdk_event_get_root_coords	(GdkEvent	 *event,
+gboolean  gdk_event_get_root_coords	(const GdkEvent  *event,
 					 gdouble	 *x_root,
 					 gdouble	 *y_root);
-gboolean  gdk_event_get_axis            (GdkEvent        *event,
+gboolean  gdk_event_get_axis            (const GdkEvent  *event,
                                          GdkAxisUse       axis_use,
                                          gdouble         *value);
-void      gdk_event_request_motions     (GdkEventMotion  *event);
+void      gdk_event_request_motions     (const GdkEventMotion *event);
 void	  gdk_event_handler_set 	(GdkEventFunc    func,
 					 gpointer        data,
 					 GDestroyNotify  notify);
 
-void       gdk_event_set_screen (GdkEvent  *event,
-				 GdkScreen *screen);
-GdkScreen *gdk_event_get_screen (GdkEvent  *event);
+void       gdk_event_set_screen         (GdkEvent        *event,
+                                         GdkScreen       *screen);
+GdkScreen *gdk_event_get_screen         (const GdkEvent  *event);
 
 void	  gdk_set_show_events		(gboolean	 show_events);
 gboolean  gdk_get_show_events		(void);

Modified: trunk/gdk/gdkpango.c
==============================================================================
--- trunk/gdk/gdkpango.c	(original)
+++ trunk/gdk/gdkpango.c	Tue Jan 15 15:32:37 2008
@@ -1214,7 +1214,7 @@
 layout_iter_get_line_clip_region (PangoLayoutIter *iter,
 				  gint             x_origin,
 				  gint             y_origin,
-				  gint            *index_ranges,
+				  const gint      *index_ranges,
 				  gint             n_ranges)
 {
   PangoLayoutLine *line;
@@ -1297,7 +1297,7 @@
 gdk_pango_layout_line_get_clip_region (PangoLayoutLine *line,
                                        gint             x_origin,
                                        gint             y_origin,
-                                       gint            *index_ranges,
+                                       const gint      *index_ranges,
                                        gint             n_ranges)
 {
   GdkRegion *clip_region;
@@ -1341,7 +1341,7 @@
 gdk_pango_layout_get_clip_region (PangoLayout *layout,
                                   gint         x_origin,
                                   gint         y_origin,
-                                  gint        *index_ranges,
+                                  const gint  *index_ranges,
                                   gint         n_ranges)
 {
   PangoLayoutIter *iter;  

Modified: trunk/gdk/gdkpango.h
==============================================================================
--- trunk/gdk/gdkpango.h	(original)
+++ trunk/gdk/gdkpango.h	Tue Jan 15 15:32:37 2008
@@ -119,12 +119,12 @@
 GdkRegion    *gdk_pango_layout_line_get_clip_region (PangoLayoutLine *line,
                                                      gint             x_origin,
                                                      gint             y_origin,
-                                                     gint            *index_ranges,
+                                                     const gint      *index_ranges,
                                                      gint             n_ranges);
 GdkRegion    *gdk_pango_layout_get_clip_region      (PangoLayout     *layout,
                                                      gint             x_origin,
                                                      gint             y_origin,
-                                                     gint            *index_ranges,
+                                                     const gint      *index_ranges,
                                                      gint             n_ranges);
 
 

Modified: trunk/gdk/gdkregion-generic.c
==============================================================================
--- trunk/gdk/gdkregion-generic.c	(original)
+++ trunk/gdk/gdkregion-generic.c	Tue Jan 15 15:32:37 2008
@@ -1689,17 +1689,16 @@
 
 
 static void
-gdk_region_unsorted_spans_intersect_foreach (GdkRegion *region,
-					     GdkSpan   *spans,
-					     int        n_spans,
-					     GdkSpanFunc function,
-					     gpointer data)
+gdk_region_unsorted_spans_intersect_foreach (GdkRegion     *region,
+					     const GdkSpan *spans,
+					     int            n_spans,
+					     GdkSpanFunc    function,
+					     gpointer       data)
 {
   gint i, left, right, y;
   gint clipped_left, clipped_right;
   GdkRegionBox *pbox;
   GdkRegionBox *pboxEnd;
-  GdkSpan out_span;
 
   if (!region->numRects)
     return;
@@ -1729,6 +1728,8 @@
 	  
 	  if ((right > pbox->x1) && (left < pbox->x2)) 
 	    {
+              GdkSpan out_span;
+
 	      clipped_left = MAX (left, pbox->x1);
 	      clipped_right = MIN (right, pbox->x2);
 	      
@@ -1753,20 +1754,19 @@
  * Calls a function on each span in the intersection of @region and @spans.
  */
 void
-gdk_region_spans_intersect_foreach (GdkRegion  *region,
-				    GdkSpan    *spans,
-				    int         n_spans,
-				    gboolean    sorted,
-				    GdkSpanFunc function,
-				    gpointer    data)
+gdk_region_spans_intersect_foreach (GdkRegion     *region,
+				    const GdkSpan *spans,
+				    int            n_spans,
+				    gboolean       sorted,
+				    GdkSpanFunc    function,
+				    gpointer       data)
 {
   gint left, right, y;
   gint clipped_left, clipped_right;
   GdkRegionBox *pbox;
   GdkRegionBox *pboxEnd;
-  GdkSpan *span, *tmpspan;
-  GdkSpan *end_span;
-  GdkSpan out_span;
+  const GdkSpan *span, *tmpspan;
+  const GdkSpan *end_span;
 
   g_return_if_fail (region != NULL);
   g_return_if_fail (spans != NULL);
@@ -1825,6 +1825,8 @@
 	  
 	  if ((right > pbox->x1) && (left < pbox->x2))
 	    {
+              GdkSpan out_span;
+
 	      clipped_left = MAX (left, pbox->x1);
 	      clipped_right = MIN (right, pbox->x2);
 	      

Modified: trunk/gdk/gdkregion.h
==============================================================================
--- trunk/gdk/gdkregion.h	(original)
+++ trunk/gdk/gdkregion.h	Tue Jan 15 15:32:37 2008
@@ -97,7 +97,7 @@
                                            const GdkRegion    *source2);
 
 void   gdk_region_spans_intersect_foreach (GdkRegion          *region,
-                                           GdkSpan            *spans,
+                                           const GdkSpan      *spans,
                                            int                 n_spans,
                                            gboolean            sorted,
                                            GdkSpanFunc         function,

Modified: trunk/gdk/gdkrgb.c
==============================================================================
--- trunk/gdk/gdkrgb.c	(original)
+++ trunk/gdk/gdkrgb.c	Tue Jan 15 15:32:37 2008
@@ -50,7 +50,7 @@
 typedef void (*GdkRgbConvFunc) (GdkRgbInfo *image_info, GdkImage *image,
 				gint x0, gint y0,
 				gint width, gint height,
-				guchar *buf, int rowstride,
+				const guchar *buf, int rowstride,
 				gint x_align, gint y_align,
 				GdkRgbCmap *cmap);
 
@@ -849,13 +849,13 @@
 static void
 gdk_rgb_convert_8 (GdkRgbInfo *image_info, GdkImage *image,
 		   gint x0, gint y0, gint width, gint height,
-		   guchar *buf, int rowstride,
+		   const guchar *buf, int rowstride,
 		   gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   gint bpl;
   guchar *obuf, *obptr;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
   guchar *colorcube = image_info->colorcube;
 
@@ -925,13 +925,13 @@
 static void
 gdk_rgb_convert_8 (GdkRgbInfo *image_info, GdkImage *image,
 		   gint x0, gint y0, gint width, gint height,
-		   guchar *buf, int rowstride,
+		   const guchar *buf, int rowstride,
 		   gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   gint bpl;
   guchar *obuf, *obptr;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
   guchar *colorcube = image_info->colorcube;
 
@@ -1298,13 +1298,13 @@
 static void
 gdk_rgb_convert_8_d666 (GdkRgbInfo *image_info, GdkImage *image,
 			gint x0, gint y0, gint width, gint height,
-			guchar *buf, int rowstride,
+			const guchar *buf, int rowstride,
 			gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   gint bpl;
   guchar *obuf, *obptr;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
   const guchar *dmp;
   gint dith;
@@ -1338,14 +1338,14 @@
 static void
 gdk_rgb_convert_8_d (GdkRgbInfo *image_info, GdkImage *image,
 		     gint x0, gint y0, gint width, gint height,
-		     guchar *buf, int rowstride,
+		     const guchar *buf, int rowstride,
 		     gint x_align, gint y_align,
 		     GdkRgbCmap *cmap)
 {
   int x, y;
   gint bpl;
   guchar *obuf, *obptr;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
   const guchar *dmp;
   gint dith;
@@ -1383,13 +1383,13 @@
 static void
 gdk_rgb_convert_8_indexed (GdkRgbInfo *image_info, GdkImage *image,
 			   gint x0, gint y0, gint width, gint height,
-			   guchar *buf, int rowstride,
+			   const guchar *buf, int rowstride,
 			   gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   gint bpl;
   guchar *obuf, *obptr;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   guchar c;
   guchar *lut;
   GdkRgbCmapInfo *cmap_info = gdk_rgb_cmap_get_info (cmap, image_info);
@@ -1416,13 +1416,13 @@
 static void
 gdk_rgb_convert_gray8 (GdkRgbInfo *image_info, GdkImage *image,
 		       gint x0, gint y0, gint width, gint height,
-		       guchar *buf, int rowstride,
+		       const guchar *buf, int rowstride,
 		       gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   gint bpl;
   guchar *obuf, *obptr;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
 
   bptr = buf;
@@ -1448,13 +1448,13 @@
 static void
 gdk_rgb_convert_gray8_gray (GdkRgbInfo *image_info, GdkImage *image,
 			    gint x0, gint y0, gint width, gint height,
-			    guchar *buf, int rowstride,
+			    const guchar *buf, int rowstride,
 			    gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int y;
   gint bpl;
   guchar *obuf;
-  guchar *bptr;
+  const guchar *bptr;
 
   bptr = buf;
   bpl = image->bpl;
@@ -1483,13 +1483,13 @@
 static void
 gdk_rgb_convert_565 (GdkRgbInfo *image_info, GdkImage *image,
 		     gint x0, gint y0, gint width, gint height,
-		     guchar *buf, int rowstride,
+		     const guchar *buf, int rowstride,
 		     gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   guchar *obuf, *obptr;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   guchar r, g, b;
 
   bptr = buf;
@@ -1580,13 +1580,13 @@
 static void
 gdk_rgb_convert_565 (GdkRgbInfo *image_info, GdkImage *image,
 		     gint x0, gint y0, gint width, gint height,
-		     guchar *buf, int rowstride,
+		     const guchar *buf, int rowstride,
 		     gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   guchar *obuf;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   guchar r, g, b;
 
   bptr = buf;
@@ -1614,13 +1614,13 @@
 static void
 gdk_rgb_convert_565_gray (GdkRgbInfo *image_info, GdkImage *image,
 			  gint x0, gint y0, gint width, gint height,
-			  guchar *buf, int rowstride,
+			  const guchar *buf, int rowstride,
 			  gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   guchar *obuf, *obptr;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   guchar g;
 
   bptr = buf;
@@ -1682,13 +1682,13 @@
 static void
 gdk_rgb_convert_565_gray (GdkRgbInfo *image_info, GdkImage *image,
 			  gint x0, gint y0, gint width, gint height,
-			  guchar *buf, int rowstride,
+			  const guchar *buf, int rowstride,
 			  gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   guchar *obuf;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   guchar g;
 
   bptr = buf;
@@ -1713,13 +1713,13 @@
 static void
 gdk_rgb_convert_565_br (GdkRgbInfo *image_info, GdkImage *image,
 			gint x0, gint y0, gint width, gint height,
-			guchar *buf, int rowstride,
+			const guchar *buf, int rowstride,
 			gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   guchar *obuf;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   guchar r, g, b;
 
   bptr = buf;
@@ -1751,15 +1751,15 @@
 #ifdef HAIRY_CONVERT_565
 static void
 gdk_rgb_convert_565_d (GdkRgbInfo *image_info, GdkImage *image,
-		     gint x0, gint y0, gint width, gint height,
-		     guchar *buf, int rowstride,
-		     gint x_align, gint y_align, GdkRgbCmap *cmap)
+                       gint x0, gint y0, gint width, gint height,
+                       const guchar *buf, int rowstride,
+                       gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   /* Now this is what I'd call some highly tuned code! */
   int x, y;
   guchar *obuf, *obptr;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
 
   width += x_align;
   height += y_align;
@@ -1877,13 +1877,13 @@
 static void
 gdk_rgb_convert_565_d (GdkRgbInfo *image_info, GdkImage *image,
                        gint x0, gint y0, gint width, gint height,
-                       guchar *buf, int rowstride,
+                       const guchar *buf, int rowstride,
                        gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   guchar *obuf;
   gint bpl;
-  guchar *bptr;
+  const guchar *bptr;
 
   width += x_align;
   height += y_align;
@@ -1922,13 +1922,13 @@
 static void
 gdk_rgb_convert_555 (GdkRgbInfo *image_info, GdkImage *image,
 		     gint x0, gint y0, gint width, gint height,
-		     guchar *buf, int rowstride,
+		     const guchar *buf, int rowstride,
 		     gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   guchar *obuf;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   guchar r, g, b;
 
   bptr = buf;
@@ -1954,13 +1954,13 @@
 static void
 gdk_rgb_convert_555_br (GdkRgbInfo *image_info, GdkImage *image,
 			gint x0, gint y0, gint width, gint height,
-			guchar *buf, int rowstride,
+			const guchar *buf, int rowstride,
 			gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   guchar *obuf;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   guchar r, g, b;
 
   bptr = buf;
@@ -1990,13 +1990,13 @@
 static void
 gdk_rgb_convert_888_msb (GdkRgbInfo *image_info, GdkImage *image,
 			 gint x0, gint y0, gint width, gint height,
-			 guchar *buf, int rowstride,
+			 const guchar *buf, int rowstride,
 			 gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int y;
   guchar *obuf;
   gint bpl;
-  guchar *bptr;
+  const guchar *bptr;
 
   bptr = buf;
   bpl = image->bpl;
@@ -2018,13 +2018,13 @@
 static void
 gdk_rgb_convert_888_lsb (GdkRgbInfo *image_info, GdkImage *image,
 			 gint x0, gint y0, gint width, gint height,
-			 guchar *buf, int rowstride,
+			 const guchar *buf, int rowstride,
 			 gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   guchar *obuf, *obptr;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   int r, g, b;
 
   bptr = buf;
@@ -2092,13 +2092,13 @@
 static void
 gdk_rgb_convert_888_lsb (GdkRgbInfo *image_info, GdkImage *image,
 			 gint x0, gint y0, gint width, gint height,
-			 guchar *buf, int rowstride,
+			 const guchar *buf, int rowstride,
 			 gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   guchar *obuf;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   int r, g, b;
 
   bptr = buf;
@@ -2128,13 +2128,13 @@
 static void
 gdk_rgb_convert_0888 (GdkRgbInfo *image_info, GdkImage *image,
 		      gint x0, gint y0, gint width, gint height,
-		      guchar *buf, int rowstride,
+		      const guchar *buf, int rowstride,
 		      gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int y, w;
   guchar *obuf, *p;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
 
   bptr = buf;
   bpl = image->bpl;
@@ -2163,13 +2163,13 @@
 static void
 gdk_rgb_convert_0888_medialib (GdkRgbInfo *image_info, GdkImage *image,
 			       gint x0, gint y0, gint width, gint height,
-			       guchar *buf, int rowstride,
+			       const guchar *buf, int rowstride,
 			       gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int y, w;
   guchar *obuf, *p;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
 
   bptr = buf;
   bpl = image->bpl;
@@ -2184,13 +2184,13 @@
 static void
 gdk_rgb_convert_0888_br (GdkRgbInfo *image_info, GdkImage *image,
 			 gint x0, gint y0, gint width, gint height,
-			 guchar *buf, int rowstride,
+			 const guchar *buf, int rowstride,
 			 gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int y, w;
   guchar *obuf, *p;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
 
   bptr = buf;
   bpl = image->bpl;
@@ -2217,13 +2217,13 @@
 static void
 gdk_rgb_convert_8880_br (GdkRgbInfo *image_info, GdkImage *image,
 			 gint x0, gint y0, gint width, gint height,
-			 guchar *buf, int rowstride,
+			 const guchar *buf, int rowstride,
 			 gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   guchar *obuf;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   int r, g, b;
 
   bptr = buf;
@@ -2250,14 +2250,14 @@
 static void
 gdk_rgb_convert_truecolor_lsb (GdkRgbInfo *image_info, GdkImage *image,
 			       gint x0, gint y0, gint width, gint height,
-			       guchar *buf, int rowstride,
+			       const guchar *buf, int rowstride,
 			       gint x_align, gint y_align,
 			       GdkRgbCmap *cmap)
 {
   int x, y;
   guchar *obuf, *obptr;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
   gint r_right, r_left;
   gint g_right, g_left;
@@ -2304,14 +2304,14 @@
 static void
 gdk_rgb_convert_truecolor_lsb_d (GdkRgbInfo *image_info, GdkImage *image,
 				 gint x0, gint y0, gint width, gint height,
-				 guchar *buf, int rowstride,
+				 const guchar *buf, int rowstride,
 				 gint x_align, gint y_align,
 				 GdkRgbCmap *cmap)
 {
   int x, y;
   guchar *obuf, *obptr;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
   gint r_right, r_left, r_prec;
   gint g_right, g_left, g_prec;
@@ -2369,14 +2369,14 @@
 static void
 gdk_rgb_convert_truecolor_msb (GdkRgbInfo *image_info, GdkImage *image,
 			       gint x0, gint y0, gint width, gint height,
-			       guchar *buf, int rowstride,
+			       const guchar *buf, int rowstride,
 			       gint x_align, gint y_align,
 			       GdkRgbCmap *cmap)
 {
   int x, y;
   guchar *obuf, *obptr;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
   gint r_right, r_left;
   gint g_right, g_left;
@@ -2423,14 +2423,14 @@
 static void
 gdk_rgb_convert_truecolor_msb_d (GdkRgbInfo *image_info, GdkImage *image,
 				 gint x0, gint y0, gint width, gint height,
-				 guchar *buf, int rowstride,
+				 const guchar *buf, int rowstride,
 				 gint x_align, gint y_align,
 				 GdkRgbCmap *cmap)
 {
   int x, y;
   guchar *obuf, *obptr;
   gint bpl;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
   gint r_right, r_left, r_prec;
   gint g_right, g_left, g_prec;
@@ -2489,14 +2489,14 @@
 static void
 gdk_rgb_convert_4 (GdkRgbInfo *image_info, GdkImage *image,
 		   gint x0, gint y0, gint width, gint height,
-		   guchar *buf, int rowstride,
+		   const guchar *buf, int rowstride,
 		   gint x_align, gint y_align,
 		   GdkRgbCmap *cmap)
 {
   int x, y;
   gint bpl;
   guchar *obuf, *obptr;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
   const guchar *dmp;
   gint dith;
@@ -2529,14 +2529,14 @@
 static void
 gdk_rgb_convert_4_pack (GdkRgbInfo *image_info, GdkImage *image,
 			gint x0, gint y0, gint width, gint height,
-			guchar *buf, int rowstride,
+			const guchar *buf, int rowstride,
 			gint x_align, gint y_align,
 			GdkRgbCmap *cmap)
 {
   int x, y, ix;
   gint bpl;
   guchar *obuf, *obptr;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
   const guchar *dmp;
   gint dith;
@@ -2603,13 +2603,13 @@
 static void
 gdk_rgb_convert_gray4 (GdkRgbInfo *image_info, GdkImage *image,
 		       gint x0, gint y0, gint width, gint height,
-		       guchar *buf, int rowstride,
+		       const guchar *buf, int rowstride,
 		       gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   gint bpl;
   guchar *obuf, *obptr;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
   gint shift;
 
@@ -2637,13 +2637,13 @@
 static void
 gdk_rgb_convert_gray4_pack (GdkRgbInfo *image_info, GdkImage *image,
 			    gint x0, gint y0, gint width, gint height,
-			    guchar *buf, int rowstride,
+			    const guchar *buf, int rowstride,
 			    gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   gint bpl;
   guchar *obuf, *obptr;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
   gint shift;
   guchar pix0, pix1;
@@ -2697,13 +2697,13 @@
 static void
 gdk_rgb_convert_gray4_d (GdkRgbInfo *image_info, GdkImage *image,
 			 gint x0, gint y0, gint width, gint height,
-			 guchar *buf, int rowstride,
+			 const guchar *buf, int rowstride,
 			 gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   gint bpl;
   guchar *obuf, *obptr;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
   const guchar *dmp;
   gint prec, right;
@@ -2737,13 +2737,13 @@
 static void
 gdk_rgb_convert_gray4_d_pack (GdkRgbInfo *image_info, GdkImage *image,
 			      gint x0, gint y0, gint width, gint height,
-			      guchar *buf, int rowstride,
+			      const guchar *buf, int rowstride,
 			      gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   int x, y;
   gint bpl;
   guchar *obuf, *obptr;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
   const guchar *dmp;
   gint prec, right;
@@ -2806,14 +2806,14 @@
 static void
 gdk_rgb_convert_1 (GdkRgbInfo *image_info, GdkImage *image,
 		   gint x0, gint y0, gint width, gint height,
-		   guchar *buf, int rowstride,
+		   const guchar *buf, int rowstride,
 		   gint x_align, gint y_align,
 		   GdkRgbCmap *cmap)
 {
   int x, y;
   gint bpl;
   guchar *obuf, *obptr;
-  guchar *bptr, *bp2;
+  const guchar *bptr, *bp2;
   gint r, g, b;
   const guchar *dmp;
   gint dith;
@@ -2860,11 +2860,13 @@
 /* This is slow. Speed me up, please. */
 static void
 gdk_rgb_32_to_stage (GdkRgbInfo *image_info,
-		     guchar *buf, gint rowstride, gint width, gint height)
+		     const guchar *buf, gint rowstride, gint width, gint height)
 {
   gint x, y;
-  guchar *pi_start, *po_start;
-  guchar *pi, *po;
+  const guchar *pi_start;
+  guchar *po_start;
+  const guchar *pi;
+  guchar *po;
 
   pi_start = buf;
   po_start = gdk_rgb_ensure_stage (image_info);
@@ -2889,7 +2891,7 @@
 static void
 gdk_rgb_convert_32_generic (GdkRgbInfo *image_info, GdkImage *image,
 			    gint x0, gint y0, gint width, gint height,
-			    guchar *buf, gint rowstride,
+			    const guchar *buf, gint rowstride,
 			    gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   gdk_rgb_32_to_stage (image_info, buf, rowstride, width, height);
@@ -2904,7 +2906,7 @@
 static void
 gdk_rgb_convert_32_generic_d (GdkRgbInfo *image_info, GdkImage *image,
 			      gint x0, gint y0, gint width, gint height,
-			      guchar *buf, gint rowstride,
+			      const guchar *buf, gint rowstride,
 			      gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   gdk_rgb_32_to_stage (image_info, buf, rowstride, width, height);
@@ -2917,11 +2919,13 @@
 /* This is slow. Speed me up, please. */
 static void
 gdk_rgb_gray_to_stage (GdkRgbInfo *image_info,
-		       guchar *buf, gint rowstride, gint width, gint height)
+		       const guchar *buf, gint rowstride, gint width, gint height)
 {
   gint x, y;
-  guchar *pi_start, *po_start;
-  guchar *pi, *po;
+  const guchar *pi_start;
+  guchar *po_start;
+  const guchar *pi;
+  guchar *po;
   guchar gray;
 
   pi_start = buf;
@@ -2947,7 +2951,7 @@
 static void
 gdk_rgb_convert_gray_generic (GdkRgbInfo *image_info, GdkImage *image,
 			      gint x0, gint y0, gint width, gint height,
-			      guchar *buf, gint rowstride,
+			      const guchar *buf, gint rowstride,
 			      gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   gdk_rgb_gray_to_stage (image_info, buf, rowstride, width, height);
@@ -2960,7 +2964,7 @@
 static void
 gdk_rgb_convert_gray_generic_d (GdkRgbInfo *image_info, GdkImage *image,
 				gint x0, gint y0, gint width, gint height,
-				guchar *buf, gint rowstride,
+				const guchar *buf, gint rowstride,
 				gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   gdk_rgb_gray_to_stage (image_info, buf, rowstride, width, height);
@@ -2974,7 +2978,7 @@
 static void
 gdk_rgb_convert_gray_cmap (GdkRgbInfo *image_info, GdkImage *image,
 			   gint x0, gint y0, gint width, gint height,
-			   guchar *buf, gint rowstride,
+			   const guchar *buf, gint rowstride,
 			   gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   (*image_info->conv_indexed) (image_info, image, x0, y0, width, height,
@@ -2986,7 +2990,7 @@
 static void
 gdk_rgb_convert_gray_cmap_d (GdkRgbInfo *image_info, GdkImage *image,
 			     gint x0, gint y0, gint width, gint height,
-			     guchar *buf, gint rowstride,
+			     const guchar *buf, gint rowstride,
 			     gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   (*image_info->conv_indexed_d) (image_info, image, x0, y0, width, height,
@@ -2998,12 +3002,14 @@
 /* This is slow. Speed me up, please. */
 static void
 gdk_rgb_indexed_to_stage (GdkRgbInfo *image_info,
-			  guchar *buf, gint rowstride, gint width, gint height,
+			  const guchar *buf, gint rowstride, gint width, gint height,
 			  GdkRgbCmap *cmap)
 {
   gint x, y;
-  guchar *pi_start, *po_start;
-  guchar *pi, *po;
+  const guchar *pi_start;
+  guchar *po_start;
+  const guchar *pi;
+  guchar *po;
   gint rgb;
 
   pi_start = buf;
@@ -3029,7 +3035,7 @@
 static void
 gdk_rgb_convert_indexed_generic (GdkRgbInfo *image_info, GdkImage *image,
 				 gint x0, gint y0, gint width, gint height,
-				 guchar *buf, gint rowstride,
+				 const guchar *buf, gint rowstride,
 				 gint x_align, gint y_align, GdkRgbCmap *cmap)
 {
   gdk_rgb_indexed_to_stage (image_info, buf, rowstride, width, height, cmap);
@@ -3042,7 +3048,7 @@
 static void
 gdk_rgb_convert_indexed_generic_d (GdkRgbInfo *image_info, GdkImage *image,
 				   gint x0, gint y0, gint width, gint height,
-				   guchar *buf, gint rowstride,
+				   const guchar *buf, gint rowstride,
 				   gint x_align, gint y_align,
 				   GdkRgbCmap *cmap)
 {
@@ -3289,26 +3295,26 @@
 }
 
 static void
-gdk_draw_rgb_image_core (GdkRgbInfo *image_info,
-			 GdkDrawable *drawable,
-			 GdkGC *gc,
-			 gint x,
-			 gint y,
-			 gint width,
-			 gint height,
-			 guchar *buf,
-			 gint pixstride,
-			 gint rowstride,
-			 GdkRgbConvFunc conv,
-			 GdkRgbCmap *cmap,
-			 gint xdith,
-			 gint ydith)
+gdk_draw_rgb_image_core (GdkRgbInfo     *image_info,
+			 GdkDrawable    *drawable,
+			 GdkGC          *gc,
+			 gint            x,
+			 gint            y,
+			 gint            width,
+			 gint            height,
+			 const guchar   *buf,
+			 gint            pixstride,
+			 gint            rowstride,
+			 GdkRgbConvFunc  conv,
+			 GdkRgbCmap     *cmap,
+			 gint            xdith,
+			 gint            ydith)
 {
   gint y0, x0;
   gint xs0, ys0;
   GdkImage *image;
   gint width1, height1;
-  guchar *buf_ptr;
+  const guchar *buf_ptr;
 
   if (image_info->bitmap)
     {
@@ -3370,15 +3376,15 @@
 }
 
 void
-gdk_draw_rgb_image (GdkDrawable *drawable,
-		    GdkGC *gc,
-		    gint x,
-		    gint y,
-		    gint width,
-		    gint height,
-		    GdkRgbDither dith,
-		    guchar *rgb_buf,
-		    gint rowstride)
+gdk_draw_rgb_image (GdkDrawable  *drawable,
+		    GdkGC        *gc,
+		    gint          x,
+		    gint          y,
+		    gint          width,
+		    gint          height,
+		    GdkRgbDither  dith,
+		    const guchar *rgb_buf,
+		    gint          rowstride)
 {
   GdkRgbInfo *image_info = gdk_rgb_get_info_from_drawable (drawable);
   if (!image_info)
@@ -3396,17 +3402,17 @@
 }
 
 void
-gdk_draw_rgb_image_dithalign (GdkDrawable *drawable,
-			      GdkGC *gc,
-			      gint x,
-			      gint y,
-			      gint width,
-			      gint height,
-			      GdkRgbDither dith,
-			      guchar *rgb_buf,
-			      gint rowstride,
-			      gint xdith,
-			      gint ydith)
+gdk_draw_rgb_image_dithalign (GdkDrawable  *drawable,
+			      GdkGC        *gc,
+			      gint          x,
+			      gint          y,
+			      gint          width,
+			      gint          height,
+			      GdkRgbDither  dith,
+			      const guchar *rgb_buf,
+			      gint          rowstride,
+			      gint          xdith,
+			      gint          ydith)
 {
   GdkRgbInfo *image_info = gdk_rgb_get_info_from_drawable (drawable);
   if (!image_info)
@@ -3424,15 +3430,15 @@
 }
 
 void
-gdk_draw_rgb_32_image (GdkDrawable *drawable,
-		       GdkGC *gc,
-		       gint x,
-		       gint y,
-		       gint width,
-		       gint height,
-		       GdkRgbDither dith,
-		       guchar *buf,
-		       gint rowstride)
+gdk_draw_rgb_32_image (GdkDrawable  *drawable,
+		       GdkGC        *gc,
+		       gint          x,
+		       gint          y,
+		       gint          width,
+		       gint          height,
+		       GdkRgbDither  dith,
+		       const guchar *buf,
+		       gint          rowstride)
 {
   GdkRgbInfo *image_info = gdk_rgb_get_info_from_drawable (drawable);
   if (!image_info)
@@ -3468,17 +3474,17 @@
  * 
  **/
 void
-gdk_draw_rgb_32_image_dithalign (GdkDrawable *drawable,
-				 GdkGC *gc,
-				 gint x,
-				 gint y,
-				 gint width,
-				 gint height,
-				 GdkRgbDither dith,
-				 guchar *buf,
-				 gint rowstride,
-				 gint xdith,
-				 gint ydith)
+gdk_draw_rgb_32_image_dithalign (GdkDrawable  *drawable,
+				 GdkGC        *gc,
+				 gint          x,
+				 gint          y,
+				 gint          width,
+				 gint          height,
+				 GdkRgbDither  dith,
+				 const guchar *buf,
+				 gint          rowstride,
+				 gint          xdith,
+				 gint          ydith)
 {
   GdkRgbInfo *image_info = gdk_rgb_get_info_from_drawable (drawable);
   if (!image_info)
@@ -3507,15 +3513,15 @@
 }
 
 void
-gdk_draw_gray_image (GdkDrawable *drawable,
-		     GdkGC *gc,
-		     gint x,
-		     gint y,
-		     gint width,
-		     gint height,
-		     GdkRgbDither dith,
-		     guchar *buf,
-		     gint rowstride)
+gdk_draw_gray_image (GdkDrawable  *drawable,
+		     GdkGC        *gc,
+		     gint          x,
+		     gint          y,
+		     gint          width,
+		     gint          height,
+		     GdkRgbDither  dith,
+		     const guchar *buf,
+		     gint          rowstride)
 {
   GdkRgbInfo *image_info = gdk_rgb_get_info_from_drawable (drawable);
   if (!image_info)
@@ -3623,16 +3629,16 @@
 }
 
 void
-gdk_draw_indexed_image (GdkDrawable *drawable,
-			GdkGC *gc,
-			gint x,
-			gint y,
-			gint width,
-			gint height,
-			GdkRgbDither dith,
-			guchar *buf,
-			gint rowstride,
-			GdkRgbCmap *cmap)
+gdk_draw_indexed_image (GdkDrawable  *drawable,
+			GdkGC        *gc,
+			gint          x,
+			gint          y,
+			gint          width,
+			gint          height,
+			GdkRgbDither  dith,
+			const guchar *buf,
+			gint          rowstride,
+			GdkRgbCmap   *cmap)
 {
   GdkRgbInfo *image_info = gdk_rgb_get_info_from_drawable (drawable);
   if (!image_info)

Modified: trunk/gdk/gdkrgb.h
==============================================================================
--- trunk/gdk/gdkrgb.h	(original)
+++ trunk/gdk/gdkrgb.h	Tue Jan 15 15:32:37 2008
@@ -69,7 +69,7 @@
 					     gint          width,
 					     gint          height,
 					     GdkRgbDither  dith,
-					     guchar       *rgb_buf,
+					     const guchar *rgb_buf,
 					     gint          rowstride);
 void        gdk_draw_rgb_image_dithalign    (GdkDrawable  *drawable,
 					     GdkGC        *gc,
@@ -78,7 +78,7 @@
 					     gint          width,
 					     gint          height,
 					     GdkRgbDither  dith,
-					     guchar       *rgb_buf,
+					     const guchar *rgb_buf,
 					     gint          rowstride,
 					     gint          xdith,
 					     gint          ydith);
@@ -89,7 +89,7 @@
 					     gint          width,
 					     gint          height,
 					     GdkRgbDither  dith,
-					     guchar       *buf,
+					     const guchar *buf,
 					     gint          rowstride);
 void        gdk_draw_rgb_32_image_dithalign (GdkDrawable  *drawable,
 					     GdkGC        *gc,
@@ -98,7 +98,7 @@
 					     gint          width,
 					     gint          height,
 					     GdkRgbDither  dith,
-					     guchar       *buf,
+					     const guchar *buf,
 					     gint          rowstride,
 					     gint          xdith,
 					     gint          ydith);
@@ -109,7 +109,7 @@
 					     gint          width,
 					     gint          height,
 					     GdkRgbDither  dith,
-					     guchar       *buf,
+					     const guchar *buf,
 					     gint          rowstride);
 void        gdk_draw_indexed_image          (GdkDrawable  *drawable,
 					     GdkGC        *gc,
@@ -118,7 +118,7 @@
 					     gint          width,
 					     gint          height,
 					     GdkRgbDither  dith,
-					     guchar       *buf,
+					     const guchar *buf,
 					     gint          rowstride,
 					     GdkRgbCmap   *cmap);
 GdkRgbCmap *gdk_rgb_cmap_new                (guint32      *colors,

Modified: trunk/gdk/gdkwindow.h
==============================================================================
--- trunk/gdk/gdkwindow.h	(original)
+++ trunk/gdk/gdkwindow.h	Tue Jan 15 15:32:37 2008
@@ -475,10 +475,10 @@
 void gdk_window_set_urgency_hint      (GdkWindow *window,
 				       gboolean   urgent);
 
-void          gdk_window_set_geometry_hints (GdkWindow        *window,
-					     GdkGeometry      *geometry,
-					     GdkWindowHints    geom_mask);
-void          gdk_set_sm_client_id          (const gchar      *sm_client_id);
+void          gdk_window_set_geometry_hints (GdkWindow          *window,
+					     const GdkGeometry  *geometry,
+					     GdkWindowHints      geom_mask);
+void          gdk_set_sm_client_id          (const gchar        *sm_client_id);
 
 void	      gdk_window_begin_paint_rect   (GdkWindow          *window,
 					     const GdkRectangle *rectangle);

Modified: trunk/gdk/quartz/gdkdisplay-quartz.c
==============================================================================
--- trunk/gdk/quartz/gdkdisplay-quartz.c	(original)
+++ trunk/gdk/quartz/gdkdisplay-quartz.c	Tue Jan 15 15:32:37 2008
@@ -161,11 +161,11 @@
 }
 
 void
-gdk_display_store_clipboard (GdkDisplay *display,
-			     GdkWindow  *clipboard_window,
-			     guint32     time_,
-			     GdkAtom    *targets,
-			     gint        n_targets)
+gdk_display_store_clipboard (GdkDisplay    *display,
+			     GdkWindow     *clipboard_window,
+			     guint32        time_,
+			     const GdkAtom *targets,
+			     gint           n_targets)
 {
   /* FIXME: Implement */
 }

Modified: trunk/gdk/quartz/gdkwindow-quartz.c
==============================================================================
--- trunk/gdk/quartz/gdkwindow-quartz.c	(original)
+++ trunk/gdk/quartz/gdkwindow-quartz.c	Tue Jan 15 15:32:37 2008
@@ -1915,9 +1915,9 @@
 }
 
 void 
-gdk_window_set_geometry_hints (GdkWindow      *window,
-			       GdkGeometry    *geometry,
-			       GdkWindowHints  geom_mask)
+gdk_window_set_geometry_hints (GdkWindow         *window,
+			       const GdkGeometry *geometry,
+			       GdkWindowHints     geom_mask)
 {
   GdkWindowImplQuartz *impl;
 

Modified: trunk/gdk/win32/gdkdisplay-win32.c
==============================================================================
--- trunk/gdk/win32/gdkdisplay-win32.c	(original)
+++ trunk/gdk/win32/gdkdisplay-win32.c	Tue Jan 15 15:32:37 2008
@@ -371,11 +371,11 @@
 }
 
 void
-gdk_display_store_clipboard (GdkDisplay *display,
-			     GdkWindow  *clipboard_window,
-			     guint32     time_,
-			     GdkAtom    *targets,
-			     gint        n_targets)
+gdk_display_store_clipboard (GdkDisplay    *display,
+			     GdkWindow     *clipboard_window,
+			     guint32        time_,
+			     const GdkAtom *targets,
+			     gint           n_targets)
 {
 }
 

Modified: trunk/gdk/win32/gdkwindow-win32.c
==============================================================================
--- trunk/gdk/win32/gdkwindow-win32.c	(original)
+++ trunk/gdk/win32/gdkwindow-win32.c	Tue Jan 15 15:32:37 2008
@@ -1844,9 +1844,9 @@
 }
 
 void 
-gdk_window_set_geometry_hints (GdkWindow      *window,
-			       GdkGeometry    *geometry,
-			       GdkWindowHints  geom_mask)
+gdk_window_set_geometry_hints (GdkWindow         *window,
+			       const GdkGeometry *geometry,
+			       GdkWindowHints     geom_mask)
 {
   GdkWindowImplWin32 *impl;
 

Modified: trunk/gdk/x11/gdkdisplay-x11.c
==============================================================================
--- trunk/gdk/x11/gdkdisplay-x11.c	(original)
+++ trunk/gdk/x11/gdkdisplay-x11.c	Tue Jan 15 15:32:37 2008
@@ -1300,11 +1300,11 @@
  * Since: 2.6
  */
 void
-gdk_display_store_clipboard (GdkDisplay *display,
-			     GdkWindow  *clipboard_window,
-			     guint32     time_,
-			     GdkAtom    *targets,
-			     gint        n_targets)
+gdk_display_store_clipboard (GdkDisplay    *display,
+			     GdkWindow     *clipboard_window,
+			     guint32        time_,
+			     const GdkAtom *targets,
+			     gint           n_targets)
 {
   GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (display);
   Atom clipboard_manager, save_targets;

Modified: trunk/gdk/x11/gdkwindow-x11.c
==============================================================================
--- trunk/gdk/x11/gdkwindow-x11.c	(original)
+++ trunk/gdk/x11/gdkwindow-x11.c	Tue Jan 15 15:32:37 2008
@@ -2588,9 +2588,9 @@
  *
  **/
 void 
-gdk_window_set_geometry_hints (GdkWindow      *window,
-			       GdkGeometry    *geometry,
-			       GdkWindowHints  geom_mask)
+gdk_window_set_geometry_hints (GdkWindow         *window,
+			       const GdkGeometry *geometry,
+			       GdkWindowHints     geom_mask)
 {
   XSizeHints size_hints;
   



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]