| 56 |
} |
} |
| 57 |
|
|
| 58 |
|
|
| 59 |
BOOL PASCAL FAR StartTeraTerm(PTTSet ts) |
BOOL PASCAL StartTeraTerm(PTTSet ts) |
| 60 |
{ |
{ |
| 61 |
char Temp[MAX_PATH]; |
char Temp[MAX_PATH]; |
| 62 |
|
|
| 99 |
|
|
| 100 |
// 設定ファイルをディスクに保存し、Tera Term本体を再起動する。 |
// 設定ファイルをディスクに保存し、Tera Term本体を再起動する。 |
| 101 |
// (2012.4.30 yutaka) |
// (2012.4.30 yutaka) |
| 102 |
void PASCAL FAR RestartTeraTerm(HWND hwnd, PTTSet ts) |
void PASCAL RestartTeraTerm(HWND hwnd, PTTSet ts) |
| 103 |
{ |
{ |
| 104 |
char path[1024]; |
char path[1024]; |
| 105 |
STARTUPINFO si; |
STARTUPINFO si; |
| 132 |
} |
} |
| 133 |
} |
} |
| 134 |
|
|
| 135 |
void PASCAL FAR ChangeDefaultSet(PTTSet ts, PKeyMap km) |
void PASCAL ChangeDefaultSet(PTTSet ts, PKeyMap km) |
| 136 |
{ |
{ |
| 137 |
if ((ts!=NULL) && |
if ((ts!=NULL) && |
| 138 |
(_stricmp(ts->SetupFName, pm->ts.SetupFName) == 0)) { |
(_stricmp(ts->SetupFName, pm->ts.SetupFName) == 0)) { |
| 143 |
} |
} |
| 144 |
} |
} |
| 145 |
|
|
| 146 |
void PASCAL FAR GetDefaultSet(PTTSet ts) |
void PASCAL GetDefaultSet(PTTSet ts) |
| 147 |
{ |
{ |
| 148 |
memcpy(ts,&(pm->ts),sizeof(TTTSet)); |
memcpy(ts,&(pm->ts),sizeof(TTTSet)); |
| 149 |
} |
} |
| 150 |
|
|
| 151 |
|
|
| 152 |
/* Key scan code -> Tera Term key code */ |
/* Key scan code -> Tera Term key code */ |
| 153 |
WORD PASCAL FAR GetKeyCode(PKeyMap KeyMap, WORD Scan) |
WORD PASCAL GetKeyCode(PKeyMap KeyMap, WORD Scan) |
| 154 |
{ |
{ |
| 155 |
WORD Key; |
WORD Key; |
| 156 |
|
|
| 164 |
return Key; |
return Key; |
| 165 |
} |
} |
| 166 |
|
|
| 167 |
void PASCAL FAR GetKeyStr(HWND HWin, PKeyMap KeyMap, WORD KeyCode, |
void PASCAL GetKeyStr(HWND HWin, PKeyMap KeyMap, WORD KeyCode, |
| 168 |
BOOL AppliKeyMode, BOOL AppliCursorMode, |
BOOL AppliKeyMode, BOOL AppliCursorMode, |
| 169 |
BOOL Send8BitMode, PCHAR KeyStr, int destlen, |
BOOL Send8BitMode, PCHAR KeyStr, int destlen, |
| 170 |
LPINT Len, LPWORD Type) |
LPINT Len, LPWORD Type) |
| 818 |
PeekMessage(&Msg,HWin, WM_CHAR, WM_CHAR,PM_REMOVE); |
PeekMessage(&Msg,HWin, WM_CHAR, WM_CHAR,PM_REMOVE); |
| 819 |
} |
} |
| 820 |
|
|
| 821 |
void FAR PASCAL SetCOMFlag(int Com) |
void PASCAL SetCOMFlag(int Com) |
| 822 |
{ |
{ |
| 823 |
pm->ComFlag[(Com-1)/CHAR_BIT] |= 1 << ((Com-1)%CHAR_BIT); |
pm->ComFlag[(Com-1)/CHAR_BIT] |= 1 << ((Com-1)%CHAR_BIT); |
| 824 |
} |
} |
| 825 |
|
|
| 826 |
void FAR PASCAL ClearCOMFlag(int Com) |
void PASCAL ClearCOMFlag(int Com) |
| 827 |
{ |
{ |
| 828 |
pm->ComFlag[(Com-1)/CHAR_BIT] &= ~(1 << ((Com-1)%CHAR_BIT)); |
pm->ComFlag[(Com-1)/CHAR_BIT] &= ~(1 << ((Com-1)%CHAR_BIT)); |
| 829 |
} |
} |
| 830 |
|
|
| 831 |
int FAR PASCAL CheckCOMFlag(int Com) |
int PASCAL CheckCOMFlag(int Com) |
| 832 |
{ |
{ |
| 833 |
return ((pm->ComFlag[(Com-1)/CHAR_BIT] & 1 << (Com-1)%CHAR_BIT) > 0); |
return ((pm->ComFlag[(Com-1)/CHAR_BIT] & 1 << (Com-1)%CHAR_BIT) > 0); |
| 834 |
} |
} |
| 835 |
|
|
| 836 |
int FAR PASCAL RegWin(HWND HWinVT, HWND HWinTEK) |
int PASCAL RegWin(HWND HWinVT, HWND HWinTEK) |
| 837 |
{ |
{ |
| 838 |
int i, j; |
int i, j; |
| 839 |
|
|
| 864 |
} |
} |
| 865 |
} |
} |
| 866 |
|
|
| 867 |
void FAR PASCAL UnregWin(HWND HWin) |
void PASCAL UnregWin(HWND HWin) |
| 868 |
{ |
{ |
| 869 |
int i, j; |
int i, j; |
| 870 |
|
|
| 902 |
return '+'; |
return '+'; |
| 903 |
} |
} |
| 904 |
|
|
| 905 |
void FAR PASCAL SetWinMenu(HMENU menu, PCHAR buf, int buflen, PCHAR langFile, int VTFlag) |
void PASCAL SetWinMenu(HMENU menu, PCHAR buf, int buflen, PCHAR langFile, int VTFlag) |
| 906 |
{ |
{ |
| 907 |
int i; |
int i; |
| 908 |
char Temp[MAXPATHLEN]; |
char Temp[MAXPATHLEN]; |
| 974 |
} |
} |
| 975 |
} |
} |
| 976 |
|
|
| 977 |
void FAR PASCAL SetWinList(HWND HWin, HWND HDlg, int IList) |
void PASCAL SetWinList(HWND HWin, HWND HDlg, int IList) |
| 978 |
{ |
{ |
| 979 |
int i; |
int i; |
| 980 |
char Temp[MAXPATHLEN]; |
char Temp[MAXPATHLEN]; |
| 1000 |
} |
} |
| 1001 |
} |
} |
| 1002 |
|
|
| 1003 |
void FAR PASCAL SelectWin(int WinId) |
void PASCAL SelectWin(int WinId) |
| 1004 |
{ |
{ |
| 1005 |
if ((WinId>=0) && (WinId<pm->NWin)) { |
if ((WinId>=0) && (WinId<pm->NWin)) { |
| 1006 |
/* ウィンドウが最大化および最小化されていた場合、その状態を維持できるように、 |
/* ウィンドウが最大化および最小化されていた場合、その状態を維持できるように、 |
| 1019 |
} |
} |
| 1020 |
} |
} |
| 1021 |
|
|
| 1022 |
void FAR PASCAL SelectNextWin(HWND HWin, int Next, BOOL SkipIconic) |
void PASCAL SelectNextWin(HWND HWin, int Next, BOOL SkipIconic) |
| 1023 |
{ |
{ |
| 1024 |
int i; |
int i; |
| 1025 |
|
|
| 1048 |
SelectWin(i); |
SelectWin(i); |
| 1049 |
} |
} |
| 1050 |
|
|
| 1051 |
void FAR PASCAL ShowAllWin(int stat) { |
void PASCAL ShowAllWin(int stat) { |
| 1052 |
int i; |
int i; |
| 1053 |
|
|
| 1054 |
for (i=0; i < pm->NWin; i++) { |
for (i=0; i < pm->NWin; i++) { |
| 1056 |
} |
} |
| 1057 |
} |
} |
| 1058 |
|
|
| 1059 |
void FAR PASCAL UndoAllWin(void) { |
void PASCAL UndoAllWin(void) { |
| 1060 |
int i; |
int i; |
| 1061 |
WINDOWPLACEMENT rc0; |
WINDOWPLACEMENT rc0; |
| 1062 |
RECT rc; |
RECT rc; |
| 1123 |
} |
} |
| 1124 |
} |
} |
| 1125 |
|
|
| 1126 |
void FAR PASCAL OpenHelp(UINT Command, DWORD Data, char *UILanguageFile) |
void PASCAL OpenHelp(UINT Command, DWORD Data, char *UILanguageFile) |
| 1127 |
{ |
{ |
| 1128 |
char HomeDir[MAX_PATH]; |
char HomeDir[MAX_PATH]; |
| 1129 |
char Temp[MAX_PATH]; |
char Temp[MAX_PATH]; |
| 1152 |
} |
} |
| 1153 |
} |
} |
| 1154 |
|
|
| 1155 |
HWND FAR PASCAL GetNthWin(int n) |
HWND PASCAL GetNthWin(int n) |
| 1156 |
{ |
{ |
| 1157 |
if (n<pm->NWin) { |
if (n<pm->NWin) { |
| 1158 |
return pm->WinList[n]; |
return pm->WinList[n]; |
| 1202 |
} |
} |
| 1203 |
|
|
| 1204 |
// ウィンドウを左右に並べて表示する(Show Windows Side by Side) |
// ウィンドウを左右に並べて表示する(Show Windows Side by Side) |
| 1205 |
void FAR PASCAL ShowAllWinSidebySide(HWND myhwnd) |
void PASCAL ShowAllWinSidebySide(HWND myhwnd) |
| 1206 |
{ |
{ |
| 1207 |
int n; |
int n; |
| 1208 |
HWND hwnd[MAXNWIN]; |
HWND hwnd[MAXNWIN]; |
| 1212 |
} |
} |
| 1213 |
|
|
| 1214 |
// ウィンドウを上下に並べて表示する(Show Windows Stacked) |
// ウィンドウを上下に並べて表示する(Show Windows Stacked) |
| 1215 |
void FAR PASCAL ShowAllWinStacked(HWND myhwnd) |
void PASCAL ShowAllWinStacked(HWND myhwnd) |
| 1216 |
{ |
{ |
| 1217 |
int n; |
int n; |
| 1218 |
HWND hwnd[MAXNWIN]; |
HWND hwnd[MAXNWIN]; |
| 1222 |
} |
} |
| 1223 |
|
|
| 1224 |
// ウィンドウを重ねて表示する(Cascade) |
// ウィンドウを重ねて表示する(Cascade) |
| 1225 |
void FAR PASCAL ShowAllWinCascade(HWND myhwnd) |
void PASCAL ShowAllWinCascade(HWND myhwnd) |
| 1226 |
{ |
{ |
| 1227 |
int n; |
int n; |
| 1228 |
HWND hwnd[MAXNWIN]; |
HWND hwnd[MAXNWIN]; |
| 1232 |
} |
} |
| 1233 |
|
|
| 1234 |
// 全Tera Termに終了指示を出す。 |
// 全Tera Termに終了指示を出す。 |
| 1235 |
void FAR PASCAL BroadcastClosingMessage(HWND myhwnd) |
void PASCAL BroadcastClosingMessage(HWND myhwnd) |
| 1236 |
{ |
{ |
| 1237 |
int i, max; |
int i, max; |
| 1238 |
HWND hwnd[MAXNWIN]; |
HWND hwnd[MAXNWIN]; |
| 1255 |
} |
} |
| 1256 |
|
|
| 1257 |
|
|
| 1258 |
int FAR PASCAL CommReadRawByte(PComVar cv, LPBYTE b) |
int PASCAL CommReadRawByte(PComVar cv, LPBYTE b) |
| 1259 |
{ |
{ |
| 1260 |
if ( ! cv->Ready ) { |
if ( ! cv->Ready ) { |
| 1261 |
return 0; |
return 0; |
| 1276 |
} |
} |
| 1277 |
} |
} |
| 1278 |
|
|
| 1279 |
void PASCAL FAR CommInsert1Byte(PComVar cv, BYTE b) |
void PASCAL CommInsert1Byte(PComVar cv, BYTE b) |
| 1280 |
{ |
{ |
| 1281 |
if ( ! cv->Ready ) { |
if ( ! cv->Ready ) { |
| 1282 |
return; |
return; |
| 1319 |
} |
} |
| 1320 |
} |
} |
| 1321 |
|
|
| 1322 |
int FAR PASCAL CommRead1Byte(PComVar cv, LPBYTE b) |
int PASCAL CommRead1Byte(PComVar cv, LPBYTE b) |
| 1323 |
{ |
{ |
| 1324 |
int c; |
int c; |
| 1325 |
|
|
| 1389 |
return c; |
return c; |
| 1390 |
} |
} |
| 1391 |
|
|
| 1392 |
int FAR PASCAL CommRawOut(PComVar cv, PCHAR B, int C) |
int PASCAL CommRawOut(PComVar cv, PCHAR B, int C) |
| 1393 |
{ |
{ |
| 1394 |
int a; |
int a; |
| 1395 |
|
|
| 1412 |
return a; |
return a; |
| 1413 |
} |
} |
| 1414 |
|
|
| 1415 |
int FAR PASCAL CommBinaryOut(PComVar cv, PCHAR B, int C) |
int PASCAL CommBinaryOut(PComVar cv, PCHAR B, int C) |
| 1416 |
{ |
{ |
| 1417 |
int a, i, Len; |
int a, i, Len; |
| 1418 |
char d[3]; |
char d[3]; |
| 1449 |
return i; |
return i; |
| 1450 |
} |
} |
| 1451 |
|
|
| 1452 |
int FAR PASCAL CommBinaryBuffOut(PComVar cv, PCHAR B, int C) |
int PASCAL CommBinaryBuffOut(PComVar cv, PCHAR B, int C) |
| 1453 |
{ |
{ |
| 1454 |
int a, i, Len, OutLen; |
int a, i, Len, OutLen; |
| 1455 |
char d[3]; |
char d[3]; |
| 1751 |
return i; |
return i; |
| 1752 |
} |
} |
| 1753 |
|
|
| 1754 |
int FAR PASCAL CommTextOut(PComVar cv, PCHAR B, int C) |
int PASCAL CommTextOut(PComVar cv, PCHAR B, int C) |
| 1755 |
{ |
{ |
| 1756 |
int i, TempLen, OutLen; |
int i, TempLen, OutLen; |
| 1757 |
char TempStr[12]; |
char TempStr[12]; |
| 1854 |
return i; |
return i; |
| 1855 |
} |
} |
| 1856 |
|
|
| 1857 |
int FAR PASCAL CommBinaryEcho(PComVar cv, PCHAR B, int C) |
int PASCAL CommBinaryEcho(PComVar cv, PCHAR B, int C) |
| 1858 |
{ |
{ |
| 1859 |
int a, i, Len; |
int a, i, Len; |
| 1860 |
char d[3]; |
char d[3]; |
| 1898 |
return i; |
return i; |
| 1899 |
} |
} |
| 1900 |
|
|
| 1901 |
int FAR PASCAL TextEchoMBCS(PComVar cv, PCHAR B, int C) |
int PASCAL TextEchoMBCS(PComVar cv, PCHAR B, int C) |
| 1902 |
{ |
{ |
| 1903 |
int i, TempLen; |
int i, TempLen; |
| 1904 |
WORD K; |
WORD K; |
| 2073 |
return i; |
return i; |
| 2074 |
} |
} |
| 2075 |
|
|
| 2076 |
int FAR PASCAL CommTextEcho(PComVar cv, PCHAR B, int C) |
int PASCAL CommTextEcho(PComVar cv, PCHAR B, int C) |
| 2077 |
{ |
{ |
| 2078 |
int i, TempLen; |
int i, TempLen; |
| 2079 |
char TempStr[11]; |
char TempStr[11]; |
| 2386 |
static int NotifyIconShowCount = 0; |
static int NotifyIconShowCount = 0; |
| 2387 |
static HICON CustomIcon = NULL; |
static HICON CustomIcon = NULL; |
| 2388 |
|
|
| 2389 |
void FAR PASCAL SetCustomNotifyIcon(HICON icon) |
void PASCAL SetCustomNotifyIcon(HICON icon) |
| 2390 |
{ |
{ |
| 2391 |
CustomIcon = icon; |
CustomIcon = icon; |
| 2392 |
} |
} |
| 2393 |
|
|
| 2394 |
HICON FAR PASCAL GetCustomNotifyIcon() |
HICON PASCAL GetCustomNotifyIcon() |
| 2395 |
{ |
{ |
| 2396 |
return CustomIcon; |
return CustomIcon; |
| 2397 |
} |
} |
| 2398 |
|
|
| 2399 |
void FAR PASCAL CreateNotifyIcon(PComVar cv) |
void PASCAL CreateNotifyIcon(PComVar cv) |
| 2400 |
{ |
{ |
| 2401 |
if (cv->NotifyIcon == NULL) { |
if (cv->NotifyIcon == NULL) { |
| 2402 |
notify_icon.cbSize = sizeof(notify_icon); |
notify_icon.cbSize = sizeof(notify_icon); |
| 2428 |
return; |
return; |
| 2429 |
} |
} |
| 2430 |
|
|
| 2431 |
void FAR PASCAL DeleteNotifyIcon(PComVar cv) |
void PASCAL DeleteNotifyIcon(PComVar cv) |
| 2432 |
{ |
{ |
| 2433 |
if (cv->NotifyIcon) { |
if (cv->NotifyIcon) { |
| 2434 |
Shell_NotifyIcon(NIM_DELETE, cv->NotifyIcon); |
Shell_NotifyIcon(NIM_DELETE, cv->NotifyIcon); |
| 2439 |
return; |
return; |
| 2440 |
} |
} |
| 2441 |
|
|
| 2442 |
void FAR PASCAL ShowNotifyIcon(PComVar cv) |
void PASCAL ShowNotifyIcon(PComVar cv) |
| 2443 |
{ |
{ |
| 2444 |
if (cv->NotifyIcon == NULL) { |
if (cv->NotifyIcon == NULL) { |
| 2445 |
CreateNotifyIcon(cv); |
CreateNotifyIcon(cv); |
| 2454 |
return; |
return; |
| 2455 |
} |
} |
| 2456 |
|
|
| 2457 |
void FAR PASCAL HideNotifyIcon(PComVar cv) |
void PASCAL HideNotifyIcon(PComVar cv) |
| 2458 |
{ |
{ |
| 2459 |
if (NotifyIconShowCount > 1) { |
if (NotifyIconShowCount > 1) { |
| 2460 |
NotifyIconShowCount -= 1; |
NotifyIconShowCount -= 1; |
| 2472 |
return; |
return; |
| 2473 |
} |
} |
| 2474 |
|
|
| 2475 |
void FAR PASCAL SetVerNotifyIcon(PComVar cv, unsigned int ver) |
void PASCAL SetVerNotifyIcon(PComVar cv, unsigned int ver) |
| 2476 |
{ |
{ |
| 2477 |
if (cv->NotifyIcon) { |
if (cv->NotifyIcon) { |
| 2478 |
cv->NotifyIcon->uVersion = ver; |
cv->NotifyIcon->uVersion = ver; |
| 2481 |
return; |
return; |
| 2482 |
} |
} |
| 2483 |
|
|
| 2484 |
void FAR PASCAL NotifyMessage(PComVar cv, char *msg, char *title, DWORD flag) |
void PASCAL NotifyMessage(PComVar cv, char *msg, char *title, DWORD flag) |
| 2485 |
{ |
{ |
| 2486 |
if (msg == NULL) { |
if (msg == NULL) { |
| 2487 |
return; |
return; |