2e4d1decdfa5a664fbc365443b9ba0ff0d337fae
2 * Header file for the Objective-C parts of Mac OS X PuTTY. This
3 * file contains the class definitions, which would cause compile
4 * failures in the pure C modules if they appeared in osx.h.
7 #ifndef PUTTY_OSXCLASS_H
8 #define PUTTY_OSXCLASS_H
13 * The application controller class, defined in osxmain.m.
15 @interface AppController
: NSObject
19 - (void)newSessionConfig
:(id
)sender
;
20 - (void)newTerminal
:(id
)sender
;
21 - (void)newSessionWithConfig
:(id
)cfg
;
22 - (void)setTimer
:(long)next
;
24 extern AppController
*controller
;
27 * The SessionWindow class, defined in osxwin.m.
31 struct alert_queue
*next
;
33 void (*callback
)(void *, int);
40 @interface SessionWindow
: NSWindow
43 TerminalView
*termview
;
44 struct unicode_data ucsdata
;
51 * The following two members relate to the currently active
52 * alert sheet, if any. They are NULL if there isn't one.
54 void (*alert_callback
)(void *, int);
56 /* This queues future alerts that need to be shown. */
57 struct alert_queue
*alert_qhead
, *alert_qtail
;
59 - (id
)initWithConfig
:(Config
)cfg
;
60 - (void)drawStartFinish
:(BOOL
)start
;
61 - (void)setColour
:(int)n r
:(float)r g
:(float)g b
:(float)b
;
63 - (void)doText
:(wchar_t *)text len
:(int)len x
:(int)x y
:(int)y
64 attr
:(unsigned long)attr lattr
:(int)lattr
;
65 - (int)fromBackend
:(const char *)data len
:(int)len isStderr
:(int)is_stderr
;
66 - (void)startAlert
:(NSAlert
*)alert
67 withCallback
:(void (*)(void *, int))callback andCtx
:(void *)ctx
;
71 * The ConfigWindow class, defined in osxdlg.m.
76 @interface ConfigWindow
: NSWindow
78 NSOutlineView
*treeview
;
79 struct controlbox
*ctrlbox
;
84 - (id
)initWithConfig
:(Config
)cfg
;
88 * Functions exported by osxctrls.m. (They have to go in this
89 * header file and not osx.h, because some of them have Cocoa class
90 * types in their prototypes.)
92 #define HSPACING 12 /* needed in osxdlg.m and osxctrls.m */
95 void *fe_dlg_init(void *data
, NSWindow
*window
, NSObject
*target
, SEL action
);
96 void fe_dlg_free(void *dv
);
97 void create_ctrls(void *dv
, NSView
*parent
, struct controlset
*s
,
98 int *minw
, int *minh
);
99 int place_ctrls(void *dv
, struct controlset
*s
, int leftx
, int topy
,
100 int width
); /* returns height used */
101 void select_panel(void *dv
, struct controlbox
*b
, const char *name
);
103 #endif /* PUTTY_OSXCLASS_H */