static void deinit_fonts(void);
static void set_input_locale(HKL);
static void update_savedsess_menu(void);
-static void init_flashwindow(void);
+static void init_winfuncs(void);
static int is_full_screen(void);
static void make_full_screen(void);
init_help();
- init_flashwindow();
+ init_winfuncs();
conf = conf_new();
return ibuf;
}
+DECL_WINDOWS_FUNCTION(static, BOOL, FlashWindowEx, (PFLASHWINFO));
+DECL_WINDOWS_FUNCTION(static, BOOL, ToUnicodeEx,
+ (UINT, UINT, const BYTE *, LPWSTR, int, UINT, HKL));
+
+static void init_winfuncs(void)
+{
+ HMODULE user32_module = load_system32_dll("user32.dll");
+ GET_WINDOWS_FUNCTION(user32_module, FlashWindowEx);
+ GET_WINDOWS_FUNCTION(user32_module, ToUnicodeEx);
+}
+
/*
* Translate a WM_(SYS)?KEY(UP|DOWN) message into a string of ASCII
* codes. Returns number of bytes used, zero to drop the message,
/* XXX how do we know what the max size of the keys array should
* be is? There's indication on MS' website of an Inquire/InquireEx
* functioning returning a KBINFO structure which tells us. */
- if (osVersion.dwPlatformId == VER_PLATFORM_WIN32_NT) {
- r = ToUnicodeEx(wParam, scan, keystate, keys_unicode,
- lenof(keys_unicode), 0, kbd_layout);
+ if (osVersion.dwPlatformId == VER_PLATFORM_WIN32_NT && p_ToUnicodeEx) {
+ r = p_ToUnicodeEx(wParam, scan, keystate, keys_unicode,
+ lenof(keys_unicode), 0, kbd_layout);
} else {
/* XXX 'keys' parameter is declared in MSDN documentation as
* 'LPWORD lpChar'.
sfree(stuff);
}
-DECL_WINDOWS_FUNCTION(static, BOOL, FlashWindowEx, (PFLASHWINFO));
-
-static void init_flashwindow(void)
-{
- HMODULE user32_module = load_system32_dll("user32.dll");
- GET_WINDOWS_FUNCTION(user32_module, FlashWindowEx);
-}
-
static BOOL flash_window_ex(DWORD dwFlags, UINT uCount, DWORD dwTimeout)
{
if (p_FlashWindowEx) {