Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
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 wchar_t *name, char *utf8_buf, size_t buflen);
00022 wchar_t *convert_to_fs(const char *name, wchar_t *utf16_buf, size_t buflen);
00023
00024
00025
00026
00027
00028
00029
00030 #if defined(UNICODE)
00031 # define MB_TO_WIDE(str) OTTD2FS(str)
00032 # define MB_TO_WIDE_BUFFER(str, buffer, buflen) convert_to_fs(str, buffer, buflen)
00033 # define WIDE_TO_MB(str) FS2OTTD(str)
00034 # define WIDE_TO_MB_BUFFER(str, buffer, buflen) convert_from_fs(str, buffer, buflen)
00035 #else
00036 extern uint _codepage;
00037 # define MB_TO_WIDE(str) (str)
00038 # define MB_TO_WIDE_BUFFER(str, buffer, buflen) (str)
00039 # define WIDE_TO_MB(str) (str)
00040 # define WIDE_TO_MB_BUFFER(str, buffer, buflen) (str)
00041 #endif
00042
00043
00044 #if defined(SHGetFolderPath)
00045 #undef SHGetFolderPath
00046 #endif
00047 #define SHGetFolderPath OTTDSHGetFolderPath
00048
00049 HRESULT OTTDSHGetFolderPath(HWND, int, HANDLE, DWORD, LPTSTR);
00050
00051 #if defined(__MINGW32__)
00052 #define SHGFP_TYPE_CURRENT 0
00053 #endif
00054
00055 #endif