Flutter Engine
platform_data.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_RUNTIME_PLATFORM_DATA_H_
6 #define FLUTTER_RUNTIME_PLATFORM_DATA_H_
7 
8 #include <memory>
9 #include <string>
10 #include <vector>
11 
12 #include "flutter/lib/ui/window/viewport_metrics.h"
13 
14 namespace flutter {
15 
16 //------------------------------------------------------------------------------
17 /// The struct of platform-specific data used for initializing ui.Window.
18 ///
19 /// framework may request data from ui.Window before platform is properly
20 /// configured. Engine this struct to set the desired default value for
21 /// ui.Window when creating Shell before platform is ready to send the real
22 /// data.
23 ///
24 /// See also:
25 ///
26 /// * flutter::Shell::Create, which takes a platform_data to initialize the
27 /// ui.Window attached to it.
28 struct PlatformData {
29  PlatformData();
30 
31  ~PlatformData();
32 
34  std::string language_code;
35  std::string country_code;
36  std::string script_code;
37  std::string variant_code;
38  std::vector<std::string> locale_data;
39  std::string user_settings_data = "{}";
40  std::string lifecycle_state;
41  bool semantics_enabled = false;
44 };
45 
46 } // namespace flutter
47 
48 #endif // FLUTTER_RUNTIME_PLATFORM_DATA_H_
std::string variant_code
Definition: platform_data.h:37
std::vector< std::string > locale_data
Definition: platform_data.h:38
std::string language_code
Definition: platform_data.h:34
std::string user_settings_data
Definition: platform_data.h:39
int32_t accessibility_feature_flags_
Definition: platform_data.h:43
ViewportMetrics viewport_metrics
Definition: platform_data.h:33
std::string country_code
Definition: platform_data.h:35
std::string script_code
Definition: platform_data.h:36
std::string lifecycle_state
Definition: platform_data.h:40