X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/1ddda1ca78c0458141b45197544597c566184b6f..edb548cd8283b5e3f680a0a8b641f9afb12d4ba4:/macosx/osxclass.h diff --git a/macosx/osxclass.h b/macosx/osxclass.h index 5f009a91..e79290df 100644 --- a/macosx/osxclass.h +++ b/macosx/osxclass.h @@ -27,6 +27,13 @@ extern AppController *controller; * The SessionWindow class, defined in osxwin.m. */ +struct alert_queue { + struct alert_queue *next; + NSAlert *alert; + void (*callback)(void *, int); + void *ctx; +}; + @class SessionWindow; @class TerminalView; @@ -40,6 +47,15 @@ extern AppController *controller; void *ldisc; Backend *back; void *backhandle; + int exited; + /* + * The following two members relate to the currently active + * alert sheet, if any. They are NULL if there isn't one. + */ + void (*alert_callback)(void *, int); + void *alert_ctx; + /* This queues future alerts that need to be shown. */ + struct alert_queue *alert_qhead, *alert_qtail; } - (id)initWithConfig:(Config)cfg; - (void)drawStartFinish:(BOOL)start; @@ -48,6 +64,12 @@ extern AppController *controller; - (void)doText:(wchar_t *)text len:(int)len x:(int)x y:(int)y attr:(unsigned long)attr lattr:(int)lattr; - (int)fromBackend:(const char *)data len:(int)len isStderr:(int)is_stderr; +- (int)fromBackendUntrusted:(const char *)data len:(int)len; +- (void)startAlert:(NSAlert *)alert + withCallback:(void (*)(void *, int))callback andCtx:(void *)ctx; +- (void)endSession:(int)clean; +- (void)notifyRemoteExit; +- (Terminal *)term; @end /* @@ -60,7 +82,6 @@ extern AppController *controller; { NSOutlineView *treeview; struct controlbox *ctrlbox; - struct sesslist sl; void *dv; Config cfg; }