Graphite Version 3
An experimental 3D geometry processing program
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
imgui_impl_android_ext.h
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 will also be supported unless IMGUI_DISABLE_OBSOLETE_KEYIO is set]
6// [X] Platform: Mouse support. Can discriminate Mouse/TouchScreen/Pen.
7// Missing features:
8// [ ] Platform: Clipboard support.
9// [ ] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
10// [ ] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: Check if this is even possible with Android.
11// Important:
12// - Consider using SDL or GLFW backend on Android, which will be more full-featured than this.
13// - [X] Fixed (Bruno): On-screen keyboard currently needs to be enabled by the application (see examples/ and issue #3446)
14// - [X] Fixed (Bruno): Unicode character inputs needs to be passed by Dear ImGui by the application (see examples/ and issue #3446)
15
16// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
17// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
18// If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
19// Read online: https://github.com/ocornut/imgui/tree/master/docs
20
21#ifdef __ANDROID__
22
23#pragma once
24#include "imgui.h" // IMGUI_IMPL_API
25#ifndef IMGUI_DISABLE
26
27struct android_app;
28struct AInputEvent;
29
30IMGUI_IMPL_API bool ImGui_ImplAndroidExt_Init(android_app* app); // [Bruno] pass app instead of window
31IMGUI_IMPL_API int32_t ImGui_ImplAndroidExt_HandleInputEvent(AInputEvent* input_event);
32IMGUI_IMPL_API void ImGui_ImplAndroidExt_Shutdown();
33IMGUI_IMPL_API void ImGui_ImplAndroidExt_NewFrame();
34
35#endif // #ifndef IMGUI_DISABLE
36#endif // __ANDROID__