imgui_impl_allegro5.h 1.6 KB

1234567891011121314151617181920212223242526272829
  1. // ImGui Renderer + Platform Binding for: Allegro 5
  2. // (Info: Allegro 5 is a cross-platform general purpose library for handling windows, inputs, graphics, etc.)
  3. // Implemented features:
  4. // [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
  5. // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
  6. // Issues:
  7. // [ ] Renderer: The renderer is suboptimal as we need to convert vertices.
  8. // [ ] Platform: Missing clipboard support via al_set_clipboard_text/al_clipboard_has_text.
  9. // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
  10. // If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
  11. // If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
  12. // https://github.com/ocornut/imgui, Original code by @birthggd
  13. #pragma once
  14. struct ALLEGRO_DISPLAY;
  15. union ALLEGRO_EVENT;
  16. IMGUI_IMPL_API bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display);
  17. IMGUI_IMPL_API void ImGui_ImplAllegro5_Shutdown();
  18. IMGUI_IMPL_API void ImGui_ImplAllegro5_NewFrame();
  19. IMGUI_IMPL_API void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data);
  20. IMGUI_IMPL_API bool ImGui_ImplAllegro5_ProcessEvent(ALLEGRO_EVENT* event);
  21. // Use if you want to reset your rendering device without losing ImGui state.
  22. IMGUI_IMPL_API bool ImGui_ImplAllegro5_CreateDeviceObjects();
  23. IMGUI_IMPL_API void ImGui_ImplAllegro5_InvalidateDeviceObjects();