imgui_impl_android.h 1.6 KB

12345678910111213141516171819202122232425262728
  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. // Implemented features:
  4. // [X] Platform: Keyboard arrays indexed using AKEYCODE_* codes, e.g. ImGui::IsKeyPressed(AKEYCODE_SPACE).
  5. // Missing features:
  6. // [ ] Platform: Clipboard support.
  7. // [ ] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
  8. // [ ] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: Check if this is even possible with Android.
  9. // Important:
  10. // - FIXME: On-screen keyboard currently needs to be enabled by the application (see examples/ and issue #3446)
  11. // - FIXME: Unicode character inputs needs to be passed by Dear ImGui by the application (see examples/ and issue #3446)
  12. // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
  13. // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
  14. // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
  15. // Read online: https://github.com/ocornut/imgui/tree/master/docs
  16. #pragma once
  17. struct ANativeWindow;
  18. struct AInputEvent;
  19. IMGUI_IMPL_API bool ImGui_ImplAndroid_Init(ANativeWindow* window);
  20. IMGUI_IMPL_API int32_t ImGui_ImplAndroid_HandleInputEvent(AInputEvent* input_event);
  21. IMGUI_IMPL_API void ImGui_ImplAndroid_Shutdown();
  22. IMGUI_IMPL_API void ImGui_ImplAndroid_NewFrame();