mirror of
https://github.com/ksherlock/TwoTerm.git
synced 2025-01-03 07:29:28 +00:00
use child monitor for data available.
git-svn-id: svn://qnap.local/TwoTerm/trunk@1999 5590a31f-7b70-45f8-8c82-aa3a8e5f4507
This commit is contained in:
parent
91878398b4
commit
8275ab5ec5
@ -9,6 +9,7 @@
|
|||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
#include "Emulator.h"
|
#include "Emulator.h"
|
||||||
|
#include "ChildMonitor.h"
|
||||||
|
|
||||||
#include "iGeometry.h"
|
#include "iGeometry.h"
|
||||||
|
|
||||||
@ -104,3 +105,8 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@interface EmulatorView (ChildMonitor) <ChildMonitorDelegate>
|
||||||
|
|
||||||
|
@end
|
@ -266,6 +266,8 @@
|
|||||||
if (_foregroundColor != currentFront) setFront = YES;
|
if (_foregroundColor != currentFront) setFront = YES;
|
||||||
if (setFront) [currentFront setFill];
|
if (setFront) [currentFront setFill];
|
||||||
|
|
||||||
|
// need to apply the scanline filter here.
|
||||||
|
|
||||||
[_charGen drawCharacter: c
|
[_charGen drawCharacter: c
|
||||||
atPoint: NSMakePoint(_paddingLeft + x * _charWidth, _paddingTop + y * _charHeight)];
|
atPoint: NSMakePoint(_paddingLeft + x * _charWidth, _paddingTop + y * _charHeight)];
|
||||||
|
|
||||||
@ -375,6 +377,8 @@
|
|||||||
|
|
||||||
-(void)startBackgroundReader
|
-(void)startBackgroundReader
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
|
|
||||||
if (_readerThread) return;
|
if (_readerThread) return;
|
||||||
|
|
||||||
_readerThread = [[NSThread alloc] initWithTarget: self selector: @selector(_readerThread) object: nil];
|
_readerThread = [[NSThread alloc] initWithTarget: self selector: @selector(_readerThread) object: nil];
|
||||||
@ -708,6 +712,23 @@
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@implementation EmulatorView (ChildMonitor)
|
||||||
|
|
||||||
|
-(void)childDataAvailable: (ChildMonitor *)monitor
|
||||||
|
{
|
||||||
|
// this is called from a separate thread.
|
||||||
|
[self dataAvailable];
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)childFinished: (ChildMonitor *)monitor
|
||||||
|
{
|
||||||
|
NSLog(@"[process complete]");
|
||||||
|
// writeline "[process complete]"
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void ViewScreen::setSize(unsigned width, unsigned height)
|
void ViewScreen::setSize(unsigned width, unsigned height)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user