OSDN Git Service

Change OpenSSL context mode flags.
[ffftp/ffftp.git] / contrib / putty / MACOSX / OSXCLASS.H
1 /*\r
2  * Header file for the Objective-C parts of Mac OS X PuTTY. This\r
3  * file contains the class definitions, which would cause compile\r
4  * failures in the pure C modules if they appeared in osx.h.\r
5  */\r
6 \r
7 #ifndef PUTTY_OSXCLASS_H\r
8 #define PUTTY_OSXCLASS_H\r
9 \r
10 #include "putty.h"\r
11 \r
12 /*\r
13  * The application controller class, defined in osxmain.m.\r
14  */\r
15 @interface AppController : NSObject\r
16 {\r
17     NSTimer *timer;\r
18 }\r
19 - (void)newSessionConfig:(id)sender;\r
20 - (void)newTerminal:(id)sender;\r
21 - (void)newSessionWithConfig:(id)cfg;\r
22 - (void)setTimer:(long)next;\r
23 @end\r
24 extern AppController *controller;\r
25 \r
26 /*\r
27  * The SessionWindow class, defined in osxwin.m.\r
28  */\r
29 \r
30 struct alert_queue {\r
31     struct alert_queue *next;\r
32     NSAlert *alert;\r
33     void (*callback)(void *, int);\r
34     void *ctx;\r
35 };\r
36 \r
37 @class SessionWindow;\r
38 @class TerminalView;\r
39 \r
40 @interface SessionWindow : NSWindow\r
41 {\r
42     Terminal *term;\r
43     TerminalView *termview;\r
44     struct unicode_data ucsdata;\r
45     void *logctx;\r
46     Config cfg;\r
47     void *ldisc;\r
48     Backend *back;\r
49     void *backhandle;\r
50     int exited;\r
51     /*\r
52      * The following two members relate to the currently active\r
53      * alert sheet, if any. They are NULL if there isn't one.\r
54      */\r
55     void (*alert_callback)(void *, int);\r
56     void *alert_ctx;\r
57     /* This queues future alerts that need to be shown. */\r
58     struct alert_queue *alert_qhead, *alert_qtail;\r
59 }\r
60 - (id)initWithConfig:(Config)cfg;\r
61 - (void)drawStartFinish:(BOOL)start;\r
62 - (void)setColour:(int)n r:(float)r g:(float)g b:(float)b;\r
63 - (Config *)cfg;\r
64 - (void)doText:(wchar_t *)text len:(int)len x:(int)x y:(int)y\r
65     attr:(unsigned long)attr lattr:(int)lattr;\r
66 - (int)fromBackend:(const char *)data len:(int)len isStderr:(int)is_stderr;\r
67 - (int)fromBackendUntrusted:(const char *)data len:(int)len;\r
68 - (void)startAlert:(NSAlert *)alert\r
69     withCallback:(void (*)(void *, int))callback andCtx:(void *)ctx;\r
70 - (void)endSession:(int)clean;\r
71 - (void)notifyRemoteExit;\r
72 - (Terminal *)term;\r
73 @end\r
74 \r
75 /*\r
76  * The ConfigWindow class, defined in osxdlg.m.\r
77  */\r
78 \r
79 @class ConfigWindow;\r
80 \r
81 @interface ConfigWindow : NSWindow\r
82 {\r
83     NSOutlineView *treeview;\r
84     struct controlbox *ctrlbox;\r
85     void *dv;\r
86     Config cfg;\r
87 }\r
88 - (id)initWithConfig:(Config)cfg;\r
89 @end\r
90 \r
91 /*\r
92  * Functions exported by osxctrls.m. (They have to go in this\r
93  * header file and not osx.h, because some of them have Cocoa class\r
94  * types in their prototypes.)\r
95  */\r
96 #define HSPACING 12                    /* needed in osxdlg.m and osxctrls.m */\r
97 #define VSPACING 8\r
98 \r
99 void *fe_dlg_init(void *data, NSWindow *window, NSObject *target, SEL action);\r
100 void fe_dlg_free(void *dv);\r
101 void create_ctrls(void *dv, NSView *parent, struct controlset *s,\r
102                   int *minw, int *minh);\r
103 int place_ctrls(void *dv, struct controlset *s, int leftx, int topy,\r
104                 int width);            /* returns height used */\r
105 void select_panel(void *dv, struct controlbox *b, const char *name);\r
106 \r
107 #endif /* PUTTY_OSXCLASS_H */\r