Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
tools
win_lcid.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2013 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
#include <windows.h>
8
#include <
stdio.h
>
9
10
#define BUFFER_SIZE 512
11
BOOL
CALLBACK
MyFuncLocaleEx
(LPWSTR pStr,
DWORD
dwFlags,
LPARAM
lparam) {
12
WCHAR wcBuffer[
BUFFER_SIZE
];
13
int
bufferSize;
14
15
bufferSize = GetLocaleInfoEx(pStr, LOCALE_SENGLANGUAGE, wcBuffer,
BUFFER_SIZE
);
16
if
(bufferSize == 0) {
17
wprintf(L
"Locale %s had error %d\n"
, pStr,
GetLastError
());
18
return
(
TRUE
);
19
}
20
21
LCID lcid = LocaleNameToLCID(pStr,
nullptr
);
22
if
(lcid == 0) {
23
wprintf(L
"Error %d getting LCID\n"
,
GetLastError
());
24
return
(
TRUE
);
25
}
26
27
if
(lcid > 0x8000) {
28
wprintf(L
"//"
);
29
}
30
wprintf(L
" { 0x%.4x, \"%s\" }, //%s\n"
, lcid, pStr, wcBuffer);
31
32
return
(
TRUE
);
33
}
34
35
int
main
(
int
argc,
wchar_t
* argv[]) {
36
EnumSystemLocalesEx(
MyFuncLocaleEx
, LOCALE_ALL,
nullptr
,
nullptr
);
37
}
TRUE
return TRUE
Definition
fl_pixel_buffer_texture_test.cc:53
main
Definition
main.py:1
stdio.h
BUFFER_SIZE
#define BUFFER_SIZE
Definition
win_lcid.cpp:10
MyFuncLocaleEx
BOOL CALLBACK MyFuncLocaleEx(LPWSTR pStr, DWORD dwFlags, LPARAM lparam)
Definition
win_lcid.cpp:11
BOOL
int BOOL
Definition
windows_types.h:37
LPARAM
LONG_PTR LPARAM
Definition
windows_types.h:60
GetLastError
WINBASEAPI _Check_return_ _Post_equals_last_error_ DWORD WINAPI GetLastError(VOID)
DWORD
unsigned long DWORD
Definition
windows_types.h:22
CALLBACK
#define CALLBACK
Definition
windows_types.h:216
Generated on Fri Apr 26 2024 06:18:16 for Flutter Engine by
1.9.8