4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
10 /** @file win32.h declarations of functions for MS windows systems */
16 bool MyShowCursor(bool show
, bool toggle
= false);
18 typedef void (*Function
)(int);
19 bool LoadLibraryList(Function proc
[], const char *dll
);
21 char *convert_from_fs(const TCHAR
*name
, char *utf8_buf
, size_t buflen
);
22 TCHAR
*convert_to_fs(const char *name
, TCHAR
*utf16_buf
, size_t buflen
, bool console_cp
= false);
24 /* Function shortcuts for UTF-8 <> UNICODE conversion. When unicode is not
25 * defined these macros return the string passed to them, with UNICODE
26 * they return a pointer to the converted string. These functions use an
27 * internal buffer of max 512 characters. */
29 # define MB_TO_WIDE(str) OTTD2FS(str)
30 # define WIDE_TO_MB(str) FS2OTTD(str)
32 # define MB_TO_WIDE(str) (str)
33 # define WIDE_TO_MB(str) (str)
36 HRESULT
OTTDSHGetFolderPath(HWND
, int, HANDLE
, DWORD
, LPTSTR
);
38 #if defined(__MINGW32__) && !defined(__MINGW64__)
39 #define SHGFP_TYPE_CURRENT 0
40 #endif /* __MINGW32__ */
43 void SetWin32ThreadName(DWORD dwThreadID
, const char* threadName
);
45 static inline void SetWin32ThreadName(DWORD dwThreadID
, const char* threadName
) {}