summaryrefslogtreecommitdiffstats
path: root/win/tkWinRegion.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-01 14:14:17 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-01 14:14:17 (GMT)
commitdc6ec74c65be90b8f27bbaf6c5cdf0191a249ca6 (patch)
treefce745f5a19fe4f7b8e20e8957c82b877e70c18d /win/tkWinRegion.c
parent29b13551eedd3ef419e3decc1d3bff21e188be7d (diff)
downloadtk-dc6ec74c65be90b8f27bbaf6c5cdf0191a249ca6.zip
tk-dc6ec74c65be90b8f27bbaf6c5cdf0191a249ca6.tar.gz
tk-dc6ec74c65be90b8f27bbaf6c5cdf0191a249ca6.tar.bz2
Modify TkClipBox and friends such that they return an int (normally 0) in stead of void. Reason: the X11 variant does this as well, this way we keep it the same on all platforms.
Diffstat (limited to 'win/tkWinRegion.c')
-rw-r--r--win/tkWinRegion.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/win/tkWinRegion.c b/win/tkWinRegion.c
index d097047..a2f6fd7 100644
--- a/win/tkWinRegion.c
+++ b/win/tkWinRegion.c
@@ -59,11 +59,12 @@ TkCreateRegion(void)
*----------------------------------------------------------------------
*/
-void
+int
TkDestroyRegion(
TkRegion r)
{
DeleteObject((HRGN) r);
+ return Success;
}
/*
@@ -82,7 +83,7 @@ TkDestroyRegion(
*----------------------------------------------------------------------
*/
-void
+int
TkClipBox(
TkRegion r,
XRectangle* rect_return)
@@ -94,6 +95,7 @@ TkClipBox(
rect_return->y = (short) rect.top;
rect_return->width = (short) (rect.right - rect.left);
rect_return->height = (short) (rect.bottom - rect.top);
+ return Success;
}
/*
@@ -112,13 +114,14 @@ TkClipBox(
*----------------------------------------------------------------------
*/
-void
+int
TkIntersectRegion(
TkRegion sra,
TkRegion srb,
TkRegion dr_return)
{
CombineRgn((HRGN) dr_return, (HRGN) sra, (HRGN) srb, RGN_AND);
+ return Success;
}
/*
@@ -137,7 +140,7 @@ TkIntersectRegion(
*----------------------------------------------------------------------
*/
-void
+int
TkUnionRectWithRegion(
XRectangle *rectangle,
TkRegion src_region,
@@ -149,6 +152,7 @@ TkUnionRectWithRegion(
CombineRgn((HRGN) dest_region_return, (HRGN) src_region,
(HRGN) rectRgn, RGN_OR);
DeleteObject(rectRgn);
+ return Success;
}
/*
@@ -270,13 +274,14 @@ TkRectInRegion(
*----------------------------------------------------------------------
*/
-void
+int
TkSubtractRegion(
TkRegion sra,
TkRegion srb,
TkRegion dr_return)
{
CombineRgn((HRGN) dr_return, (HRGN) sra, (HRGN) srb, RGN_DIFF);
+ return Success;
}
/*