imgui_impl_osx.h 1.4 KB

12345678910111213141516171819202122232425
  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. // Implemented features:
  5. // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
  6. // [X] Platform: OSX clipboard is supported within core Dear ImGui (no specific code in this backend).
  7. // Issues:
  8. // [ ] Platform: Keys are all generally very broken. Best using [event keycode] and not [event characters]..
  9. // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
  10. // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
  11. // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
  12. // Read online: https://github.com/ocornut/imgui/tree/master/docs
  13. #include "imgui.h" // IMGUI_IMPL_API
  14. @class NSEvent;
  15. @class NSView;
  16. IMGUI_IMPL_API bool ImGui_ImplOSX_Init();
  17. IMGUI_IMPL_API void ImGui_ImplOSX_Shutdown();
  18. IMGUI_IMPL_API void ImGui_ImplOSX_NewFrame(NSView* _Nullable view);
  19. IMGUI_IMPL_API bool ImGui_ImplOSX_HandleEvent(NSEvent* _Nonnull event, NSView* _Nullable view);