# win32.h

Go to the documentation of this file.

    00001 /* $Id: win32.h 25676 2013-08-05 20:36:55Z michi_cc $ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * 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.
    00006  * 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.
    00007  * 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/>.
    00008  */
    00009
    00012 #ifndef WIN32_H
    00013 #define WIN32_H
    00014
    00015 #include <windows.h>
    00016 bool MyShowCursor(bool show, bool toggle = false);
    00017
    00018 typedef void (*Function)(int);
    00019 bool LoadLibraryList(Function proc[], const char *dll);
    00020
    00021 char *convert_from_fs(const TCHAR *name, char *utf8_buf, size_t buflen);
    00022 TCHAR *convert_to_fs(const char *name, TCHAR *utf16_buf, size_t buflen, bool console_cp = false);
    00023
    00024 /* Function shortcuts for UTF-8 <> UNICODE conversion. When unicode is not
    00025  * defined these macros return the string passed to them, with UNICODE
    00026  * they return a pointer to the converted string. These functions use an
    00027  * internal buffer of max 512 characters. */
    00028 #if defined(UNICODE)
    00029 # define MB_TO_WIDE(str) OTTD2FS(str)
    00030 # define WIDE_TO_MB(str) FS2OTTD(str)
    00031 #else
    00032 # define MB_TO_WIDE(str) (str)
    00033 # define WIDE_TO_MB(str) (str)
    00034 #endif
    00035
    00036 HRESULT OTTDSHGetFolderPath(HWND, int, HANDLE, DWORD, LPTSTR);
    00037
    00038 #if defined(__MINGW32__)
    00039 #define SHGFP_TYPE_CURRENT 0
    00040 #endif /* __MINGW32__ */
    00041
    00042 #endif /* WIN32_H */