Update to tk 8.5.19

This commit is contained in:
Zachary Ware
2017-11-24 17:53:51 -06:00
parent 27e7dfc7da
commit c67b328f06
325 changed files with 12511 additions and 12047 deletions

View File

@@ -155,6 +155,29 @@ TkUnionRectWithRegion(
}
}
/*
*----------------------------------------------------------------------
*
* TkMacOSXIsEmptyRegion --
*
* Return native region for given tk region.
*
* Results:
* 1 if empty, 0 otherwise.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
int
TkMacOSXIsEmptyRegion(
TkRegion r)
{
return HIShapeIsEmpty((HIMutableShapeRef) r) ? 1 : 0;
}
/*
*----------------------------------------------------------------------
*
@@ -181,12 +204,14 @@ TkRectInRegion(
unsigned int width,
unsigned int height)
{
int result;
const CGRect r = CGRectMake(x, y, width, height);
result = HIShapeIntersectsRect((HIShapeRef) region, &r) ?
if ( TkMacOSXIsEmptyRegion(region) ) {
return RectangleOut;
}
else {
const CGRect r = CGRectMake(x, y, width, height);
return HIShapeIntersectsRect((HIShapeRef) region, &r) ?
RectanglePart : RectangleOut;
return result;
}
}
/*
@@ -332,12 +357,11 @@ TkpReleaseRegion(
{
CFRelease(r);
}
#if 0
/*
*----------------------------------------------------------------------
*
* TkMacOSXEmtpyRegion --
* TkMacOSXSetEmptyRegion --
*
* Set region to emtpy.
*
@@ -351,36 +375,12 @@ TkpReleaseRegion(
*/
void
TkMacOSXEmtpyRegion(
TkMacOSXSetEmptyRegion(
TkRegion r)
{
ChkErr(HIShapeSetEmpty, (HIMutableShapeRef) r);
}
/*
*----------------------------------------------------------------------
*
* TkMacOSXIsEmptyRegion --
*
* Return native region for given tk region.
*
* Results:
* 1 if empty, 0 otherwise.
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
int
TkMacOSXIsEmptyRegion(
TkRegion r)
{
return HIShapeIsEmpty((HIMutableShapeRef) r) ? 1 : 0;
}
#endif
/*
*----------------------------------------------------------------------
*