Flutter Engine
The Flutter Engine
runtime
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
#include "flutter/shell/common/display.h"
14
15
namespace
flutter
{
16
17
//------------------------------------------------------------------------------
18
/// The struct of platform-specific data used for initializing
19
/// ui.PlatformDispatcher.
20
///
21
/// The framework may request data from ui.PlatformDispatcher before the
22
/// platform is properly configured. When creating the Shell, the engine sets
23
/// this struct to default values until the platform is ready to send the real
24
/// data.
25
///
26
/// See also:
27
///
28
/// * flutter::Shell::Create, which takes a platform_data to initialize the
29
/// ui.PlatformDispatcher attached to it.
30
struct
PlatformData
{
31
PlatformData
();
32
33
~PlatformData
();
34
35
// A map from view IDs of existing views to their viewport metrics.
36
std::unordered_map<int64_t, ViewportMetrics>
viewport_metrics_for_views
;
37
38
std::string
language_code
;
39
std::string
country_code
;
40
std::string
script_code
;
41
std::string
variant_code
;
42
std::vector<std::string>
locale_data
;
43
std::string
user_settings_data
=
"{}"
;
44
std::string
lifecycle_state
;
45
bool
semantics_enabled
=
false
;
46
bool
assistive_technology_enabled
=
false
;
47
int32_t
accessibility_feature_flags_
= 0;
48
std::vector<DisplayData>
displays
;
49
};
50
51
}
// namespace flutter
52
53
#endif
// FLUTTER_RUNTIME_PLATFORM_DATA_H_
flutter
Definition:
asset_manager.cc:10
flutter::PlatformData
Definition:
platform_data.h:30
flutter::PlatformData::viewport_metrics_for_views
std::unordered_map< int64_t, ViewportMetrics > viewport_metrics_for_views
Definition:
platform_data.h:36
flutter::PlatformData::language_code
std::string language_code
Definition:
platform_data.h:38
flutter::PlatformData::accessibility_feature_flags_
int32_t accessibility_feature_flags_
Definition:
platform_data.h:47
flutter::PlatformData::~PlatformData
~PlatformData()
flutter::PlatformData::semantics_enabled
bool semantics_enabled
Definition:
platform_data.h:45
flutter::PlatformData::lifecycle_state
std::string lifecycle_state
Definition:
platform_data.h:44
flutter::PlatformData::country_code
std::string country_code
Definition:
platform_data.h:39
flutter::PlatformData::displays
std::vector< DisplayData > displays
Definition:
platform_data.h:48
flutter::PlatformData::PlatformData
PlatformData()
flutter::PlatformData::assistive_technology_enabled
bool assistive_technology_enabled
Definition:
platform_data.h:46
flutter::PlatformData::locale_data
std::vector< std::string > locale_data
Definition:
platform_data.h:42
flutter::PlatformData::script_code
std::string script_code
Definition:
platform_data.h:40
flutter::PlatformData::variant_code
std::string variant_code
Definition:
platform_data.h:41
flutter::PlatformData::user_settings_data
std::string user_settings_data
Definition:
platform_data.h:43
Generated on Sun Jun 23 2024 21:55:07 for Flutter Engine by
1.9.4