Skip to content

Commit

Permalink
feat: added bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelOsborne committed Jun 25, 2024
1 parent f464337 commit 2108bf1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dotlottie-ffi/emscripten_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ EMSCRIPTEN_BINDINGS(DotLottiePlayer)
// .function("onStateExit", &StateMachineObserver::on_state_exit);

class_<DotLottiePlayer>("DotLottiePlayer")
.smart_ptr<std::shared_ptr<DotLottiePlayer> >("DotLottiePlayer")
.smart_ptr<std::shared_ptr<DotLottiePlayer>>("DotLottiePlayer")
.constructor(&DotLottiePlayer::init, allow_raw_pointers())
.function("buffer", &buffer)
.function("clear", &DotLottiePlayer::clear)
Expand Down Expand Up @@ -157,7 +157,8 @@ EMSCRIPTEN_BINDINGS(DotLottiePlayer)
.function("startStateMachine", &DotLottiePlayer::start_state_machine)
.function("stopStateMachine", &DotLottiePlayer::stop_state_machine)
.function("postEventPayload", &DotLottiePlayer::post_serialized_event)
.function("stateMachineFrameworkSetup", &DotLottiePlayer::state_machine_framework_setup);
.function("stateMachineFrameworkSetup", &DotLottiePlayer::state_machine_framework_setup)
.function("loadStateMachineData", &DotLottiePlayer::load_state_machine_data);
// .function("state_machine_subscribe", &DotLottiePlayer::state_machine_subscribe)
// .function("state_machine_unsubscribe", &DotLottiePlayer::state_machine_unsubscribe)
}
1 change: 1 addition & 0 deletions dotlottie-ffi/src/dotlottie_player.udl
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,5 @@ interface DotLottiePlayer {
boolean state_machine_subscribe(StateMachineObserver observer);
boolean state_machine_unsubscribe(StateMachineObserver observer);
sequence<string> state_machine_framework_setup();
boolean load_state_machine_data([ByRef] string state_machine);
};
1 change: 1 addition & 0 deletions dotlottie-ffi/src/dotlottie_player_cpp.udl
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,5 @@ interface DotLottiePlayer {
boolean stop_state_machine();
boolean post_serialized_event(string event);
sequence<string> state_machine_framework_setup();
boolean load_state_machine_data([ByRef] string state_machine);
};

0 comments on commit 2108bf1

Please sign in to comment.