/* * DISTRHO Plugin Framework (DPF) * Copyright (C) 2012-2021 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this * permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "../Vulkan.hpp" #include "../Color.hpp" #include "SubWidgetPrivateData.hpp" #include "TopLevelWidgetPrivateData.hpp" #include "WidgetPrivateData.hpp" #include "WindowPrivateData.hpp" START_NAMESPACE_DGL // ----------------------------------------------------------------------- static void notImplemented(const char* const name) { d_stderr2("vulkan function not implemented: %s", name); } // ----------------------------------------------------------------------- // Color void Color::setFor(const GraphicsContext&, bool) { notImplemented("Color::setFor"); } // ----------------------------------------------------------------------- // Line template void Line::draw(const GraphicsContext&, T) { notImplemented("Line::draw"); } template void Line::draw() { notImplemented("Line::draw"); } template class Line; template class Line; template class Line; template class Line; template class Line; template class Line; // ----------------------------------------------------------------------- // Circle template void Circle::draw(const GraphicsContext&) { notImplemented("Circle::draw"); } template void Circle::drawOutline(const GraphicsContext&, T) { notImplemented("Circle::drawOutline"); } template void Circle::draw() { notImplemented("Circle::draw"); } template void Circle::drawOutline() { notImplemented("Circle::drawOutline"); } template class Circle; template class Circle; template class Circle; template class Circle; template class Circle; template class Circle; // ----------------------------------------------------------------------- // Triangle template void Triangle::draw(const GraphicsContext&) { notImplemented("Triangle::draw"); } template void Triangle::drawOutline(const GraphicsContext&, T) { notImplemented("Triangle::drawOutline"); } template void Triangle::draw() { notImplemented("Triangle::draw"); } template void Triangle::drawOutline() { notImplemented("Triangle::drawOutline"); } template class Triangle; template class Triangle; template class Triangle; template class Triangle; template class Triangle; template class Triangle; // ----------------------------------------------------------------------- // Rectangle template void Rectangle::draw(const GraphicsContext&) { notImplemented("Rectangle::draw"); } template void Rectangle::drawOutline(const GraphicsContext&, T) { notImplemented("Rectangle::drawOutline"); } template void Rectangle::draw() { notImplemented("Rectangle::draw"); } template void Rectangle::drawOutline() { notImplemented("Rectangle::drawOutline"); } template class Rectangle; template class Rectangle; template class Rectangle; template class Rectangle; template class Rectangle; template class Rectangle; // ----------------------------------------------------------------------- // VulkanImage VulkanImage::VulkanImage() : ImageBase() {} VulkanImage::VulkanImage(const char* const rdata, const uint w, const uint h, const ImageFormat fmt) : ImageBase(rdata, w, h, fmt) {} VulkanImage::VulkanImage(const char* const rdata, const Size& s, const ImageFormat fmt) : ImageBase(rdata, s, fmt) {} VulkanImage::VulkanImage(const VulkanImage& image) : ImageBase(image.rawData, image.size, image.format) {} VulkanImage::~VulkanImage() {} void VulkanImage::loadFromMemory(const char* const rdata, const Size& s, const ImageFormat fmt) noexcept { ImageBase::loadFromMemory(rdata, s, fmt); } void VulkanImage::drawAt(const GraphicsContext&, const Point&) { } VulkanImage& VulkanImage::operator=(const VulkanImage& image) noexcept { rawData = image.rawData; size = image.size; format = image.format; return *this; } // ----------------------------------------------------------------------- void SubWidget::PrivateData::display(const uint width, const uint height, const double autoScaleFactor) { // TODO selfw->pData->displaySubWidgets(width, height, autoScaleFactor); } // ----------------------------------------------------------------------- void TopLevelWidget::PrivateData::display() { if (! selfw->pData->visible) return; const Size size(window.getSize()); const uint width = size.getWidth(); const uint height = size.getHeight(); const double autoScaleFactor = window.pData->autoScaleFactor; // TODO // main widget drawing self->onDisplay(); // now draw subwidgets if there are any selfw->pData->displaySubWidgets(width, height, autoScaleFactor); } // ----------------------------------------------------------------------- void Window::PrivateData::renderToPicture(const char*, const GraphicsContext&, uint, uint) { notImplemented("Window::PrivateData::renderToPicture"); } // ----------------------------------------------------------------------- const GraphicsContext& Window::PrivateData::getGraphicsContext() const noexcept { return (const GraphicsContext&)graphicsContext; } // ----------------------------------------------------------------------- END_NAMESPACE_DGL // -----------------------------------------------------------------------