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 6841 - (hide annotations) (download) (as text)
Tue Jul 4 15:02:28 2017 UTC (6 years, 9 months ago) by doda
File MIME type: text/x-chdr
File size: 7243 byte(s)
TeraTerm Project としてのライセンス表記を追加

・Tera Term 本体分を横 80 桁に収まるように改行位置を調整
・ttssh 関連の分を追加
1 doda 6806 /*
2     * Copyright (C) 1994-1998 T. Teranishi
3     * (C) Robert O'Callahan
4     * (C) 2008-2017 TeraTerm Project
5     * All rights reserved.
6     *
7 doda 6841 * Redistribution and use in source and binary forms, with or without
8     * modification, are permitted provided that the following conditions
9     * are met:
10 doda 6806 *
11 doda 6841 * 1. Redistributions of source code must retain the above copyright
12     * notice, this list of conditions and the following disclaimer.
13     * 2. Redistributions in binary form must reproduce the above copyright
14     * notice, this list of conditions and the following disclaimer in the
15     * documentation and/or other materials provided with the distribution.
16     * 3. The name of the author may not be used to endorse or promote products
17     * derived from this software without specific prior written permission.
18 doda 6806 *
19 doda 6841 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
20     * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21     * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22     * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23     * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24     * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25     * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26     * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27     * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28     * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 doda 6806 */
30 maya 3227 #ifndef __TTPLUG_H
31     #define __TTPLUG_H
32    
33     #ifdef __cplusplus
34     extern "C" {
35     #endif
36    
37     #include "ttplugin.h"
38    
39     /* This function initializes the extensions and is called at the beginning
40     of the program. */
41 doda 6801 void PASCAL TTXInit(PTTSet ts, PComVar cv);
42 maya 3227
43     /* This function is called when a TCP connection is about to be opened.
44     This macro stuff is to make sure that the functions in the caller's
45     EXE or DLL are hooked. */
46 doda 6801 void PASCAL TTXInternalOpenTCP(TTXSockHooks * hooks);
47 maya 3227 #define TTXOpenTCP() \
48     do { \
49     static TTXSockHooks SockHooks = { \
50     &Pclosesocket, &Pconnect, &Phtonl, &Phtons, &Pinet_addr, \
51     &Pioctlsocket, &Precv, &Pselect, &Psend, &Psetsockopt, \
52     &Psocket, &PWSAAsyncSelect, &PWSAAsyncGetHostByName, \
53 doda 4089 &PWSACancelAsyncRequest, &PWSAGetLastError, \
54 doda 4165 /* &Pgetaddrinfo,*/ &Pfreeaddrinfo, &PWSAAsyncGetAddrInfo \
55 maya 3227 }; \
56     TTXInternalOpenTCP(&SockHooks); \
57     } while (0)
58    
59     /* This function is called when a TCP connection has been closed.
60     This macro stuff is to make sure that the functions in the caller's
61     EXE or DLL are hooked. */
62 doda 6801 void PASCAL TTXInternalCloseTCP(TTXSockHooks * hooks);
63 maya 3227 #define TTXCloseTCP() \
64     do { \
65     static TTXSockHooks SockHooks = { \
66     &Pclosesocket, &Pconnect, &Phtonl, &Phtons, &Pinet_addr, \
67     &Pioctlsocket, &Precv, &Pselect, &Psend, &Psetsockopt, \
68     &Psocket, &PWSAAsyncSelect, &PWSAAsyncGetHostByName, \
69 doda 4089 &PWSACancelAsyncRequest, &PWSAGetLastError, \
70 doda 4165 /* &Pgetaddrinfo,*/ &Pfreeaddrinfo, &PWSAAsyncGetAddrInfo \
71 maya 3227 }; \
72     TTXInternalCloseTCP(&SockHooks); \
73     } while (0)
74    
75 doda 6801 void PASCAL TTXInternalOpenFile(TTXFileHooks * hooks);
76 maya 3227 #define TTXOpenFile() \
77     do { \
78     static TTXFileHooks FileHooks = { \
79     &PCreateFile, &PCloseFile, &PReadFile, &PWriteFile \
80     }; \
81     TTXInternalOpenFile(&FileHooks); \
82     } while (0)
83    
84 doda 6801 void PASCAL TTXInternalCloseFile(TTXFileHooks * hooks);
85 maya 3227 #define TTXCloseFile() \
86     do { \
87     static TTXFileHooks FileHooks = { \
88     &PCreateFile, &PCloseFile, &PReadFile, &PWriteFile \
89     }; \
90     TTXInternalCloseFile(&FileHooks); \
91     } while (0)
92    
93     /* This function is called after the TTDLG DLL has been loaded.
94     This macro stuff is to make sure that the functions in the caller's
95     EXE or DLL are hooked. */
96 doda 6801 void PASCAL TTXInternalGetUIHooks(TTXUIHooks * hooks);
97 maya 3227 #define TTXGetUIHooks() \
98     do { \
99     static TTXUIHooks UIHooks = { \
100     &SetupTerminal, &SetupWin, &SetupKeyboard, &SetupSerialPort, \
101     &SetupTCPIP, &GetHostName, &ChangeDirectory, &AboutDialog, \
102     &ChooseFontDlg, &SetupGeneral, &WindowWindow \
103     }; \
104     TTXInternalGetUIHooks(&UIHooks); \
105     } while (0)
106    
107     /* This function is called after the TTSET DLL has been loaded.
108     This macro stuff is to make sure that the functions in the caller's
109     EXE or DLL are hooked. */
110 doda 6801 void PASCAL TTXInternalGetSetupHooks(TTXSetupHooks * hooks);
111 maya 3227 #define TTXGetSetupHooks() \
112     do { \
113     static TTXSetupHooks SetupHooks = { \
114     &ReadIniFile, &WriteIniFile, &ReadKeyboardCnf, &CopyHostList, \
115     &AddHostToList, &ParseParam \
116     }; \
117     TTXInternalGetSetupHooks(&SetupHooks); \
118     } while (0)
119    
120     /* This function is called when the window size has changed. */
121 doda 6801 void PASCAL TTXSetWinSize(int rows, int cols);
122 maya 3227
123     /* This function adds the extensions' entries to the menu, which is the
124     handle for the program's menubar. */
125 doda 6801 void PASCAL TTXModifyMenu(HMENU menu);
126 maya 3227
127     /* This function is called when a popup menu is about to be displayed.
128     The status of the entries is set appropriately. */
129 doda 6801 void PASCAL TTXModifyPopupMenu(HMENU menu);
130 maya 3227
131     /* This function calls on the extensions to handle a command. It returns
132     TRUE if they handle it, otherwise FALSE. */
133 doda 6801 BOOL PASCAL TTXProcessCommand(HWND hWin, WORD cmd);
134 maya 3227
135     /* This function is called to see whether Telnet mode can be turned on when
136     Tera Term thinks it has detected a telnetd */
137 doda 6801 void PASCAL TTXEnd(void);
138 maya 3227
139     /* This function is called when a new Tera Term is being started with certain
140     settings and the extension may wish to add some options to the command line */
141 doda 6801 void PASCAL TTXSetCommandLine(PCHAR cmd, int cmdlen, PGetHNRec rec);
142 maya 3227 #ifdef __cplusplus
143     }
144     #endif
145    
146     #endif

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