-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Embeddable iTerm2Lib.framework + Demo App
- Loading branch information
Showing
36 changed files
with
5,613 additions
and
53 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
80 changes: 80 additions & 0 deletions
80
iTerm2.xcodeproj/xcshareddata/xcschemes/iTerm2Lib.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1000" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "E7F22BEA213682A900664A10" | ||
BuildableName = "iTerm2Lib.framework" | ||
BlueprintName = "iTerm2Lib" | ||
ReferencedContainer = "container:iTerm2.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Library" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<Testables> | ||
</Testables> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Library" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "E7F22BEA213682A900664A10" | ||
BuildableName = "iTerm2Lib.framework" | ||
BlueprintName = "iTerm2Lib" | ||
ReferencedContainer = "container:iTerm2.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Library" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "E7F22BEA213682A900664A10" | ||
BuildableName = "iTerm2Lib.framework" | ||
BlueprintName = "iTerm2Lib" | ||
ReferencedContainer = "container:iTerm2.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Library"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Library" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
91 changes: 91 additions & 0 deletions
91
iTerm2.xcodeproj/xcshareddata/xcschemes/iTerm2LibDemo.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1000" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "E7F22E0D2136A29500664A10" | ||
BuildableName = "iTerm2LibDemo.app" | ||
BlueprintName = "iTerm2LibDemo" | ||
ReferencedContainer = "container:iTerm2.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Library" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<Testables> | ||
</Testables> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "E7F22E0D2136A29500664A10" | ||
BuildableName = "iTerm2LibDemo.app" | ||
BlueprintName = "iTerm2LibDemo" | ||
ReferencedContainer = "container:iTerm2.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Library" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
<BuildableProductRunnable | ||
runnableDebuggingMode = "0"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "E7F22E0D2136A29500664A10" | ||
BuildableName = "iTerm2LibDemo.app" | ||
BlueprintName = "iTerm2LibDemo" | ||
ReferencedContainer = "container:iTerm2.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Library" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<BuildableProductRunnable | ||
runnableDebuggingMode = "0"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "E7F22E0D2136A29500664A10" | ||
BuildableName = "iTerm2LibDemo.app" | ||
BlueprintName = "iTerm2LibDemo" | ||
ReferencedContainer = "container:iTerm2.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Library"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Library" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>$(DEVELOPMENT_LANGUAGE)</string> | ||
<key>CFBundleExecutable</key> | ||
<string>$(EXECUTABLE_NAME)</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>$(PRODUCT_NAME)</string> | ||
<key>CFBundlePackageType</key> | ||
<string>FMWK</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleVersion</key> | ||
<string>$(CURRENT_PROJECT_VERSION)</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#import <Cocoa/Cocoa.h> | ||
|
||
@interface NSWindow (iTermLib) | ||
|
||
- (double)approximateFractionOccluded; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#import "NSWindow+iTermLib.h" | ||
|
||
@implementation NSWindow (iTermLib) | ||
|
||
- (double)approximateFractionOccluded | ||
{ | ||
return 0; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#import <Cocoa/Cocoa.h> | ||
|
||
#import "SessionView.h" | ||
|
||
extern NSString* const iTermLibSessionViewDidMoveToWindowNotification; | ||
|
||
@interface SessionView (iTermLib) | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#import "SessionView+iTermLib.h" | ||
|
||
NSString* const iTermLibSessionViewDidMoveToWindowNotification = @"iTermLibSessionViewDidMoveToWindowNotification"; | ||
|
||
@implementation SessionView (iTermLib) | ||
|
||
- (void)viewDidMoveToWindow | ||
{ | ||
[NSNotificationCenter.defaultCenter postNotificationName:iTermLibSessionViewDidMoveToWindowNotification object:self]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#import <Cocoa/Cocoa.h> | ||
|
||
#import "iTermLibApplication.h" | ||
#import "iTermLibController.h" | ||
#import "iTermLibSessionController.h" | ||
#import "SessionView+iTermLib.h" | ||
#import "NSWindow+iTermLib.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#import <Cocoa/Cocoa.h> | ||
|
||
@class iTermLibController; | ||
|
||
@interface iTermLibApplication : NSObject | ||
|
||
+ (instancetype)sharedApplication; | ||
|
||
@property (readonly) iTermLibController *delegate; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#import "iTermLibApplication.h" | ||
|
||
#import "iTermLibController.h" | ||
|
||
static iTermLibApplication* _gSharedApplication; | ||
|
||
@implementation iTermLibApplication | ||
|
||
+ (instancetype)sharedApplication | ||
{ | ||
static dispatch_once_t onceToken; | ||
dispatch_once(&onceToken, ^{ | ||
_gSharedApplication = [[iTermLibApplication alloc] init]; | ||
}); | ||
|
||
return _gSharedApplication; | ||
} | ||
|
||
- (iTermLibController*)delegate | ||
{ | ||
return iTermLibController.sharedController; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#import <Cocoa/Cocoa.h> | ||
|
||
#import "iTermLibSessionController.h" | ||
|
||
@class PTYSession; | ||
@class iTermLibController; | ||
|
||
@protocol iTermLibControllerDelegate<NSObject> | ||
|
||
- (void)controller:(iTermLibController*)controller shouldRemoveSessionView:(iTermLibSessionController*)session; | ||
|
||
@optional | ||
- (void)controller:(iTermLibController*)controller sessionDidClose:(iTermLibSessionController*)session; | ||
- (void)controller:(iTermLibController*)controller nameOfSession:(iTermLibSessionController*)session didChangeTo:(NSString*)newName; | ||
|
||
@end | ||
|
||
@interface iTermLibController : NSObject<iTermLibSessionDelegate> | ||
|
||
+ (instancetype)sharedController; | ||
|
||
@property (readonly, copy) NSArray<iTermLibSessionController*>* sessions; | ||
@property (readonly) iTermLibSessionController* activeSession; | ||
@property (assign) id<iTermLibControllerDelegate> delegate; | ||
@property (assign) BOOL broadcasting; | ||
|
||
- (iTermLibSessionController*)createSessionWithProfile:(Profile*)profile command:(NSString*)command initialSize:(NSSize)initialSize; | ||
|
||
@end |
Oops, something went wrong.