OpenTTD Source  1.11.2
win32.h File Reference
#include <windows.h>

Go to the source code of this file.

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.
 
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. More...
 
wchar_t * convert_to_fs (const char *name, wchar_t *utf16_buf, size_t buflen, bool console_cp=false)
 Convert from OpenTTD's encoding to that of the environment in UNICODE. More...
 
void Win32SetCurrentLocaleName (const char *iso_code)
 
int OTTDStringCompare (const char *s1, const char *s2)
 
bool IsWindowsVistaOrGreater ()
 Is the current Windows version Vista or later? More...
 

Detailed Description

declarations of functions for MS windows systems

Definition in file win32.h.

Function Documentation

◆ convert_from_fs()

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.

Parameters
namepointer to a valid string that will be converted
utf8_bufpointer to a valid buffer that will receive the converted string
buflenlength in characters of the receiving buffer
Returns
pointer to utf8_buf. If conversion fails the string is of zero-length

Definition at line 595 of file win32.cpp.

Referenced by FS2OTTD(), and HandleIMEComposition().

◆ convert_to_fs()

wchar_t* convert_to_fs ( const char *  name,
wchar_t *  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.

Parameters
namepointer to a valid string that will be converted
system_bufpointer to a valid wide-char buffer that will receive the converted string
buflenlength in wide characters of the receiving buffer
console_cpconvert to the console encoding instead of the normal system encoding.
Returns
pointer to system_buf. If conversion fails the string is of zero-length

Definition at line 617 of file win32.cpp.

Referenced by HelpDialogFunc(), HFontFromFont(), and OTTD2FS().

◆ IsWindowsVistaOrGreater()

bool IsWindowsVistaOrGreater ( )

Is the current Windows version Vista or later?

Returns
True if the current Windows is Vista or later.

Definition at line 710 of file win32.cpp.