merge into trunk

git-svn-id: svn://qnap.local/TwoTerm/trunk@3108 5590a31f-7b70-45f8-8c82-aa3a8e5f4507
This commit is contained in:
Kelvin Sherlock
2016-07-06 17:43:36 +00:00
77 changed files with 1733 additions and 790 deletions
+113 -22
View File
@@ -15,12 +15,13 @@
B60EBD1211E8DEEF00C1974F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B60EBD1111E8DEEF00C1974F /* QuartzCore.framework */; };
B60EBDE311E90FC300C1974F /* ScanLineFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = B60EBDE211E90FC300C1974F /* ScanLineFilter.m */; };
B60EBE2B11E918D500C1974F /* ScanLineFilter.cikernel in Resources */ = {isa = PBXBuildFile; fileRef = B60EBDE711E9143F00C1974F /* ScanLineFilter.cikernel */; };
B612870E1480B4F6002E04DF /* TermContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = B612870D1480B4F6002E04DF /* TermContentView.m */; };
B612F45012DD5DAD005D1B77 /* iGeometry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B612F44712DD5DAD005D1B77 /* iGeometry.cpp */; };
B612F45112DD5DAD005D1B77 /* Lock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B612F44912DD5DAD005D1B77 /* Lock.cpp */; };
B612F45212DD5DAD005D1B77 /* OutputChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B612F44B12DD5DAD005D1B77 /* OutputChannel.cpp */; };
B612F45312DD5DAD005D1B77 /* Screen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B612F44D12DD5DAD005D1B77 /* Screen.cpp */; };
B612F46412DD5DF1005D1B77 /* Apple80.mm in Sources */ = {isa = PBXBuildFile; fileRef = B612F45712DD5DF1005D1B77 /* Apple80.mm */; };
B612F46512DD5DF1005D1B77 /* EmulatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B612F45912DD5DF1005D1B77 /* EmulatorManager.m */; };
B612F46512DD5DF1005D1B77 /* EmulatorManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = B612F45912DD5DF1005D1B77 /* EmulatorManager.mm */; };
B612F46612DD5DF1005D1B77 /* GNOConsole.mm in Sources */ = {isa = PBXBuildFile; fileRef = B612F45B12DD5DF1005D1B77 /* GNOConsole.mm */; };
B612F46712DD5DF1005D1B77 /* PTSE.mm in Sources */ = {isa = PBXBuildFile; fileRef = B612F45D12DD5DF1005D1B77 /* PTSE.mm */; };
B612F46812DD5DF1005D1B77 /* VT05.mm in Sources */ = {isa = PBXBuildFile; fileRef = B612F45F12DD5DF1005D1B77 /* VT05.mm */; };
@@ -30,16 +31,27 @@
B612F47112DD5E02005D1B77 /* EmulatorView.mm in Sources */ = {isa = PBXBuildFile; fileRef = B612F46F12DD5E02005D1B77 /* EmulatorView.mm */; };
B612F47412DDEBA9005D1B77 /* Screen_obsolete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B612F47212DDEBA9005D1B77 /* Screen_obsolete.cpp */; };
B612F47512DDEBA9005D1B77 /* Screen_TextPort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B612F47312DDEBA9005D1B77 /* Screen_TextPort.cpp */; };
B61D0D5D125B740C001C713B /* NewTerminal.xib in Resources */ = {isa = PBXBuildFile; fileRef = B61D0D5B125B740C001C713B /* NewTerminal.xib */; };
B61D0D60125B7ACA001C713B /* NewTerminalWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = B61D0D5F125B7ACA001C713B /* NewTerminalWindowController.m */; };
B61D0D69125B8E06001C713B /* Defaults.m in Sources */ = {isa = PBXBuildFile; fileRef = B61D0D68125B8E06001C713B /* Defaults.m */; };
B627333B12E3FF5B00A14C94 /* ChildMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = B627333A12E3FF5B00A14C94 /* ChildMonitor.m */; };
B61EF7C51481561E008C1891 /* titlebar-corner.png in Resources */ = {isa = PBXBuildFile; fileRef = B61EF7C31481561E008C1891 /* titlebar-corner.png */; };
B61EF7C61481561E008C1891 /* titlebar-middle.png in Resources */ = {isa = PBXBuildFile; fileRef = B61EF7C41481561E008C1891 /* titlebar-middle.png */; };
B61EF7C914815AF8008C1891 /* NewTerminal.xib in Resources */ = {isa = PBXBuildFile; fileRef = B61EF7C714815AF8008C1891 /* NewTerminal.xib */; };
B61EF7CC14815E07008C1891 /* TitleBarView.m in Sources */ = {isa = PBXBuildFile; fileRef = B61EF7CB14815E07008C1891 /* TitleBarView.m */; };
B61EF7CF148163E7008C1891 /* TitleBarView.xib in Resources */ = {isa = PBXBuildFile; fileRef = B61EF7CD148163E7008C1891 /* TitleBarView.xib */; };
B61EF7D71482FB6D008C1891 /* titlebar-center.png in Resources */ = {isa = PBXBuildFile; fileRef = B61EF7D41482FB6D008C1891 /* titlebar-center.png */; };
B61EF7D81482FB6D008C1891 /* titlebar-left.png in Resources */ = {isa = PBXBuildFile; fileRef = B61EF7D51482FB6D008C1891 /* titlebar-left.png */; };
B61EF7D91482FB6D008C1891 /* titlebar-right.png in Resources */ = {isa = PBXBuildFile; fileRef = B61EF7D61482FB6D008C1891 /* titlebar-right.png */; };
B638188214A179D60027D007 /* ColorView.m in Sources */ = {isa = PBXBuildFile; fileRef = B638188114A179D60027D007 /* ColorView.m */; };
B66412391480A070003BC8D3 /* EmulatorWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = B66412381480A070003BC8D3 /* EmulatorWindow.m */; };
B676063B11DEAD3500D6B66C /* TermWindowController.mm in Sources */ = {isa = PBXBuildFile; fileRef = B676063A11DEAD3500D6B66C /* TermWindowController.mm */; };
B676065111DEBAE900D6B66C /* TermWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = B676065011DEBAE900D6B66C /* TermWindow.xib */; };
B67B3CE512B6FA040033AE07 /* a2-charset-40.png in Resources */ = {isa = PBXBuildFile; fileRef = B67B3CE312B6FA040033AE07 /* a2-charset-40.png */; };
B67B3CE612B6FA040033AE07 /* a2-charset-80.png in Resources */ = {isa = PBXBuildFile; fileRef = B67B3CE412B6FA040033AE07 /* a2-charset-80.png */; };
B6801BD912EB549300B22E9E /* vt100-charset.png in Resources */ = {isa = PBXBuildFile; fileRef = B6801BD812EB549300B22E9E /* vt100-charset.png */; };
B68E632A12FF909D00EAFF5F /* ExampleView.m in Sources */ = {isa = PBXBuildFile; fileRef = B68E632912FF909C00EAFF5F /* ExampleView.m */; };
B6C704EF15CCC64100CC0401 /* titlebar-center@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B6C704EC15CCC64100CC0401 /* titlebar-center@2x.png */; };
B6C704F015CCC64100CC0401 /* titlebar-left@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B6C704ED15CCC64100CC0401 /* titlebar-left@2x.png */; };
B6C704F115CCC64100CC0401 /* titlebar-right@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B6C704EE15CCC64100CC0401 /* titlebar-right@2x.png */; };
B6EBE2B511E0EA9100EA0458 /* CharacterGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EBE2B411E0EA9100EA0458 /* CharacterGenerator.m */; };
/* End PBXBuildFile section */
@@ -83,6 +95,8 @@
B60EBDE111E90FC300C1974F /* ScanLineFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScanLineFilter.h; sourceTree = "<group>"; };
B60EBDE211E90FC300C1974F /* ScanLineFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScanLineFilter.m; sourceTree = "<group>"; };
B60EBDE711E9143F00C1974F /* ScanLineFilter.cikernel */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ScanLineFilter.cikernel; sourceTree = "<group>"; };
B612870C1480B4F6002E04DF /* TermContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TermContentView.h; sourceTree = "<group>"; };
B612870D1480B4F6002E04DF /* TermContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TermContentView.m; sourceTree = "<group>"; };
B612F44712DD5DAD005D1B77 /* iGeometry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = iGeometry.cpp; sourceTree = "<group>"; };
B612F44812DD5DAD005D1B77 /* iGeometry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iGeometry.h; sourceTree = "<group>"; };
B612F44912DD5DAD005D1B77 /* Lock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Lock.cpp; sourceTree = "<group>"; };
@@ -94,7 +108,7 @@
B612F45612DD5DF1005D1B77 /* Apple80.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Apple80.h; sourceTree = "<group>"; };
B612F45712DD5DF1005D1B77 /* Apple80.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Apple80.mm; sourceTree = "<group>"; };
B612F45812DD5DF1005D1B77 /* Emulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Emulator.h; sourceTree = "<group>"; };
B612F45912DD5DF1005D1B77 /* EmulatorManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EmulatorManager.m; sourceTree = "<group>"; };
B612F45912DD5DF1005D1B77 /* EmulatorManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EmulatorManager.mm; sourceTree = "<group>"; };
B612F45A12DD5DF1005D1B77 /* GNOConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GNOConsole.h; sourceTree = "<group>"; };
B612F45B12DD5DF1005D1B77 /* GNOConsole.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GNOConsole.mm; sourceTree = "<group>"; };
B612F45C12DD5DF1005D1B77 /* PTSE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTSE.h; sourceTree = "<group>"; };
@@ -111,13 +125,23 @@
B612F46F12DD5E02005D1B77 /* EmulatorView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EmulatorView.mm; sourceTree = "<group>"; };
B612F47212DDEBA9005D1B77 /* Screen_obsolete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Screen_obsolete.cpp; sourceTree = "<group>"; };
B612F47312DDEBA9005D1B77 /* Screen_TextPort.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Screen_TextPort.cpp; sourceTree = "<group>"; };
B61D0D5C125B740C001C713B /* NewTerminal.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = NewTerminal.xib; path = English.lproj/NewTerminal.xib; sourceTree = "<group>"; };
B61D0D5E125B7ACA001C713B /* NewTerminalWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewTerminalWindowController.h; sourceTree = "<group>"; };
B61D0D5F125B7ACA001C713B /* NewTerminalWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewTerminalWindowController.m; sourceTree = "<group>"; };
B61D0D67125B8E06001C713B /* Defaults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Defaults.h; sourceTree = "<group>"; };
B61D0D68125B8E06001C713B /* Defaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Defaults.m; sourceTree = "<group>"; };
B627333912E3FF5B00A14C94 /* ChildMonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChildMonitor.h; sourceTree = "<group>"; };
B627333A12E3FF5B00A14C94 /* ChildMonitor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChildMonitor.m; sourceTree = "<group>"; };
B61EF7C31481561E008C1891 /* titlebar-corner.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "titlebar-corner.png"; sourceTree = "<group>"; };
B61EF7C41481561E008C1891 /* titlebar-middle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "titlebar-middle.png"; sourceTree = "<group>"; };
B61EF7C814815AF8008C1891 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/NewTerminal.xib; sourceTree = "<group>"; };
B61EF7CA14815E07008C1891 /* TitleBarView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TitleBarView.h; sourceTree = "<group>"; };
B61EF7CB14815E07008C1891 /* TitleBarView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TitleBarView.m; sourceTree = "<group>"; };
B61EF7CE148163E7008C1891 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/TitleBarView.xib; sourceTree = "<group>"; };
B61EF7D41482FB6D008C1891 /* titlebar-center.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "titlebar-center.png"; sourceTree = "<group>"; };
B61EF7D51482FB6D008C1891 /* titlebar-left.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "titlebar-left.png"; sourceTree = "<group>"; };
B61EF7D61482FB6D008C1891 /* titlebar-right.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "titlebar-right.png"; sourceTree = "<group>"; };
B638188014A179D60027D007 /* ColorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorView.h; sourceTree = "<group>"; };
B638188114A179D60027D007 /* ColorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ColorView.m; sourceTree = "<group>"; };
B66412371480A070003BC8D3 /* EmulatorWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmulatorWindow.h; sourceTree = "<group>"; };
B66412381480A070003BC8D3 /* EmulatorWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EmulatorWindow.m; sourceTree = "<group>"; };
B676063911DEAD3500D6B66C /* TermWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TermWindowController.h; sourceTree = "<group>"; };
B676063A11DEAD3500D6B66C /* TermWindowController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TermWindowController.mm; sourceTree = "<group>"; };
B676064D11DEBAE300D6B66C /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/TermWindow.xib; sourceTree = "<group>"; };
@@ -126,7 +150,9 @@
B6801BD812EB549300B22E9E /* vt100-charset.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "vt100-charset.png"; sourceTree = "<group>"; };
B68E632812FF909C00EAFF5F /* ExampleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExampleView.h; sourceTree = "<group>"; };
B68E632912FF909C00EAFF5F /* ExampleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExampleView.m; sourceTree = "<group>"; };
B68E632B130990DD00EAFF5F /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/NewTerminal.xib; sourceTree = "<group>"; };
B6C704EC15CCC64100CC0401 /* titlebar-center@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "titlebar-center@2x.png"; sourceTree = "<group>"; };
B6C704ED15CCC64100CC0401 /* titlebar-left@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "titlebar-left@2x.png"; sourceTree = "<group>"; };
B6C704EE15CCC64100CC0401 /* titlebar-right@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "titlebar-right@2x.png"; sourceTree = "<group>"; };
B6EBE2B311E0EA9100EA0458 /* CharacterGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterGenerator.h; sourceTree = "<group>"; };
B6EBE2B411E0EA9100EA0458 /* CharacterGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CharacterGenerator.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -147,8 +173,6 @@
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
B627333912E3FF5B00A14C94 /* ChildMonitor.h */,
B627333A12E3FF5B00A14C94 /* ChildMonitor.m */,
B61D0D5E125B7ACA001C713B /* NewTerminalWindowController.h */,
B61D0D5F125B7ACA001C713B /* NewTerminalWindowController.m */,
256AC3D80F4B6AC300CF3369 /* TwoTermAppDelegate.h */,
@@ -225,7 +249,8 @@
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
B676065011DEBAE900D6B66C /* TermWindow.xib */,
B61D0D5B125B740C001C713B /* NewTerminal.xib */,
B61EF7C714815AF8008C1891 /* NewTerminal.xib */,
B61EF7CD148163E7008C1891 /* TitleBarView.xib */,
);
name = Resources;
sourceTree = "<group>";
@@ -262,7 +287,7 @@
B612F45612DD5DF1005D1B77 /* Apple80.h */,
B612F45712DD5DF1005D1B77 /* Apple80.mm */,
B612F45812DD5DF1005D1B77 /* Emulator.h */,
B612F45912DD5DF1005D1B77 /* EmulatorManager.m */,
B612F45912DD5DF1005D1B77 /* EmulatorManager.mm */,
B612F45A12DD5DF1005D1B77 /* GNOConsole.h */,
B612F45B12DD5DF1005D1B77 /* GNOConsole.mm */,
B612F45C12DD5DF1005D1B77 /* PTSE.h */,
@@ -280,12 +305,20 @@
B612F46B12DD5E02005D1B77 /* Views */ = {
isa = PBXGroup;
children = (
B66412371480A070003BC8D3 /* EmulatorWindow.h */,
B66412381480A070003BC8D3 /* EmulatorWindow.m */,
B68E632812FF909C00EAFF5F /* ExampleView.h */,
B68E632912FF909C00EAFF5F /* ExampleView.m */,
B612F46C12DD5E02005D1B77 /* CurveView.h */,
B612F46D12DD5E02005D1B77 /* CurveView.m */,
B612F46E12DD5E02005D1B77 /* EmulatorView.h */,
B612F46F12DD5E02005D1B77 /* EmulatorView.mm */,
B612870C1480B4F6002E04DF /* TermContentView.h */,
B612870D1480B4F6002E04DF /* TermContentView.m */,
B61EF7CA14815E07008C1891 /* TitleBarView.h */,
B61EF7CB14815E07008C1891 /* TitleBarView.m */,
B638188014A179D60027D007 /* ColorView.h */,
B638188114A179D60027D007 /* ColorView.m */,
);
path = Views;
sourceTree = "<group>";
@@ -293,6 +326,14 @@
B66979CE11E6BCAE002ED475 /* images */ = {
isa = PBXGroup;
children = (
B61EF7D41482FB6D008C1891 /* titlebar-center.png */,
B61EF7D51482FB6D008C1891 /* titlebar-left.png */,
B61EF7D61482FB6D008C1891 /* titlebar-right.png */,
B6C704EC15CCC64100CC0401 /* titlebar-center@2x.png */,
B6C704ED15CCC64100CC0401 /* titlebar-left@2x.png */,
B6C704EE15CCC64100CC0401 /* titlebar-right@2x.png */,
B61EF7C31481561E008C1891 /* titlebar-corner.png */,
B61EF7C41481561E008C1891 /* titlebar-middle.png */,
B6801BD812EB549300B22E9E /* vt100-charset.png */,
B67B3CE312B6FA040033AE07 /* a2-charset-40.png */,
B67B3CE412B6FA040033AE07 /* a2-charset-80.png */,
@@ -329,7 +370,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0420;
LastUpgradeCheck = 0730;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "2Term" */;
compatibilityVersion = "Xcode 3.2";
@@ -357,10 +398,19 @@
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
B676065111DEBAE900D6B66C /* TermWindow.xib in Resources */,
B61D0D5D125B740C001C713B /* NewTerminal.xib in Resources */,
B67B3CE512B6FA040033AE07 /* a2-charset-40.png in Resources */,
B67B3CE612B6FA040033AE07 /* a2-charset-80.png in Resources */,
B6801BD912EB549300B22E9E /* vt100-charset.png in Resources */,
B61EF7C51481561E008C1891 /* titlebar-corner.png in Resources */,
B61EF7C61481561E008C1891 /* titlebar-middle.png in Resources */,
B61EF7C914815AF8008C1891 /* NewTerminal.xib in Resources */,
B61EF7CF148163E7008C1891 /* TitleBarView.xib in Resources */,
B61EF7D71482FB6D008C1891 /* titlebar-center.png in Resources */,
B61EF7D81482FB6D008C1891 /* titlebar-left.png in Resources */,
B61EF7D91482FB6D008C1891 /* titlebar-right.png in Resources */,
B6C704EF15CCC64100CC0401 /* titlebar-center@2x.png in Resources */,
B6C704F015CCC64100CC0401 /* titlebar-left@2x.png in Resources */,
B6C704F115CCC64100CC0401 /* titlebar-right@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -383,7 +433,7 @@
B612F45212DD5DAD005D1B77 /* OutputChannel.cpp in Sources */,
B612F45312DD5DAD005D1B77 /* Screen.cpp in Sources */,
B612F46412DD5DF1005D1B77 /* Apple80.mm in Sources */,
B612F46512DD5DF1005D1B77 /* EmulatorManager.m in Sources */,
B612F46512DD5DF1005D1B77 /* EmulatorManager.mm in Sources */,
B612F46612DD5DF1005D1B77 /* GNOConsole.mm in Sources */,
B612F46712DD5DF1005D1B77 /* PTSE.mm in Sources */,
B612F46812DD5DF1005D1B77 /* VT05.mm in Sources */,
@@ -393,8 +443,11 @@
B612F47112DD5E02005D1B77 /* EmulatorView.mm in Sources */,
B612F47412DDEBA9005D1B77 /* Screen_obsolete.cpp in Sources */,
B612F47512DDEBA9005D1B77 /* Screen_TextPort.cpp in Sources */,
B627333B12E3FF5B00A14C94 /* ChildMonitor.m in Sources */,
B68E632A12FF909D00EAFF5F /* ExampleView.m in Sources */,
B66412391480A070003BC8D3 /* EmulatorWindow.m in Sources */,
B612870E1480B4F6002E04DF /* TermContentView.m in Sources */,
B61EF7CC14815E07008C1891 /* TitleBarView.m in Sources */,
B638188214A179D60027D007 /* ColorView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -417,15 +470,22 @@
name = MainMenu.xib;
sourceTree = "<group>";
};
B61D0D5B125B740C001C713B /* NewTerminal.xib */ = {
B61EF7C714815AF8008C1891 /* NewTerminal.xib */ = {
isa = PBXVariantGroup;
children = (
B61D0D5C125B740C001C713B /* NewTerminal.xib */,
B68E632B130990DD00EAFF5F /* en */,
B61EF7C814815AF8008C1891 /* English */,
);
name = NewTerminal.xib;
sourceTree = "<group>";
};
B61EF7CD148163E7008C1891 /* TitleBarView.xib */ = {
isa = PBXVariantGroup;
children = (
B61EF7CE148163E7008C1891 /* English */,
);
name = TitleBarView.xib;
sourceTree = "<group>";
};
B676065011DEBAE900D6B66C /* TermWindow.xib */ = {
isa = PBXVariantGroup;
children = (
@@ -441,6 +501,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_MODEL_TUNING = G5;
@@ -449,6 +510,7 @@
GCC_PREFIX_HEADER = TwoTerm_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
PRODUCT_BUNDLE_IDENTIFIER = "com.ksherlock.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = TwoTerm;
};
name = Debug;
@@ -457,12 +519,14 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = _Term_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
PRODUCT_BUNDLE_IDENTIFIER = "com.ksherlock.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = TwoTerm;
};
name = Release;
@@ -470,15 +534,29 @@
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = NO;
MACOSX_DEPLOYMENT_TARGET = 10.10;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
@@ -486,13 +564,26 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
-44
View File
@@ -1,44 +0,0 @@
//
// ChildMonitor.h
// 2Term
//
// Created by Kelvin Sherlock on 1/16/2011.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
/*
* An NSThread to monitor a pid and fd.
* requires 10.5+
*
*/
#import <Foundation/Foundation.h>
@class ChildMonitor;
@protocol ChildMonitorDelegate
-(void)childDataAvailable: (ChildMonitor *)monitor;
-(void)childFinished: (ChildMonitor *)monitor;
@end
@interface ChildMonitor : NSThread {
pid_t _childPID;
int _fd;
int _childStatus;
BOOL _childFinished;
id<ChildMonitorDelegate> _delegate;
}
@property (assign) BOOL childFinished;
@property (assign) int childStatus;
@property (nonatomic, assign) pid_t childPID;
@property (nonatomic, assign) int fd;
@property (nonatomic, assign) id<ChildMonitorDelegate> delegate;
@end
-102
View File
@@ -1,102 +0,0 @@
//
// ChildMonitor.m
// 2Term
//
// Created by Kelvin Sherlock on 1/16/2011.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import "ChildMonitor.h"
#include <sys/wait.h>
#include <sys/select.h>
#include <signal.h>
@implementation ChildMonitor
@synthesize childFinished = _childFinished;
@synthesize childStatus = _childStatus;
@synthesize childPID = _childPID;
@synthesize fd = _fd;
@synthesize delegate = _delegate;
-(BOOL)wait
{
int status = 0;
if (waitpid(_childPID, &status, WNOHANG) == _childPID)
{
[self setChildStatus: status];
[self setChildFinished: YES];
[(NSObject *)_delegate performSelectorOnMainThread: @selector(childFinished:)
withObject: self
waitUntilDone: NO];
return YES;
}
return NO;
}
-(void)main
{
int fd = _fd;
// poll(2) does not work for ptys.
// todo -- check if kqueue works with ptys
// kqueue can also monitor the child process.
for(;;)
{
int n;
struct timeval tm;
fd_set read_set;
fd_set error_set;
if ([self isCancelled]) break;
FD_ZERO(&read_set);
FD_SET(fd, &read_set);
FD_ZERO(&error_set);
FD_SET(fd, &error_set);
// 10 second timeout...
tm.tv_sec = 10;
tm.tv_usec = 0;
n = select(fd + 1, &read_set, NULL, &error_set, &tm);
if (n == 0) continue;
if (n < 0) break;
if (FD_ISSET(fd, &error_set)) break;
// ?
if (FD_ISSET(fd, &read_set))
{
[_delegate childDataAvailable: self];
}
if ([self wait]) break;
}
if (!_childFinished) [self wait];
}
- (void)dealloc {
if (!_childFinished) kill(_childPID, 9);
[super dealloc];
}
@end
+8 -4
View File
@@ -220,10 +220,10 @@ enum {
-(void)keyDown:(NSEvent *)event screen:(Screen *)screen output:(OutputChannel *)output
{
unsigned flags = [event modifierFlags];
NSEventModifierFlags flags = [event modifierFlags];
NSString *chars = [event charactersIgnoringModifiers];
unsigned length = [chars length];
NSUInteger length = [chars length];
for (unsigned i = 0; i < length; ++i)
{
@@ -269,9 +269,13 @@ enum {
{
char c = uc;
if (flags & (NSAlphaShiftKeyMask | NSShiftKeyMask))
c = toupper(c);
//NSLog(@"%@", event);
if (flags & NSAlphaShiftKeyMask)
{
c = flags & NSShiftKeyMask ? tolower(c) : toupper(c);
}
if (flags & NSControlKeyMask)
c = CTRL(c);
+6
View File
@@ -15,6 +15,12 @@
#ifdef __cplusplus
class Screen;
class OutputChannel;
#include <string>
extern "C" unsigned EventCharacters(NSEvent *event, std::u32string &rv);
#else
#define Screen void
#define OutputChannel void
+122
View File
@@ -0,0 +1,122 @@
//
// EmulatorManager.m
// 2Term
//
// Created by Kelvin Sherlock on 10/5/2010.
// Copyright (c) 2010 __MyCompanyName__. All rights reserved.
//
#import "Emulator.h"
#import <AppKit/AppKit.h>
unsigned EventCharacters(NSEvent *event, std::u32string &rv)
{
NSEventModifierFlags flags = [event modifierFlags];
NSString *chars = [event charactersIgnoringModifiers];
NSUInteger length = [chars length];
rv.reserve(length);
// chars is expected to have 1 character but could have 0 (dead key)
// or multiple
for (unsigned i = 0; i < length; ++i)
{
unichar c = [chars characterAtIndex: i];
if (c <= 0x7f)
{
if (flags & NSAlphaShiftKeyMask)
{
c = flags & NSShiftKeyMask ? tolower(c) : toupper(c);
}
if (flags & NSControlKeyMask)
c = CTRL(c);
}
rv.push_back(c);
}
return (unsigned)length;
}
@implementation EmulatorManager
static NSMutableArray *array = nil;
+(id)alloc
{
return nil;
}
+(id)new
{
return nil;
}
-(id)init
{
[self release];
return nil;
}
// can be called before +load.
+(void)registerClass: (Class)klass
{
if (klass && [klass conformsToProtocol: @protocol(Emulator)])
{
@synchronized (self)
{
if (!array)
array = [NSMutableArray new];
[array addObject: klass];
[array sortUsingComparator: ^(id lhs, id rhs){
NSString *a, *b;
a = (NSString *)[lhs name];
b = (NSString *)[rhs name];
return [a caseInsensitiveCompare: b];
}];
}
}
}
+(NSMenu *)emulatorMenu
{
NSMenu *menu = [[[NSMenu alloc] initWithTitle: @"Terminal Type"] autorelease];
@synchronized (self)
{
unsigned index = 0;
for (Class klass in array)
{
NSMenuItem *item = [[NSMenuItem new] autorelease];
[item setTitle: [klass name]];
[item setTag: ++index];
[menu addItem: item];
}
}
return menu;
}
+(id)emulatorForTag: (unsigned)tag
{
@synchronized(self)
{
if (tag && tag <= [array count])
{
return [array objectAtIndex: tag - 1];
}
}
return nil;
}
@end
+6 -5
View File
@@ -371,7 +371,7 @@ enum {
case StateSetPort1:
// [
if (c == ']')
if (c == '[')
{
_state++;
}
@@ -389,7 +389,7 @@ enum {
case StateSetPort3:
// right
_vp[1] = c - 32;
_vp[1] = c - 32 + 1;
_state++;
break;
@@ -402,11 +402,12 @@ enum {
// bottom
// and validation.
_vp[3] = c - 32;
_vp[3] = c - 32 + 1;
_vp[0] = std::max(0, _vp[0]);
_vp[2] = std::max(0, _vp[2]);
_vp[1] = std::min(80, _vp[1]);
_vp[3] = std::min(24, _vp[3]);
@@ -434,10 +435,10 @@ enum {
-(void)keyDown:(NSEvent *)event screen:(Screen *)screen output:(OutputChannel *)output
{
unsigned flags = [event modifierFlags];
NSEventModifierFlags flags = [event modifierFlags];
NSString *chars = [event charactersIgnoringModifiers];
unsigned length = [chars length];
NSUInteger length = [chars length];
for (unsigned i = 0; i < length; ++i)
{
+2 -2
View File
@@ -314,10 +314,10 @@ enum {
-(void)keyDown:(NSEvent *)event screen:(Screen *)screen output:(OutputChannel *)output
{
unsigned flags = [event modifierFlags];
NSEventModifierFlags flags = [event modifierFlags];
NSString *chars = [event charactersIgnoringModifiers];
unsigned length = [chars length];
NSUInteger length = [chars length];
for (unsigned i = 0; i < length; ++i)
{
+2 -2
View File
@@ -67,9 +67,9 @@ enum {
-(void)keyDown: (NSEvent *)event screen: (Screen *)screen output: (OutputChannel *)output
{
unsigned flags = [event modifierFlags];
NSEventModifierFlags flags = [event modifierFlags];
NSString *chars = [event charactersIgnoringModifiers];
unsigned length = [chars length];
NSUInteger length = [chars length];
for (unsigned i = 0; i < length; ++i)
+4 -4
View File
@@ -799,7 +799,7 @@ enum {
static void vt100ModeKey(unichar uc, unsigned flags, Screen *screen, OutputChannel *output, struct __vt100flags vt100flags)
static void vt100ModeKey(unichar uc, NSEventModifierFlags flags, Screen *screen, OutputChannel *output, struct __vt100flags vt100flags)
{
const char *str = NULL;
@@ -926,7 +926,7 @@ static void vt100ModeKey(unichar uc, unsigned flags, Screen *screen, OutputChann
}
static void vt52ModeKey(unichar uc, unsigned flags, Screen * screen, OutputChannel *output, struct __vt100flags vt100flags)
static void vt52ModeKey(unichar uc, NSEventModifierFlags flags, Screen * screen, OutputChannel *output, struct __vt100flags vt100flags)
{
const char *str = NULL;
@@ -1043,9 +1043,9 @@ static void vt52ModeKey(unichar uc, unsigned flags, Screen * screen, OutputChann
-(void)keyDown:(NSEvent *)event screen:(Screen *)screen output:(OutputChannel *)output
{
unsigned flags = [event modifierFlags];
NSEventModifierFlags flags = [event modifierFlags];
NSString *chars = [event charactersIgnoringModifiers];
unsigned length = [chars length];
NSUInteger length = [chars length];
for (unsigned i = 0; i < length; ++i)
{
+2 -2
View File
@@ -87,9 +87,9 @@ enum {
-(void)keyDown: (NSEvent *)event screen: (Screen *)screen output: (OutputChannel *)output
{
unsigned flags = [event modifierFlags];
NSEventModifierFlags flags = [event modifierFlags];
NSString *chars = [event charactersIgnoringModifiers];
unsigned length = [chars length];
NSUInteger length = [chars length];
for (unsigned i = 0; i < length; ++i)
{
+103 -146
View File
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1060</int>
<string key="IBDocument.SystemVersion">10J567</string>
<string key="IBDocument.InterfaceBuilderVersion">1294</string>
<string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">462.00</string>
<int key="IBDocument.SystemTarget">1070</int>
<string key="IBDocument.SystemVersion">11C74</string>
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
<string key="IBDocument.AppKitVersion">1138.23</string>
<string key="IBDocument.HIToolboxVersion">567.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">1294</string>
<string key="NS.object.0">1938</string>
</object>
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -35,11 +35,8 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="dict.values" ref="0"/>
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -60,6 +57,7 @@
<string key="NSWindowTitle">New Terminal</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
<nil key="NSUserInterfaceItemIdentifier"/>
<object class="NSView" key="NSWindowView" id="1006">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
@@ -229,7 +227,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSView" id="411919171">
<reference key="NSNextResponder" ref="293979707"/>
<int key="NSvFlags">256</int>
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTextField" id="252954094">
@@ -445,7 +443,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSView" id="295643624">
<reference key="NSNextResponder" ref="916078394"/>
<int key="NSvFlags">256</int>
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSSlider" id="256941151">
@@ -639,13 +637,16 @@
<string key="NSClassName">ExampleView</string>
</object>
</object>
<string key="NSFrame">{{7, 11}, {400, 500}}</string>
<string key="NSFrameSize">{400, 500}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="497952356"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
<string key="NSMaxSize">{1e+13, 1e+13}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSAutorecalculatesContentBorderThicknessMinY">NO</bool>
<bool key="NSAutorecalculatesContentBorderThicknessMaxY">NO</bool>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
<object class="NSUserDefaultsController" id="129918082">
<bool key="NSSharedInstance">YES</bool>
@@ -662,14 +663,6 @@
</object>
<int key="connectionID">38</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1005"/>
<reference key="destination" ref="1001"/>
</object>
<int key="connectionID">39</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">cancelButton:</string>
@@ -750,6 +743,70 @@
</object>
<int key="connectionID">101</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">setColorScheme:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="791166735"/>
</object>
<int key="connectionID">122</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">filterParameterChanged:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="256941151"/>
</object>
<int key="connectionID">124</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">filterParameterChanged:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="976679137"/>
</object>
<int key="connectionID">125</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">filterParameterChanged:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="623080652"/>
</object>
<int key="connectionID">126</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">filterParameterChanged:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="257625175"/>
</object>
<int key="connectionID">127</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">filterParameterChanged:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="1050894810"/>
</object>
<int key="connectionID">128</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">exampleView</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="1017736271"/>
</object>
<int key="connectionID">129</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1005"/>
<reference key="destination" ref="1001"/>
</object>
<int key="connectionID">39</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: effectsEnabled</string>
@@ -814,69 +871,15 @@
</object>
<int key="connectionID">119</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">setColorScheme:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="791166735"/>
</object>
<int key="connectionID">122</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">filterParameterChanged:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="256941151"/>
</object>
<int key="connectionID">124</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">filterParameterChanged:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="976679137"/>
</object>
<int key="connectionID">125</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">filterParameterChanged:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="623080652"/>
</object>
<int key="connectionID">126</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">filterParameterChanged:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="257625175"/>
</object>
<int key="connectionID">127</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">filterParameterChanged:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="1050894810"/>
</object>
<int key="connectionID">128</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">exampleView</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="1017736271"/>
</object>
<int key="connectionID">129</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<reference key="object" ref="0"/>
<object class="NSArray" key="object" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
@@ -1250,13 +1253,11 @@
<string>-1.IBPluginDependency</string>
<string>-2.IBPluginDependency</string>
<string>-3.IBPluginDependency</string>
<string>1.IBEditorWindowLastContentRect</string>
<string>1.IBPluginDependency</string>
<string>1.IBWindowTemplateEditedContentRect</string>
<string>1.NSWindowTemplate.visibleAtLaunch</string>
<string>1.WindowOrigin</string>
<string>1.editorWindowContentRectSynchronizationRect</string>
<string>10.IBPluginDependency</string>
<string>102.IBPluginDependency</string>
<string>123.IBPluginDependency</string>
<string>17.IBPluginDependency</string>
<string>18.IBPluginDependency</string>
@@ -1264,53 +1265,45 @@
<string>2.IBPluginDependency</string>
<string>20.IBPluginDependency</string>
<string>49.IBPluginDependency</string>
<string>49.IBViewBoundsToFrameTransform</string>
<string>50.IBPluginDependency</string>
<string>50.IBViewBoundsToFrameTransform</string>
<string>50.IBViewIntegration.shadowBlurRadius</string>
<string>50.IBViewIntegration.shadowColor</string>
<string>50.IBViewIntegration.shadowOffsetHeight</string>
<string>50.IBViewIntegration.shadowOffsetWidth</string>
<string>51.IBPluginDependency</string>
<string>52.IBPluginDependency</string>
<string>52.IBViewBoundsToFrameTransform</string>
<string>53.IBPluginDependency</string>
<string>53.IBViewBoundsToFrameTransform</string>
<string>54.IBPluginDependency</string>
<string>55.IBPluginDependency</string>
<string>55.IBViewBoundsToFrameTransform</string>
<string>56.IBPluginDependency</string>
<string>57.IBEditorWindowLastContentRect</string>
<string>57.IBPluginDependency</string>
<string>58.IBPluginDependency</string>
<string>59.IBPluginDependency</string>
<string>60.IBPluginDependency</string>
<string>62.IBPluginDependency</string>
<string>62.IBViewBoundsToFrameTransform</string>
<string>63.IBPluginDependency</string>
<string>68.IBPluginDependency</string>
<string>69.IBPluginDependency</string>
<string>70.IBPluginDependency</string>
<string>71.IBPluginDependency</string>
<string>72.IBPluginDependency</string>
<string>73.IBPluginDependency</string>
<string>76.IBPluginDependency</string>
<string>77.IBPluginDependency</string>
<string>78.IBPluginDependency</string>
<string>79.IBPluginDependency</string>
<string>80.IBPluginDependency</string>
<string>80.IBViewBoundsToFrameTransform</string>
<string>81.IBPluginDependency</string>
<string>82.IBPluginDependency</string>
<string>83.IBPluginDependency</string>
<string>84.IBPluginDependency</string>
<string>85.IBPluginDependency</string>
<string>86.IBPluginDependency</string>
<string>86.IBViewBoundsToFrameTransform</string>
<string>87.IBPluginDependency</string>
<string>88.IBPluginDependency</string>
<string>88.IBViewBoundsToFrameTransform</string>
<string>89.IBPluginDependency</string>
<string>9.IBPluginDependency</string>
<string>9.IBViewBoundsToFrameTransform</string>
<string>90.IBPluginDependency</string>
<string>90.IBViewBoundsToFrameTransform</string>
<string>90.IBViewIntegration.shadowBlurRadius</string>
<string>90.IBViewIntegration.shadowColor</string>
<string>90.IBViewIntegration.shadowOffsetHeight</string>
@@ -1322,12 +1315,9 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{107, 469}, {400, 200}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{107, 469}, {400, 200}}</string>
<boolean value="NO"/>
<string>{196, 240}</string>
<string>{{357, 418}, {480, 270}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1336,41 +1326,14 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">AULyAABCygAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABBuAAAwu4AAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<real value="0.0"/>
<reference ref="182967316"/>
<real value="0.0"/>
<real value="0.0"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABBuAAAwrYAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">AUL8AABCwAAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDjAAAwxoAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{217, 586}, {259, 63}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABB8AAAwswAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1379,32 +1342,30 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABBuAAAwrYAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABBuAAAwrYAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABBuAAAwrYAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABBiAAAwxYAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABBuAAAwu4AAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<real value="0.0"/>
<reference ref="182967316"/>
<real value="0.0"/>
@@ -1424,7 +1385,7 @@
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">129</int>
<int key="maxID">131</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -1591,10 +1552,6 @@
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
<integer value="1060" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<integer value="3000" key="NS.object.0"/>
+69 -352
View File
@@ -1,352 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1060</int>
<string key="IBDocument.SystemVersion">10J567</string>
<string key="IBDocument.InterfaceBuilderVersion">1278</string>
<string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">462.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">1278</string>
</object>
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSCustomView</string>
<string>NSWindowTemplate</string>
<string>NSView</string>
<string>NSCustomObject</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="dict.values" ref="0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
<string key="NSClassName">TermWindowController</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
</object>
<object class="NSCustomObject" id="1004">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSWindowTemplate" id="1005">
<int key="NSWindowStyleMask">271</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{158, 575}, {620, 444}}</string>
<int key="NSWTFlags">539492352</int>
<string key="NSWindowTitle">Two Term [VT52]</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
<string key="NSWindowContentMinSize">{620, 444}</string>
<object class="NSView" key="NSWindowView" id="1006">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomView" id="1067446494">
<reference key="NSNextResponder" ref="1006"/>
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomView" id="59249513">
<reference key="NSNextResponder" ref="1067446494"/>
<int key="NSvFlags">274</int>
<string key="NSFrame">{{10, 10}, {560, 384}}</string>
<reference key="NSSuperview" ref="1067446494"/>
<reference key="NSWindow"/>
<string key="NSClassName">EmulatorView</string>
</object>
</object>
<string key="NSFrame">{{20, 20}, {580, 404}}</string>
<reference key="NSSuperview" ref="1006"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="59249513"/>
<string key="NSClassName">CurveView</string>
</object>
</object>
<string key="NSFrame">{{7, 11}, {620, 444}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1067446494"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
<string key="NSMinSize">{620, 466}</string>
<string key="NSMaxSize">{1e+13, 1e+13}</string>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="1005"/>
</object>
<int key="connectionID">3</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1005"/>
<reference key="destination" ref="1001"/>
</object>
<int key="connectionID">4</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">displayPatternTitle1: emulator.name</string>
<reference key="source" ref="1005"/>
<reference key="destination" ref="1001"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="1005"/>
<reference key="NSDestination" ref="1001"/>
<string key="NSLabel">displayPatternTitle1: emulator.name</string>
<string key="NSBinding">displayPatternTitle1</string>
<string key="NSKeyPath">emulator.name</string>
<object class="NSDictionary" key="NSOptions">
<string key="NS.key.0">NSDisplayPattern</string>
<string key="NS.object.0">Two Term [%{title1}@]</string>
</object>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">12</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">curveView</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="1067446494"/>
</object>
<int key="connectionID">13</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">emulatorView</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="59249513"/>
</object>
<int key="connectionID">14</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<reference key="object" ref="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="1001"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="1003"/>
<reference key="parent" ref="0"/>
<string key="objectName">First Responder</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-3</int>
<reference key="object" ref="1004"/>
<reference key="parent" ref="0"/>
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">1</int>
<reference key="object" ref="1005"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1006"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">2</int>
<reference key="object" ref="1006"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1067446494"/>
</object>
<reference key="parent" ref="1005"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="1067446494"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="59249513"/>
</object>
<reference key="parent" ref="1006"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">5</int>
<reference key="object" ref="59249513"/>
<reference key="parent" ref="1067446494"/>
<string key="objectName">Emulator View</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>1.IBEditorWindowLastContentRect</string>
<string>1.IBPluginDependency</string>
<string>1.IBWindowTemplateEditedContentRect</string>
<string>1.NSWindowTemplate.visibleAtLaunch</string>
<string>1.WindowOrigin</string>
<string>1.editorWindowContentRectSynchronizationRect</string>
<string>2.IBPluginDependency</string>
<string>5.IBPluginDependency</string>
<string>9.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{{428, 414}, {620, 444}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{428, 414}, {620, 444}}</string>
<boolean value="NO"/>
<string>{196, 240}</string>
<string>{{202, 428}, {480, 270}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<reference key="dict.values" ref="0"/>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">14</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">CurveView</string>
<string key="superclassName">NSView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/CurveView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">EmulatorView</string>
<string key="superclassName">NSView</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>copy:</string>
<string>paste:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>copy:</string>
<string>paste:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">copy:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">paste:</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/EmulatorView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">TermWindowController</string>
<string key="superclassName">NSWindowController</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>curveView</string>
<string>emulatorView</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>CurveView</string>
<string>EmulatorView</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>curveView</string>
<string>emulatorView</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">curveView</string>
<string key="candidateClassName">CurveView</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">emulatorView</string>
<string key="candidateClassName">EmulatorView</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/TermWindowController.h</string>
</object>
</object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
<integer value="1060" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<integer value="3000" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
</data>
</archive>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="TermWindowController">
<connections>
<outlet property="curveView" destination="9" id="13"/>
<outlet property="emulatorView" destination="5" id="14"/>
<outlet property="window" destination="1" id="3"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<window title="Two Term [VT52]" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" visibleAtLaunch="NO" animationBehavior="default" id="1" customClass="EmulatorWindow">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" texturedBackground="YES" fullSizeContentView="YES"/>
<windowCollectionBehavior key="collectionBehavior" fullScreenPrimary="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" topStrut="YES"/>
<rect key="contentRect" x="158" y="575" width="600" height="424"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1178"/>
<value key="minSize" type="size" width="600" height="424"/>
<view key="contentView" id="2" customClass="TermContentView">
<rect key="frame" x="0.0" y="0.0" width="600" height="424"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<customView id="9" customClass="ColorView">
<rect key="frame" x="0.0" y="0.0" width="600" height="424"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<customView id="5" userLabel="Emulator View" customClass="EmulatorView">
<rect key="frame" x="10" y="10" width="580" height="404"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</customView>
</subviews>
</customView>
</subviews>
</view>
<connections>
<binding destination="-2" name="displayPatternTitle1" keyPath="emulator.name" id="12">
<dictionary key="options">
<string key="NSDisplayPattern">Two Term [%{title1}@]</string>
</dictionary>
</binding>
<outlet property="delegate" destination="-2" id="4"/>
<outlet property="titleBarView" destination="28" id="29"/>
</connections>
</window>
<customView id="28" customClass="TitleBarView">
<rect key="frame" x="0.0" y="0.0" width="400" height="24"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField focusRingType="none" verticalHuggingPriority="750" id="30">
<rect key="frame" x="75" y="2" width="250" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" allowsUndo="NO" sendsActionOnEndEditing="YES" focusRingType="none" alignment="center" title="Label" id="31">
<font key="font" metaFont="systemBold"/>
<color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<connections>
<outlet property="label" destination="30" id="33"/>
</connections>
</customView>
</objects>
</document>
+257
View File
@@ -0,0 +1,257 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1070</int>
<string key="IBDocument.SystemVersion">11C74</string>
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
<string key="IBDocument.AppKitVersion">1138.23</string>
<string key="IBDocument.HIToolboxVersion">567.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">1938</string>
</object>
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSCustomView</string>
<string>NSTextField</string>
<string>NSTextFieldCell</string>
<string>NSCustomObject</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
<string key="NSClassName">TermContentView</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
</object>
<object class="NSCustomObject" id="1004">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSCustomView" id="564603994">
<reference key="NSNextResponder"/>
<int key="NSvFlags">4362</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTextField" id="700799747">
<reference key="NSNextResponder" ref="564603994"/>
<int key="NSvFlags">298</int>
<string key="NSFrame">{{150, 3}, {300, 17}}</string>
<reference key="NSSuperview" ref="564603994"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:3944</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="800040525">
<int key="NSCellFlags">67239488</int>
<int key="NSCellFlags2">138418176</int>
<string key="NSContents">Label</string>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande-Bold</string>
<double key="NSSize">13</double>
<int key="NSfFlags">2072</int>
</object>
<string key="NSCellIdentifier">_NS:3944</string>
<reference key="NSControlView" ref="700799747"/>
<object class="NSColor" key="NSBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
</object>
<object class="NSColor" key="NSTextColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">textColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
</object>
</object>
<string key="NSFrameSize">{600, 24}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="700799747"/>
<string key="NSReuseIdentifierKey">_NS:1192</string>
<string key="NSClassName">TitleBarView</string>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">titleBar</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="564603994"/>
</object>
<int key="connectionID">6</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">label</string>
<reference key="source" ref="564603994"/>
<reference key="destination" ref="700799747"/>
</object>
<int key="connectionID">5</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<object class="NSArray" key="object" id="1002">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="1001"/>
<reference key="parent" ref="1002"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="1003"/>
<reference key="parent" ref="1002"/>
<string key="objectName">First Responder</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-3</int>
<reference key="object" ref="1004"/>
<reference key="parent" ref="1002"/>
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">2</int>
<reference key="object" ref="564603994"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="700799747"/>
</object>
<reference key="parent" ref="1002"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="700799747"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="800040525"/>
</object>
<reference key="parent" ref="564603994"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="800040525"/>
<reference key="parent" ref="700799747"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.IBPluginDependency</string>
<string>-2.IBPluginDependency</string>
<string>-3.IBPluginDependency</string>
<string>2.IBPluginDependency</string>
<string>3.IBPluginDependency</string>
<string>4.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="1002"/>
<reference key="dict.values" ref="1002"/>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="1002"/>
<reference key="dict.values" ref="1002"/>
</object>
<nil key="sourceID"/>
<int key="maxID">6</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">CurveView</string>
<string key="superclassName">NSView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/CurveView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">TermContentView</string>
<string key="superclassName">CurveView</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">titleBar</string>
<string key="NS.object.0">TitleBarView</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">titleBar</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">titleBar</string>
<string key="candidateClassName">TitleBarView</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/TermContentView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">TitleBarView</string>
<string key="superclassName">NSView</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">label</string>
<string key="NS.object.0">NSTextField</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">label</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">label</string>
<string key="candidateClassName">NSTextField</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/TitleBarView.h</string>
</object>
</object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<integer value="3000" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
</data>
</archive>
+1 -1
View File
@@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.ksherlock.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
+23 -3
View File
@@ -31,6 +31,7 @@
enum {
kCustom = 0,
kGreenBlack,
kBlueBlack,
kWhiteBlue,
kAmberBlack
};
@@ -65,8 +66,15 @@ enum {
- (void)windowDidLoad {
NSWindow *window;
[super windowDidLoad];
window = [self window];
//[window setAutorecalculatesContentBorderThickness: NO forEdge: NSMinYEdge];
//[window setAutorecalculatesContentBorderThickness: NO forEdge: NSMaxYEdge];
[self setEffectsEnabled: YES];
@@ -87,6 +95,12 @@ enum {
[item setTitle: @"Green Black"];
[item setTag: kGreenBlack];
[menu addItem: item];
item = [[NSMenuItem new] autorelease];
[item setTitle: @"Blue Black"];
[item setTag: kBlueBlack];
[menu addItem: item];
item = [[NSMenuItem new] autorelease];
[item setTitle: @"White Blue"];
@@ -119,9 +133,9 @@ enum {
{
NSMenuItem *item = [_terminalTypeButton selectedItem];
unsigned tag = [item tag];
NSUInteger tag = [item tag];
Class klass = [EmulatorManager emulatorForTag: tag];
Class klass = [EmulatorManager emulatorForTag: (unsigned)tag];
if (klass)
{
@@ -160,7 +174,13 @@ enum {
[_foregroundColorControl setColor: [NSColor greenColor]];
[_backgroundColorControl setColor: [NSColor blackColor]];
break;
case kBlueBlack:
[_foregroundColorControl setColor: [NSColor colorWithCalibratedRed:0.0 green: 0.5 blue: 1.0 alpha: 1.0]];
[_backgroundColorControl setColor: [NSColor blackColor]];
break;
case kWhiteBlue:
[_foregroundColorControl setColor: [NSColor whiteColor]];
[_backgroundColorControl setColor: [NSColor blueColor]];
+6
View File
@@ -30,6 +30,12 @@
int _child;
int _fd;
pid_t _pid;
dispatch_source_t _read_source;
dispatch_source_t _wait_source;
}
@property (nonatomic, retain) NSDictionary *parameters;
+169 -31
View File
@@ -10,9 +10,6 @@
#import "EmulatorView.h"
#import "CurveView.h"
#import "ChildMonitor.h"
#import "VT52.h"
#import "PTSE.h"
@@ -70,11 +67,8 @@
-(void)initPTY
{
int pid;
int fd;
struct termios term;
struct winsize ws = [_emulator defaultSize];
//int flags;
memset(&term, 0, sizeof(term));
@@ -95,16 +89,16 @@
[_emulator initTerm: &term];
pid = forkpty(&fd, NULL, &term, &ws);
_pid = forkpty(&_fd, NULL, &term, &ws);
if (pid < 0)
if (_pid < 0)
{
fprintf(stderr, "forkpty failed\n");
fflush(stderr);
return;
}
if (pid == 0)
if (_pid == 0)
{
std::vector<const char *> environ;
@@ -153,18 +147,16 @@
// child
}
/*
if (fcntl(fd, F_GETFL, &flags) < 0) flags = 0;
fcntl(fd, F_SETFL, flags | O_NONBLOCK);
*/
[_emulatorView resizeTo: iSize(ws.ws_col, ws.ws_row) animated: NO];
NSWindow *window = [self window];
if (![_emulator resizable])
{
NSWindow *window = [self window];
NSUInteger mask = [window styleMask];
@@ -172,24 +164,108 @@
[window setStyleMask: mask & ~NSResizableWindowMask];
}
[window setMinSize: [window frame].size];
[_emulatorView setFd: _fd];
[self monitor];
/*
if (!_childMonitor)
{
_childMonitor = [ChildMonitor new];
[_childMonitor setDelegate: _emulatorView];
}
[_childMonitor setChildPID: pid];
[_childMonitor setFd: fd];
_child = pid;
[_emulatorView setFd: fd];
//[_emulatorView startBackgroundReader];
[_childMonitor start];
*/
}
-(void)monitor {
int fd = _fd;
int pid = _pid;
int flags;
// non-blocking io.
if (fcntl(_fd, F_GETFL, &flags) < 0) flags = 0;
fcntl(_fd, F_SETFL, flags | O_NONBLOCK);
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
_wait_source = dispatch_source_create(DISPATCH_SOURCE_TYPE_PROC,
pid, DISPATCH_PROC_EXIT, queue);
if (_wait_source)
{
dispatch_source_set_event_handler(_wait_source, ^{
int status = 0;
waitpid(pid, &status, WNOHANG);
_pid = 0;
//dispatch_async(dispatch_get_main_queue(), ^(){
[_emulatorView childFinished: status];
//});
dispatch_source_cancel(_wait_source);
dispatch_release(_wait_source);
_wait_source = nullptr;
});
dispatch_resume(_wait_source);
}
_read_source = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ,
fd, 0, queue);
if (_read_source)
{
// Install the event handler
dispatch_source_set_event_handler(_read_source, ^{
static uint8_t sbuffer[1024];
size_t estimated = dispatch_source_get_data(_read_source) + 1;
uint8_t *buffer = estimated > sizeof(sbuffer) ? (uint8_t *)malloc(estimated) : sbuffer;
if (buffer)
{
ssize_t actual;
for (;;) {
actual = read(fd, buffer, (estimated));
if (actual < 0) {
if (errno == EINTR || errno == EAGAIN) return;
NSLog(@"read: %s", strerror(errno));
dispatch_source_cancel(_read_source);
dispatch_release(_read_source);
_read_source = nullptr;
}
break;
}
if (actual > 0) [_emulatorView processData: buffer size: actual];
if (buffer != sbuffer) free(buffer);
if (actual == 0 && _pid == 0) {
dispatch_source_cancel(_read_source);
dispatch_release(_read_source);
_read_source = nullptr;
}
}
});
dispatch_source_set_cancel_handler(_read_source, ^{
_fd = -1;
[_emulatorView setFd: -1];
close(fd);
});
dispatch_resume(_read_source);
}
}
#pragma mark -
#pragma mark NSWindowDelegate
@@ -209,8 +285,12 @@
window = [self window];
// resize in 2.0 he ight increments to prevent jittering the scan lines.
[window setResizeIncrements: NSMakeSize(1.0, 2.0)];
//[(CurveView *)[window contentView] setColor: [NSColor clearColor]];
//[window setContentView: _curveView];
// resize in 2.0 height increments to prevent jittering the scan lines.
//[window setResizeIncrements: NSMakeSize(1.0, 2.0)];
klass = [_parameters objectForKey: kClass];
@@ -233,6 +313,7 @@
_emulator = [klass new];
[self didChangeValueForKey: @"emulator"];
[window setBackgroundColor: backgroundColor];
[_emulatorView setEmulator: _emulator];
[_emulatorView setForegroundColor: foregroundColor];
@@ -244,24 +325,81 @@
o = [_parameters objectForKey: kContentFilters];
if (o)
{
//CALayer *layer;
[_curveView setWantsLayer: YES];
/*
CGColorRef color;
color = CGColorCreateGenericRGB(1.0, 0.0, 0.0, 1.0);
layer = [_curveView layer];
[layer setCornerRadius: 20.0];
[layer setBorderWidth: 4.0];
[layer setBorderColor: color];
[layer setBackgroundColor: color];
[layer setBackgroundFilters: (NSArray *)o];
CGColorRelease(color);
*/
[_curveView setContentFilters: (NSArray *)o];
/*
CALayer *layer;
CGColorRef color;
color = CGColorCreateGenericRGB(1.0, 0.0, 0.0, 1.0);
layer = [CALayer layer];
[layer setFrame: CGRectMake(100, 100, 100, 100)];
[layer setBackgroundColor: color];
[layer setBackgroundFilters: nil];
CGColorRelease(color);
[[_curveView layer] addSublayer: layer];
NSLog(@"%@", [layer backgroundFilters]);
NSLog(@"%@", [[_curveView layer] backgroundFilters]);
*/
}
/*
NSShadow *shadow;
shadow = [[NSShadow alloc] init];
[shadow setShadowColor:[NSColor blackColor]];
[shadow setShadowOffset: NSZeroSize];
[shadow setShadowBlurRadius: 10.0];
[_curveView setShadow: shadow];
[shadow release];
*/
//[_curveView initScanLines];
//[_curveView setColor: [NSColor blueColor]];
[self initPTY];
[window setMinSize: [window frame].size];
}
-(void)windowWillClose:(NSNotification *)notification
{
[_childMonitor setDelegate: nil];
[_childMonitor cancel];
if (_wait_source) {
dispatch_source_cancel(_wait_source);
dispatch_release(_wait_source);
}
if (_read_source) {
dispatch_source_cancel(_read_source);
dispatch_release(_read_source);
}
if (_pid) kill(_pid, 9);
[self autorelease];
}
@end
+18
View File
@@ -0,0 +1,18 @@
//
// ColorView.h
// 2Term
//
// Created by Kelvin Sherlock on 12/20/2011.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface ColorView : NSView
{
NSColor *_color;
}
@property (nonatomic, retain) NSColor *color;
@end
+35
View File
@@ -0,0 +1,35 @@
//
// ColorView.m
// 2Term
//
// Created by Kelvin Sherlock on 12/20/2011.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "ColorView.h"
@implementation ColorView
@synthesize color = _color;
- (void)drawRect:(NSRect)dirtyRect
{
[_color setFill];
NSRectFill(dirtyRect);
}
-(void)setColor:(NSColor *)color
{
if (_color == color) return;
[_color release];
_color = [color retain];
[self setNeedsDisplay: YES];
}
-(void)dealloc
{
[_color release];
[super dealloc];
}
@end
+36 -5
View File
@@ -26,16 +26,27 @@
_color = [[NSColor blackColor] retain];
}
/*
-(BOOL)acceptsFirstMouse:(NSEvent *)theEvent
{
return YES;
}
*/
#define curveSize 4
#define curveSize 5
- (void)drawRect:(NSRect)dirtyRect {
NSGraphicsContext *nsgc = [NSGraphicsContext currentContext];
CGContextRef ctx = [nsgc graphicsPort];
//NSGraphicsContext *nsgc = [NSGraphicsContext currentContext];
//CGContextRef ctx = [nsgc graphicsPort];
NSRect bounds = [self bounds];
//[super drawRect: dirtyRect];
#if 0
[[NSColor clearColor] setFill];
NSRectFill(dirtyRect);
[_color setFill];
@@ -58,6 +69,25 @@
CGContextAddQuadCurveToPoint(ctx, 0, 0, 0, curveSize);
CGContextFillPath(ctx);
#else
NSBezierPath *path;
[[NSColor clearColor] set];
NSRectFill(dirtyRect);
path = [NSBezierPath bezierPathWithRoundedRect:bounds xRadius: curveSize yRadius: curveSize];
[path addClip];
//path = [NSBezierPath bezierPathWithRect: dirtyRect];
//[path addClip];
[_color set];
NSRectFill(dirtyRect);
#endif
}
@@ -72,5 +102,6 @@
-(void)dealloc
{
[_color release];
[super dealloc];
}
@end
+4 -9
View File
@@ -9,7 +9,6 @@
#import <Cocoa/Cocoa.h>
#include "Emulator.h"
#include "ChildMonitor.h"
#include "iGeometry.h"
@@ -47,9 +46,7 @@ private:
int _fd;
NSObject<Emulator> *_emulator;
NSThread *_readerThread;
CharacterGenerator *_charGen;
NSColor *_backgroundColor;
@@ -82,7 +79,7 @@ private:
}
@property (nonatomic, assign) BOOL scanLines;
@property (nonatomic, assign) int fd;
@property (atomic, assign) int fd;
@property (nonatomic, assign) unsigned cursorType;
@property (nonatomic, retain) NSColor *foregroundColor;
@@ -91,7 +88,6 @@ private:
//@property (nonatomic, assign) iPoint cursor;
-(void)startBackgroundReader;
-(void)dataAvailable;
-(void)invalidateIRect: (iRect)rect;
@@ -106,12 +102,11 @@ private:
-(IBAction)copy: (id)sender;
-(void)processData: (const uint8_t *)data size: (size_t)size;
-(void)childFinished: (int)status;
@end
@interface EmulatorView (ChildMonitor) <ChildMonitorDelegate>
@end
@interface EmulatorView (Cursor)
+164 -56
View File
@@ -36,7 +36,7 @@
_cursorOn = NO;
_cursorTimer = [[NSTimer alloc] initWithFireDate: [NSDate date]
interval: 0.5
interval: 0.5
target: self
selector: @selector(cursorTimer:)
userInfo: nil
@@ -133,6 +133,10 @@
#pragma mark -
#pragma mark properties
-(int)fd {
return _fd;
}
-(void)setFd: (int)fd
{
_fd = fd;
@@ -149,7 +153,7 @@
_charHeight = 16;
_paddingLeft = 8;
_paddingTop = 8;
_paddingTop = 24;
//_foregroundColor = [[NSColor greenColor] retain];
@@ -166,7 +170,7 @@
_charGen = [[CharacterGenerator generator] retain];
_cursorImg = [[_charGen imageForCharacter: '_'] retain];
_cursorType = Screen::CursorTypeUnderscore;
size = [_charGen characterSize];
_charWidth = size.width;
@@ -238,7 +242,7 @@
}
else
{
[self setContentFilters: nil];
[self setContentFilters: @[]];
}
}
@@ -253,14 +257,13 @@
[self becomeFirstResponder];
[self startCursorTimer];
_cursorTimer = [[NSTimer scheduledTimerWithTimeInterval: .5
target: self
selector: @selector(cursorTimer:)
userInfo: nil
repeats: YES] retain];
/*
[[self window] display];
[[self window] setHasShadow: NO];
[[self window] setHasShadow: YES];
*/
}
-(void)viewDidMoveToSuperview
@@ -275,13 +278,14 @@
-(void)drawRect:(NSRect)dirtyRect
{
//NSLog(@"drawRect:");
//NSRect bounds = [self bounds];
NSRect screenRect = dirtyRect;
unsigned x, y;
NSColor *currentFront;
NSColor *currentBack;
@@ -317,8 +321,8 @@
[_foregroundColor setFill];
currentFront = _foregroundColor;
currentBack = _backgroundColor;
//currentFront = _foregroundColor;
//currentBack = _backgroundColor;
_screen.lock();
@@ -438,7 +442,6 @@
[_foregroundColor release];
[_backgroundColor release];
[_readerThread release];
[_emulator release];
[_cursorImg release];
@@ -448,9 +451,13 @@
-(void)keyDown:(NSEvent *)theEvent
{
//NSLog(@"keyDown:");
if (_fd < 0) return;
OutputChannel channel(_fd);
iRect updateRect; // should be nil but whatever...
// todo -- after _fd closes, need to block further activity.
[NSCursor setHiddenUntilMouseMoves: YES];
@@ -468,9 +475,11 @@
-(void)autoTypeText:(NSString *)text
{
if (_fd < 0) return;
NSData *data = [text dataUsingEncoding: NSASCIIStringEncoding allowLossyConversion: YES];
unsigned length = [data length];
NSUInteger length = [data length];
OutputChannel channel(_fd);
@@ -483,52 +492,83 @@
}
-(void)startBackgroundReader
{
return;
-(void)childFinished:(int)status {
// called from other thread.
NSLog(@"[process complete]");
dispatch_async(dispatch_get_main_queue(), ^(){
iRect updateRect;
[self setCursorType: Screen::CursorTypeNone];
//[self stopCursorTimer];
//_screen.setCursorType(Screen::CursorTypeNone);
_screen.beginUpdate();
_screen.setX(0);
_screen.incrementY();
for (const char *cp = "[Process completed]"; *cp; ++cp)
{
_screen.putc(*cp);
}
updateRect = _screen.endUpdate();
[self invalidateIRect: updateRect];
//[_emulator writeLine: @"[Process completed]"];
});
if (_readerThread) return;
_readerThread = [[NSThread alloc] initWithTarget: self selector: @selector(_readerThread) object: nil];
[_readerThread start];
}
-(void)_readerThread
{
// I would prefer to poll(2) but it's broken on os x for ptys.
int fd = _fd;
-(void)processData:(const uint8_t *)buffer size:(size_t)size {
typedef void (*ProcessCharFX)(id, SEL, uint8_t, Screen *, OutputChannel *);
for(;;)
ProcessCharFX fx;
SEL cmd;
OutputChannel channel(_fd);
iRect updateRect;
cmd = @selector(processCharacter: screen: output:);
fx = (ProcessCharFX)[_emulator methodForSelector: cmd];
NSAutoreleasePool *pool;
pool = [NSAutoreleasePool new];
_screen.beginUpdate();
for (unsigned i = 0; i < size; ++i)
{
int n;
fd_set read_set;
fd_set error_set;
FD_ZERO(&read_set);
FD_SET(fd, &read_set);
FD_ZERO(&error_set);
FD_SET(fd, &error_set);
n = select(fd + 1, &read_set, NULL, &error_set, NULL);
if (n == 0) continue;
if (n < 0) break;
if (FD_ISSET(fd, &error_set)) break;
if (FD_ISSET(fd, &read_set)) [self dataAvailable];
fx(_emulator,cmd, buffer[i], &_screen, &channel);
}
updateRect = _screen.endUpdate();
dispatch_async(dispatch_get_main_queue(), ^(){
[self invalidateIRect: updateRect];
});
[pool release];
}
-(void)dataAvailable
{
//NSLog(@"data available");
typedef void (*ProcessCharFX)(id, SEL, uint8_t, Screen *, OutputChannel *);
ProcessCharFX fx;
@@ -546,11 +586,13 @@
ssize_t size;
// this should be a non-blocking read.
size = read(_fd, buffer, sizeof(buffer));
if (size == 0) break;
if (size < 0)
{
if (errno == EAGAIN) break; // non-blocking, no data available.
if (errno == EINTR || errno == EAGAIN) continue;
perror("[EmulatorView dataAvailable]");
@@ -574,15 +616,22 @@
updateRect = _screen.endUpdate();
[self invalidateIRect: updateRect];
dispatch_async(dispatch_get_main_queue(), ^(){
[self invalidateIRect: updateRect];
});
[pool release];
}
}
// should be done in the main thread.
-(void)invalidateIRect: (iRect)updateRect
{
//NSLog(@"invalidateIRect");
NSRect rect;
if (updateRect.size.width <= 0 || updateRect.size.height <= 0) return;
@@ -600,7 +649,19 @@
rect.origin.x += _paddingLeft;
rect.origin.y += _paddingTop;
[self setNeedsDisplayInRect: rect];
/*
dispatch_async(dispatch_get_main_queue(), ^(){
[self setNeedsDisplayInRect: rect];
//[self display];
});
*/
[self setNeedsDisplayInRect: rect];
//[self display];
}
@@ -698,21 +759,33 @@
#pragma mark -
#pragma mark IBActions
-(BOOL)validateUserInterfaceItem: (id <NSValidatedUserInterfaceItem>)anItem {
SEL cmd = [anItem action];
if (cmd == @selector(paste:)) {
return _fd >= 1;
}
if (cmd == @selector(copy:)) return NO;
return NO;
//return [super validateUserInterfaceItem: anItem];
}
//-(BOOL)validateUserInterfaceItem:
-(IBAction)paste: (id)sender
{
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
NSArray *classArray = [NSArray arrayWithObject:[NSString class]];
NSDictionary *options = [NSDictionary dictionary];
if (_fd < 0) return;
BOOL ok = [pasteboard canReadObjectForClasses:classArray options:options];
if (ok)
{
NSArray *objectsToPaste = [pasteboard readObjectsForClasses:classArray options:options];
NSString *string = [objectsToPaste objectAtIndex: 0];
NSLog(@"%@", objectsToPaste);
//NSLog(@"%@", objectsToPaste);
[self autoTypeText: string];
@@ -754,6 +827,8 @@
pboard = [sender draggingPasteboard];
if (_fd < 0) return NO;
types = [pboard types];
@@ -809,6 +884,7 @@
@end
#if 0
@implementation EmulatorView (ChildMonitor)
-(void)childDataAvailable: (ChildMonitor *)monitor
@@ -819,12 +895,44 @@
-(void)childFinished: (ChildMonitor *)monitor
{
// called from other thread.
NSLog(@"[process complete]");
// writeline "[process complete]"
dispatch_async(dispatch_get_main_queue(), ^(){
iRect updateRect;
[self setCursorType: Screen::CursorTypeNone];
//[self stopCursorTimer];
//_screen.setCursorType(Screen::CursorTypeNone);
_screen.beginUpdate();
_screen.setX(0);
_screen.incrementY();
for (const char *cp = "[Process completed]"; *cp; ++cp)
{
_screen.putc(*cp);
}
updateRect = _screen.endUpdate();
[self invalidateIRect: updateRect];
//[_emulator writeLine: @"[Process completed]"];
});
}
@end
#endif
void ViewScreen::setSize(unsigned width, unsigned height)
+23
View File
@@ -0,0 +1,23 @@
//
// EmulatorWindow.h
// 2Term
//
// Created by Kelvin Sherlock on 11/25/2011.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <AppKit/AppKit.h>
@class TitleBarView;
@interface EmulatorWindow : NSWindow
{
TitleBarView *_titleBarView;
}
@property (nonatomic, retain) IBOutlet TitleBarView *titleBarView;
-(void)adjustTitleBar;
-(void)setTitleTextColor: (NSColor *)color;
@end
+163
View File
@@ -0,0 +1,163 @@
//
// EmulatorWindow.m
// 2Term
//
// Created by Kelvin Sherlock on 11/25/2011.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "EmulatorWindow.h"
#import "TitleBarView.h"
@implementation EmulatorWindow
@synthesize titleBarView = _titleBarView;
-(id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)styleMask
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag
{
if ((self = [super initWithContentRect: contentRect
styleMask: styleMask
backing: bufferingType
defer: flag]))
{
[self setOpaque: NO];
[self setAlphaValue: 1.0];
[self setTitleVisibility: NSWindowTitleVisible];
// resize in 2.0 height increments to prevent jittering the scan lines.
[self setResizeIncrements: NSMakeSize(1.0, 2.0)];
[self setMovableByWindowBackground: YES];
//[self setBackgroundColor: [NSColor clearColor]];
//[self setHasShadow: NO];
//[self setHasShadow: YES];
}
return self;
}
-(id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)styleMask
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag
screen:(NSScreen *)screen
{
if ((self = [super initWithContentRect: contentRect
styleMask: styleMask
backing: bufferingType
defer: flag
screen: screen]))
{
[self setTitleVisibility: NSWindowTitleVisible];
[self setOpaque: NO];
[self setAlphaValue: 1.0];
[self setResizeIncrements: NSMakeSize(1.0, 2.0)];
[self setMovableByWindowBackground: YES];
//[self setBackgroundColor: [NSColor clearColor]];
//[self setHasShadow: NO];
//[self setHasShadow: YES];
}
return self;
}
-(void)dealloc
{
[_titleBarView release];
[super dealloc];
}
-(void)setTitle:(NSString *)aString
{
[super setTitle: aString];
[_titleBarView setTitle: aString];
}
-(void)setTitleTextColor: (NSColor *)color
{
[_titleBarView setTextColor: color];
}
-(void)setBackgroundColor:(NSColor *)color
{
//NSLog(@"%@", color);
[super setBackgroundColor: color];
[_titleBarView setBackgroundColor: color];
[_titleBarView setTextColor: [NSColor greenColor]];
}
-(void)awakeFromNib
{
//[self adjustTitleBar];
[self setAppearance: [NSAppearance appearanceNamed: NSAppearanceNameVibrantDark]];
[self setTitleVisibility: NSWindowTitleVisible];
[self setTitlebarAppearsTransparent: YES];
//[NSApp addWindowsItem: self title: @"Window Title" filename: NO];
//[self setHasShadow: YES];
}
/*
-(BOOL)canBecomeKeyWindow {
return YES;
}
-(BOOL)canBecomeMainWindow {
return YES;
}
-(BOOL)isExcludedFromWindowsMenu {
return NO;
}
*/
-(void)adjustTitleBar
{
NSView *themeView;
NSArray *array;
themeView = [[self contentView] superview];
NSLog(@"%@", themeView);
NSLog(@"%u", (int)[_titleBarView retainCount]);
[_titleBarView setBackgroundColor: [NSColor blackColor]];
[_titleBarView setFrame: [themeView bounds]];
[_titleBarView setTitle: [self title]];
NSLog(@"%@", [self title]);
array = [themeView subviews];
NSLog(@"%@", array);
[themeView addSubview: _titleBarView
positioned: NSWindowBelow
relativeTo: [array objectAtIndex: 0]];
array = [themeView subviews];
NSLog(@"%@", array);
}
@end
+21
View File
@@ -0,0 +1,21 @@
//
// TermContentView.h
// 2Term
//
// Created by Kelvin Sherlock on 11/26/2011.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "CurveView.h"
@class TitleBarView;
@interface TermContentView : CurveView
{
NSTrackingArea *_trackingArea;
TitleBarView *_titleBar;
}
@property (nonatomic, assign) IBOutlet TitleBarView *titleBar;
@end
+84
View File
@@ -0,0 +1,84 @@
//
// TermContentView.m
// 2Term
//
// Created by Kelvin Sherlock on 11/26/2011.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "TermContentView.h"
#import "TitleBarView.h"
@implementation TermContentView
@synthesize titleBar = _titleBar;
-(void)createTrackingArea
{
return;
#if 0
NSRect rect;
NSRect bounds;
if (_trackingArea)
{
[self removeTrackingArea: _trackingArea];
[_trackingArea release];
_trackingArea = nil;
}
bounds = [self bounds];
rect = NSMakeRect(0, bounds.size.height - 24, bounds.size.width, 24);
_trackingArea = [[NSTrackingArea alloc] initWithRect: rect
options: NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways
owner: self
userInfo:nil];
[self addTrackingArea: _trackingArea];
#endif
}
-(void)awakeFromNib
{
[super awakeFromNib];
[self createTrackingArea];
}
-(void)updateTrackingAreas
{
[self createTrackingArea];
}
-(void)dealloc
{
[_trackingArea release];
[_titleBar release];
[super dealloc];
}
/*
-(void)mouseEntered:(NSEvent *)theEvent
{
//NSLog(@"%s", sel_getName(_cmd));
[_titleBar fadeIn];
// animate title bar in.
}
-(void)mouseExited:(NSEvent *)theEvent
{
//NSLog(@"%s", sel_getName(_cmd));
[_titleBar fadeOut];
// animate title bar out.
}
*/
@end
+32
View File
@@ -0,0 +1,32 @@
//
// TitleBarView.h
// 2Term
//
// Created by Kelvin Sherlock on 11/26/2011.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <AppKit/AppKit.h>
@interface TitleBarView : NSView
{
NSColor *_backgroundColor;
NSColor *_textColor;
NSTextField *_label;
NSImage *_rightImage;
NSImage *_leftImage;
NSImage *_centerImage;
BOOL _dark;
}
@property (nonatomic, retain) NSColor *backgroundColor;
@property (nonatomic, retain) NSColor *textColor;
@property (nonatomic, retain) IBOutlet NSTextField *label;
@property (nonatomic, retain) NSString *title;
-(void)updateTitle;
-(void)fadeIn;
-(void)fadeOut;
@end
+260
View File
@@ -0,0 +1,260 @@
//
// TitleBarView.m
// 2Term
//
// Created by Kelvin Sherlock on 11/26/2011.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "TitleBarView.h"
#import <QuartzCore/QuartzCore.h>
@implementation TitleBarView
@synthesize label = _label;
@synthesize backgroundColor = _backgroundColor;
@synthesize textColor = _textColor;
-(id)initWithFrame:(NSRect)frameRect
{
if ((self = [super initWithFrame: frameRect]))
{
[self setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
[self awakeFromNib];
}
return self;
}
-(void)awakeFromNib
{
_leftImage = [[NSImage imageNamed: @"titlebar-left"] retain];
_rightImage = [[NSImage imageNamed: @"titlebar-right"] retain];
_centerImage = [[NSImage imageNamed: @"titlebar-center"] retain];
[_label setStringValue: @""];
[_label setBackgroundColor: [NSColor clearColor]];
[_label setTextColor: [NSColor whiteColor]];
}
-(void)dealloc
{
[_backgroundColor release];
[_textColor release];
[_leftImage release];
[_rightImage release];
[_centerImage release];
[_label release];
[super dealloc];
}
-(void)setBackgroundColor:(NSColor *)backgroundColor
{
NSColor *tmp;
if (_backgroundColor == backgroundColor) return;
[_backgroundColor release];
_backgroundColor = [backgroundColor retain];
_dark = YES;
tmp = [_backgroundColor colorUsingColorSpaceName: NSCalibratedWhiteColorSpace];
if (tmp)
{
if ([tmp whiteComponent] > 0.5) _dark = NO;
}
[self updateTitle];
}
-(void)setTextColor: (NSColor *)textColor
{
if (_textColor == textColor) return;
[_textColor release];
_textColor = [textColor retain];
[_label setTextColor: _textColor];
//[self updateTitle];
}
-(void)setTitle:(NSString *)title
{
[_label setStringValue: title];
[self updateTitle];
}
-(NSString *)title
{
return [_label stringValue];
}
-(void)updateTitle
{
NSAttributedString *as;
NSDictionary *attr;
NSShadow *shadow;
NSMutableParagraphStyle *ps;
NSString *title;
title = [_label stringValue];
if (![title length])
{
return;
}
//[_label setTextColor: _dark ? [NSColor whiteColor] : [NSColor blackColor]];
shadow = [NSShadow new];
[shadow setShadowBlurRadius: 1.0];
[shadow setShadowColor: _dark ? [NSColor blackColor] : [NSColor whiteColor]];
[shadow setShadowOffset: _dark ? NSMakeSize(0.0, 1.0) : NSMakeSize(0.0, -1.0)];
ps = [NSMutableParagraphStyle new];
[ps setAlignment: NSCenterTextAlignment];
[ps setLineBreakMode: NSLineBreakByTruncatingMiddle];
attr = [NSDictionary dictionaryWithObjectsAndKeys:
shadow, NSShadowAttributeName,
ps, NSParagraphStyleAttributeName,
nil];
as = [[NSAttributedString alloc] initWithString: title attributes: attr];
[_label setAttributedStringValue: as];
[as release];
[ps release];
[shadow release];
}
-(BOOL)isFlipped
{
return YES;
}
-(void)drawRect:(NSRect)dirtyRect
{
NSRect bounds;
NSRect rect;
bounds = [self bounds];
rect = NSMakeRect(0, 0, bounds.size.width, bounds.size.height);
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect: rect
xRadius: 4.0
yRadius: 4.0];
[path addClip];
[_backgroundColor setFill];
NSRectFill(dirtyRect);
rect = NSMakeRect(0, 0, bounds.size.width, 24.0);
rect = NSInsetRect(rect, 1, 0);
NSDrawThreePartImage(rect,
_leftImage,
_centerImage,
_rightImage,
NO,
NSCompositeSourceOver /*NSCompositeDestinationOver*/,
1.0,
YES);
}
-(void)fadeIn
{
/*
NSDictionary *dict;
NSViewAnimation *anim;
dict = [NSDictionary dictionaryWithObjectsAndKeys:
self, NSViewAnimationTargetKey,
NSViewAnimationFadeInEffect, NSViewAnimationEffectKey,
nil];
anim = [NSViewAnimation new];
[anim setViewAnimations: [NSArray arrayWithObject: dict]];
[anim setDuration: 1.0];
[anim setAnimationCurve: NSAnimationEaseIn];
[anim startAnimation];
[anim release];
*/
[self setContentFilters: [NSArray array]];
CABasicAnimation *anim;
CALayer *layer;
layer = [self layer];
[layer setOpacity: 1.0];
anim = [CABasicAnimation animationWithKeyPath: @"opacity"];
[anim setFromValue: [NSNumber numberWithDouble: 0.0]];
[anim setToValue: [NSNumber numberWithDouble: 1.0]];
[anim setDuration: 0.5];
[anim setRemovedOnCompletion: NO];
[layer addAnimation: anim forKey: @"opacity"];
}
-(void)fadeOut
{
/*
NSDictionary *dict;
NSViewAnimation *anim;
dict = [NSDictionary dictionaryWithObjectsAndKeys:
self, NSViewAnimationTargetKey,
NSViewAnimationFadeOutEffect, NSViewAnimationEffectKey,
nil];
anim = [NSViewAnimation new];
[anim setViewAnimations: [NSArray arrayWithObject: dict]];
[anim setDuration: 1.0];
[anim setAnimationCurve: NSAnimationEaseIn];
[anim startAnimation];
[anim release];
*/
CABasicAnimation *anim;
CALayer *layer;
layer = [self layer];
[layer setOpacity: 0.0];
anim = [CABasicAnimation animationWithKeyPath: @"opacity"];
[anim setFromValue: [NSNumber numberWithDouble: 1.0]];
[anim setToValue: [NSNumber numberWithDouble: 0.0]];
[anim setDuration: 0.5];
[anim setRemovedOnCompletion: NO];
[layer addAnimation: anim forKey: @"opacity"];
}
@end
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB