newsmemory-ios-sdk/Frameworks/RNReanimated.xcframework/ios-arm64/Headers/WorkletEventHandler.h

31 lines
573 B
C
Raw Normal View History

2024-10-29 07:36:43 +00:00
#pragma once
#include <jsi/jsi.h>
#include <string>
#include <utility>
using namespace facebook;
namespace reanimated {
class EventHandlerRegistry;
class WorkletEventHandler {
friend EventHandlerRegistry;
private:
unsigned long id;
std::string eventName;
jsi::Function handler;
public:
WorkletEventHandler(
unsigned long id,
std::string eventName,
jsi::Function &&handler)
: id(id), eventName(eventName), handler(std::move(handler)) {}
void process(jsi::Runtime &rt, const jsi::Value &eventValue);
};
} // namespace reanimated