From f7a68b6bc6b69d1e127b7ee1a550b5be9a4f6d7b Mon Sep 17 00:00:00 2001 From: Reece Date: Thu, 7 Oct 2021 00:22:07 +0100 Subject: [PATCH] Update readme --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 1f5053b..a205ebc 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,29 @@ LIB_INTERFACE(IInputMouseSubscriber, #include <...> ``` +#### Usage Runtime Binding and Modern C++ +``` +// My language binding +IInputMouseSubscriberFunctional test; +test.onButtonPress = [](AuUInt8 btn) +{ + +}; + +AuSPtr handle = AuUnsafeRaiiToShared(&test); +// use handle with an Aurora API +``` + +#### Usage Native +``` +struct MyEventHandler : public IInputMouseSubscriber +{ + void onButtonPress(AuUInt8 mb) override; + void onButtonTick(AuUInt8 mb) override; + void onButtonUp(AuUInt8 mb) override; +} + +``` ##### Not recommended for small projects and/or people with a shred of sanity left ##### Possibly useful for API developers \ No newline at end of file