mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 09:41:15 +00:00
Patched from mail. See ChangeLog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@678 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e4ecbb522e
commit
49ab05a3a4
2 changed files with 9 additions and 5 deletions
|
@ -24,11 +24,10 @@
|
||||||
#ifndef __NSException_h_OBJECTS_INCLUDE
|
#ifndef __NSException_h_OBJECTS_INCLUDE
|
||||||
#define __NSException_h_OBJECTS_INCLUDE
|
#define __NSException_h_OBJECTS_INCLUDE
|
||||||
|
|
||||||
#include <Foundation/NSObject.h>
|
#include <Foundation/NSString.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
@class NSString;
|
|
||||||
@class NSDictionary;
|
@class NSDictionary;
|
||||||
|
|
||||||
@interface NSException : NSObject <NSCoding, NSCopying>
|
@interface NSException : NSObject <NSCoding, NSCopying>
|
||||||
|
|
|
@ -295,14 +295,19 @@ NSIsEmptyRect(NSRect aRect)
|
||||||
return (!((NSWidth(aRect) > 0) && (NSHeight(aRect) > 0)));
|
return (!((NSWidth(aRect) > 0) && (NSHeight(aRect) > 0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: what to do for flipped coordinates? */
|
|
||||||
BOOL
|
BOOL
|
||||||
NSMouseInRect(NSPoint aPoint, NSRect aRect, BOOL flipped)
|
NSMouseInRect(NSPoint aPoint, NSRect aRect, BOOL flipped)
|
||||||
{
|
{
|
||||||
return ((aPoint.x > NSMinX(aRect))
|
if (flipped)
|
||||||
&& (aPoint.y > NSMinY(aRect))
|
return ((aPoint.x >= NSMinX(aRect))
|
||||||
|
&& (aPoint.y >= NSMinY(aRect))
|
||||||
&& (aPoint.x < NSMaxX(aRect))
|
&& (aPoint.x < NSMaxX(aRect))
|
||||||
&& (aPoint.y < NSMaxY(aRect)));
|
&& (aPoint.y < NSMaxY(aRect)));
|
||||||
|
else
|
||||||
|
return ((aPoint.x >= NSMinX(aRect))
|
||||||
|
&& (aPoint.y > NSMinY(aRect))
|
||||||
|
&& (aPoint.x < NSMaxX(aRect))
|
||||||
|
&& (aPoint.y <= NSMaxY(aRect)));
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
|
|
Loading…
Reference in a new issue