]> Pileus Git - ~andy/gtk/commitdiff
gdk/gdk.h gdk/gdkcairo.h gdk/gdkcolor.h gdk/gdkgc.h gdk/gdkinternals.h
authorMichael Natterer <mitch@imendio.com>
Mon, 14 Jan 2008 14:02:12 +0000 (14:02 +0000)
committerMichael Natterer <mitch@src.gnome.org>
Mon, 14 Jan 2008 14:02:12 +0000 (14:02 +0000)
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.

svn path=/trunk/; revision=19365

33 files changed:
ChangeLog
gdk/directfb/gdkcolor-directfb.c
gdk/directfb/gdkgc-directfb.c
gdk/directfb/gdkgeometry-directfb.c
gdk/directfb/gdkwindow-directfb.c
gdk/gdk.h
gdk/gdkcairo.c
gdk/gdkcairo.h
gdk/gdkcolor.h
gdk/gdkgc.c
gdk/gdkgc.h
gdk/gdkinternals.h
gdk/gdkpolyreg-generic.c
gdk/gdkrectangle.c
gdk/gdkregion-generic.c
gdk/gdkregion.h
gdk/gdkwindow.c
gdk/gdkwindow.h
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

index 88f4d30ee1ff1f378c0f53637044e16e45f111a8..06483a3924edb0555e321e58a3f21ef45da0975f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,43 @@
+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.
+
 2008-01-14  Mathias Hasselmann  <mathias@openismus.com>
 
        Explain name choice for gtk_tool_item_toolbar_reconfigured.
index 6c98f76a7ed719a397b8c60d4e098a6f2d48ea97..6bd31c34191d7ef4bbb2562511005aa12b71ea3b 100644 (file)
@@ -287,9 +287,9 @@ gdk_colors_free (GdkColormap *colormap,
 }
 
 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;
