1*ab11e3c9SKudo Chien #pragma once 2*ab11e3c9SKudo Chien 3*ab11e3c9SKudo Chien #include <jsi/jsi.h> 4*ab11e3c9SKudo Chien #include <stdio.h> 5*ab11e3c9SKudo Chien #include <functional> 6*ab11e3c9SKudo Chien #include <map> 7*ab11e3c9SKudo Chien #include <memory> 8*ab11e3c9SKudo Chien 9*ab11e3c9SKudo Chien namespace reanimated { 10*ab11e3c9SKudo Chien 11*ab11e3c9SKudo Chien using namespace facebook; 12*ab11e3c9SKudo Chien 13*ab11e3c9SKudo Chien class MutableValue; 14*ab11e3c9SKudo Chien 15*ab11e3c9SKudo Chien class LayoutAnimationsProxy { 16*ab11e3c9SKudo Chien public: 17*ab11e3c9SKudo Chien LayoutAnimationsProxy( 18*ab11e3c9SKudo Chien std::function<void(int, jsi::Object newProps)> _notifyAboutProgress, 19*ab11e3c9SKudo Chien std::function<void(int, bool)> _notifyAboutEnd); 20*ab11e3c9SKudo Chien 21*ab11e3c9SKudo Chien void 22*ab11e3c9SKudo Chien startObserving(int tag, std::shared_ptr<MutableValue> sv, jsi::Runtime &rt); 23*ab11e3c9SKudo Chien void stopObserving(int tag, bool finished); 24*ab11e3c9SKudo Chien void notifyAboutCancellation(int tag); 25*ab11e3c9SKudo Chien 26*ab11e3c9SKudo Chien private: 27*ab11e3c9SKudo Chien std::function<void(int, jsi::Object newProps)> notifyAboutProgress; 28*ab11e3c9SKudo Chien std::function<void(int, bool)> notifyAboutEnd; 29*ab11e3c9SKudo Chien std::map<int, std::shared_ptr<MutableValue>> observedValues; 30*ab11e3c9SKudo Chien }; 31*ab11e3c9SKudo Chien 32*ab11e3c9SKudo Chien } // namespace reanimated 33