OpenTTD
|
declarations of functions for MS windows systems More...
#include <windows.h>
Go to the source code of this file.
Macros | |
#define | MB_TO_WIDE(str) OTTD2FS(str) |
#define | WIDE_TO_MB(str) FS2OTTD(str) |
Typedefs | |
typedef void(* | Function )(int) |
Functions | |
bool | MyShowCursor (bool show, bool toggle=false) |
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 TCHAR *name, char *utf8_buf, size_t buflen) |
Convert to OpenTTD's encoding from that of the environment in UNICODE. | |
TCHAR * | convert_to_fs (const char *name, TCHAR *utf16_buf, size_t buflen, bool console_cp=false) |
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.). |
declarations of functions for MS windows systems
Definition in file win32.h.
char* convert_from_fs | ( | const TCHAR * | 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 646 of file win32.cpp.
References AllocaM.
Referenced by FS2OTTD(), and HandleIMEComposition().
TCHAR* convert_to_fs | ( | const char * | name, |
TCHAR * | system_buf, | ||
size_t | buflen, | ||
bool | console_cp | ||
) |
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 |
console_cp | convert to the console encoding instead of the normal system encoding. |
Definition at line 680 of file win32.cpp.
References AllocaM.
Referenced by HelpDialogFunc(), and 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 708 of file win32.cpp.
References DEBUG, and LoadLibraryList().