2018-05-22 15:48:24 -07:00
|
|
|
/**
|
2018-09-11 15:27:47 -07:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2018-05-22 15:48:24 -07:00
|
|
|
*
|
|
|
|
* 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>
|
|
|
|
|
2018-05-24 18:23:13 -07:00
|
|
|
#include <fabric/core/LayoutMetrics.h>
|
2018-06-08 20:16:17 -07:00
|
|
|
#include <fabric/core/ReactPrimitives.h>
|
2018-09-10 11:19:19 -07:00
|
|
|
#include "TouchEventEmitter.h"
|
2018-05-22 15:48:24 -07:00
|
|
|
|
|
|
|
namespace facebook {
|
|
|
|
namespace react {
|
|
|
|
|
2018-06-09 13:02:55 -07:00
|
|
|
class ViewEventEmitter;
|
2018-05-22 15:48:24 -07:00
|
|
|
|
2018-06-09 13:02:55 -07:00
|
|
|
using SharedViewEventEmitter = std::shared_ptr<const ViewEventEmitter>;
|
2018-05-22 15:48:24 -07:00
|
|
|
|
2018-06-09 13:02:55 -07:00
|
|
|
class ViewEventEmitter:
|
2018-09-10 11:19:19 -07:00
|
|
|
public TouchEventEmitter {
|
2018-05-22 15:48:24 -07:00
|
|
|
public:
|
2018-09-10 11:19:19 -07:00
|
|
|
using TouchEventEmitter::TouchEventEmitter;
|
2018-05-22 15:48:24 -07:00
|
|
|
|
2018-05-24 18:23:13 -07:00
|
|
|
#pragma mark - Accessibility
|
|
|
|
|
2018-05-22 15:48:24 -07:00
|
|
|
void onAccessibilityAction(const std::string &name) const;
|
|
|
|
void onAccessibilityTap() const;
|
|
|
|
void onAccessibilityMagicTap() const;
|
2018-05-24 18:23:13 -07:00
|
|
|
|
|
|
|
#pragma mark - Layout
|
|
|
|
|
|
|
|
void onLayout(const LayoutMetrics &layoutMetrics) const;
|
2018-05-22 15:48:24 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace react
|
|
|
|
} // namespace facebook
|