2010-07-08 22:26:58 +00:00
|
|
|
//
|
|
|
|
// Emulator.h
|
|
|
|
// 2Term
|
|
|
|
//
|
|
|
|
// Created by Kelvin Sherlock on 7/7/2010.
|
|
|
|
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2010-07-17 18:21:26 +00:00
|
|
|
#include <sys/ttycom.h>
|
2010-07-08 22:26:58 +00:00
|
|
|
|
|
|
|
@class NSEvent;
|
2010-10-05 18:56:45 +00:00
|
|
|
@class NSMenu;
|
2010-07-08 22:26:58 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
class Screen;
|
|
|
|
class OutputChannel;
|
|
|
|
#else
|
|
|
|
#define Screen void
|
2010-07-09 01:18:30 +00:00
|
|
|
#define OutputChannel void
|
2010-07-08 22:26:58 +00:00
|
|
|
#endif
|
|
|
|
|
2010-07-17 18:21:26 +00:00
|
|
|
#import "iGeometry.h"
|
|
|
|
|
2010-10-05 18:56:45 +00:00
|
|
|
|
|
|
|
@interface EmulatorManager : NSObject
|
|
|
|
|
|
|
|
+(void)registerClass: (Class)klass;
|
|
|
|
+(NSMenu *)emulatorMenu;
|
|
|
|
+(id)emulatorForTag: (unsigned)tag;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2010-07-08 22:26:58 +00:00
|
|
|
@protocol Emulator
|
|
|
|
|
|
|
|
-(void)processCharacter: (uint8_t)c screen: (Screen *)screen output: (OutputChannel *)output;
|
|
|
|
-(void)keyDown: (NSEvent *)event screen: (Screen *)screen output: (OutputChannel *)output;
|
2010-10-05 18:56:45 +00:00
|
|
|
|
2010-07-08 22:26:58 +00:00
|
|
|
-(void)reset;
|
|
|
|
|
2010-10-05 18:56:45 +00:00
|
|
|
+(NSString *)name;
|
2010-07-09 01:18:30 +00:00
|
|
|
-(NSString *)name;
|
|
|
|
|
|
|
|
-(const char *)termName;
|
|
|
|
|
2010-07-17 18:21:26 +00:00
|
|
|
-(BOOL)resizable;
|
|
|
|
|
|
|
|
-(struct winsize)defaultSize;
|
|
|
|
|
2010-07-08 22:26:58 +00:00
|
|
|
@end
|