Skip to content
Browse files

Merge branch 'master' into fix-hostview-reference

  • Loading branch information...
2 parents f2d03ee + ac2e9d3 commit 97b0d18b71a4b0f1afe51bbd2c41799fc1c90803 @jspahrsummers jspahrsummers committed Jul 25, 2012
Showing with 0 additions and 147 deletions.
  1. +0 −10 TwUI.xcodeproj/project.pbxproj
  2. +0 −23 lib/Support/TUIAnimationManager.h
  3. +0 −114 lib/Support/TUIAnimationManager.m
View
10 TwUI.xcodeproj/project.pbxproj
@@ -278,9 +278,6 @@
D039724B15B7D7DE0092CD26 /* TUILayoutConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 48A10E7D15B7769A007F9EE3 /* TUILayoutConstraint.h */; };
D04007EB15BF2BC000FD49DB /* libExpecta.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D04007CD15BF2BB000FD49DB /* libExpecta.a */; };
D04007EC15BF2BC000FD49DB /* libSpecta.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D04007E015BF2BB300FD49DB /* libSpecta.a */; };
- D040610D15B6A77500F753ED /* TUIAnimationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D040610915B6A77500F753ED /* TUIAnimationManager.m */; };
- D040610E15B6A77500F753ED /* TUIAnimationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D040610915B6A77500F753ED /* TUIAnimationManager.m */; };
- D040610F15B6A77500F753ED /* TUIAnimationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D040610915B6A77500F753ED /* TUIAnimationManager.m */; };
D040611615B6A7CD00F753ED /* NSTextView+TUIExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = D040611215B6A7CC00F753ED /* NSTextView+TUIExtensions.m */; };
D040611715B6A7CD00F753ED /* NSTextView+TUIExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = D040611215B6A7CC00F753ED /* NSTextView+TUIExtensions.m */; };
D040611815B6A7CD00F753ED /* NSTextView+TUIExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = D040611215B6A7CC00F753ED /* NSTextView+TUIExtensions.m */; };
@@ -562,8 +559,6 @@
D04007C215BF2BAF00FD49DB /* Expecta.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Expecta.xcodeproj; path = expecta/Expecta.xcodeproj; sourceTree = "<group>"; };
D04007D515BF2BB300FD49DB /* Specta.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Specta.xcodeproj; path = specta/Specta.xcodeproj; sourceTree = "<group>"; };
D04007ED15BF2C0700FD49DB /* TwUITests-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "TwUITests-Prefix.pch"; sourceTree = "<group>"; };
- D040610815B6A77500F753ED /* TUIAnimationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TUIAnimationManager.h; sourceTree = "<group>"; };
- D040610915B6A77500F753ED /* TUIAnimationManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TUIAnimationManager.m; sourceTree = "<group>"; };
D040611115B6A7CC00F753ED /* NSTextView+TUIExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSTextView+TUIExtensions.h"; sourceTree = "<group>"; };
D040611215B6A7CC00F753ED /* NSTextView+TUIExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSTextView+TUIExtensions.m"; sourceTree = "<group>"; };
D07AA82515BDD72D00F736C0 /* TUINSView+NSTextInputClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "TUINSView+NSTextInputClient.h"; sourceTree = "<group>"; };
@@ -746,8 +741,6 @@
D0C7652315B6232100E7AC2C /* CATransaction+TUIExtensions.m */,
D040611115B6A7CC00F753ED /* NSTextView+TUIExtensions.h */,
D040611215B6A7CC00F753ED /* NSTextView+TUIExtensions.m */,
- D040610815B6A77500F753ED /* TUIAnimationManager.h */,
- D040610915B6A77500F753ED /* TUIAnimationManager.m */,
D0C7656F15B6341800E7AC2C /* TUICAAction.h */,
D0C7657015B6341800E7AC2C /* TUICAAction.m */,
);
@@ -1322,7 +1315,6 @@
D0C7656215B6297300E7AC2C /* NSClipView+TUIExtensions.m in Sources */,
D0C7656815B6297300E7AC2C /* NSScrollView+TUIExtensions.m in Sources */,
D0C7657615B6341800E7AC2C /* TUICAAction.m in Sources */,
- D040610F15B6A77500F753ED /* TUIAnimationManager.m in Sources */,
D040611815B6A7CD00F753ED /* NSTextView+TUIExtensions.m in Sources */,
D039724115B7D7CC0092CD26 /* TUILayoutConstraint.m in Sources */,
D039724315B7D7CE0092CD26 /* TUILayoutManager.m in Sources */,
@@ -1400,7 +1392,6 @@
D0C7656015B6297300E7AC2C /* NSClipView+TUIExtensions.m in Sources */,
D0C7656615B6297300E7AC2C /* NSScrollView+TUIExtensions.m in Sources */,
D0C7657415B6341800E7AC2C /* TUICAAction.m in Sources */,
- D040610D15B6A77500F753ED /* TUIAnimationManager.m in Sources */,
D040611615B6A7CD00F753ED /* NSTextView+TUIExtensions.m in Sources */,
48A10E8215B7769A007F9EE3 /* TUILayoutConstraint.m in Sources */,
48A10E8415B7769A007F9EE3 /* TUILayoutManager.m in Sources */,
@@ -1484,7 +1475,6 @@
D0C7656115B6297300E7AC2C /* NSClipView+TUIExtensions.m in Sources */,
D0C7656715B6297300E7AC2C /* NSScrollView+TUIExtensions.m in Sources */,
D0C7657515B6341800E7AC2C /* TUICAAction.m in Sources */,
- D040610E15B6A77500F753ED /* TUIAnimationManager.m in Sources */,
D040611715B6A7CD00F753ED /* NSTextView+TUIExtensions.m in Sources */,
D039723F15B7D7CB0092CD26 /* TUILayoutConstraint.m in Sources */,
D039724215B7D7CE0092CD26 /* TUILayoutManager.m in Sources */,
View
23 lib/Support/TUIAnimationManager.h
@@ -1,23 +0,0 @@
-//
-// TUIAnimationManager.h
-//
-// Created by Justin Spahr-Summers on 10.03.12.
-// Copyright (c) 2012 Bitswift. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-/**
- * This private class is responsible for disabling implicit NSView animations.
- *
- * This class may be expanded in the future to add other global animation
- * capabilities.
- */
-@interface TUIAnimationManager : NSObject
-
-/*
- * Returns the singleton instance of this class.
- */
-+ (TUIAnimationManager *)defaultManager;
-
-@end
View
114 lib/Support/TUIAnimationManager.m
@@ -1,114 +0,0 @@
-//
-// TUIAnimationManager.m
-//
-// Created by Justin Spahr-Summers on 10.03.12.
-// Copyright (c) 2012 Bitswift. All rights reserved.
-//
-
-#import "TUIAnimationManager.h"
-
-/**
- * Disables implicit AppKit animations on every run loop iteration.
- */
-static void mainRunLoopObserverCallback (CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info) {
- [[NSAnimationContext currentContext] setDuration:0];
-}
-
-@interface TUIAnimationManager ()
-/**
- * The observer associated with the main run loop, responsible for invoking the
- * mainRunLoopObserverCallback.
- */
-@property (nonatomic) CFRunLoopObserverRef mainRunLoopObserver;
-
-/**
- * Invoked on the defaultManager when the application has finished launching.
- */
-- (void)applicationDidFinishLaunchingNotification:(NSNotification *)notification;
-
-/**
- * Registers an observer on the main run loop which will invoke the
- * mainRunLoopObserverCallback.
- */
-- (void)registerRunLoopObserver;
-@end
-
-@implementation TUIAnimationManager
-
-#pragma mark Properties
-
-@synthesize mainRunLoopObserver = m_mainRunLoopObserver;
-
-- (void)setMainRunLoopObserver:(CFRunLoopObserverRef)observer {
- if (observer == m_mainRunLoopObserver)
- return;
-
- if (m_mainRunLoopObserver) {
- CFRunLoopRemoveObserver(CFRunLoopGetMain(), m_mainRunLoopObserver, kCFRunLoopCommonModes);
- CFRelease(m_mainRunLoopObserver);
- }
-
- if (observer)
- CFRetain(observer);
-
- m_mainRunLoopObserver = observer;
-}
-
-#pragma mark Lifecycle
-
-+ (void)load {
- @autoreleasepool {
- [[NSNotificationCenter defaultCenter]
- addObserver:[self defaultManager]
- selector:@selector(applicationDidFinishLaunchingNotification:)
- name:NSApplicationDidFinishLaunchingNotification
- object:nil
- ];
- }
-}
-
-+ (TUIAnimationManager *)defaultManager; {
- static id singleton = nil;
- static dispatch_once_t pred;
-
- dispatch_once(&pred, ^{
- singleton = [[self alloc] init];
- });
-
- return singleton;
-}
-
-- (void)dealloc {
- [[NSNotificationCenter defaultCenter] removeObserver:self];
-
- self.mainRunLoopObserver = NULL;
-}
-
-#pragma mark Run Loop Observer
-
-- (void)registerRunLoopObserver; {
- // set up an observer on the main run loop that can disable implicit
- // animations
- CFRunLoopObserverRef observer = CFRunLoopObserverCreate(
- NULL,
- kCFRunLoopBeforeTimers,
- YES,
- 10000,
- &mainRunLoopObserverCallback,
- NULL
- );
-
- CFRunLoopAddObserver(CFRunLoopGetMain(), observer, kCFRunLoopCommonModes);
-
- self.mainRunLoopObserver = observer;
- CFRelease(observer);
-}
-
-#pragma mark Notifications
-
-- (void)applicationDidFinishLaunchingNotification:(NSNotification *)notification; {
- [[NSNotificationCenter defaultCenter] removeObserver:self name:notification.name object:nil];
- [self registerRunLoopObserver];
-}
-
-@end

0 comments on commit 97b0d18

Please sign in to comment.
Something went wrong with that request. Please try again.