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.

241 lines
6.2KB

  1. /*
  2. * DISTRHO Plugin Framework (DPF)
  3. * Copyright (C) 2012-2025 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& context, T)
  62. {
  63. notImplemented("Line::draw");
  64. }
  65. #ifdef DGL_ALLOW_DEPRECATED_METHODS
  66. template<typename T>
  67. void Line<T>::draw()
  68. {
  69. notImplemented("Line::draw");
  70. }
  71. #endif
  72. template class Line<double>;
  73. template class Line<float>;
  74. template class Line<int>;
  75. template class Line<uint>;
  76. template class Line<short>;
  77. template class Line<ushort>;
  78. // --------------------------------------------------------------------------------------------------------------------
  79. // Circle
  80. template<typename T>
  81. void Circle<T>::draw(const GraphicsContext&)
  82. {
  83. notImplemented("Circle::draw");
  84. }
  85. template<typename T>
  86. void Circle<T>::drawOutline(const GraphicsContext&, T)
  87. {
  88. notImplemented("Circle::drawOutline");
  89. }
  90. #ifdef DGL_ALLOW_DEPRECATED_METHODS
  91. template<typename T>
  92. void Circle<T>::draw()
  93. {
  94. notImplemented("Circle::draw");
  95. }
  96. template<typename T>
  97. void Circle<T>::drawOutline()
  98. {
  99. notImplemented("Circle::drawOutline");
  100. }
  101. #endif
  102. template class Circle<double>;
  103. template class Circle<float>;
  104. template class Circle<int>;
  105. template class Circle<uint>;
  106. template class Circle<short>;
  107. template class Circle<ushort>;
  108. // --------------------------------------------------------------------------------------------------------------------
  109. // Triangle
  110. template<typename T>
  111. void Triangle<T>::draw(const GraphicsContext&)
  112. {
  113. notImplemented("Triangle::draw");
  114. }
  115. template<typename T>
  116. void Triangle<T>::drawOutline(const GraphicsContext&, T)
  117. {
  118. notImplemented("Triangle::drawOutline");
  119. }
  120. #ifdef DGL_ALLOW_DEPRECATED_METHODS
  121. template<typename T>
  122. void Triangle<T>::draw()
  123. {
  124. notImplemented("Triangle::draw");
  125. }
  126. template<typename T>
  127. void Triangle<T>::drawOutline()
  128. {
  129. notImplemented("Triangle::drawOutline");
  130. }
  131. #endif
  132. template class Triangle<double>;
  133. template class Triangle<float>;
  134. template class Triangle<int>;
  135. template class Triangle<uint>;
  136. template class Triangle<short>;
  137. template class Triangle<ushort>;
  138. // --------------------------------------------------------------------------------------------------------------------
  139. // Rectangle
  140. template<typename T>
  141. void Rectangle<T>::draw(const GraphicsContext&)
  142. {
  143. notImplemented("Rectangle::draw");
  144. }
  145. template<typename T>
  146. void Rectangle<T>::drawOutline(const GraphicsContext&, T)
  147. {
  148. notImplemented("Rectangle::drawOutline");
  149. }
  150. #ifdef DGL_ALLOW_DEPRECATED_METHODS
  151. template<typename T>
  152. void Rectangle<T>::draw()
  153. {
  154. notImplemented("Rectangle::draw");
  155. }
  156. template<typename T>
  157. void Rectangle<T>::drawOutline()
  158. {
  159. notImplemented("Rectangle::drawOutline");
  160. }
  161. #endif
  162. template class Rectangle<double>;
  163. template class Rectangle<float>;
  164. template class Rectangle<int>;
  165. template class Rectangle<uint>;
  166. template class Rectangle<short>;
  167. template class Rectangle<ushort>;
  168. // --------------------------------------------------------------------------------------------------------------------
  169. void SubWidget::PrivateData::display(uint, uint, double)
  170. {
  171. }
  172. // --------------------------------------------------------------------------------------------------------------------
  173. void TopLevelWidget::PrivateData::display()
  174. {
  175. }
  176. // --------------------------------------------------------------------------------------------------------------------
  177. void Window::PrivateData::renderToPicture(const char*, const GraphicsContext&, uint, uint)
  178. {
  179. notImplemented("Window::PrivateData::renderToPicture");
  180. }
  181. // --------------------------------------------------------------------------------------------------------------------
  182. void Window::PrivateData::createContextIfNeeded()
  183. {
  184. }
  185. void Window::PrivateData::destroyContext()
  186. {
  187. }
  188. void Window::PrivateData::startContext()
  189. {
  190. }
  191. void Window::PrivateData::endContext()
  192. {
  193. }
  194. // --------------------------------------------------------------------------------------------------------------------
  195. END_NAMESPACE_DGL