Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TMS API for handling events directly; handle text input events #137

Merged
merged 6 commits into from
Dec 3, 2023

Conversation

griffi-gh
Copy link
Contributor

@griffi-gh griffi-gh commented Sep 4, 2023

  • Introduce new raw event handler api
    raw event handlers get called before any internal widget/pscreen logic
    suitable for implementing stuff like immediate-mode ui backends
    typedef int (*tms_event_handler)(struct tms_event*);
    int tms_event_register_raw(tms_event_handler);
    
  • Intercept and handle text input events

@griffi-gh griffi-gh marked this pull request as draft September 4, 2023 12:03
@rollerozxa
Copy link
Collaborator

   /home/runner/work/principia/principia/build-android/jni/tms/backends/android/main.c:232:17: error: expected expression
              std::copy(ev.text.text, ev.text.text + 32, spec.data.text.text);
                  ^
  1 error generated.
  make: *** [/usr/local/lib/android/sdk/ndk/23.2.8568313/build/core/build-binary.mk:476: /home/runner/work/principia/principia/build-android/principia/build/intermediates/cxx/Release/2c5a484w/obj/local/arm64-v8a/objs/main/tms/backends/android/main.o] Error 1

Probably gets fixed if you rename the android backend to .cc so it gets compiled as C++

@griffi-gh
Copy link
Contributor Author

I'll just use good ol' memcpy instead

@griffi-gh griffi-gh marked this pull request as ready for review September 4, 2023 12:32
@rollerozxa
Copy link
Collaborator

Is this okay to be merged now?

@griffi-gh
Copy link
Contributor Author

Is this okay to be merged now?

yeah, should be ok

@rollerozxa rollerozxa merged commit 759a5ce into Bithack:master Dec 3, 2023
@rollerozxa
Copy link
Collaborator

wham

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants