OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

win32.h
Go to the documentation of this file.
1 /* $Id: win32.h 27176 2015-03-02 09:10:16Z planetmaker $ */
2
3 /*
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/>.
8 */
9
12 #ifndef WIN32_H
13 #define WIN32_H
14
15 #include <windows.h>
16 bool MyShowCursor(bool show, bool toggle = false);
17
18 typedef void (*Function)(int);
19 bool LoadLibraryList(Function proc[], const char *dll);
20
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);
23
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. */
28 #if defined(UNICODE)
29 # define MB_TO_WIDE(str) OTTD2FS(str)
30 # define WIDE_TO_MB(str) FS2OTTD(str)
31 #else
32 # define MB_TO_WIDE(str) (str)
33 # define WIDE_TO_MB(str) (str)
34 #endif
35
36 HRESULT OTTDSHGetFolderPath(HWND, int, HANDLE, DWORD, LPTSTR);
37
38 #if defined(__MINGW32__) && !defined(__MINGW64__)
39 #define SHGFP_TYPE_CURRENT 0
40 #endif /* __MINGW32__ */
41
42 #endif /* WIN32_H */