gdk/gdk.h gdk/gdkcairo.h gdk/gdkcolor.h gdk/gdkgc.h gdk/gdkinternals.h

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
This commit is contained in:
Michael Natterer 2008-01-14 14:02:12 +00:00 committed by Michael Natterer
parent 112dad6695
commit 92f86e0496
33 changed files with 424 additions and 379 deletions

View File

@ -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.

View 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;

View 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;

View 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;

View 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)
{
}

View File

@ -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;

View 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);

View File

@ -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_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,
GdkRectangle *rectangle);
void gdk_cairo_region (cairo_t *cr,
GdkRegion *region);
void gdk_cairo_rectangle (cairo_t *cr,
const GdkRectangle *rectangle);
void gdk_cairo_region (cairo_t *cr,
const GdkRegion *region);
G_END_DECLS

View 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,

View 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;

View 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,

View 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 (* begin_paint_region) (GdkPaintable *paintable,
const 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 (* 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:

View 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;

View 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;

View 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);
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);
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;

View 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

View 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 ?

View 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);

View 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.

View 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);

View 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 */
}

View 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 */
}

View 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;

View 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;

View 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;

View 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);

View 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);

View 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;

View 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);

View 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;

View 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;

View 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,

View 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);