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.

63 lines
2.0KB

  1. /*
  2. * DISTRHO Cardinal Plugin
  3. * Copyright (C) 2021-2025 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 3 of
  8. * the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the LICENSE file.
  16. */
  17. #include "DistrhoPluginInfo.h"
  18. #ifndef DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
  19. # error wrong build 1
  20. #endif
  21. #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS && !defined(HEADLESS)
  22. # error wrong build 2
  23. #endif
  24. #include "nanovg.h"
  25. struct NVGLUframebuffer;
  26. void nvgluBindFramebuffer(NVGLUframebuffer* fb) {}
  27. NVGLUframebuffer* nvgluCreateFramebuffer(NVGcontext* ctx, int w, int h, int imageFlags) { return nullptr; }
  28. void nvgluDeleteFramebuffer(NVGLUframebuffer* fb) {}
  29. #if defined(__GNUC__) && (__GNUC__ >= 6)
  30. # pragma GCC diagnostic push
  31. # pragma GCC diagnostic ignored "-Wmisleading-indentation"
  32. # pragma GCC diagnostic ignored "-Wshift-negative-value"
  33. #endif
  34. #include "nanovg.c"
  35. #if defined(__GNUC__) && (__GNUC__ >= 6)
  36. # pragma GCC diagnostic pop
  37. #endif
  38. #define GLFWAPI
  39. extern "C" {
  40. typedef struct GLFWcursor GLFWcursor;
  41. typedef struct GLFWwindow GLFWwindow;
  42. GLFWAPI const char* glfwGetClipboardString(GLFWwindow*) { return nullptr; }
  43. GLFWAPI void glfwSetClipboardString(GLFWwindow*, const char*) {}
  44. GLFWAPI GLFWcursor* glfwCreateStandardCursor(int) { return nullptr; }
  45. GLFWAPI void glfwSetCursor(GLFWwindow*, GLFWcursor*) {}
  46. GLFWAPI const char* glfwGetKeyName(int, int) { return nullptr; }
  47. GLFWAPI int glfwGetKey(GLFWwindow*, int) { return 0; }
  48. GLFWAPI int glfwGetKeyScancode(int) { return 0; }
  49. GLFWAPI double glfwGetTime(void) { return 0.0; }
  50. }