mirror of
https://github.com/status-im/react-native.git
synced 2025-03-02 18:30:38 +00:00
Summary: In the future, we may want some components (like Virtual Text) to handle only touch events. Therefore, I've extracted `TouchEventEmitter` from `ViewEventEmitter`. Reviewed By: shergin Differential Revision: D9696903 fbshipit-source-id: f6acc90d8ff53b5e6badaa472a5e099fb7cf03ff
40 lines
872 B
C++
40 lines
872 B
C++
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* 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 <memory>
|
|
|
|
#include <fabric/core/LayoutMetrics.h>
|
|
#include <fabric/core/ReactPrimitives.h>
|
|
#include "TouchEventEmitter.h"
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
class ViewEventEmitter;
|
|
|
|
using SharedViewEventEmitter = std::shared_ptr<const ViewEventEmitter>;
|
|
|
|
class ViewEventEmitter:
|
|
public TouchEventEmitter {
|
|
public:
|
|
using TouchEventEmitter::TouchEventEmitter;
|
|
|
|
#pragma mark - Accessibility
|
|
|
|
void onAccessibilityAction(const std::string &name) const;
|
|
void onAccessibilityTap() const;
|
|
void onAccessibilityMagicTap() const;
|
|
|
|
#pragma mark - Layout
|
|
|
|
void onLayout(const LayoutMetrics &layoutMetrics) const;
|
|
};
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|