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.
33 @interface SessionWindow
: NSWindow
36 TerminalView
*termview
;
37 struct unicode_data ucsdata
;
43 void (*alert_callback
)(void *, int);
46 - (id
)initWithConfig
:(Config
)cfg
;
47 - (void)drawStartFinish
:(BOOL
)start
;
48 - (void)setColour
:(int)n r
:(float)r g
:(float)g b
:(float)b
;
50 - (void)doText
:(wchar_t *)text len
:(int)len x
:(int)x y
:(int)y
51 attr
:(unsigned long)attr lattr
:(int)lattr
;
52 - (int)fromBackend
:(const char *)data len
:(int)len isStderr
:(int)is_stderr
;
53 - (void)startAlert
:(NSAlert
*)alert
54 withCallback
:(void (*)(void *, int))callback andCtx
:(void *)ctx
;
58 * The ConfigWindow class, defined in osxdlg.m.
63 @interface ConfigWindow
: NSWindow
65 NSOutlineView
*treeview
;
66 struct controlbox
*ctrlbox
;
71 - (id
)initWithConfig
:(Config
)cfg
;
75 * Functions exported by osxctrls.m. (They have to go in this
76 * header file and not osx.h, because some of them have Cocoa class
77 * types in their prototypes.)
79 #define HSPACING 12 /* needed in osxdlg.m and osxctrls.m */
82 void *fe_dlg_init(void *data
, NSWindow
*window
, NSObject
*target
, SEL action
);
83 void fe_dlg_free(void *dv
);
84 void create_ctrls(void *dv
, NSView
*parent
, struct controlset
*s
,
85 int *minw
, int *minh
);
86 int place_ctrls(void *dv
, struct controlset
*s
, int leftx
, int topy
,
87 int width
); /* returns height used */
88 void select_panel(void *dv
, struct controlbox
*b
, const char *name
);
90 #endif /* PUTTY_OSXCLASS_H */