mirror of
https://github.com/status-im/react-native.git
synced 2025-01-30 03:05:44 +00:00
504c7694c4
Summary: @public RawEvent represents ready-to-dispatch event data, an event that can be processed uniformly. Reviewed By: mdvacca Differential Revision: D8886235 fbshipit-source-id: 1c905517814330c5ecbf39f0ebc95ff2b576d1f2
30 lines
623 B
C++
30 lines
623 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.
|
|
*/
|
|
|
|
#include "RawEvent.h"
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
RawEvent::RawEvent(
|
|
const std::string &type,
|
|
const folly::dynamic &payload,
|
|
const EventTarget &eventTarget,
|
|
const std::function<bool()> &isDispatchable
|
|
):
|
|
type(type),
|
|
payload(payload),
|
|
eventTarget(eventTarget),
|
|
isDispachable_(isDispatchable) {}
|
|
|
|
bool RawEvent::isDispachable() const {
|
|
return isDispachable_();
|
|
}
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|