From 052fcd5eab5dc9d21e9b3ccf7bd6358de205552c Mon Sep 17 00:00:00 2001 From: gcasa Date: Sun, 14 Jun 2015 21:47:43 +0000 Subject: [PATCH] Add skeleton for NSAnimationContext. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38637 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 +++ Headers/AppKit/NSAnimationContext.h | 53 +++++++++++++++++++++++++ Source/GNUmakefile | 2 + Source/NSAnimationContext.m | 61 +++++++++++++++++++++++++++++ 4 files changed, 122 insertions(+) create mode 100644 Headers/AppKit/NSAnimationContext.h create mode 100644 Source/NSAnimationContext.m diff --git a/ChangeLog b/ChangeLog index acb8aa29d..c2ea4933a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-06-14 17:47-EDT Gregory John Casamento + + * Headers/AppKit/NSAnimationContext.h + * Source/GNUmakefile + * Source/NSAnimationContext.m: Add skeleton for NSAnimationContext. + 2015-06-12 Fred Kiefer * Source/NSSplitView.m: Be sure to adjust subviews before setting diff --git a/Headers/AppKit/NSAnimationContext.h b/Headers/AppKit/NSAnimationContext.h new file mode 100644 index 000000000..b7c133000 --- /dev/null +++ b/Headers/AppKit/NSAnimationContext.h @@ -0,0 +1,53 @@ +/* + NSAnimationContext.h + + Created by Gregory John Casamento on Wed Jun 10 2015. + Copyright (c) 2015 Free Software Foundation, Inc. + + Author: Gregory Casamento + + This file is part of the GNUstep GUI Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; see the file COPYING.LIB. + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + */ + + +#ifndef _GNUstep_H_NSAnimationContext_ +#define _GNUstep_H_NSAnimationContext_ + +#import +#import + +@interface NSAnimationContext : NSObject +{ + NSTimeInterval _duration; +} + +// Begin and end grouping ++ (void) beginGrouping; ++ (void) endGrouping; + +// Retrieve current context ++ (NSAnimationContext *)currentContext; + +// Properties... +- (void) setDuration: (NSTimeInterval)duration; +- (NSTimeInterval) duration; + +@end + +#endif diff --git a/Source/GNUmakefile b/Source/GNUmakefile index 6c96de073..a883f52c7 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -48,6 +48,7 @@ NSActionCell.m \ NSAffineTransform.m \ NSAlert.m \ NSAnimation.m \ +NSAnimationContext.m \ NSApplication.m \ NSArrayController.m \ NSAttributedString.m \ @@ -278,6 +279,7 @@ NSActionCell.h \ NSAffineTransform.h \ NSAlert.h \ NSAnimation.h \ +NSAnimationContext.h \ NSApplication.h \ NSArrayController.h \ NSBezierPath.h \ diff --git a/Source/NSAnimationContext.m b/Source/NSAnimationContext.m new file mode 100644 index 000000000..a868a9313 --- /dev/null +++ b/Source/NSAnimationContext.m @@ -0,0 +1,61 @@ +/* + NSAnimationContext.h + + Created by Gregory John Casamento on Wed Jun 10 2015. + Copyright (c) 2015 Free Software Foundation, Inc. + + Author: Gregory Casamento + + This file is part of the GNUstep GUI Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; see the file COPYING.LIB. + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + */ + +#import + +static NSAnimationContext *_currentContext = nil; + +@implementation NSAnimationContext : NSObject + +// Begin and end grouping ++ (void) beginGrouping +{ +} + ++ (void) endGrouping +{ +} + +// Retrieve current context ++ (NSAnimationContext *)currentContext +{ + return _currentContext; +} + +// Properties... +- (void) setDuration: (NSTimeInterval)duration +{ + _duration = duration; +} + +- (NSTimeInterval) duration +{ + return _duration; +} + +@end +