#pragma once #include #include #include #include #include "Shareables.h" #include "WorkletRuntime.h" using namespace facebook; namespace reanimated { class WorkletEventHandler { const uint64_t handlerId_; const uint64_t emitterReactTag_; const std::string eventName_; const std::shared_ptr handlerFunction_; public: WorkletEventHandler( const uint64_t handlerId, const std::string &eventName, const uint64_t emitterReactTag, const std::shared_ptr &handlerFunction) : handlerId_(handlerId), emitterReactTag_(emitterReactTag), eventName_(eventName), handlerFunction_(handlerFunction) {} void process( const std::shared_ptr &workletRuntime, double eventTimestamp, const jsi::Value &eventValue) const; uint64_t getHandlerId() const; const std::string &getEventName() const; uint64_t getEmitterReactTag() const; bool shouldIgnoreEmitterReactTag() const; }; } // namespace reanimated