mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Cleans up header order/grouping for consistency: associated header, C/C++ system/standard library headers, library headers, platform-specific #includes. Adds <cstring> where strlen, memcpy are being used: there are a bunch of places we use them transitively. Applies linter-required cleanups. Disables linter on one file due to included RapidJson header. See https://github.com/flutter/flutter/issues/65676 This patch does not cover flutter/shell/platform/darwin. There's a separate, slightly more intensive cleanup for those in progress.
49 lines
1.4 KiB
C++
49 lines
1.4 KiB
C++
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef FLUTTER_RUNTIME_PLATFORM_DATA_H_
|
|
#define FLUTTER_RUNTIME_PLATFORM_DATA_H_
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "flutter/lib/ui/window/viewport_metrics.h"
|
|
|
|
namespace flutter {
|
|
|
|
//------------------------------------------------------------------------------
|
|
/// The struct of platform-specific data used for initializing ui.Window.
|
|
///
|
|
/// framework may request data from ui.Window before platform is properly
|
|
/// configured. Engine this struct to set the desired default value for
|
|
/// ui.Window when creating Shell before platform is ready to send the real
|
|
/// data.
|
|
///
|
|
/// See also:
|
|
///
|
|
/// * flutter::Shell::Create, which takes a platform_data to initialize the
|
|
/// ui.Window attached to it.
|
|
struct PlatformData {
|
|
PlatformData();
|
|
|
|
~PlatformData();
|
|
|
|
ViewportMetrics viewport_metrics;
|
|
std::string language_code;
|
|
std::string country_code;
|
|
std::string script_code;
|
|
std::string variant_code;
|
|
std::vector<std::string> locale_data;
|
|
std::string user_settings_data = "{}";
|
|
std::string lifecycle_state;
|
|
bool semantics_enabled = false;
|
|
bool assistive_technology_enabled = false;
|
|
int32_t accessibility_feature_flags_ = 0;
|
|
};
|
|
|
|
} // namespace flutter
|
|
|
|
#endif // FLUTTER_RUNTIME_PLATFORM_DATA_H_
|