#include <windows.h>
Go to the source code of this file.
Defines | |
#define | MB_TO_WIDE(str) (str) |
#define | MB_TO_WIDE_BUFFER(str, buffer, buflen) (str) |
#define | WIDE_TO_MB(str) (str) |
#define | WIDE_TO_MB_BUFFER(str, buffer, buflen) (str) |
#define | SHGetFolderPath OTTDSHGetFolderPath |
Typedefs | |
typedef void(* | Function )(int) |
Functions | |
bool | MyShowCursor (bool show) |
bool | LoadLibraryList (Function proc[], const char *dll) |
Helper function needed by dynamically loading libraries XXX: Hurray for MS only having an ANSI GetProcAddress function on normal windows and no Wide version except for in Windows Mobile/CE. | |
char * | convert_from_fs (const wchar_t *name, char *utf8_buf, size_t buflen) |
Convert to OpenTTD's encoding from that of the environment in UNICODE. | |
wchar_t * | convert_to_fs (const char *name, wchar_t *utf16_buf, size_t buflen) |
Convert from OpenTTD's encoding to that of the environment in UNICODE. | |
HRESULT | OTTDSHGetFolderPath (HWND, int, HANDLE, DWORD, LPTSTR) |
Our very own SHGetFolderPath function for support of windows operating systems that don't have this function (eg Win9x, etc. | |
Variables | |
uint | _codepage |
Definition in file win32.h.
char* convert_from_fs | ( | const wchar_t * | name, | |
char * | utf8_buf, | |||
size_t | buflen | |||
) |
Convert to OpenTTD's encoding from that of the environment in UNICODE.
OpenTTD encoding is UTF8, local is wide
name | pointer to a valid string that will be converted | |
utf8_buf | pointer to a valid buffer that will receive the converted string | |
buflen | length in characters of the receiving buffer |
Definition at line 1269 of file win32.cpp.
Referenced by FS2OTTD(), and InsertTextBufferClipboard().
wchar_t* convert_to_fs | ( | const char * | name, | |
wchar_t * | utf16_buf, | |||
size_t | buflen | |||
) |
Convert from OpenTTD's encoding to that of the environment in UNICODE.
OpenTTD encoding is UTF8, local is wide
name | pointer to a valid string that will be converted | |
utf16_buf | pointer to a valid wide-char buffer that will receive the converted string | |
buflen | length in wide characters of the receiving buffer |
Definition at line 1288 of file win32.cpp.
Referenced by OTTD2FS().
HRESULT OTTDSHGetFolderPath | ( | HWND | hwnd, | |
int | csidl, | |||
HANDLE | hToken, | |||
DWORD | dwFlags, | |||
LPTSTR | pszPath | |||
) |
Our very own SHGetFolderPath function for support of windows operating systems that don't have this function (eg Win9x, etc.
). We try using the native function, and if that doesn't exist we will try a more crude approach of environment variables and hope for the best
Definition at line 1303 of file win32.cpp.
References LoadLibraryList().