Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/GHOST_IWindow.h
| /* SPDX-License-Identifier: GPL-2.0-or-later | /* SPDX-License-Identifier: GPL-2.0-or-later | ||||
| * Copyright 2001-2002 NaN Holding BV. All rights reserved. */ | * Copyright 2001-2002 NaN Holding BV. All rights reserved. */ | ||||
| /** \file | /** \file | ||||
| * \ingroup GHOST | * \ingroup GHOST | ||||
| * Declaration of GHOST_IWindow interface class. | * Declaration of GHOST_IWindow interface class. | ||||
| */ | */ | ||||
| #pragma once | #pragma once | ||||
| #include "GHOST_Rect.h" | #include "GHOST_Rect.h" | ||||
| #include "GHOST_Types.h" | #include "GHOST_Types.h" | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string> | #include <string> | ||||
| class GHOST_IContext; | |||||
| /** | /** | ||||
| * Interface for GHOST windows. | * Interface for GHOST windows. | ||||
| * | * | ||||
| * You can create a window with the system's GHOST_ISystem::createWindow | * You can create a window with the system's GHOST_ISystem::createWindow | ||||
| * method. | * method. | ||||
| * \see GHOST_ISystem#createWindow | * \see GHOST_ISystem#createWindow | ||||
| * | * | ||||
| * There are two coordinate systems: | * There are two coordinate systems: | ||||
| Show All 33 Lines | public: | ||||
| /** | /** | ||||
| * Tries to install a rendering context in this window. | * Tries to install a rendering context in this window. | ||||
| * \param type: The type of rendering context installed. | * \param type: The type of rendering context installed. | ||||
| * \return Indication as to whether installation has succeeded. | * \return Indication as to whether installation has succeeded. | ||||
| */ | */ | ||||
| virtual GHOST_TSuccess setDrawingContextType(GHOST_TDrawingContextType type) = 0; | virtual GHOST_TSuccess setDrawingContextType(GHOST_TDrawingContextType type) = 0; | ||||
| /** | /** | ||||
| * Returns the drawing context used in this window. | |||||
| * \return The current drawing context. | |||||
| */ | |||||
| virtual GHOST_IContext *getDrawingContext() = 0; | |||||
| /** | |||||
| * Sets the title displayed in the title bar. | * Sets the title displayed in the title bar. | ||||
| * \param title: The title to display in the title bar. | * \param title: The title to display in the title bar. | ||||
| */ | */ | ||||
| virtual void setTitle(const char *title) = 0; | virtual void setTitle(const char *title) = 0; | ||||
| /** | /** | ||||
| * Returns the title displayed in the title bar. | * Returns the title displayed in the title bar. | ||||
| * \param title: The title displayed in the title bar. | * \param title: The title displayed in the title bar. | ||||
| ▲ Show 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | public: | ||||
| /** | /** | ||||
| * Gets the OpenGL frame-buffer associated with the window's contents. | * Gets the OpenGL frame-buffer associated with the window's contents. | ||||
| * \return The name of an OpenGL frame-buffer object. | * \return The name of an OpenGL frame-buffer object. | ||||
| */ | */ | ||||
| virtual unsigned int getDefaultFramebuffer() = 0; | virtual unsigned int getDefaultFramebuffer() = 0; | ||||
| /** | /** | ||||
| * Gets the Vulkan framebuffer related resource handles associated with the Vulkan context. | |||||
| * Needs to be called after each swap events as the framebuffer will change. | |||||
| * \return A boolean success indicator. | |||||
| */ | |||||
| virtual GHOST_TSuccess getVulkanBackbuffer(void *image, | |||||
| void *framebuffer, | |||||
| void *command_buffer, | |||||
| void *render_pass, | |||||
| void *extent, | |||||
| uint32_t *fb_id) = 0; | |||||
| /** | |||||
| * Invalidates the contents of this window. | * Invalidates the contents of this window. | ||||
| * \return Indication of success. | * \return Indication of success. | ||||
| */ | */ | ||||
| virtual GHOST_TSuccess invalidate() = 0; | virtual GHOST_TSuccess invalidate() = 0; | ||||
| /** | /** | ||||
| * Returns the window user data. | * Returns the window user data. | ||||
| * \return The window user data. | * \return The window user data. | ||||
| ▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines | |||||