29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
- EE1D7C9416E0ECCF00B000EB /* NSError+Description.h */,
- EE1D7C9516E0ECCF00B000EB /* NSError+Description.m */,
32CA4F630368D1EE00C91783 /* Enjoyable_Prefix.pch */,
29B97316FDCFA39411CA2CEA /* main.m */,
+ EE1D7C9416E0ECCF00B000EB /* NSError+Description.h */,
+ EE1D7C9516E0ECCF00B000EB /* NSError+Description.m */,
EE1D7C9016E01E7000B000EB /* NSView+FirstResponder.h */,
EE1D7C9116E01E7000B000EB /* NSView+FirstResponder.m */,
);
-//
-// NSView+FirstResponder.h
-// Enjoy
-//
-// Created by Joe Wreschnig on 3/1/13.
-//
-//
-
#import <Cocoa/Cocoa.h>
@interface NSView (FirstResponder)
- (BOOL)resignIfFirstResponder;
+ // Resign first responder status if this view is the active first
+ // responder in its window. Returns whether first responder status
+ // was resigned; YES if it was and NO if refused or the view was
+ // not the first responder.
@end
-//
-// NSView+FirstResponder.m
-// Enjoy
-//
-// Created by Joe Wreschnig on 3/1/13.
-//
-//
-
#import "NSView+FirstResponder.h"
@implementation NSView (FirstResponder)
- (BOOL)resignIfFirstResponder {
- if (self.window.firstResponder == self)
- return [self.window makeFirstResponder:nil];
- return NO;
+ NSWindow *window = self.window;
+ return window.firstResponder == self
+ ? [window makeFirstResponder:nil]
+ : NO;
}
@end
// Enjoy
//
// Created by Yifeng Huang on 7/26/12.
-// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import "TargetMouseMove.h"
// Enjoy
//
// Created by Yifeng Huang on 7/28/12.
-// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import "TargetMouseScroll.h"
// Enjoy
//
// Created by Yifeng Huang on 7/28/12.
-// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import "Target.h"