index 9e20ebcd3bc9d1c44b69821cc83a8c3f626e7927..a1b329ee0dfe6982adee31248e993cb35c736c6c 100644 (file)
@@ -350,8 +350,8 @@ gc_unset_clip_mask (GdkGC *gc)
 
 
 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 @@ _gdk_windowing_gc_set_clip_region (GdkGC     *gc,
     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;
index f36fc22f7dcdf532ca1d64092ac16fdb5de40940..f29b6b11b92c71e3d55b1ea891390e5f873e36e9 100644 (file)
@@ -161,10 +161,10 @@ gdk_window_scroll (GdkWindow *window,
  * 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;
index db07bdd32e4aa5eba23cb3dc8183a89e60ced9e0..122d54ed2be0f5d0f9d1c4b4b8a9d9c866fa3127 100644 (file)
@@ -2129,18 +2129,18 @@ gdk_window_input_shape_combine_mask (GdkWindow *window,
 }
 
 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)
 {
 }
 
index 7a5684b64d3a791c70277065030a7c19f0d07d3f..14a0432e21b95e274f7c7dec7b25c29a5d6dc9fd 100644 (file)
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -147,12 +147,12 @@ void gdk_set_double_click_time             (guint       msec);
 
 /* 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;
 
index c1474e9cd6c4f524a7e0894fa7e67fb188450351..f887627e6534e104798500a9d7694c1851f1fd16 100644 (file)
@@ -59,8 +59,8 @@ gdk_cairo_create (GdkDrawable *drawable)
  * 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 @@ gdk_cairo_set_source_color (cairo_t  *cr,
  * 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 @@ gdk_cairo_rectangle (cairo_t      *cr,
  * 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 @@ gdk_cairo_region (cairo_t   *cr,
  * 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);
index 8550e6bc58dc8fea37705acd02bff61a1f964bf8..19c954d46fea4c18f1a4257b7a35fec7d1c1c94e 100644 (file)
 
 G_BEGIN_DECLS
 
-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);
+cairo_t *gdk_cairo_create            (GdkDrawable        *drawable);
+
+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
 
index 46f4a645b88796779b85a304b4e05eab412d3314..9ce33f53346467793be2939dddce50cefc7501c8 100644 (file)
@@ -108,25 +108,25 @@ void gdk_colormap_change (GdkColormap     *colormap,
                          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,
index ec53dec702f340d3ad35aca1ccb358516006977f..07e3b0a7bbc8751bf895c8292a7adda9e56c6ce7 100644 (file)
@@ -566,8 +566,8 @@ _gdk_gc_set_clip_region_internal (GdkGC     *gc,
  * 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_rectangle (GdkGC  *gc,
  * 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 @@ gc_get_background (GdkGC    *gc,
  * 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;
index 779735c06dc5331efac9a082ddfb4a52dd74fdf1..70be9875b33cb538fd6bd345dd592718be166380 100644 (file)
@@ -257,9 +257,9 @@ void   gdk_gc_set_clip_origin         (GdkGC            *gc,
 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,
index aa56b795a5afcca45ae7324406e5eed713fee737..68df9a4dcc9d8da0d20d02aa7a92717e59704a87 100644 (file)
@@ -220,11 +220,11 @@ cairo_surface_t *_gdk_drawable_ref_cairo_surface (GdkDrawable *drawable);
 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 @@ gint _gdk_windowing_get_bits_for_depth (GdkDisplay *display,
  * 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 @@ struct _GdkPaintableIface
 {
   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 @@ GType _gdk_pixmap_impl_get_type (void) G_GNUC_CONST;
  * 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:
index e759cb8d44e057780ab20954ce8ae43a7082974d..3fb43a207cc145113e4ada4f4dd75607b9880895 100644 (file)
@@ -62,12 +62,11 @@ SOFTWARE.
  *
  */
 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 @@ InsertEdgeInET(ET, ETE, scanline, SLLBlock, iSLLBlock)
  */
 
 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 @@ CreateETandAET(count, pts, ET, AET, pETEs, pSLLBlock)
  */
 
 static void
-loadAET(AET, ETEs)
-    EdgeTableEntry *AET, *ETEs;
+loadAET(EdgeTableEntry *AET,
+        EdgeTableEntry *ETEs)
 {
     EdgeTableEntry *pPrevAET;
     EdgeTableEntry *tmp;
@@ -290,8 +288,7 @@ loadAET(AET, ETEs)
  *
  */
 static void
-computeWAET(AET)
-    EdgeTableEntry *AET;
+computeWAET (EdgeTableEntry *AET)
 {
     EdgeTableEntry *pWETE;
     int inside = 1;
@@ -329,8 +326,7 @@ computeWAET(AET)
  */
 
 static int
-InsertionSort(AET)
-    EdgeTableEntry *AET;
+InsertionSort (EdgeTableEntry *AET)
 {
     EdgeTableEntry *pETEchase;
     EdgeTableEntry *pETEinsert;
@@ -366,8 +362,7 @@ InsertionSort(AET)
  *     Clean up our act.
  */
 static void
-FreeStorage(pSLLBlock)
-    ScanLineListBlock   *pSLLBlock;
+FreeStorage (ScanLineListBlock *pSLLBlock)
 {
     ScanLineListBlock   *tmpSLLBlock;
 
@@ -387,10 +382,11 @@ FreeStorage(pSLLBlock)
  *     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 @@ static int PtsToRegion(numFullPtBlocks, iCurPtBlock, FirstPtBlock, reg)
  * 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 @@ gdk_region_polygon(GdkPoint *Pts, gint Count, GdkFillRule rule)
     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 @@ gdk_region_polygon(GdkPoint *Pts, gint Count, GdkFillRule rule)
     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;
index c5e9dfcc377a9bb1b8d01436fa97976f7a6b00f9..c9d983b8e4b70fd88d9e1f885b33a9b0005e5608 100644 (file)
@@ -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 @@ gdk_rectangle_union (GdkRectangle *src1,
  * 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;
index 71030d7c685aa605f015a95f12981e74ff18c349..f8f54a3f486bcc1b1012dff04e21ddc0feb38b06 100644 (file)
@@ -75,27 +75,27 @@ SOFTWARE.
 #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 @@ gdk_region_new (void)
  * Return value: a new region
  **/
 GdkRegion *
-gdk_region_rectangle (GdkRectangle *rectangle)
+gdk_region_rectangle (const GdkRectangle *rectangle)
 {
   GdkRegion *temp;
 
@@ -162,7 +162,7 @@ gdk_region_rectangle (GdkRectangle *rectangle)
  * 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 @@ gdk_region_copy (GdkRegion *region)
  *
  */
 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 @@ gdk_region_get_clipbox (GdkRegion    *region,
  * 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 @@ gdk_region_get_rectangles (GdkRegion     *region,
  * 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 @@ miIntersectO (GdkRegion    *pReg,
  * 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 @@ gdk_region_intersect (GdkRegion *source1,
       (!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 @@ gdk_region_intersect (GdkRegion *source1,
 }
 
 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 @@ miCoalesce (GdkRegion *pReg,         /* Region to coalesce */
  */
 /* 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 @@ miUnionO (GdkRegion *pReg,
  * 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 @@ miSubtractO (GdkRegion    *pReg,
  * 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 @@ gdk_region_subtract (GdkRegion *source1,
  * 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 @@ gdk_region_xor (GdkRegion *source1,
  * 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 @@ gdk_region_empty (GdkRegion *region)
  * 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 @@ gdk_region_equal (GdkRegion *region1,
  * 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 @@ gdk_region_point_in (GdkRegion *region,
  *   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;
index ce31ba03d265fa34efc39899790a91f50cfb0806..f8a97f6114632aa9a949258f2520b8a47db574f1 100644 (file)
@@ -53,55 +53,55 @@ typedef enum
   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);
+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    (GdkRegion     *region,
-                                          GdkRectangle  *rectangle);
-void           gdk_region_get_rectangles (GdkRegion     *region,
-                                          GdkRectangle **rectangles,
-                                          gint          *n_rectangles);
+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    (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);
+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,
-                                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_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);
+void   gdk_region_spans_intersect_foreach (GdkRegion          *region,
+                                           GdkSpan            *spans,
+                                           int                 n_spans,
+                                           gboolean            sorted,
+                                           GdkSpanFunc         function,
+                                           gpointer            data);
 
 G_END_DECLS
 
index 6e57fe6467fb96a0dc79c0e102f2a6caa4ad7159..323450aa50567b9d79cf614048fb7feef9f7416d 100644 (file)
@@ -905,8 +905,8 @@ gdk_window_get_state (GdkWindow *window)
  * 
  **/
 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 @@ gdk_window_begin_paint_rect (GdkWindow    *window,
  * 
  **/
 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_process_updates (GdkWindow *window,
  * 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 @@ gdk_window_invalidate_rect   (GdkWindow    *window,
 }
 
 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 @@ draw_ugly_color (GdkWindow *window,
  * 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 @@ gdk_window_invalidate_maybe_recurse (GdkWindow *window,
          
          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 @@ true_predicate (GdkWindow *window,
  * 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 ?
index 3e169c43981858fde560df4e22508ae15305e8ad..608f7c00431f3303c31503cb5df4ba15464b2fe8 100644 (file)
@@ -365,13 +365,13 @@ void          gdk_window_add_filter            (GdkWindow     *window,
 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 @@ void            gdk_window_move_region           (GdkWindow *window,
  *  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_shape_combine_region (GdkWindow         *window,
 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 @@ void gdk_window_set_composited   (GdkWindow *window,
  * 
  * - 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_urgency_hint      (GdkWindow *window,
 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 @@ void gdk_window_begin_move_drag   (GdkWindow     *window,
                                    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);
index 8b5d2f5a4ea7356e402b32038bc46988c8310ca3..a2772e6fed8ee470affb0559ef3f64d79c65b3d1 100644 (file)
@@ -133,9 +133,9 @@ gdk_colors_free (GdkColormap *colormap,
 }
 
 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.
index 159d707dbfa766678097a4dc0a5bc50c20ea0cc1..3f1fe037333e3bf4f6aa6608c08f7c5507a6985b 100644 (file)
@@ -207,8 +207,8 @@ _gdk_quartz_gc_new (GdkDrawable      *drawable,
 }
 
 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);
 
index 75985223efc707400b5661ac20a5a044d165b6ce..d1f81017ecd0a457aea920d1ce776859ea2a17b4 100644 (file)
@@ -79,10 +79,10 @@ gdk_window_scroll (GdkWindow *window,
 }
 
 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 */
 }
index a5dfa595b45a739cb58fd3d377ab8d4235920aea..4e0f97a1ef71fd88675ff582011f59d233c5e149 100644 (file)
@@ -2074,10 +2074,10 @@ gdk_window_set_transient_for (GdkWindow *window,
 }
 
 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 @@ gdk_window_shape_combine_mask (GdkWindow *window,
   /* FIXME: Implement */
 }
 
-void 
+void
 gdk_window_input_shape_combine_mask (GdkWindow *window,
                                     GdkBitmap *mask,
                                     gint       x,
@@ -2101,11 +2101,11 @@ gdk_window_input_shape_combine_mask (GdkWindow *window,
   /* 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 */
 }
index 7dfe2b175411708c715c6a50b08437c7ae8401dd..01ecec80c60d9cd23e50bda0f4874dd5357bb362 100644 (file)
@@ -765,9 +765,9 @@ gdk_colors_free (GdkColormap *colormap,
 }
 
 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;
index 07658bb05c66792519ff7e2746ec1eb5829da207..e2db1e4107c759f832351273b255b13dc0705f9d 100644 (file)
@@ -571,8 +571,8 @@ gdk_win32_gc_set_dashes (GdkGC *gc,
 }
 
 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 @@ _gdk_win32_bitmap_to_hrgn (GdkPixmap *pixmap)
 }
 
 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;
index 95056a701592ce93bb1954ea1802613992a0dbcd..e51ba52c69911269feb46adfa96b8fe5896a2b48 100644 (file)
@@ -172,10 +172,10 @@ gdk_window_scroll (GdkWindow *window,
 }
 
 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;
index 419e6fc399d348843b835f5bba5ffc1640fd0da2..61e67c48f0a19206a683e5d6d4994744139e78ac 100644 (file)
@@ -254,9 +254,9 @@ COLORREF  _gdk_win32_colormap_color     (GdkColormap *colormap,
 
 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);
 
index 09a54de192188a6a3c70916129c1fdfb77138ad4..ef3d14e648bd3f3459cd810ea9f334157b87476a 100644 (file)
@@ -3561,10 +3561,10 @@ gdk_window_get_type_hint (GdkWindow *window)
 }
 
 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 @@ gdk_window_shape_combine_region (GdkWindow *window,
 }
 
 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 @@ gdk_window_input_shape_combine_region (GdkWindow *window,
 }
 
 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);
 
index ab74d7b06a16e731bb407e67b4acedfacb9b28dc..93c8921d42eff6e5255843859657fbaef2dba92d 100644 (file)
@@ -649,9 +649,9 @@ gdk_colors_free (GdkColormap *colormap,
  * 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 @@ gdk_colormap_free_colors (GdkColormap *colormap,
  * 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;
index cff480201c9a4f7072db1236228d17828e2780ac..c7c6fce38d72b0f14a1a940c336d4e74c2df67da 100644 (file)
@@ -607,8 +607,8 @@ gdk_x11_gc_values_to_xvalues (GdkGCValues    *values,
 }
 
 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);
 
index da572a8d131b4f7cbcc32291a41d970a15ebb95b..367f26c59e87e71295a7b65bccd1431075402fa9 100644 (file)
@@ -499,10 +499,10 @@ gdk_window_scroll (GdkWindow *window,
  * 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;
index 60746458de1f405ddfbae39f98bf0186d95b8a25..0399b9c3b2a8e7f8edb35ea959c9c33964c63303 100644 (file)
@@ -817,11 +817,11 @@ _gdk_send_xevent (GdkDisplay *display,
 }
 
 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;
index f254deb8fa42ec489ffe77206af0225b127287ad..5033c4a0937e205151d7c1c2d700932be514cee9 100644 (file)
@@ -131,7 +131,7 @@ void _gdk_window_process_expose    (GdkWindow     *window,
 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,
index 452959d05daef116e5517a3091095837c5258231..9741a0b7512be671caef6167eda0157ff10858c6 100644 (file)
@@ -4018,11 +4018,11 @@ gdk_window_input_shape_combine_mask (GdkWindow *window,
 
 
 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 @@ do_shape_combine_region (GdkWindow *window,
  * 
  **/
 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 @@ gdk_window_shape_combine_region (GdkWindow *window,
  * 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);