Flutter Engine
The Flutter Engine
shell
platform
glfw
system_utils.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef FLUTTER_SHELL_PLATFORM_GLFW_SYSTEM_UTILS_H_
6
#define FLUTTER_SHELL_PLATFORM_GLFW_SYSTEM_UTILS_H_
7
8
#include <string>
9
#include <vector>
10
11
#include "flutter/shell/platform/embedder/embedder.h"
12
13
namespace
flutter
{
14
15
// Components of a system language/locale.
16
struct
LanguageInfo
{
17
std::string
language
;
18
std::string
territory
;
19
std::string
codeset
;
20
std::string
modifier
;
21
};
22
23
// Returns the list of user-preferred languages, in preference order,
24
// parsed into LanguageInfo structures.
25
std::vector<LanguageInfo>
GetPreferredLanguageInfo
();
26
27
// Converts a vector of LanguageInfo structs to a vector of FlutterLocale
28
// structs. |languages| must outlive the returned value, since the returned
29
// elements have pointers into it.
30
std::vector<FlutterLocale>
ConvertToFlutterLocale
(
31
const
std::vector<LanguageInfo>& languages);
32
33
}
// namespace flutter
34
35
#endif
// FLUTTER_SHELL_PLATFORM_GLFW_SYSTEM_UTILS_H_
flutter
Definition:
asset_manager.cc:10
flutter::ConvertToFlutterLocale
std::vector< FlutterLocale > ConvertToFlutterLocale(const std::vector< LanguageInfo > &languages)
Definition:
system_utils.cc:131
flutter::GetPreferredLanguageInfo
std::vector< LanguageInfo > GetPreferredLanguageInfo()
Definition:
system_utils.cc:114
flutter::LanguageInfo
Definition:
system_utils.h:16
flutter::LanguageInfo::language
std::string language
Definition:
system_utils.h:17
flutter::LanguageInfo::codeset
std::string codeset
Definition:
system_utils.h:19
flutter::LanguageInfo::modifier
std::string modifier
Definition:
system_utils.h:20
flutter::LanguageInfo::territory
std::string territory
Definition:
system_utils.h:18
Generated on Sun Jun 23 2024 21:55:18 for Flutter Engine by
1.9.4