win32.h
Go to the documentation of this file.00001
00002
00005 #ifndef WIN32_H
00006 #define WIN32_H
00007
00008 #include <windows.h>
00009 bool MyShowCursor(bool show);
00010
00011 typedef void (*Function)(int);
00012 bool LoadLibraryList(Function proc[], const char *dll);
00013
00014 char *convert_from_fs(const wchar_t *name, char *utf8_buf, size_t buflen);
00015 wchar_t *convert_to_fs(const char *name, wchar_t *utf16_buf, size_t buflen);
00016
00017
00018
00019
00020
00021
00022
00023 #if defined(UNICODE)
00024 # define MB_TO_WIDE(str) OTTD2FS(str)
00025 # define MB_TO_WIDE_BUFFER(str, buffer, buflen) convert_to_fs(str, buffer, buflen)
00026 # define WIDE_TO_MB(str) FS2OTTD(str)
00027 # define WIDE_TO_MB_BUFFER(str, buffer, buflen) convert_from_fs(str, buffer, buflen)
00028 #else
00029 extern uint _codepage;
00030 # define MB_TO_WIDE(str) (str)
00031 # define MB_TO_WIDE_BUFFER(str, buffer, buflen) (str)
00032 # define WIDE_TO_MB(str) (str)
00033 # define WIDE_TO_MB_BUFFER(str, buffer, buflen) (str)
00034 #endif
00035
00036
00037 #if defined(SHGetFolderPath)
00038 #undef SHGetFolderPath
00039 #endif
00040 #define SHGetFolderPath OTTDSHGetFolderPath
00041
00042 HRESULT OTTDSHGetFolderPath(HWND, int, HANDLE, DWORD, LPTSTR);
00043
00044 #if defined(__MINGW32__)
00045 #define SHGFP_TYPE_CURRENT 0
00046 #endif
00047
00048 #endif