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



Author: mitch
Date: Mon Jan 14 14:02:12 2008
New Revision: 19365
URL: http://svn.gnome.org/viewvc/gtk+?rev=19365&view=rev

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

	* gdk/gdk.h
	* gdk/gdkcairo.h
	* gdk/gdkcolor.h
	* gdk/gdkgc.h
	* gdk/gdkinternals.h
	* gdk/gdkregion.h
	* gdk/gdkwindow.h: made GdkRectangle*, GdkRegion* and GdkColor*
	parameters const.

	* gdk/gdkcairo.c
	* gdk/gdkgc.c
	* gdk/gdkwindow.c
	* gdk/gdkrectangle.c
	* gdk/gdkpolyreg-generic.c
	* gdk/gdkregion-generic.c
	* gdk/directfb/gdkcolor-directfb.c
	* gdk/directfb/gdkgc-directfb.c
	* gdk/directfb/gdkgeometry-directfb.c
	* gdk/directfb/gdkwindow-directfb.c
	* gdk/quartz/gdkcolor-quartz.c
	* gdk/quartz/gdkgc-quartz.c
	* gdk/quartz/gdkgeometry-quartz.c
	* gdk/quartz/gdkwindow-quartz.c
	* gdk/win32/gdkcolor-win32.c
	* gdk/win32/gdkgc-win32.c
	* gdk/win32/gdkgeometry-win32.c
	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkwindow-win32.c
	* gdk/x11/gdkcolor-x11.c
	* gdk/x11/gdkgc-x11.c
	* gdk/x11/gdkgeometry-x11.c
	* gdk/x11/gdkmain-x11.c
	* gdk/x11/gdkprivate-x11.h
	* gdk/x11/gdkwindow-x11.c: changed accordingly.

	* gdk/gdkpolyreg-generic.c: uncruftify to have proper function
	headers.



Modified:
   trunk/ChangeLog
   trunk/gdk/directfb/gdkcolor-directfb.c
   trunk/gdk/directfb/gdkgc-directfb.c
   trunk/gdk/directfb/gdkgeometry-directfb.c
   trunk/gdk/directfb/gdkwindow-directfb.c
   trunk/gdk/gdk.h
   trunk/gdk/gdkcairo.c
   trunk/gdk/gdkcairo.h
   trunk/gdk/gdkcolor.h
   trunk/gdk/gdkgc.c
   trunk/gdk/gdkgc.h
   trunk/gdk/gdkinternals.h
   trunk/gdk/gdkpolyreg-generic.c
   trunk/gdk/gdkrectangle.c
   trunk/gdk/gdkregion-generic.c
   trunk/gdk/gdkregion.h
   trunk/gdk/gdkwindow.c
   trunk/gdk/gdkwindow.h
   trunk/gdk/quartz/gdkcolor-quartz.c
   trunk/gdk/quartz/gdkgc-quartz.c
   trunk/gdk/quartz/gdkgeometry-quartz.c
   trunk/gdk/quartz/gdkwindow-quartz.c
   trunk/gdk/win32/gdkcolor-win32.c
   trunk/gdk/win32/gdkgc-win32.c
   trunk/gdk/win32/gdkgeometry-win32.c
   trunk/gdk/win32/gdkprivate-win32.h
   trunk/gdk/win32/gdkwindow-win32.c
   trunk/gdk/x11/gdkcolor-x11.c
   trunk/gdk/x11/gdkgc-x11.c
   trunk/gdk/x11/gdkgeometry-x11.c
   trunk/gdk/x11/gdkmain-x11.c
   trunk/gdk/x11/gdkprivate-x11.h
   trunk/gdk/x11/gdkwindow-x11.c

Modified: trunk/gdk/directfb/gdkcolor-directfb.c
==============================================================================
--- trunk/gdk/directfb/gdkcolor-directfb.c	(original)
+++ trunk/gdk/directfb/gdkcolor-directfb.c	Mon Jan 14 14:02:12 2008
@@ -287,9 +287,9 @@
 }
 
 void
