kernel32: Implement EnumTimeFormatsEx().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
49e5b9c2a4
commit
61c49bd78e
|
@ -428,7 +428,7 @@
|
|||
@ stdcall EnumSystemLocalesEx(ptr long long ptr)
|
||||
@ stdcall EnumSystemLocalesW(ptr long)
|
||||
@ stdcall EnumTimeFormatsA(ptr long long)
|
||||
# @ stub EnumTimeFormatsEx
|
||||
@ stdcall EnumTimeFormatsEx(ptr wstr long long)
|
||||
@ stdcall EnumTimeFormatsW(ptr long long)
|
||||
@ stdcall EnumUILanguagesA(ptr long long)
|
||||
@ stdcall EnumUILanguagesW(ptr long long)
|
||||
|
|
|
@ -1924,9 +1924,11 @@ struct enumtimeformats_context {
|
|||
enum enum_callback_type type; /* callback kind */
|
||||
union {
|
||||
TIMEFMT_ENUMPROCW callback; /* user callback pointer */
|
||||
TIMEFMT_ENUMPROCEX callbackex;
|
||||
} u;
|
||||
LCID lcid; /* locale of interest */
|
||||
DWORD flags;
|
||||
LPARAM lParam;
|
||||
BOOL unicode; /* A vs W callback type, only for regular and Ex callbacks */
|
||||
};
|
||||
|
||||
|
@ -1970,6 +1972,9 @@ static BOOL NLS_EnumTimeFormats(struct enumtimeformats_context *ctxt)
|
|||
case CALLBACK_ENUMPROC:
|
||||
ctxt->u.callback(ctxt->unicode ? bufW : (WCHAR*)bufA);
|
||||
break;
|
||||
case CALLBACK_ENUMPROCEX:
|
||||
ctxt->u.callbackex(bufW, ctxt->lParam);
|
||||
break;
|
||||
default:
|
||||
;
|
||||
}
|
||||
|
@ -2020,6 +2025,23 @@ BOOL WINAPI EnumTimeFormatsW(TIMEFMT_ENUMPROCW proc, LCID lcid, DWORD flags)
|
|||
return NLS_EnumTimeFormats(&ctxt);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* EnumTimeFormatsEx (KERNEL32.@)
|
||||
*/
|
||||
BOOL WINAPI EnumTimeFormatsEx(TIMEFMT_ENUMPROCEX proc, const WCHAR *locale, DWORD flags, LPARAM lParam)
|
||||
{
|
||||
struct enumtimeformats_context ctxt;
|
||||
|
||||
ctxt.type = CALLBACK_ENUMPROCEX;
|
||||
ctxt.u.callbackex = proc;
|
||||
ctxt.lcid = LocaleNameToLCID(locale, 0);
|
||||
ctxt.flags = flags;
|
||||
ctxt.lParam = lParam;
|
||||
ctxt.unicode = TRUE;
|
||||
|
||||
return NLS_EnumTimeFormats(&ctxt);
|
||||
}
|
||||
|
||||
struct enumcalendar_context {
|
||||
enum enum_callback_type type; /* callback kind */
|
||||
union {
|
||||
|
|
|
@ -735,6 +735,7 @@ typedef struct _nlsversioninfoex {
|
|||
|
||||
typedef BOOL (CALLBACK *CALINFO_ENUMPROCEXEX)(LPWSTR,CALID,LPWSTR,LPARAM);
|
||||
typedef BOOL (CALLBACK *DATEFMT_ENUMPROCEXEX)(LPWSTR,CALID,LPARAM);
|
||||
typedef BOOL (CALLBACK *TIMEFMT_ENUMPROCEX)(LPWSTR,LPARAM);
|
||||
#if defined(STRICT)
|
||||
typedef BOOL (CALLBACK *CALINFO_ENUMPROCA)(LPSTR);
|
||||
typedef BOOL (CALLBACK *CALINFO_ENUMPROCW)(LPWSTR);
|
||||
|
@ -862,6 +863,7 @@ WINBASEAPI BOOL WINAPI EnumLanguageGroupLocalesW(LANGGROUPLOCALE_ENUMPROC
|
|||
WINBASEAPI BOOL WINAPI EnumTimeFormatsA(TIMEFMT_ENUMPROCA,LCID,DWORD);
|
||||
WINBASEAPI BOOL WINAPI EnumTimeFormatsW(TIMEFMT_ENUMPROCW,LCID,DWORD);
|
||||
#define EnumTimeFormats WINELIB_NAME_AW(EnumTimeFormats)
|
||||
WINBASEAPI BOOL WINAPI EnumTimeFormatsEx(TIMEFMT_ENUMPROCEX,LPCWSTR,DWORD,LPARAM);
|
||||
WINBASEAPI BOOL WINAPI EnumUILanguagesA(UILANGUAGE_ENUMPROCA,DWORD,LONG_PTR);
|
||||
WINBASEAPI BOOL WINAPI EnumUILanguagesW(UILANGUAGE_ENUMPROCW,DWORD,LONG_PTR);
|
||||
#define EnumUILanguages WINELIB_NAME_AW(EnumUILanguages)
|
||||
|
|
Loading…
Reference in New Issue