You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
971B

  1. #pragma once
  2. #include "app.hpp"
  3. #include <GL/glew.h>
  4. #include <GLFW/glfw3.h>
  5. #ifdef ARCH_MAC
  6. #define GUI_MOD_KEY_NAME "Cmd"
  7. #else
  8. #define GUI_MOD_KEY_NAME "Ctrl"
  9. #endif
  10. namespace rack {
  11. extern GLFWwindow *gWindow;
  12. extern NVGcontext *gVg;
  13. extern NVGcontext *gFramebufferVg;
  14. /** The default font to use for GUI elements */
  15. extern std::shared_ptr<Font> gGuiFont;
  16. /** The scaling ratio */
  17. extern float gPixelRatio;
  18. /* The ratio between the framebuffer size and the window size reported by the OS.
  19. This is not equal to gPixelRatio in general.
  20. */
  21. extern float gWindowRatio;
  22. extern bool gAllowCursorLock;
  23. extern int gGuiFrame;
  24. extern Vec gMousePos;
  25. void guiInit();
  26. void guiDestroy();
  27. void guiRun();
  28. void guiClose();
  29. void guiCursorLock();
  30. void guiCursorUnlock();
  31. bool guiIsModPressed();
  32. bool guiIsShiftPressed();
  33. Vec guiGetWindowSize();
  34. void guiSetWindowSize(Vec size);
  35. Vec guiGetWindowPos();
  36. void guiSetWindowPos(Vec pos);
  37. bool guiIsMaximized();
  38. } // namespace rack