Update readme

This commit is contained in:
Reece Wilson 2021-10-07 00:22:07 +01:00
parent bb25b600eb
commit f7a68b6bc6

View File

@ -28,6 +28,29 @@ LIB_INTERFACE(IInputMouseSubscriber,
#include <...> #include <...>
``` ```
#### Usage Runtime Binding and Modern C++
```
// My language binding
IInputMouseSubscriberFunctional test;
test.onButtonPress = [](AuUInt8 btn)
{
};
AuSPtr<IInputMouseSubscriber> 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 ##### Not recommended for small projects and/or people with a shred of sanity left
##### Possibly useful for API developers ##### Possibly useful for API developers