Small fixups and comments added.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25131 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2007-05-10 10:44:39 +00:00
parent b2d3176408
commit daa056545a
3 changed files with 15 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2007-05-10 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSAnimation.m: removed some C99-isms and fixed bug in
use of boolean.
* Headers/AppKit/NSAnimation.h: added an ivar and FIXME comments.
2007-05-08 Riccardo Mottola <rmottola@users.sf.net>
* Source/NSAnimation.m: removed some C99-isms

View file

@ -106,6 +106,9 @@ APPKIT_EXPORT NSString *NSAnimationProgressMark;
*/
@interface NSAnimation : NSObject < NSCopying, NSCoding, GSAnimation >
{
// FIXME ... all these ivars should be hidden inside a pointer to an
// FIXME ... opaque data structure, so that layout etc can be changed
// FIXME ... without breaking binary compatibility.
NSTimeInterval _duration; // Duration of the animation
float _frameRate; // Wanted frame rate
NSAnimationCurve _curve; // Id of progres->value function
@ -137,6 +140,7 @@ APPKIT_EXPORT NSString *NSAnimationProgressMark;
id _currentDelegate; // The delegate when the animation is running
BOOL _isThreaded;
BOOL __gs_isLocked;
NSRecursiveLock *_isAnimatingLock;
}

View file

@ -178,21 +178,22 @@ nsanimation_progressMarkSorter ( NSAnimationProgress first,NSAnimationProgress s
}
#define _NSANIMATION_LOCK \
BOOL __gs_isLocked = NO; \
if (_isThreaded) \
{ \
__gs_isLocked = YES; \
NSAssert(__gs_isLocked == NO, NSInternalInconsistencyException); \
NSDebugFLLog(@"NSAnimationLock",\
@"%@ LOCK %@",self,[NSThread currentThread]);\
[_isAnimatingLock lock]; \
__gs_isLocked = YES; \
}
#define _NSANIMATION_UNLOCK \
if (__gs_isLocked) \
if (_isThreaded) \
{ \
__gs_isLocked = YES; \
NSAssert(__gs_isLocked == YES, NSInternalInconsistencyException); \
NSDebugFLLog(@"NSAnimationLock",\
@"%@ UNLOCK %@",self,[NSThread currentThread]);\
__gs_isLocked = NO; \
[_isAnimatingLock unlock]; \
}