DISTRHO Plugin Framework
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.

245 lines
6.4KB

  1. /*
  2. * DISTRHO Plugin Framework (DPF)
  3. * Copyright (C) 2012-2026 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any purpose with
  6. * or without fee is hereby granted, provided that the above copyright notice and this
  7. * permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
  10. * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
  11. * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  12. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  13. * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  14. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifdef _MSC_VER
  17. // instantiated template classes whose methods are defined elsewhere
  18. # pragma warning(disable:4661)
  19. #endif
  20. #include "../Color.hpp"
  21. #include "../ImageBaseWidgets.hpp"
  22. #include "SubWidgetPrivateData.hpp"
  23. #include "TopLevelWidgetPrivateData.hpp"
  24. #include "WidgetPrivateData.hpp"
  25. #include "WindowPrivateData.hpp"
  26. START_NAMESPACE_DGL
  27. // --------------------------------------------------------------------------------------------------------------------
  28. // Check for correct build config
  29. #ifdef DGL_CAIRO
  30. # error Build config error, Cairo requested while building Stub code
  31. #endif
  32. #ifdef DGL_OPENGL
  33. # error Build config error, OpenGL requested while building Stub code
  34. #endif
  35. #ifdef DGL_VULKAN
  36. # error Build config error, Vulkan requested while building Stub code
  37. #endif
  38. #ifdef DGL_USE_GLES2
  39. # error Build config error, GLESv2 requested while building Stub code
  40. #endif
  41. #ifdef DGL_USE_GLES3
  42. # error Build config error, GLESv3 requested while building Stub code
  43. #endif
  44. #ifdef DGL_USE_OPENGL3
  45. # error Build config error, OpenGL3 requested while building Stub code
  46. #endif
  47. // --------------------------------------------------------------------------------------------------------------------
  48. static void notImplemented(const char* const name)
  49. {
  50. d_stderr2("Stub function not implemented: %s", name);
  51. }
  52. // --------------------------------------------------------------------------------------------------------------------
  53. // Color
  54. void Color::setFor(const GraphicsContext&, bool)
  55. {
  56. notImplemented("Color::setFor");
  57. }
  58. // --------------------------------------------------------------------------------------------------------------------
  59. // Line
  60. template<typename T>
  61. void Line<T>::draw(const GraphicsContext&, T)
  62. {
  63. notImplemented("Line::draw");
  64. }
  65. #if DGL_ALLOW_DEPRECATED_METHODS
  66. template<typename T>
  67. void Line<T>::draw()
  68. {
  69. notImplemented("Line::draw");
  70. }
  71. #endif
  72. // --------------------------------------------------------------------------------------------------------------------
  73. // Circle
  74. template<typename T>
  75. void Circle<T>::draw(const GraphicsContext&)
  76. {
  77. notImplemented("Circle::draw");
  78. }
  79. template<typename T>
  80. void Circle<T>::drawOutline(const GraphicsContext&, T)
  81. {
  82. notImplemented("Circle::drawOutline");
  83. }
  84. #if DGL_ALLOW_DEPRECATED_METHODS
  85. template<typename T>
  86. void Circle<T>::draw()
  87. {
  88. notImplemented("Circle::draw");
  89. }
  90. template<typename T>
  91. void Circle<T>::drawOutline()
  92. {
  93. notImplemented("Circle::drawOutline");
  94. }
  95. #endif
  96. // --------------------------------------------------------------------------------------------------------------------
  97. // Triangle
  98. template<typename T>
  99. void Triangle<T>::draw(const GraphicsContext&)
  100. {
  101. notImplemented("Triangle::draw");
  102. }
  103. template<typename T>
  104. void Triangle<T>::drawOutline(const GraphicsContext&, T)
  105. {
  106. notImplemented("Triangle::drawOutline");
  107. }
  108. #if DGL_ALLOW_DEPRECATED_METHODS
  109. template<typename T>
  110. void Triangle<T>::draw()
  111. {
  112. notImplemented("Triangle::draw");
  113. }
  114. template<typename T>
  115. void Triangle<T>::drawOutline()
  116. {
  117. notImplemented("Triangle::drawOutline");
  118. }
  119. #endif
  120. // --------------------------------------------------------------------------------------------------------------------
  121. // Rectangle
  122. template<typename T>
  123. void Rectangle<T>::draw(const GraphicsContext&)
  124. {
  125. notImplemented("Rectangle::draw");
  126. }
  127. template<typename T>
  128. void Rectangle<T>::drawOutline(const GraphicsContext&, T)
  129. {
  130. notImplemented("Rectangle::drawOutline");
  131. }
  132. #if DGL_ALLOW_DEPRECATED_METHODS
  133. template<typename T>
  134. void Rectangle<T>::draw()
  135. {
  136. notImplemented("Rectangle::draw");
  137. }
  138. template<typename T>
  139. void Rectangle<T>::drawOutline()
  140. {
  141. notImplemented("Rectangle::drawOutline");
  142. }
  143. #endif
  144. // --------------------------------------------------------------------------------------------------------------------
  145. void SubWidget::PrivateData::display(uint, uint, double)
  146. {
  147. }
  148. // --------------------------------------------------------------------------------------------------------------------
  149. void TopLevelWidget::PrivateData::display()
  150. {
  151. }
  152. // --------------------------------------------------------------------------------------------------------------------
  153. void Window::PrivateData::renderToPicture(const char*, const GraphicsContext&, uint, uint)
  154. {
  155. notImplemented("Window::PrivateData::renderToPicture");
  156. }
  157. // --------------------------------------------------------------------------------------------------------------------
  158. void Window::PrivateData::createContextIfNeeded()
  159. {
  160. }
  161. void Window::PrivateData::destroyContext()
  162. {
  163. }
  164. void Window::PrivateData::startContext()
  165. {
  166. }
  167. void Window::PrivateData::endContext()
  168. {
  169. }
  170. // --------------------------------------------------------------------------------------------------------------------
  171. #ifndef DGL_GEOMETRY_CPP_INCLUDED
  172. template class Line<double>;
  173. template class Line<float>;
  174. template class Line<int>;
  175. template class Line<uint>;
  176. template class Line<short>;
  177. template class Line<ushort>;
  178. template class Circle<double>;
  179. template class Circle<float>;
  180. template class Circle<int>;
  181. template class Circle<uint>;
  182. template class Circle<short>;
  183. template class Circle<ushort>;
  184. template class Triangle<double>;
  185. template class Triangle<float>;
  186. template class Triangle<int>;
  187. template class Triangle<uint>;
  188. template class Triangle<short>;
  189. template class Triangle<ushort>;
  190. template class Rectangle<double>;
  191. template class Rectangle<float>;
  192. template class Rectangle<int>;
  193. template class Rectangle<uint>;
  194. template class Rectangle<short>;
  195. template class Rectangle<ushort>;
  196. #endif
  197. // --------------------------------------------------------------------------------------------------------------------
  198. END_NAMESPACE_DGL