Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /trunk/teraterm/teraterm/ttplug.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2526 - (hide annotations) (download) (as text)
Fri May 23 05:04:08 2008 UTC (15 years, 10 months ago) by doda
Original Path: teraterm/trunk/teraterm/ttplug.h
File MIME type: text/x-chdr
File size: 4539 byte(s)
Teraterm -> TeraTerm
Tera Term/TeraTermの表記の統一を行うかは別途検討。

1 maya 2476 #ifndef __TTPLUG_H
2     #define __TTPLUG_H
3    
4     #ifdef __cplusplus
5     extern "C" {
6     #endif
7    
8     #include "ttplugin.h"
9    
10     /* This function initializes the extensions and is called at the beginning
11     of the program. */
12     void PASCAL FAR TTXInit(PTTSet ts, PComVar cv);
13    
14     /* This function is called when a TCP connection is about to be opened.
15     This macro stuff is to make sure that the functions in the caller's
16     EXE or DLL are hooked. */
17     void PASCAL FAR TTXInternalOpenTCP(TTXSockHooks FAR * hooks);
18     #define TTXOpenTCP() \
19     do { \
20     static TTXSockHooks SockHooks = { \
21     &Pclosesocket, &Pconnect, &Phtonl, &Phtons, &Pinet_addr, \
22     &Pioctlsocket, &Precv, &Pselect, &Psend, &Psetsockopt, \
23     &Psocket, &PWSAAsyncSelect, &PWSAAsyncGetHostByName, \
24     &PWSACancelAsyncRequest, &PWSAGetLastError \
25     }; \
26     TTXInternalOpenTCP(&SockHooks); \
27     } while (0)
28    
29     /* This function is called when a TCP connection has been closed.
30     This macro stuff is to make sure that the functions in the caller's
31     EXE or DLL are hooked. */
32     void PASCAL FAR TTXInternalCloseTCP(TTXSockHooks FAR * hooks);
33     #define TTXCloseTCP() \
34     do { \
35     static TTXSockHooks SockHooks = { \
36     &Pclosesocket, &Pconnect, &Phtonl, &Phtons, &Pinet_addr, \
37     &Pioctlsocket, &Precv, &Pselect, &Psend, &Psetsockopt, \
38     &Psocket, &PWSAAsyncSelect, &PWSAAsyncGetHostByName, \
39     &PWSACancelAsyncRequest, &PWSAGetLastError \
40     }; \
41     TTXInternalCloseTCP(&SockHooks); \
42     } while (0)
43    
44     /* This function is called after the TTDLG DLL has been loaded.
45     This macro stuff is to make sure that the functions in the caller's
46     EXE or DLL are hooked. */
47     void PASCAL FAR TTXInternalGetUIHooks(TTXUIHooks FAR * hooks);
48     #define TTXGetUIHooks() \
49     do { \
50     static TTXUIHooks UIHooks = { \
51     &SetupTerminal, &SetupWin, &SetupKeyboard, &SetupSerialPort, \
52     &SetupTCPIP, &GetHostName, &ChangeDirectory, &AboutDialog, \
53     &ChooseFontDlg, &SetupGeneral, &WindowWindow \
54     }; \
55     TTXInternalGetUIHooks(&UIHooks); \
56     } while (0)
57    
58     /* This function is called after the TTSET DLL has been loaded.
59     This macro stuff is to make sure that the functions in the caller's
60     EXE or DLL are hooked. */
61     void PASCAL FAR TTXInternalGetSetupHooks(TTXSetupHooks FAR * hooks);
62     #define TTXGetSetupHooks() \
63     do { \
64     static TTXSetupHooks SetupHooks = { \
65     &ReadIniFile, &WriteIniFile, &ReadKeyboardCnf, &CopyHostList, \
66     &AddHostToList, &ParseParam \
67     }; \
68     TTXInternalGetSetupHooks(&SetupHooks); \
69     } while (0)
70    
71     /* This function is called when the window size has changed. */
72     void PASCAL FAR TTXSetWinSize(int rows, int cols);
73    
74     /* This function adds the extensions' entries to the menu, which is the
75     handle for the program's menubar. */
76     void PASCAL FAR TTXModifyMenu(HMENU menu);
77    
78     /* This function is called when a popup menu is about to be displayed.
79     The status of the entries is set appropriately. */
80     void PASCAL FAR TTXModifyPopupMenu(HMENU menu);
81    
82     /* This function calls on the extensions to handle a command. It returns
83     TRUE if they handle it, otherwise FALSE. */
84     BOOL PASCAL FAR TTXProcessCommand(HWND hWin, WORD cmd);
85    
86     /* This function is called to see whether Telnet mode can be turned on when
87 doda 2526 TeraTerm thinks it has detected a telnetd */
88 maya 2476 void PASCAL FAR TTXEnd(void);
89    
90 doda 2526 /* This function is called when a new TeraTerm is being started with certain
91 maya 2476 settings and the extension may wish to add some options to the command line */
92     void PASCAL FAR TTXSetCommandLine(PCHAR cmd, int cmdlen, PGetHNRec rec);
93     #ifdef __cplusplus
94     }
95     #endif
96    
97     #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26