gui.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #pragma once
  2. #include "view_port.h"
  3. #include "canvas.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. typedef enum {
  8. GuiLayerNone, /* Special layer for internal use only */
  9. GuiLayerStatusBarLeft, /* Status bar left-side layer, auto-layout */
  10. GuiLayerStatusBarRight, /* Status bar right-side layer, auto-layout */
  11. GuiLayerMain, /* Main layer, status bar is shown */
  12. GuiLayerFullscreen, /* Fullscreen layer */
  13. GuiLayerMAX /* Don't use or move, special value */
  14. } GuiLayer;
  15. typedef struct Gui Gui;
  16. /*
  17. * Add view_port to view_port tree
  18. * @remarks thread safe
  19. */
  20. void gui_add_view_port(Gui* gui, ViewPort* view_port, GuiLayer layer);
  21. /*
  22. * Remove view_port from rendering tree
  23. * @remarks thread safe
  24. */
  25. void gui_remove_view_port(Gui* gui, ViewPort* view_port);
  26. /* Send ViewPort to the front
  27. * Places selected ViewPort to the top of the drawing stack
  28. * @param gui, Gui instance
  29. * @param view_port, ViewPort instance
  30. */
  31. void gui_send_view_port_front(Gui* gui, ViewPort* view_port);
  32. /* Send ViewPort to the back
  33. * Places selected ViewPort to the bottom of the drawing stack
  34. * @param gui, Gui instance
  35. * @param view_port, ViewPort instance
  36. */
  37. void gui_send_view_port_back(Gui* gui, ViewPort* view_port);
  38. #ifdef __cplusplus
  39. }
  40. #endif