| 1 | // dear imgui: Platform Binding for Android native app |
| 2 | // This needs to be used along with the OpenGL 3 Renderer (imgui_impl_opengl3) |
| 3 | |
| 4 | // Implemented features: |
| 5 | // [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy AKEYCODE_* values are obsolete since 1.87 and not supported since 1.91.5] |
| 6 | // [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen. |
| 7 | // Missing features or Issues: |
| 8 | // [ ] Platform: Clipboard support. |
| 9 | // [ ] Platform: Gamepad support. |
| 10 | // [ ] Platform: Mouse cursor shape and visibility (ImGuiBackendFlags_HasMouseCursors). Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: Check if this is even possible with Android. |
| 11 | // [ ] Platform: Multi-viewport support (multiple windows). Not meaningful on Android. |
| 12 | // Important: |
| 13 | // - Consider using SDL or GLFW backend on Android, which will be more full-featured than this. |
| 14 | // - FIXME: On-screen keyboard currently needs to be enabled by the application (see examples/ and issue #3446) |
| 15 | // - FIXME: Unicode character inputs needs to be passed by Dear ImGui by the application (see examples/ and issue #3446) |
| 16 | |
| 17 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. |
| 18 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. |
| 19 | // Learn about Dear ImGui: |
| 20 | // - FAQ https://dearimgui.com/faq |
| 21 | // - Getting Started https://dearimgui.com/getting-started |
| 22 | // - Documentation https://dearimgui.com/docs (same as your local docs/ folder). |
| 23 | // - Introduction, links and more at the top of imgui.cpp |
| 24 | |
| 25 | #pragma once |
| 26 | #include "imgui.h" // IMGUI_IMPL_API |
| 27 | #ifndef IMGUI_DISABLE |
| 28 | |
| 29 | struct ANativeWindow; |
| 30 | struct AInputEvent; |
| 31 | |
| 32 | // Follow "Getting Started" link and check examples/ folder to learn about using backends! |
| 33 | IMGUI_IMPL_API bool ImGui_ImplAndroid_Init(ANativeWindow* window); |
| 34 | IMGUI_IMPL_API int32_t ImGui_ImplAndroid_HandleInputEvent(const AInputEvent* input_event); |
| 35 | IMGUI_IMPL_API void ImGui_ImplAndroid_Shutdown(); |
| 36 | IMGUI_IMPL_API void ImGui_ImplAndroid_NewFrame(); |
| 37 | |
| 38 | #endif // #ifndef IMGUI_DISABLE |
| 39 | |