mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
110b191b14
Summary: Previously, ViewPropsMapBuffer conversions were hardcoded deep in Android infrastructrue. I've generalized this into a different mechanism to allow any Props struct to support MapBuffer props. There are still some things that need to be cleaned up and this should be treated as experimental. One thing we likely want to do is remove the hardcoded IDs (fine for codegen'd code; less so for handwritten) and use compile-time-hashed IDs instead with human-readable string names. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D38708719 fbshipit-source-id: 64603dee7f21828be31346c555d99862dab304ea
34 lines
1.0 KiB
C++
34 lines
1.0 KiB
C++
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <react/renderer/mapbuffer/MapBuffer.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
#ifdef ANDROID
|
|
constexpr MapBuffer::Key AP_ACCESSIBILITY_ACTIONS = 0;
|
|
constexpr MapBuffer::Key AP_ACCESSIBILITY_HINT = 1;
|
|
constexpr MapBuffer::Key AP_ACCESSIBILITY_LABEL = 2;
|
|
constexpr MapBuffer::Key AP_ACCESSIBILITY_LABELLED_BY = 3;
|
|
constexpr MapBuffer::Key AP_ACCESSIBILITY_LIVE_REGION = 4;
|
|
constexpr MapBuffer::Key AP_ACCESSIBILITY_ROLE = 5;
|
|
constexpr MapBuffer::Key AP_ACCESSIBILITY_STATE = 6;
|
|
constexpr MapBuffer::Key AP_ACCESSIBILITY_VALUE = 7;
|
|
constexpr MapBuffer::Key AP_ACCESSIBLE = 8;
|
|
constexpr MapBuffer::Key AP_IMPORTANT_FOR_ACCESSIBILITY = 19;
|
|
|
|
// AccessibilityAction values
|
|
constexpr MapBuffer::Key ACCESSIBILITY_ACTION_NAME = 0;
|
|
constexpr MapBuffer::Key ACCESSIBILITY_ACTION_LABEL = 1;
|
|
#endif
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|