imgui_impl_osx.h (1279B)
1 // dear imgui: Platform Backend for OSX / Cocoa 2 // This needs to be used along with a Renderer (e.g. OpenGL2, OpenGL3, Vulkan, Metal..) 3 // [ALPHA] Early backend, not well tested. If you want a portable application, prefer using the GLFW or SDL platform Backends on Mac. 4 5 // Implemented features: 6 // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 7 // [X] Platform: OSX clipboard is supported within core Dear ImGui (no specific code in this backend). 8 // Issues: 9 // [ ] Platform: Keys are all generally very broken. Best using [event keycode] and not [event characters].. 10 11 // You can copy and use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 12 // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp. 13 // Read online: https://github.com/ocornut/imgui/tree/master/docs 14 15 #include "imgui.h" // IMGUI_IMPL_API 16 17 @class NSEvent; 18 @class NSView; 19 20 IMGUI_IMPL_API bool ImGui_ImplOSX_Init(); 21 IMGUI_IMPL_API void ImGui_ImplOSX_Shutdown(); 22 IMGUI_IMPL_API void ImGui_ImplOSX_NewFrame(NSView* _Nullable view); 23 IMGUI_IMPL_API bool ImGui_ImplOSX_HandleEvent(NSEvent* _Nonnull event, NSView* _Nullable view);