-gdk_colormap_free_colors (GdkColormap *colormap,
-                          GdkColor    *colors,
-                          gint         ncolors)
+gdk_colormap_free_colors (GdkColormap    *colormap,
+                          const GdkColor *colors,
+                          gint            ncolors)
 {
   GdkColormapPrivateDirectFB *private;
   gint                        i;

Modified: trunk/gdk/directfb/gdkgc-directfb.c
==============================================================================
--- trunk/gdk/directfb/gdkgc-directfb.c	(original)
+++ trunk/gdk/directfb/gdkgc-directfb.c	Mon Jan 14 14:02:12 2008
@@ -350,8 +350,8 @@
 
 
 void
-_gdk_windowing_gc_set_clip_region (GdkGC     *gc,
-                        GdkRegion *region)
+_gdk_windowing_gc_set_clip_region (GdkGC           *gc,
+                                   const GdkRegion *region)
 {
   GdkGCDirectFB *data;
 
@@ -363,9 +363,9 @@
     return;
 
   if (region)
-       temp_region_init_copy (&data->clip_region, region);
+    temp_region_init_copy (&data->clip_region, region);
   else
-       temp_region_reset (&data->clip_region);
+    temp_region_reset (&data->clip_region);
 
   gc->clip_x_origin = 0;
   gc->clip_y_origin = 0;

Modified: trunk/gdk/directfb/gdkgeometry-directfb.c
==============================================================================
--- trunk/gdk/directfb/gdkgeometry-directfb.c	(original)
+++ trunk/gdk/directfb/gdkgeometry-directfb.c	Mon Jan 14 14:02:12 2008
@@ -161,10 +161,10 @@
  * Since: 2.8
  **/
 void
-gdk_window_move_region (GdkWindow *window,
-			GdkRegion *region,
-			gint       dx,
-			gint       dy)
+gdk_window_move_region (GdkWindow       *window,
+                        const GdkRegion *region,
+                        gint             dx,
+                        gint             dy)
 {
   GdkWindowObject         *private;
   GdkDrawableImplDirectFB *impl;

Modified: trunk/gdk/directfb/gdkwindow-directfb.c
==============================================================================
--- trunk/gdk/directfb/gdkwindow-directfb.c	(original)
+++ trunk/gdk/directfb/gdkwindow-directfb.c	Mon Jan 14 14:02:12 2008
@@ -2129,18 +2129,18 @@
 }
 
 void
-gdk_window_shape_combine_region (GdkWindow *window,
-                                 GdkRegion *shape_region,
-                                 gint       offset_x,
-                                 gint       offset_y)
+gdk_window_shape_combine_region (GdkWindow       *window,
+                                 const GdkRegion *shape_region,
+                                 gint             offset_x,
+                                 gint             offset_y)
 {
 }
 
 void
-gdk_window_input_shape_combine_region (GdkWindow *window,
-                                      GdkRegion *shape_region,
-                                      gint       offset_x,
-                                      gint       offset_y)
+gdk_window_input_shape_combine_region (GdkWindow       *window,
+                                       const GdkRegion *shape_region,
+                                       gint             offset_x,
+                                       gint             offset_y)
 {
 }
 

Modified: trunk/gdk/gdk.h
==============================================================================
--- trunk/gdk/gdk.h	(original)
+++ trunk/gdk/gdk.h	Mon Jan 14 14:02:12 2008
@@ -147,12 +147,12 @@
 
 /* Rectangle utilities
  */
-gboolean gdk_rectangle_intersect (GdkRectangle *src1,
-				  GdkRectangle *src2,
-				  GdkRectangle *dest);
-void     gdk_rectangle_union     (GdkRectangle *src1,
-				  GdkRectangle *src2,
-				  GdkRectangle *dest);
+gboolean gdk_rectangle_intersect (const GdkRectangle *src1,
+				  const GdkRectangle *src2,
+				  GdkRectangle       *dest);
+void     gdk_rectangle_union     (const GdkRectangle *src1,
+				  const GdkRectangle *src2,
+				  GdkRectangle       *dest);
 
 GType gdk_rectangle_get_type (void) G_GNUC_CONST;
 

Modified: trunk/gdk/gdkcairo.c
==============================================================================
--- trunk/gdk/gdkcairo.c	(original)
+++ trunk/gdk/gdkcairo.c	Mon Jan 14 14:02:12 2008
@@ -59,8 +59,8 @@
  * Since: 2.8
  **/
 void
-gdk_cairo_set_source_color (cairo_t  *cr,
-			    GdkColor *color)
+gdk_cairo_set_source_color (cairo_t        *cr,
+			    const GdkColor *color)
 {
   g_return_if_fail (cr != NULL);
   g_return_if_fail (color != NULL);
@@ -81,8 +81,8 @@
  * Since: 2.8
  **/
 void
-gdk_cairo_rectangle (cairo_t      *cr,
-		     GdkRectangle *rectangle)
+gdk_cairo_rectangle (cairo_t            *cr,
+		     const GdkRectangle *rectangle)
 {
   g_return_if_fail (cr != NULL);
   g_return_if_fail (rectangle != NULL);
@@ -102,8 +102,8 @@
  * Since: 2.8
  **/
 void
-gdk_cairo_region (cairo_t   *cr,
-		  GdkRegion *region)
+gdk_cairo_region (cairo_t         *cr,
+		  const GdkRegion *region)
 {
   GdkRegionBox *boxes;
   gint n_boxes, i;
@@ -136,10 +136,10 @@
  * Since: 2.8
  **/
 void
-gdk_cairo_set_source_pixbuf (cairo_t   *cr,
-			     GdkPixbuf *pixbuf,
-			     double     pixbuf_x,
-			     double     pixbuf_y)
+gdk_cairo_set_source_pixbuf (cairo_t         *cr,
+			     const GdkPixbuf *pixbuf,
+			     double           pixbuf_x,
+			     double           pixbuf_y)
 {
   gint width = gdk_pixbuf_get_width (pixbuf);
   gint height = gdk_pixbuf_get_height (pixbuf);

Modified: trunk/gdk/gdkcairo.h
==============================================================================
--- trunk/gdk/gdkcairo.h	(original)
+++ trunk/gdk/gdkcairo.h	Mon Jan 14 14:02:12 2008
@@ -26,23 +26,23 @@
 
 G_BEGIN_DECLS
 
-cairo_t *gdk_cairo_create (GdkDrawable *drawable);
+cairo_t *gdk_cairo_create            (GdkDrawable        *drawable);
 
-void gdk_cairo_set_source_color  (cairo_t      *cr,
-				  GdkColor     *color);
-void gdk_cairo_set_source_pixbuf (cairo_t      *cr,
-				  GdkPixbuf    *pixbuf,
-				  double        pixbuf_x,
-				  double        pixbuf_y);
-void gdk_cairo_set_source_pixmap (cairo_t   *cr,
-				  GdkPixmap *pixmap,
-				  double     pixmap_x,
-				  double     pixmap_y);
-
-void gdk_cairo_rectangle (cairo_t      *cr,
-			  GdkRectangle *rectangle);
-void gdk_cairo_region    (cairo_t      *cr,
-			  GdkRegion    *region);
+void     gdk_cairo_set_source_color  (cairo_t            *cr,
+                                      const GdkColor     *color);
+void     gdk_cairo_set_source_pixbuf (cairo_t            *cr,
+                                      const GdkPixbuf    *pixbuf,
+                                      double              pixbuf_x,
+                                      double              pixbuf_y);
+void     gdk_cairo_set_source_pixmap (cairo_t            *cr,
+                                      GdkPixmap          *pixmap,
+                                      double              pixmap_x,
+                                      double              pixmap_y);
+
+void     gdk_cairo_rectangle         (cairo_t            *cr,
+                                      const GdkRectangle *rectangle);
+void     gdk_cairo_region            (cairo_t            *cr,
+                                      const GdkRegion    *region);
 
 G_END_DECLS
 

Modified: trunk/gdk/gdkcolor.h
==============================================================================
--- trunk/gdk/gdkcolor.h	(original)
+++ trunk/gdk/gdkcolor.h	Mon Jan 14 14:02:12 2008
@@ -108,25 +108,25 @@
 			  gint		 ncolors);
 #endif 
 
-gint  gdk_colormap_alloc_colors   (GdkColormap *colormap,
-				   GdkColor    *colors,
-				   gint         ncolors,
-				   gboolean     writeable,
-				   gboolean     best_match,
-				   gboolean    *success);
-gboolean gdk_colormap_alloc_color (GdkColormap *colormap,
-				   GdkColor    *color,
-				   gboolean     writeable,
-				   gboolean     best_match);
-void     gdk_colormap_free_colors (GdkColormap *colormap,
-				   GdkColor    *colors,
-				   gint         ncolors);
-void     gdk_colormap_query_color (GdkColormap *colormap,
-				   gulong       pixel,
-				   GdkColor    *result);
+gint  gdk_colormap_alloc_colors   (GdkColormap    *colormap,
+				   GdkColor       *colors,
+				   gint            n_colors,
+				   gboolean        writeable,
+				   gboolean        best_match,
+				   gboolean       *success);
+gboolean gdk_colormap_alloc_color (GdkColormap    *colormap,
+				   GdkColor       *color,
+				   gboolean        writeable,
+				   gboolean        best_match);
+void     gdk_colormap_free_colors (GdkColormap    *colormap,
+				   const GdkColor *colors,
+				   gint            n_colors);
+void     gdk_colormap_query_color (GdkColormap    *colormap,
+				   gulong          pixel,
+				   GdkColor       *result);
 
 GdkVisual *gdk_colormap_get_visual (GdkColormap *colormap);
-     
+
 GdkColor *gdk_color_copy      (const GdkColor *color);
 void      gdk_color_free      (GdkColor       *color);
 gboolean  gdk_color_parse     (const gchar    *spec,

Modified: trunk/gdk/gdkgc.c
==============================================================================
--- trunk/gdk/gdkgc.c	(original)
+++ trunk/gdk/gdkgc.c	Mon Jan 14 14:02:12 2008
@@ -566,8 +566,8 @@
  * origin. (See gdk_gc_set_clip_origin()).
  **/
 void
-gdk_gc_set_clip_rectangle (GdkGC	*gc,
-			   GdkRectangle *rectangle)
+gdk_gc_set_clip_rectangle (GdkGC              *gc,
+			   const GdkRectangle *rectangle)
 {
   GdkRegion *region;
   
@@ -591,15 +591,19 @@
  * gdk_gc_set_clip_origin()).
  **/
 void
-gdk_gc_set_clip_region (GdkGC	  *gc,
-			GdkRegion *region)
+gdk_gc_set_clip_region (GdkGC           *gc,
+			const GdkRegion *region)
 {
+  GdkRegion *copy;
+
   g_return_if_fail (GDK_IS_GC (gc));
 
   if (region)
-    region = gdk_region_copy (region);
-  
-  _gdk_gc_set_clip_region_internal (gc, region);
+    copy = gdk_region_copy (region);
+  else
+    copy = NULL;
+
+  _gdk_gc_set_clip_region_internal (gc, copy);
 }
 
 /**
@@ -1119,11 +1123,11 @@
  * and functions other than %GDK_COPY are not currently handled.
  **/
 void
-_gdk_gc_update_context (GdkGC     *gc,
-			cairo_t   *cr,
-			GdkColor  *override_foreground,
-			GdkBitmap *override_stipple,
-			gboolean   gc_changed)
+_gdk_gc_update_context (GdkGC          *gc,
+                        cairo_t        *cr,
+                        const GdkColor *override_foreground,
+                        GdkBitmap      *override_stipple,
+                        gboolean        gc_changed)
 {
   GdkGCPrivate *priv;
   GdkFill fill;

Modified: trunk/gdk/gdkgc.h
==============================================================================
--- trunk/gdk/gdkgc.h	(original)
+++ trunk/gdk/gdkgc.h	Mon Jan 14 14:02:12 2008
@@ -257,9 +257,9 @@
 void   gdk_gc_set_clip_mask	  (GdkGC	    *gc,
 				   GdkBitmap	    *mask);
 void   gdk_gc_set_clip_rectangle  (GdkGC	    *gc,
-				   GdkRectangle	    *rectangle);
+				   const GdkRectangle *rectangle);
 void   gdk_gc_set_clip_region	  (GdkGC	    *gc,
-				   GdkRegion	    *region);
+				   const GdkRegion  *region);
 void   gdk_gc_set_subwindow	  (GdkGC	    *gc,
 				   GdkSubwindowMode  mode);
 void   gdk_gc_set_exposures	  (GdkGC	    *gc,

Modified: trunk/gdk/gdkinternals.h
==============================================================================
--- trunk/gdk/gdkinternals.h	(original)
+++ trunk/gdk/gdkinternals.h	Mon Jan 14 14:02:12 2008
@@ -220,11 +220,11 @@
 GdkGC *_gdk_drawable_get_scratch_gc (GdkDrawable *drawable,
 				     gboolean     graphics_exposures);
 
-void _gdk_gc_update_context (GdkGC     *gc,
-			     cairo_t   *cr,
-			     GdkColor  *override_foreground,
-			     GdkBitmap *override_stipple,
-			     gboolean   gc_changed);
+void _gdk_gc_update_context (GdkGC          *gc,
+			     cairo_t        *cr,
+			     const GdkColor *override_foreground,
+			     GdkBitmap      *override_stipple,
+			     gboolean        gc_changed);
 
 /*************************************
  * Interfaces used by windowing code *
@@ -310,8 +310,8 @@
  * the region; if the result is TRUE, then the windowing layer is responsible
  * for destroying the region later.
  */
-gboolean _gdk_windowing_window_queue_antiexpose (GdkWindow  *window,
-						 GdkRegion  *area);
+gboolean _gdk_windowing_window_queue_antiexpose (GdkWindow *window,
+						 GdkRegion *area);
 
 /* Called to do the windowing system specific part of gdk_window_destroy(),
  *
@@ -355,16 +355,16 @@
 {
   GTypeInterface g_iface;
   
-  void (* begin_paint_region) (GdkPaintable *paintable,
-			       GdkRegion    *region);
-  void (* end_paint)          (GdkPaintable *paintable);
-
-  void (* invalidate_maybe_recurse) (GdkPaintable *paintable,
-				     GdkRegion    *region,
-				     gboolean    (*child_func) (GdkWindow *, gpointer),
-				     gpointer      user_data);
-  void (* process_updates)          (GdkPaintable *paintable,
-				     gboolean      update_children);
+  void (* begin_paint_region)       (GdkPaintable    *paintable,
+                                     const GdkRegion *region);
+  void (* end_paint)                (GdkPaintable    *paintable);
+
+  void (* invalidate_maybe_recurse) (GdkPaintable    *paintable,
+				     const GdkRegion *region,
+				     gboolean       (*child_func) (GdkWindow *, gpointer),
+				     gpointer         user_data);
+  void (* process_updates)          (GdkPaintable    *paintable,
+				     gboolean         update_children);
 };
 
 GType _gdk_paintable_get_type (void) G_GNUC_CONST;
@@ -388,8 +388,8 @@
  * When this function is called, _gdk_gc_get_clip_region
  * will already return the new region.
  **/
-void _gdk_windowing_gc_set_clip_region (GdkGC     *gc,
-					GdkRegion *region);
+void _gdk_windowing_gc_set_clip_region (GdkGC           *gc,
+					const GdkRegion *region);
 
 /**
  * _gdk_windowing_gc_copy:

Modified: trunk/gdk/gdkpolyreg-generic.c
==============================================================================
--- trunk/gdk/gdkpolyreg-generic.c	(original)
+++ trunk/gdk/gdkpolyreg-generic.c	Mon Jan 14 14:02:12 2008
@@ -62,12 +62,11 @@
  *
  */
 static void
-InsertEdgeInET(ET, ETE, scanline, SLLBlock, iSLLBlock)
-    EdgeTable *ET;
-    EdgeTableEntry *ETE;
-    int scanline;
-    ScanLineListBlock **SLLBlock;
-    int *iSLLBlock;
+InsertEdgeInET (EdgeTable          *ET,
+                EdgeTableEntry     *ETE,
+                int                 scanline,
+                ScanLineListBlock **SLLBlock,
+                int                *iSLLBlock)
 {
     EdgeTableEntry *start, *prev;
     ScanLineList *pSLL, *pPrevSLL;
@@ -150,16 +149,15 @@
  */
 
 static void
-CreateETandAET(count, pts, ET, AET, pETEs, pSLLBlock)
-    int count;
-    GdkPoint *pts;
-    EdgeTable *ET;
-    EdgeTableEntry *AET;
-    EdgeTableEntry *pETEs;
-    ScanLineListBlock   *pSLLBlock;
+CreateETandAET (int                count,
+                const GdkPoint    *pts,
+                EdgeTable         *ET,
+                EdgeTableEntry    *AET,
+                EdgeTableEntry    *pETEs,
+                ScanLineListBlock *pSLLBlock)
 {
-    GdkPoint *top, *bottom;
-    GdkPoint *PrevPt, *CurrPt;
+    const GdkPoint *top, *bottom;
+    const GdkPoint *PrevPt, *CurrPt;
     int iSLLBlock = 0;
     int dy;
 
@@ -242,8 +240,8 @@
  */
 
 static void
-loadAET(AET, ETEs)
-    EdgeTableEntry *AET, *ETEs;
+loadAET(EdgeTableEntry *AET,
+        EdgeTableEntry *ETEs)
 {
     EdgeTableEntry *pPrevAET;
     EdgeTableEntry *tmp;
@@ -290,8 +288,7 @@
  *
  */
 static void
-computeWAET(AET)
-    EdgeTableEntry *AET;
+computeWAET (EdgeTableEntry *AET)
 {
     EdgeTableEntry *pWETE;
     int inside = 1;
@@ -329,8 +326,7 @@
  */
 
 static int
-InsertionSort(AET)
-    EdgeTableEntry *AET;
+InsertionSort (EdgeTableEntry *AET)
 {
     EdgeTableEntry *pETEchase;
     EdgeTableEntry *pETEinsert;
@@ -366,8 +362,7 @@
  *     Clean up our act.
  */
 static void
-FreeStorage(pSLLBlock)
-    ScanLineListBlock   *pSLLBlock;
+FreeStorage (ScanLineListBlock *pSLLBlock)
 {
     ScanLineListBlock   *tmpSLLBlock;
 
@@ -387,10 +382,11 @@
  *     stack by the calling procedure.
  *
  */
-static int PtsToRegion(numFullPtBlocks, iCurPtBlock, FirstPtBlock, reg)
-    int  numFullPtBlocks, iCurPtBlock;
-    POINTBLOCK *FirstPtBlock;
-    GdkRegion *reg;
+static int
+PtsToRegion (int         numFullPtBlocks,
+             int         iCurPtBlock,
+             POINTBLOCK *FirstPtBlock,
+             GdkRegion  *reg)
 {
     GdkRegionBox *rects;
     GdkPoint *pts;
@@ -464,7 +460,9 @@
  * Returns: a new #GdkRegion based on the given polygon
  */
 GdkRegion *
-gdk_region_polygon(GdkPoint *Pts, gint Count, GdkFillRule rule)
+gdk_region_polygon (const GdkPoint *Pts,
+                    gint            Count,
+                    GdkFillRule     rule)
 {
     GdkRegion *region;
     EdgeTableEntry *pAET;   /* Active Edge Table       */
@@ -472,7 +470,7 @@
     int iPts = 0;           /* number of pts in buffer */
     EdgeTableEntry *pWETE;  /* Winding Edge Table Entry*/
     ScanLineList *pSLL;     /* current scanLineList    */
-    GdkPoint *pts;             /* output buffer           */
+    GdkPoint *pts;          /* output buffer           */
     EdgeTableEntry *pPrevAET;        /* ptr to previous AET     */
     EdgeTable ET;                    /* header node for ET      */
     EdgeTableEntry AET;              /* header node for AET     */
@@ -486,21 +484,20 @@
     region = gdk_region_new ();
 
     /* special case a rectangle */
-    pts = Pts;
     if (((Count == 4) ||
-	 ((Count == 5) && (pts[4].x == pts[0].x) && (pts[4].y == pts[0].y))) &&
-	(((pts[0].y == pts[1].y) &&
-	  (pts[1].x == pts[2].x) &&
-	  (pts[2].y == pts[3].y) &&
-	  (pts[3].x == pts[0].x)) ||
-	 ((pts[0].x == pts[1].x) &&
-	  (pts[1].y == pts[2].y) &&
-	  (pts[2].x == pts[3].x) &&
-	  (pts[3].y == pts[0].y)))) {
-	region->extents.x1 = MIN(pts[0].x, pts[2].x);
-	region->extents.y1 = MIN(pts[0].y, pts[2].y);
-	region->extents.x2 = MAX(pts[0].x, pts[2].x);
-	region->extents.y2 = MAX(pts[0].y, pts[2].y);
+	 ((Count == 5) && (Pts[4].x == Pts[0].x) && (Pts[4].y == Pts[0].y))) &&
+	(((Pts[0].y == Pts[1].y) &&
+	  (Pts[1].x == Pts[2].x) &&
+	  (Pts[2].y == Pts[3].y) &&
+	  (Pts[3].x == Pts[0].x)) ||
+	 ((Pts[0].x == Pts[1].x) &&
+	  (Pts[1].y == Pts[2].y) &&
+	  (Pts[2].x == Pts[3].x) &&
+	  (Pts[3].y == Pts[0].y)))) {
+	region->extents.x1 = MIN(Pts[0].x, Pts[2].x);
+	region->extents.y1 = MIN(Pts[0].y, Pts[2].y);
+	region->extents.x2 = MAX(Pts[0].x, Pts[2].x);
+	region->extents.y2 = MAX(Pts[0].y, Pts[2].y);
 	if ((region->extents.x1 != region->extents.x2) &&
 	    (region->extents.y1 != region->extents.y2)) {
 	    region->numRects = 1;

Modified: trunk/gdk/gdkrectangle.c
==============================================================================
--- trunk/gdk/gdkrectangle.c	(original)
+++ trunk/gdk/gdkrectangle.c	Mon Jan 14 14:02:12 2008
@@ -40,9 +40,9 @@
  * It is allowed for @dest to be the same as either @src1 or @src2.
  */
 void
-gdk_rectangle_union (GdkRectangle *src1,
-		     GdkRectangle *src2,
-		     GdkRectangle *dest)
+gdk_rectangle_union (const GdkRectangle *src1,
+		     const GdkRectangle *src2,
+		     GdkRectangle       *dest)
 {
   gint dest_x, dest_y;
   
@@ -74,9 +74,9 @@
  * Returns: %TRUE if the rectangles intersect.
  */
 gboolean
-gdk_rectangle_intersect (GdkRectangle *src1,
-			 GdkRectangle *src2,
-			 GdkRectangle *dest)
+gdk_rectangle_intersect (const GdkRectangle *src1,
+			 const GdkRectangle *src2,
+			 GdkRectangle       *dest)
 {
   gint dest_x, dest_y;
   gint dest_w, dest_h;

Modified: trunk/gdk/gdkregion-generic.c
==============================================================================
--- trunk/gdk/gdkregion-generic.c	(original)
+++ trunk/gdk/gdkregion-generic.c	Mon Jan 14 14:02:12 2008
@@ -75,27 +75,27 @@
 #include "gdkregion-generic.h"
 #include "gdkalias.h"
 
-typedef void (*overlapFunc) (GdkRegion    *pReg,
-			     GdkRegionBox *r1,
-			     GdkRegionBox *r1End,
-			     GdkRegionBox *r2,
-			     GdkRegionBox *r2End,
-			     gint          y1,
-			     gint          y2);
-typedef void (*nonOverlapFunc) (GdkRegion    *pReg,
-				GdkRegionBox *r,
-				GdkRegionBox *rEnd,
-				gint          y1,
-				gint          y2);
-
-static void miRegionCopy (GdkRegion      *dstrgn,
-			  GdkRegion      *rgn);
-static void miRegionOp   (GdkRegion      *newReg,
-			  GdkRegion      *reg1,
-			  GdkRegion      *reg2,
-			  overlapFunc     overlapFn,
-			  nonOverlapFunc  nonOverlap1Fn,
-			  nonOverlapFunc  nonOverlap2Fn);
+typedef void (* overlapFunc)    (GdkRegion    *pReg,
+                                 GdkRegionBox *r1,
+                                 GdkRegionBox *r1End,
+                                 GdkRegionBox *r2,
+                                 GdkRegionBox *r2End,
+                                 gint          y1,
+                                 gint          y2);
+typedef void (* nonOverlapFunc) (GdkRegion    *pReg,
+                                 GdkRegionBox *r,
+                                 GdkRegionBox *rEnd,
+                                 gint          y1,
+                                 gint          y2);
+
+static void miRegionCopy (GdkRegion       *dstrgn,
+			  const GdkRegion *rgn);
+static void miRegionOp   (GdkRegion       *newReg,
+			  GdkRegion       *reg1,
+			  const GdkRegion *reg2,
+			  overlapFunc      overlapFn,
+			  nonOverlapFunc   nonOverlap1Fn,
+			  nonOverlapFunc   nonOverlap2Fn);
 
 /**
  * gdk_region_new:
@@ -131,7 +131,7 @@
  * Return value: a new region
  **/
 GdkRegion *
-gdk_region_rectangle (GdkRectangle *rectangle)
+gdk_region_rectangle (const GdkRectangle *rectangle)
 {
   GdkRegion *temp;
 
@@ -162,7 +162,7 @@
  * Return value: a new region identical to @region
  **/
 GdkRegion *
-gdk_region_copy (GdkRegion *region)
+gdk_region_copy (const GdkRegion *region)
 {
   GdkRegion *temp;
 
@@ -184,8 +184,8 @@
  *
  */
 void
-gdk_region_get_clipbox (GdkRegion    *region, 
-			GdkRectangle *rectangle)
+gdk_region_get_clipbox (const GdkRegion *region,
+			GdkRectangle    *rectangle)
 {
   g_return_if_fail (region != NULL);
   g_return_if_fail (rectangle != NULL);
@@ -207,9 +207,9 @@
  * The array returned in @rectangles must be freed with g_free().
  **/
 void
-gdk_region_get_rectangles (GdkRegion     *region,
-                           GdkRectangle **rectangles,
-                           gint          *n_rectangles)
+gdk_region_get_rectangles (const GdkRegion  *region,
+                           GdkRectangle    **rectangles,
+                           gint             *n_rectangles)
 {
   gint i;
   
@@ -241,8 +241,8 @@
  * either @region or @rect.
  **/
 void
-gdk_region_union_with_rect (GdkRegion    *region,
-			    GdkRectangle *rect)
+gdk_region_union_with_rect (GdkRegion          *region,
+			    const GdkRectangle *rect)
 {
   GdkRegion tmp_region;
 
@@ -567,8 +567,8 @@
  * both @source1 and @source2.
  **/
 void
-gdk_region_intersect (GdkRegion *source1,
-		      GdkRegion *source2)
+gdk_region_intersect (GdkRegion       *source1,
+		      const GdkRegion *source2)
 {
   g_return_if_fail (source1 != NULL);
   g_return_if_fail (source2 != NULL);
@@ -578,7 +578,7 @@
       (!EXTENTCHECK(&source1->extents, &source2->extents)))
     source1->numRects = 0;
   else
-    miRegionOp (source1, source1, source2, 
+    miRegionOp (source1, source1, source2,
     		miIntersectO, (nonOverlapFunc) NULL, (nonOverlapFunc) NULL);
     
   /*
@@ -591,8 +591,8 @@
 }
 
 static void
-miRegionCopy (GdkRegion *dstrgn, 
-	      GdkRegion *rgn)
+miRegionCopy (GdkRegion       *dstrgn,
+	      const GdkRegion *rgn)
 {
   if (dstrgn != rgn) /*  don't want to copy to itself */
     {  
@@ -788,15 +788,15 @@
  */
 /* static void*/
 static void
-miRegionOp(GdkRegion *newReg,
-	   GdkRegion *reg1,
-	   GdkRegion *reg2,
-	   overlapFunc    overlapFn,   	        /* Function to call for over-
+miRegionOp(GdkRegion       *newReg,
+	   GdkRegion       *reg1,
+	   const GdkRegion *reg2,
+	   overlapFunc      overlapFn,          /* Function to call for over-
 						 * lapping bands */
-	   nonOverlapFunc nonOverlap1Fn,	/* Function to call for non-
+	   nonOverlapFunc   nonOverlap1Fn,	/* Function to call for non-
 						 * overlapping bands in region
 						 * 1 */
-	   nonOverlapFunc nonOverlap2Fn)	/* Function to call for non-
+	   nonOverlapFunc   nonOverlap2Fn)	/* Function to call for non-
 						 * overlapping bands in region
 						 * 2 */
 {
@@ -1189,8 +1189,8 @@
  * either @source1 or @source2.
  **/
 void
-gdk_region_union (GdkRegion *source1,
-		  GdkRegion *source2)
+gdk_region_union (GdkRegion       *source1,
+		  const GdkRegion *source2)
 {
   g_return_if_fail (source1 != NULL);
   g_return_if_fail (source2 != NULL);
@@ -1450,8 +1450,8 @@
  * area is the set of pixels contained in @source1 but not in @source2.
  **/
 void
-gdk_region_subtract (GdkRegion *source1,
-		     GdkRegion *source2)
+gdk_region_subtract (GdkRegion       *source1,
+		     const GdkRegion *source2)
 {
   g_return_if_fail (source1 != NULL);
   g_return_if_fail (source2 != NULL);
@@ -1483,8 +1483,8 @@
  * or the other of the two sources but not in both.
  **/
 void
-gdk_region_xor (GdkRegion *source1,
-		GdkRegion *source2)
+gdk_region_xor (GdkRegion       *source1,
+		const GdkRegion *source2)
 {
   GdkRegion *trb;
 
@@ -1510,7 +1510,7 @@
  * Returns: %TRUE if @region is empty.
  */
 gboolean
-gdk_region_empty (GdkRegion *region)
+gdk_region_empty (const GdkRegion *region)
 {
   g_return_val_if_fail (region != NULL, FALSE);
   
@@ -1530,8 +1530,8 @@
  * Returns: %TRUE if @region1 and @region2 are equal.
  */
 gboolean
-gdk_region_equal (GdkRegion *region1,
-		  GdkRegion *region2)
+gdk_region_equal (const GdkRegion *region1,
+		  const GdkRegion *region2)
 {
   int i;
 
@@ -1566,9 +1566,9 @@
  * Returns: %TRUE if the point is in @region.
  */
 gboolean
-gdk_region_point_in (GdkRegion *region,
-		     int        x,
-		     int        y)
+gdk_region_point_in (const GdkRegion *region,
+		     int              x,
+		     int              y)
 {
   int i;
 
@@ -1598,8 +1598,8 @@
  *   outside, or partly inside the #GdkRegion, respectively.
  */
 GdkOverlapType
-gdk_region_rect_in (GdkRegion    *region,
-		    GdkRectangle *rectangle)
+gdk_region_rect_in (const GdkRegion    *region,
+		    const GdkRectangle *rectangle)
 {
   GdkRegionBox *pbox;
   GdkRegionBox *pboxEnd;

Modified: trunk/gdk/gdkregion.h
==============================================================================
--- trunk/gdk/gdkregion.h	(original)
+++ trunk/gdk/gdkregion.h	Mon Jan 14 14:02:12 2008
@@ -53,55 +53,55 @@
   GDK_OVERLAP_RECTANGLE_PART
 } GdkOverlapType;
 
-typedef void (*GdkSpanFunc) (GdkSpan *span,
-			     gpointer data);
+typedef void (* GdkSpanFunc) (GdkSpan *span,
+                              gpointer data);
 
-GdkRegion *gdk_region_new       (void);
-GdkRegion *gdk_region_polygon   (GdkPoint     *points,
-				 gint          npoints,
-				 GdkFillRule   fill_rule);
-GdkRegion *gdk_region_copy      (GdkRegion    *region);
-GdkRegion *gdk_region_rectangle (GdkRectangle *rectangle);
-void       gdk_region_destroy   (GdkRegion    *region);
-
-void	       gdk_region_get_clipbox    (GdkRegion     *region,
-                                          GdkRectangle  *rectangle);
-void           gdk_region_get_rectangles (GdkRegion     *region,
-                                          GdkRectangle **rectangles,
-                                          gint          *n_rectangles);
-
-gboolean       gdk_region_empty    (GdkRegion    *region);
-gboolean       gdk_region_equal    (GdkRegion    *region1,
-				    GdkRegion    *region2);
-gboolean       gdk_region_point_in (GdkRegion    *region,
-				    int           x,
-				    int           y);
-GdkOverlapType gdk_region_rect_in  (GdkRegion    *region,
-				    GdkRectangle *rectangle);
-
-void gdk_region_offset          (GdkRegion    *region,
-				 gint          dx,
-				 gint          dy);
-void gdk_region_shrink          (GdkRegion    *region,
-				 gint          dx,
-				 gint          dy);
-void gdk_region_union_with_rect (GdkRegion    *region,
-				 GdkRectangle *rect);
-void gdk_region_intersect       (GdkRegion    *source1,
-				 GdkRegion    *source2);
-void gdk_region_union           (GdkRegion    *source1,
-			 	 GdkRegion    *source2);
-void gdk_region_subtract        (GdkRegion    *source1,
-				 GdkRegion    *source2);
-void gdk_region_xor             (GdkRegion    *source1,
-				 GdkRegion    *source2);
-
-void gdk_region_spans_intersect_foreach (GdkRegion   *region,
-					 GdkSpan     *spans,
-					 int          n_spans,
-					 gboolean     sorted,
-					 GdkSpanFunc  function,
-					 gpointer     data);
+GdkRegion    * gdk_region_new             (void);
+GdkRegion    * gdk_region_polygon         (const GdkPoint     *points,
+                                           gint                n_points,
+                                           GdkFillRule         fill_rule);
+GdkRegion    * gdk_region_copy            (const GdkRegion    *region);
+GdkRegion    * gdk_region_rectangle       (const GdkRectangle *rectangle);
+void           gdk_region_destroy         (GdkRegion          *region);
+
+void	       gdk_region_get_clipbox     (const GdkRegion    *region,
+                                           GdkRectangle       *rectangle);
+void           gdk_region_get_rectangles  (const GdkRegion    *region,
+                                           GdkRectangle      **rectangles,
+                                           gint               *n_rectangles);
+
+gboolean       gdk_region_empty           (const GdkRegion    *region);
+gboolean       gdk_region_equal           (const GdkRegion    *region1,
+                                           const GdkRegion    *region2);
+gboolean       gdk_region_point_in        (const GdkRegion    *region,
+                                           int                 x,
+                                           int                 y);
+GdkOverlapType gdk_region_rect_in         (const GdkRegion    *region,
+                                           const GdkRectangle *rectangle);
+
+void           gdk_region_offset          (GdkRegion          *region,
+                                           gint                dx,
+                                           gint                dy);
+void           gdk_region_shrink          (GdkRegion          *region,
+                                           gint                dx,
+                                           gint                dy);
+void           gdk_region_union_with_rect (GdkRegion          *region,
+                                           const GdkRectangle *rect);
+void           gdk_region_intersect       (GdkRegion          *source1,
+                                           const GdkRegion    *source2);
+void           gdk_region_union           (GdkRegion          *source1,
+                                           const GdkRegion    *source2);
+void           gdk_region_subtract        (GdkRegion          *source1,
+                                           const GdkRegion    *source2);
+void           gdk_region_xor             (GdkRegion          *source1,
+                                           const GdkRegion    *source2);
+
+void   gdk_region_spans_intersect_foreach (GdkRegion          *region,
+                                           GdkSpan            *spans,
+                                           int                 n_spans,
+                                           gboolean            sorted,
+                                           GdkSpanFunc         function,
+                                           gpointer            data);
 
 G_END_DECLS
 

Modified: trunk/gdk/gdkwindow.c
==============================================================================
--- trunk/gdk/gdkwindow.c	(original)
+++ trunk/gdk/gdkwindow.c	Mon Jan 14 14:02:12 2008
@@ -905,8 +905,8 @@
  * 
  **/
 void
-gdk_window_begin_paint_rect (GdkWindow    *window,
-			     GdkRectangle *rectangle)
+gdk_window_begin_paint_rect (GdkWindow          *window,
+                             const GdkRectangle *rectangle)
 {
   GdkRegion *region;
 
@@ -968,8 +968,8 @@
  * 
  **/
 void	      
-gdk_window_begin_paint_region (GdkWindow *window,
-			       GdkRegion *region)
+gdk_window_begin_paint_region (GdkWindow       *window,
+                               const GdkRegion *region)
 {
 #ifdef USE_BACKING_STORE
   GdkWindowObject *private = (GdkWindowObject *)window;
@@ -2518,9 +2518,9 @@
  * gdk_window_invalidate_region() for details.
  **/
 void
-gdk_window_invalidate_rect   (GdkWindow    *window,
-			      GdkRectangle *rect,
-			      gboolean      invalidate_children)
+gdk_window_invalidate_rect (GdkWindow          *window,
+                            const GdkRectangle *rect,
+                            gboolean            invalidate_children)
 {
   GdkRectangle window_rect;
   GdkRegion *region;
@@ -2551,8 +2551,8 @@
 }
 
 static void
-draw_ugly_color (GdkWindow *window,
-                GdkRegion *region)
+draw_ugly_color (GdkWindow       *window,
+                 const GdkRegion *region)
 {
   /* Draw ugly color all over the newly-invalid region */
   GdkColor ugly_color = { 0, 50000, 10000, 10000 };
@@ -2600,9 +2600,10 @@
  * invalidated.
  **/
 void
-gdk_window_invalidate_maybe_recurse (GdkWindow *window,
-				     GdkRegion *region,
-				     gboolean (*child_func) (GdkWindow *, gpointer),
+gdk_window_invalidate_maybe_recurse (GdkWindow       *window,
+                                     const GdkRegion *region,
+                                     gboolean       (*child_func) (GdkWindow *,
+                                                                   gpointer),
 				     gpointer   user_data)
 {
   GdkWindowObject *private = (GdkWindowObject *)window;
@@ -2655,14 +2656,16 @@
 	  
 	  if (child_func && (*child_func) ((GdkWindow *)child, user_data))
 	    {
-	      gdk_region_offset (region, - child_rect.x, - child_rect.y);
+              GdkRegion *tmp = gdk_region_copy (region);
+
+	      gdk_region_offset (tmp, - child_rect.x, - child_rect.y);
 	      gdk_region_offset (child_region, - child_rect.x, - child_rect.y);
-	      gdk_region_intersect (child_region, region);
+	      gdk_region_intersect (child_region, tmp);
 	      
 	      gdk_window_invalidate_maybe_recurse ((GdkWindow *)child,
 						   child_region, child_func, user_data);
 	      
-	      gdk_region_offset (region, child_rect.x, child_rect.y);
+	      gdk_region_destroy (tmp);
 	    }
 
 	  gdk_region_destroy (child_region);
@@ -2724,9 +2727,9 @@
  * fine grained control over which children are invalidated.
  **/
 void
-gdk_window_invalidate_region (GdkWindow *window,
-			      GdkRegion *region,
-			      gboolean   invalidate_children)
+gdk_window_invalidate_region (GdkWindow       *window,
+			      const GdkRegion *region,
+			      gboolean         invalidate_children)
 {
   gdk_window_invalidate_maybe_recurse (window, region,
 				       invalidate_children ?

Modified: trunk/gdk/gdkwindow.h
==============================================================================
--- trunk/gdk/gdkwindow.h	(original)
+++ trunk/gdk/gdkwindow.h	Mon Jan 14 14:02:12 2008
@@ -365,13 +365,13 @@
 void          gdk_window_remove_filter         (GdkWindow     *window,
                                                 GdkFilterFunc  function,
                                                 gpointer       data);
-void          gdk_window_scroll                (GdkWindow *window,
-                                                gint       dx,
-                                                gint       dy);
-void	      gdk_window_move_region           (GdkWindow *window,
-						GdkRegion *region,
-						gint       dx,
-						gint       dy);
+void          gdk_window_scroll                (GdkWindow     *window,
+                                                gint           dx,
+                                                gint           dy);
+void	      gdk_window_move_region           (GdkWindow       *window,
+						const GdkRegion *region,
+						gint             dx,
+						gint             dy);
 
 /* 
  * This allows for making shaped (partially transparent) windows
@@ -379,14 +379,14 @@
  *  The shape_mask can be the mask
  *  from gdk_pixmap_create_from_xpm.   Stefan Wille
  */
-void gdk_window_shape_combine_mask  (GdkWindow	    *window,
-                                     GdkBitmap	    *mask,
-                                     gint	     x,
-                                     gint	     y);
-void gdk_window_shape_combine_region (GdkWindow	    *window,
-                                      GdkRegion     *shape_region,
-                                      gint	     offset_x,
-                                      gint	     offset_y);
+void gdk_window_shape_combine_mask  (GdkWindow	      *window,
+                                     GdkBitmap	      *mask,
+                                     gint	       x,
+                                     gint	       y);
+void gdk_window_shape_combine_region (GdkWindow	      *window,
+                                      const GdkRegion *shape_region,
+                                      gint	       offset_x,
+                                      gint	       offset_y);
 
 /*
  * This routine allows you to quickly take the shapes of all the child windows
@@ -398,7 +398,7 @@
 void gdk_window_set_child_shapes (GdkWindow *window);
 
 void gdk_window_set_composited   (GdkWindow *window,
-                                  gboolean composited);
+                                  gboolean   composited);
 
 /*
  * This routine allows you to merge (ie ADD) child shapes to your
@@ -407,18 +407,18 @@
  * 
  * - Raster
  */
-void gdk_window_merge_child_shapes (GdkWindow *window);
+void gdk_window_merge_child_shapes         (GdkWindow       *window);
 
-void gdk_window_input_shape_combine_mask   (GdkWindow *window,
-					    GdkBitmap *mask,
-					    gint       x,
-					    gint       y);
-void gdk_window_input_shape_combine_region (GdkWindow *window,
-                                            GdkRegion *shape_region,
-                                            gint       offset_x,
-                                            gint       offset_y);
-void gdk_window_set_child_input_shapes     (GdkWindow *window);
-void gdk_window_merge_child_input_shapes   (GdkWindow *window);
+void gdk_window_input_shape_combine_mask   (GdkWindow       *window,
+					    GdkBitmap       *mask,
+					    gint             x,
+					    gint             y);
+void gdk_window_input_shape_combine_region (GdkWindow       *window,
+                                            const GdkRegion *shape_region,
+                                            gint             offset_x,
+                                            gint             offset_y);
+void gdk_window_set_child_input_shapes     (GdkWindow       *window);
+void gdk_window_merge_child_input_shapes   (GdkWindow       *window);
 
 
 /*
@@ -478,13 +478,13 @@
 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_set_sm_client_id          (const gchar      *sm_client_id);
 
-void	      gdk_window_begin_paint_rect   (GdkWindow    *window,
-					     GdkRectangle *rectangle);
-void	      gdk_window_begin_paint_region (GdkWindow    *window,
-					     GdkRegion    *region);
-void	      gdk_window_end_paint          (GdkWindow    *window);
+void	      gdk_window_begin_paint_rect   (GdkWindow          *window,
+					     const GdkRectangle *rectangle);
+void	      gdk_window_begin_paint_region (GdkWindow          *window,
+					     const GdkRegion    *region);
+void	      gdk_window_end_paint          (GdkWindow          *window);
 
 void	      gdk_window_set_title	   (GdkWindow	  *window,
 					    const gchar	  *title);
@@ -592,14 +592,14 @@
                                    guint32        timestamp);
 
 /* Interface for dirty-region queueing */
-void       gdk_window_invalidate_rect           (GdkWindow    *window,
-					         GdkRectangle *rect,
-					         gboolean      invalidate_children);
-void       gdk_window_invalidate_region         (GdkWindow    *window,
-					         GdkRegion    *region,
-					         gboolean      invalidate_children);
-void       gdk_window_invalidate_maybe_recurse  (GdkWindow *window,
-						 GdkRegion *region,
+void       gdk_window_invalidate_rect           (GdkWindow          *window,
+					         const GdkRectangle *rect,
+					         gboolean            invalidate_children);
+void       gdk_window_invalidate_region         (GdkWindow          *window,
+					         const GdkRegion    *region,
+					         gboolean            invalidate_children);
+void       gdk_window_invalidate_maybe_recurse  (GdkWindow          *window,
+						 const GdkRegion    *region,
 						 gboolean (*child_func) (GdkWindow *, gpointer),
 						 gpointer   user_data);
 GdkRegion *gdk_window_get_update_area     (GdkWindow    *window);

Modified: trunk/gdk/quartz/gdkcolor-quartz.c
==============================================================================
--- trunk/gdk/quartz/gdkcolor-quartz.c	(original)
+++ trunk/gdk/quartz/gdkcolor-quartz.c	Mon Jan 14 14:02:12 2008
@@ -133,9 +133,9 @@
 }
 
 void
-gdk_colormap_free_colors (GdkColormap *colormap,
-			  GdkColor    *colors,
-			  gint         ncolors)
+gdk_colormap_free_colors (GdkColormap    *colormap,
+                          const GdkColor *colors,
+                          gint            n_colors)
 {
   /* This function shouldn't do anything since
    * colors are neve allocated.

Modified: trunk/gdk/quartz/gdkgc-quartz.c
==============================================================================
--- trunk/gdk/quartz/gdkgc-quartz.c	(original)
+++ trunk/gdk/quartz/gdkgc-quartz.c	Mon Jan 14 14:02:12 2008
@@ -207,8 +207,8 @@
 }
 
 void
-_gdk_windowing_gc_set_clip_region (GdkGC     *gc,
-				   GdkRegion *region)
+_gdk_windowing_gc_set_clip_region (GdkGC           *gc,
+				   const GdkRegion *region)
 {
   GdkGCQuartz *private = GDK_GC_QUARTZ (gc);
 

Modified: trunk/gdk/quartz/gdkgeometry-quartz.c
==============================================================================
--- trunk/gdk/quartz/gdkgeometry-quartz.c	(original)
+++ trunk/gdk/quartz/gdkgeometry-quartz.c	Mon Jan 14 14:02:12 2008
@@ -79,10 +79,10 @@
 }
 
 void
-gdk_window_move_region (GdkWindow *window,
-			GdkRegion *region,
-			gint       dx,
-			gint       dy)
+gdk_window_move_region (GdkWindow       *window,
+                        const GdkRegion *region,
+                        gint             dx,
+                        gint             dy)
 {
   /* FIXME: Implement */
 }

Modified: trunk/gdk/quartz/gdkwindow-quartz.c
==============================================================================
--- trunk/gdk/quartz/gdkwindow-quartz.c	(original)
+++ trunk/gdk/quartz/gdkwindow-quartz.c	Mon Jan 14 14:02:12 2008
@@ -2074,10 +2074,10 @@
 }
 
 void
-gdk_window_shape_combine_region (GdkWindow *window,
-                                 GdkRegion *shape,
-                                 gint       x,
-                                 gint       y)
+gdk_window_shape_combine_region (GdkWindow       *window,
+                                 const GdkRegion *shape,
+                                 gint             x,
+                                 gint             y)
 {
   g_return_if_fail (GDK_IS_WINDOW (window));
 
@@ -2092,7 +2092,7 @@
   /* FIXME: Implement */
 }
 
-void 
+void
 gdk_window_input_shape_combine_mask (GdkWindow *window,
 				     GdkBitmap *mask,
 				     gint       x,
@@ -2101,11 +2101,11 @@
   /* FIXME: Implement */
 }
 
-void 
-gdk_window_input_shape_combine_region (GdkWindow *window,
-				       GdkRegion *shape_region,
-				       gint       offset_x,
-				       gint       offset_y)
+void
+gdk_window_input_shape_combine_region (GdkWindow       *window,
+                                       const GdkRegion *shape_region,
+                                       gint             offset_x,
+                                       gint             offset_y)
 {
   /* FIXME: Implement */
 }

Modified: trunk/gdk/win32/gdkcolor-win32.c
==============================================================================
--- trunk/gdk/win32/gdkcolor-win32.c	(original)
+++ trunk/gdk/win32/gdkcolor-win32.c	Mon Jan 14 14:02:12 2008
@@ -765,9 +765,9 @@
 }
 
 void
-gdk_colormap_free_colors (GdkColormap *colormap,
-			  GdkColor    *colors,
-			  gint         ncolors)
+gdk_colormap_free_colors (GdkColormap    *colormap,
+			  const GdkColor *colors,
+			  gint            ncolors)
 {
   gulong *pixels;
   gint i;

Modified: trunk/gdk/win32/gdkgc-win32.c
==============================================================================
--- trunk/gdk/win32/gdkgc-win32.c	(original)
+++ trunk/gdk/win32/gdkgc-win32.c	Mon Jan 14 14:02:12 2008
@@ -571,8 +571,8 @@
 }
 
 void
-_gdk_windowing_gc_set_clip_region (GdkGC	  *gc,
-				   GdkRegion *region)
+_gdk_windowing_gc_set_clip_region (GdkGC           *gc,
+                                   const GdkRegion *region)
 {
   GdkGCWin32 *win32_gc = GDK_GC_WIN32 (gc);
 
@@ -1100,9 +1100,9 @@
 }
 
 HRGN
-_gdk_win32_gdkregion_to_hrgn (GdkRegion *region,
-			      gint       x_origin,
-			      gint       y_origin)
+_gdk_win32_gdkregion_to_hrgn (const GdkRegion *region,
+			      gint             x_origin,
+			      gint             y_origin)
 {
   HRGN hrgn;
   RGNDATA *rgndata;

Modified: trunk/gdk/win32/gdkgeometry-win32.c
==============================================================================
--- trunk/gdk/win32/gdkgeometry-win32.c	(original)
+++ trunk/gdk/win32/gdkgeometry-win32.c	Mon Jan 14 14:02:12 2008
@@ -172,10 +172,10 @@
 }
 
 void
-gdk_window_move_region (GdkWindow *window,
-			GdkRegion *region,
-			gint       dx,
-			gint       dy)
+gdk_window_move_region (GdkWindow       *window,
+                        const GdkRegion *region,
+                        gint             dx,
+                        gint             dy)
 {
   GdkRegion *invalidate_region;
   GdkWindowImplWin32 *impl;

Modified: trunk/gdk/win32/gdkprivate-win32.h
==============================================================================
--- trunk/gdk/win32/gdkprivate-win32.h	(original)
+++ trunk/gdk/win32/gdkprivate-win32.h	Mon Jan 14 14:02:12 2008
@@ -254,9 +254,9 @@
 
 HRGN	  _gdk_win32_bitmap_to_hrgn     (GdkPixmap   *bitmap);
 
-HRGN	  _gdk_win32_gdkregion_to_hrgn  (GdkRegion   *region,
-					 gint         x_origin,
-					 gint         y_origin);
+HRGN	  _gdk_win32_gdkregion_to_hrgn  (const GdkRegion *region,
+					 gint             x_origin,
+					 gint             y_origin);
 
 GdkRegion *_gdk_win32_hrgn_to_region    (HRGN hrgn);
 

Modified: trunk/gdk/win32/gdkwindow-win32.c
==============================================================================
--- trunk/gdk/win32/gdkwindow-win32.c	(original)
+++ trunk/gdk/win32/gdkwindow-win32.c	Mon Jan 14 14:02:12 2008
@@ -3561,10 +3561,10 @@
 }
 
 void
-gdk_window_shape_combine_region (GdkWindow *window,
-                                 GdkRegion *shape_region,
-                                 gint       offset_x,
-                                 gint       offset_y)
+gdk_window_shape_combine_region (GdkWindow       *window,
+                                 const GdkRegion *shape_region,
+                                 gint             offset_x,
+                                 gint             offset_y)
 {
   GdkWindowObject *private = (GdkWindowObject *)window;
 
@@ -3598,10 +3598,10 @@
 }
 
 void 
-gdk_window_input_shape_combine_region (GdkWindow *window,
-				       GdkRegion *shape_region,
-				       gint       offset_x,
-				       gint       offset_y)
+gdk_window_input_shape_combine_region (GdkWindow       *window,
+                                       const GdkRegion *shape_region,
+                                       gint             offset_x,
+                                       gint             offset_y)
 {
   g_return_if_fail (GDK_IS_WINDOW (window));
 
@@ -3611,7 +3611,8 @@
 }
 
 GdkWindow *
-gdk_window_lookup_for_display (GdkDisplay *display, GdkNativeWindow anid)
+gdk_window_lookup_for_display (GdkDisplay      *display,
+                               GdkNativeWindow  anid)
 {
   g_return_val_if_fail (display == _gdk_display, NULL);
 

Modified: trunk/gdk/x11/gdkcolor-x11.c
==============================================================================
--- trunk/gdk/x11/gdkcolor-x11.c	(original)
+++ trunk/gdk/x11/gdkcolor-x11.c	Mon Jan 14 14:02:12 2008
@@ -649,9 +649,9 @@
  * Frees previously allocated colors.
  **/
 void
-gdk_colormap_free_colors (GdkColormap *colormap,
-			  GdkColor    *colors,
-			  gint         ncolors)
+gdk_colormap_free_colors (GdkColormap    *colormap,
+			  const GdkColor *colors,
+			  gint            ncolors)
 {
   GdkColormapPrivateX11 *private;
   gulong *pixels;
@@ -702,9 +702,9 @@
  * cache the result in our colormap, and store in ret.
  */
 static gboolean 
-gdk_colormap_alloc1 (GdkColormap *colormap,
-		     GdkColor    *color,
-		     GdkColor    *ret)
+gdk_colormap_alloc1 (GdkColormap    *colormap,
+		     const GdkColor *color,
+		     GdkColor       *ret)
 {
   GdkColormapPrivateX11 *private;
   XColor xcolor;

Modified: trunk/gdk/x11/gdkgc-x11.c
==============================================================================
--- trunk/gdk/x11/gdkgc-x11.c	(original)
+++ trunk/gdk/x11/gdkgc-x11.c	Mon Jan 14 14:02:12 2008
@@ -607,8 +607,8 @@
 }
 
 void
-_gdk_windowing_gc_set_clip_region (GdkGC     *gc,
-				   GdkRegion *region)
+_gdk_windowing_gc_set_clip_region (GdkGC           *gc,
+				   const GdkRegion *region)
 {
   GdkGCX11 *x11_gc = GDK_GC_X11 (gc);
 

Modified: trunk/gdk/x11/gdkgeometry-x11.c
==============================================================================
--- trunk/gdk/x11/gdkgeometry-x11.c	(original)
+++ trunk/gdk/x11/gdkgeometry-x11.c	Mon Jan 14 14:02:12 2008
@@ -499,10 +499,10 @@
  * Since: 2.8
  **/
 void
-gdk_window_move_region (GdkWindow *window,
-			GdkRegion *region,
-			gint       dx,
-			gint       dy)
+gdk_window_move_region (GdkWindow       *window,
+			const GdkRegion *region,
+			gint             dx,
+			gint             dy)
 {
   GdkWindowImplX11 *impl;
   GdkWindowObject *private;

Modified: trunk/gdk/x11/gdkmain-x11.c
==============================================================================
--- trunk/gdk/x11/gdkmain-x11.c	(original)
+++ trunk/gdk/x11/gdkmain-x11.c	Mon Jan 14 14:02:12 2008
@@ -817,11 +817,11 @@
 }
 
 void
-_gdk_region_get_xrectangles (GdkRegion   *region,
-                             gint         x_offset,
-                             gint         y_offset,
-                             XRectangle **rects,
-                             gint        *n_rects)
+_gdk_region_get_xrectangles (const GdkRegion *region,
+                             gint             x_offset,
+                             gint             y_offset,
+                             XRectangle     **rects,
+                             gint            *n_rects)
 {
   XRectangle *rectangles = g_new (XRectangle, region->numRects);
   GdkRegionBox *boxes = region->rects;

Modified: trunk/gdk/x11/gdkprivate-x11.h
==============================================================================
--- trunk/gdk/x11/gdkprivate-x11.h	(original)
+++ trunk/gdk/x11/gdkprivate-x11.h	Mon Jan 14 14:02:12 2008
@@ -131,7 +131,7 @@
 void     _gdk_selection_window_destroyed   (GdkWindow            *window);
 gboolean _gdk_selection_filter_clear_event (XSelectionClearEvent *event);
 
-void     _gdk_region_get_xrectangles       (GdkRegion            *region,
+void     _gdk_region_get_xrectangles       (const GdkRegion      *region,
                                             gint                  x_offset,
                                             gint                  y_offset,
                                             XRectangle          **rects,

Modified: trunk/gdk/x11/gdkwindow-x11.c
==============================================================================
--- trunk/gdk/x11/gdkwindow-x11.c	(original)
+++ trunk/gdk/x11/gdkwindow-x11.c	Mon Jan 14 14:02:12 2008
@@ -4018,11 +4018,11 @@
 
 
 static void
-do_shape_combine_region (GdkWindow *window,
-			 GdkRegion *shape_region,
-			 gint       offset_x,
-			 gint       offset_y,
-			 gint       shape)
+do_shape_combine_region (GdkWindow       *window,
+			 const GdkRegion *shape_region,
+			 gint             offset_x,
+			 gint             offset_y,
+			 gint             shape)
 {
   GdkWindowObject *private = (GdkWindowObject *)window;
   gint xoffset, yoffset;
@@ -4101,10 +4101,10 @@
  * 
  **/
 void
-gdk_window_shape_combine_region (GdkWindow *window,
-                                 GdkRegion *shape_region,
-                                 gint       offset_x,
-                                 gint       offset_y)
+gdk_window_shape_combine_region (GdkWindow       *window,
+                                 const GdkRegion *shape_region,
+                                 gint             offset_x,
+                                 gint             offset_y)
 { 
   do_shape_combine_region (window, shape_region, offset_x, offset_y, ShapeBounding);
 }
@@ -4136,10 +4136,10 @@
  * Since: 2.10
  */
 void 
-gdk_window_input_shape_combine_region (GdkWindow *window,
-				       GdkRegion *shape_region,
-				       gint       offset_x,
-				       gint       offset_y)
+gdk_window_input_shape_combine_region (GdkWindow       *window,
+				       const GdkRegion *shape_region,
+				       gint             offset_x,
+				       gint             offset_y)
 {
 #ifdef ShapeInput
   do_shape_combine_region (window, shape_region, offset_x, offset_y, ShapeInput);



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