Permalink
Browse files

Made TUINSView+NSTextInputClient into a proper category, and cleaned …

…up imports around it
  • Loading branch information...
1 parent 4246138 commit f6e984a337df6d00c1736c90622c477cd9ae1531 @jspahrsummers jspahrsummers committed Jul 23, 2012
@@ -39,7 +39,6 @@
5EE983CE13BE7834005F430D /* TUIImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C5913BE6E1900C85CB5 /* TUIImageView.m */; };
5EE983CF13BE7834005F430D /* TUILabel.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C5D13BE6E1900C85CB5 /* TUILabel.m */; };
5EE983D013BE7834005F430D /* TUINSView+Hyperfocus.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C5F13BE6E1900C85CB5 /* TUINSView+Hyperfocus.m */; };
- 5EE983D113BE7834005F430D /* TUINSView+NSTextInputClient.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C6013BE6E1900C85CB5 /* TUINSView+NSTextInputClient.m */; };
5EE983D213BE7834005F430D /* TUINSView.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C6213BE6E1900C85CB5 /* TUINSView.m */; };
5EE983D313BE7834005F430D /* TUINSWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C6413BE6E1900C85CB5 /* TUINSWindow.m */; };
5EE983D413BE7834005F430D /* TUIResponder.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C6613BE6E1900C85CB5 /* TUIResponder.m */; };
@@ -157,7 +156,6 @@
CB5E323913BE70CA004B7899 /* TUIKit.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C5B13BE6E1900C85CB5 /* TUIKit.m */; };
CB5E323B13BE70CA004B7899 /* TUILabel.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C5D13BE6E1900C85CB5 /* TUILabel.m */; };
CB5E323D13BE70CA004B7899 /* TUINSView+Hyperfocus.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C5F13BE6E1900C85CB5 /* TUINSView+Hyperfocus.m */; };
- CB5E323E13BE70CA004B7899 /* TUINSView+NSTextInputClient.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C6013BE6E1900C85CB5 /* TUINSView+NSTextInputClient.m */; };
CB5E324013BE70CA004B7899 /* TUINSView.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C6213BE6E1900C85CB5 /* TUINSView.m */; };
CB5E324213BE70CA004B7899 /* TUINSWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C6413BE6E1900C85CB5 /* TUINSWindow.m */; };
CB5E324413BE70CA004B7899 /* TUIResponder.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C6613BE6E1900C85CB5 /* TUIResponder.m */; };
@@ -224,7 +222,6 @@
CBB74CB413BE6E1900C85CB5 /* TUILabel.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C5D13BE6E1900C85CB5 /* TUILabel.m */; };
CBB74CB513BE6E1900C85CB5 /* TUINSView+Hyperfocus.h in Headers */ = {isa = PBXBuildFile; fileRef = CBB74C5E13BE6E1900C85CB5 /* TUINSView+Hyperfocus.h */; settings = {ATTRIBUTES = (Public, ); }; };
CBB74CB613BE6E1900C85CB5 /* TUINSView+Hyperfocus.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C5F13BE6E1900C85CB5 /* TUINSView+Hyperfocus.m */; };
- CBB74CB713BE6E1900C85CB5 /* TUINSView+NSTextInputClient.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C6013BE6E1900C85CB5 /* TUINSView+NSTextInputClient.m */; };
CBB74CB813BE6E1900C85CB5 /* TUINSView.h in Headers */ = {isa = PBXBuildFile; fileRef = CBB74C6113BE6E1900C85CB5 /* TUINSView.h */; settings = {ATTRIBUTES = (Public, ); }; };
CBB74CB913BE6E1900C85CB5 /* TUINSView.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C6213BE6E1900C85CB5 /* TUINSView.m */; };
CBB74CBA13BE6E1900C85CB5 /* TUINSWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = CBB74C6313BE6E1900C85CB5 /* TUINSWindow.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -292,6 +289,12 @@
D040611815B6A7CD00F753ED /* NSTextView+TUIExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = D040611215B6A7CC00F753ED /* NSTextView+TUIExtensions.m */; };
D07AA82315BDD6B600F736C0 /* TUINSView+Hyperfocus.h in Headers */ = {isa = PBXBuildFile; fileRef = CBB74C5E13BE6E1900C85CB5 /* TUINSView+Hyperfocus.h */; settings = {ATTRIBUTES = (Public, ); }; };
D07AA82415BDD6B700F736C0 /* TUINSView+Hyperfocus.h in Headers */ = {isa = PBXBuildFile; fileRef = CBB74C5E13BE6E1900C85CB5 /* TUINSView+Hyperfocus.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ D07AA82615BDD72F00F736C0 /* TUINSView+NSTextInputClient.h in Headers */ = {isa = PBXBuildFile; fileRef = D07AA82515BDD72D00F736C0 /* TUINSView+NSTextInputClient.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ D07AA82715BDD72F00F736C0 /* TUINSView+NSTextInputClient.h in Headers */ = {isa = PBXBuildFile; fileRef = D07AA82515BDD72D00F736C0 /* TUINSView+NSTextInputClient.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ D07AA82815BDD72F00F736C0 /* TUINSView+NSTextInputClient.h in Headers */ = {isa = PBXBuildFile; fileRef = D07AA82515BDD72D00F736C0 /* TUINSView+NSTextInputClient.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ D07AA82915BDD79900F736C0 /* TUINSView+NSTextInputClient.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C6013BE6E1900C85CB5 /* TUINSView+NSTextInputClient.m */; };
+ D07AA82A15BDD79A00F736C0 /* TUINSView+NSTextInputClient.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C6013BE6E1900C85CB5 /* TUINSView+NSTextInputClient.m */; };
+ D07AA82B15BDD79A00F736C0 /* TUINSView+NSTextInputClient.m in Sources */ = {isa = PBXBuildFile; fileRef = CBB74C6013BE6E1900C85CB5 /* TUINSView+NSTextInputClient.m */; };
D0C764EB15B611C200E7AC2C /* TUIBridgedView.h in Headers */ = {isa = PBXBuildFile; fileRef = D0C764EA15B611C200E7AC2C /* TUIBridgedView.h */; settings = {ATTRIBUTES = (Public, ); }; };
D0C764EC15B611C200E7AC2C /* TUIBridgedView.h in Headers */ = {isa = PBXBuildFile; fileRef = D0C764EA15B611C200E7AC2C /* TUIBridgedView.h */; settings = {ATTRIBUTES = (Public, ); }; };
D0C764ED15B611C200E7AC2C /* TUIBridgedView.h in Headers */ = {isa = PBXBuildFile; fileRef = D0C764EA15B611C200E7AC2C /* TUIBridgedView.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -496,6 +499,7 @@
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>"; };
D0C764EA15B611C200E7AC2C /* TUIBridgedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TUIBridgedView.h; sourceTree = "<group>"; };
D0C7650415B6156A00E7AC2C /* TUIHostView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TUIHostView.h; sourceTree = "<group>"; };
D0C7650C15B6189D00E7AC2C /* TUINSHostView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TUINSHostView.h; sourceTree = "<group>"; };
@@ -739,6 +743,7 @@
48A10E8015B7769A007F9EE3 /* TUILayoutManager.m */,
CBB74C5E13BE6E1900C85CB5 /* TUINSView+Hyperfocus.h */,
CBB74C5F13BE6E1900C85CB5 /* TUINSView+Hyperfocus.m */,
+ D07AA82515BDD72D00F736C0 /* TUINSView+NSTextInputClient.h */,
CBB74C6013BE6E1900C85CB5 /* TUINSView+NSTextInputClient.m */,
D0C7656915B62EFA00E7AC2C /* TUINSView+Private.h */,
CBB74C6113BE6E1900C85CB5 /* TUINSView.h */,
@@ -845,6 +850,7 @@
D039724915B7D7DC0092CD26 /* TUILayoutManager.h in Headers */,
D039724B15B7D7DE0092CD26 /* TUILayoutConstraint.h in Headers */,
D07AA82415BDD6B700F736C0 /* TUINSView+Hyperfocus.h in Headers */,
+ D07AA82815BDD72F00F736C0 /* TUINSView+NSTextInputClient.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -917,6 +923,7 @@
48A10E8115B7769A007F9EE3 /* TUILayoutConstraint.h in Headers */,
48A10E8315B7769A007F9EE3 /* TUILayoutManager.h in Headers */,
48A10E8B15B77A46007F9EE3 /* TUIView+Layout.h in Headers */,
+ D07AA82615BDD72F00F736C0 /* TUINSView+NSTextInputClient.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -946,6 +953,7 @@
D039724815B7D7DB0092CD26 /* TUILayoutManager.h in Headers */,
D039724A15B7D7DE0092CD26 /* TUILayoutConstraint.h in Headers */,
D07AA82315BDD6B600F736C0 /* TUINSView+Hyperfocus.h in Headers */,
+ D07AA82715BDD72F00F736C0 /* TUINSView+NSTextInputClient.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1112,7 +1120,6 @@
5EE983CE13BE7834005F430D /* TUIImageView.m in Sources */,
5EE983CF13BE7834005F430D /* TUILabel.m in Sources */,
5EE983D013BE7834005F430D /* TUINSView+Hyperfocus.m in Sources */,
- 5EE983D113BE7834005F430D /* TUINSView+NSTextInputClient.m in Sources */,
5EE983D213BE7834005F430D /* TUINSView.m in Sources */,
5EE983D313BE7834005F430D /* TUINSWindow.m in Sources */,
5EE983D413BE7834005F430D /* TUIResponder.m in Sources */,
@@ -1161,6 +1168,7 @@
D039724115B7D7CC0092CD26 /* TUILayoutConstraint.m in Sources */,
D039724315B7D7CE0092CD26 /* TUILayoutManager.m in Sources */,
D039724515B7D7D40092CD26 /* TUIView+Layout.m in Sources */,
+ D07AA82B15BDD79A00F736C0 /* TUINSView+NSTextInputClient.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1188,7 +1196,6 @@
CBB74CB213BE6E1900C85CB5 /* TUIKit.m in Sources */,
CBB74CB413BE6E1900C85CB5 /* TUILabel.m in Sources */,
CBB74CB613BE6E1900C85CB5 /* TUINSView+Hyperfocus.m in Sources */,
- CBB74CB713BE6E1900C85CB5 /* TUINSView+NSTextInputClient.m in Sources */,
CBB74CB913BE6E1900C85CB5 /* TUINSView.m in Sources */,
CBB74CBB13BE6E1900C85CB5 /* TUINSWindow.m in Sources */,
CBB74CBD13BE6E1900C85CB5 /* TUIResponder.m in Sources */,
@@ -1240,6 +1247,7 @@
48A10E8215B7769A007F9EE3 /* TUILayoutConstraint.m in Sources */,
48A10E8415B7769A007F9EE3 /* TUILayoutManager.m in Sources */,
48A10E8915B778E8007F9EE3 /* TUIView+Layout.m in Sources */,
+ D07AA82915BDD79900F736C0 /* TUINSView+NSTextInputClient.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1276,7 +1284,6 @@
CB5E323913BE70CA004B7899 /* TUIKit.m in Sources */,
CB5E323B13BE70CA004B7899 /* TUILabel.m in Sources */,
CB5E323D13BE70CA004B7899 /* TUINSView+Hyperfocus.m in Sources */,
- CB5E323E13BE70CA004B7899 /* TUINSView+NSTextInputClient.m in Sources */,
CB5E324013BE70CA004B7899 /* TUINSView.m in Sources */,
CB5E324213BE70CA004B7899 /* TUINSWindow.m in Sources */,
CB5E324413BE70CA004B7899 /* TUIResponder.m in Sources */,
@@ -1325,6 +1332,7 @@
D039723F15B7D7CB0092CD26 /* TUILayoutConstraint.m in Sources */,
D039724215B7D7CE0092CD26 /* TUILayoutManager.m in Sources */,
D039724415B7D7D40092CD26 /* TUIView+Layout.m in Sources */,
+ D07AA82A15BDD79A00F736C0 /* TUINSView+NSTextInputClient.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
@@ -37,6 +37,7 @@
#import "TUILayoutConstraint.h"
#import "TUINSView.h"
#import "TUINSView+Hyperfocus.h"
+#import "TUINSView+NSTextInputClient.h"
#import "TUINSWindow.h"
#import "TUIPopover.h"
#import "TUIProgressBar.h"
@@ -0,0 +1,20 @@
+/*
+ Copyright 2011 Twitter, Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this work except in compliance with the License.
+ You may obtain a copy of the License in the LICENSE file, or at:
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+#import "TUINSView.h"
+
+@interface TUINSView (NSTextInputClient) <NSTextInputClient>
+@end
@@ -14,7 +14,11 @@
limitations under the License.
*/
-#ifdef ENABLE_NSTEXT_INPUT_CLIENT
+#import "TUINSView+NSTextInputClient.h"
+#import "TUINSView+Private.h"
+#import "TUINSWindow.h"
+
+@implementation TUINSView (NSTextInputClient)
/*
This file is jank - TUITextRenderer and friends can shoulder this stuff
@@ -153,4 +157,4 @@ - (void)doCommandBySelector:(SEL)aSelector
[self tryToPerform:aSelector with:self];
}
-#endif
+@end
@@ -21,7 +21,7 @@
/**
TUINSView is the bridge that hosts a TUIView-based interface heirarchy. You may add it as the contentView of your window if you want to build a pure TwUI-based UI, or you can use it for a small part.
*/
-@interface TUINSView : NSView <NSTextInputClient, TUIHostView>
+@interface TUINSView : NSView <TUIHostView>
{
TUIView *_hoverView;
@@ -653,10 +653,6 @@ - (void)didAddSubview:(NSView *)view {
[super didAddSubview:view];
}
-#define ENABLE_NSTEXT_INPUT_CLIENT
-#import "TUINSView+NSTextInputClient.m"
-#undef ENABLE_NSTEXT_INPUT_CLIENT
-
#pragma mark AppKit bridging
- (NSView *)hitTest:(NSPoint)point {

0 comments on commit f6e984a

Please sign in to comment.