1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-18 11:31:00 -05:00

Rename most of the platform source files.

This gets rid of all those annoying 'win', 'ux' and 'gtk' prefixes
which made filenames annoying to type and to tab-complete. Also, as
with my other recent renaming sprees, I've taken the opportunity to
expand and clarify some of the names so that they're not such cryptic
abbreviations.
This commit is contained in:
Simon Tatham
2021-04-23 06:19:05 +01:00
parent d9f217323e
commit f39c51f9a7
92 changed files with 127 additions and 124 deletions

38
windows/select-gui.c Normal file
View File

@ -0,0 +1,38 @@
/*
* Implementation of do_select() for winnet.c to use, that uses
* WSAAsyncSelect to convert network activity into window messages,
* for integration into a GUI event loop.
*/
#include "putty.h"
static HWND winsel_hwnd = NULL;
void winselgui_set_hwnd(HWND hwnd)
{
winsel_hwnd = hwnd;
}
void winselgui_clear_hwnd(void)
{
winsel_hwnd = NULL;
}
const char *do_select(SOCKET skt, bool enable)
{
int msg, events;
if (enable) {
msg = WM_NETEVENT;
events = (FD_CONNECT | FD_READ | FD_WRITE |
FD_OOB | FD_CLOSE | FD_ACCEPT);
} else {
msg = events = 0;
}
assert(winsel_hwnd);
if (p_WSAAsyncSelect(skt, winsel_hwnd, msg, events) == SOCKET_ERROR)
return winsock_error_string(p_WSAGetLastError());
return NULL;
}