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 6801 - (hide annotations) (download) (as text)
Tue Jun 13 10:30:12 2017 UTC (6 years, 9 months ago) by doda
File MIME type: text/x-chdr
File size: 5677 byte(s)
eliminate FAR keyword.
1 maya 3227 #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 doda 6801 void PASCAL TTXInit(PTTSet ts, PComVar cv);
13 maya 3227
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 doda 6801 void PASCAL TTXInternalOpenTCP(TTXSockHooks * hooks);
18 maya 3227 #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 doda 4089 &PWSACancelAsyncRequest, &PWSAGetLastError, \
25 doda 4165 /* &Pgetaddrinfo,*/ &Pfreeaddrinfo, &PWSAAsyncGetAddrInfo \
26 maya 3227 }; \
27     TTXInternalOpenTCP(&SockHooks); \
28     } while (0)
29    
30     /* This function is called when a TCP connection has been closed.
31     This macro stuff is to make sure that the functions in the caller's
32     EXE or DLL are hooked. */
33 doda 6801 void PASCAL TTXInternalCloseTCP(TTXSockHooks * hooks);
34 maya 3227 #define TTXCloseTCP() \
35     do { \
36     static TTXSockHooks SockHooks = { \
37     &Pclosesocket, &Pconnect, &Phtonl, &Phtons, &Pinet_addr, \
38     &Pioctlsocket, &Precv, &Pselect, &Psend, &Psetsockopt, \
39     &Psocket, &PWSAAsyncSelect, &PWSAAsyncGetHostByName, \
40 doda 4089 &PWSACancelAsyncRequest, &PWSAGetLastError, \
41 doda 4165 /* &Pgetaddrinfo,*/ &Pfreeaddrinfo, &PWSAAsyncGetAddrInfo \
42 maya 3227 }; \
43     TTXInternalCloseTCP(&SockHooks); \
44     } while (0)
45    
46 doda 6801 void PASCAL TTXInternalOpenFile(TTXFileHooks * hooks);
47 maya 3227 #define TTXOpenFile() \
48     do { \
49     static TTXFileHooks FileHooks = { \
50     &PCreateFile, &PCloseFile, &PReadFile, &PWriteFile \
51     }; \
52     TTXInternalOpenFile(&FileHooks); \
53     } while (0)
54    
55 doda 6801 void PASCAL TTXInternalCloseFile(TTXFileHooks * hooks);
56 maya 3227 #define TTXCloseFile() \
57     do { \
58     static TTXFileHooks FileHooks = { \
59     &PCreateFile, &PCloseFile, &PReadFile, &PWriteFile \
60     }; \
61     TTXInternalCloseFile(&FileHooks); \
62     } while (0)
63    
64     /* This function is called after the TTDLG DLL has been loaded.
65     This macro stuff is to make sure that the functions in the caller's
66     EXE or DLL are hooked. */
67 doda 6801 void PASCAL TTXInternalGetUIHooks(TTXUIHooks * hooks);
68 maya 3227 #define TTXGetUIHooks() \
69     do { \
70     static TTXUIHooks UIHooks = { \
71     &SetupTerminal, &SetupWin, &SetupKeyboard, &SetupSerialPort, \
72     &SetupTCPIP, &GetHostName, &ChangeDirectory, &AboutDialog, \
73     &ChooseFontDlg, &SetupGeneral, &WindowWindow \
74     }; \
75     TTXInternalGetUIHooks(&UIHooks); \
76     } while (0)
77    
78     /* This function is called after the TTSET DLL has been loaded.
79     This macro stuff is to make sure that the functions in the caller's
80     EXE or DLL are hooked. */
81 doda 6801 void PASCAL TTXInternalGetSetupHooks(TTXSetupHooks * hooks);
82 maya 3227 #define TTXGetSetupHooks() \
83     do { \
84     static TTXSetupHooks SetupHooks = { \
85     &ReadIniFile, &WriteIniFile, &ReadKeyboardCnf, &CopyHostList, \
86     &AddHostToList, &ParseParam \
87     }; \
88     TTXInternalGetSetupHooks(&SetupHooks); \
89     } while (0)
90    
91     /* This function is called when the window size has changed. */
92 doda 6801 void PASCAL TTXSetWinSize(int rows, int cols);
93 maya 3227
94     /* This function adds the extensions' entries to the menu, which is the
95     handle for the program's menubar. */
96 doda 6801 void PASCAL TTXModifyMenu(HMENU menu);
97 maya 3227
98     /* This function is called when a popup menu is about to be displayed.
99     The status of the entries is set appropriately. */
100 doda 6801 void PASCAL TTXModifyPopupMenu(HMENU menu);
101 maya 3227
102     /* This function calls on the extensions to handle a command. It returns
103     TRUE if they handle it, otherwise FALSE. */
104 doda 6801 BOOL PASCAL TTXProcessCommand(HWND hWin, WORD cmd);
105 maya 3227
106     /* This function is called to see whether Telnet mode can be turned on when
107     Tera Term thinks it has detected a telnetd */
108 doda 6801 void PASCAL TTXEnd(void);
109 maya 3227
110     /* This function is called when a new Tera Term is being started with certain
111     settings and the extension may wish to add some options to the command line */
112 doda 6801 void PASCAL TTXSetCommandLine(PCHAR cmd, int cmdlen, PGetHNRec rec);
113 maya 3227 #ifdef __cplusplus
114     }
115     #endif
116    
117     #endif

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