VTK  9.5.20250718
vtkXWebGPURenderWindow.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
15#ifndef vtkXWebGPURenderWindow_h
16#define vtkXWebGPURenderWindow_h
17
18#include "vtkRenderingWebGPUModule.h" // For export macro
20#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
21#include <X11/Xlib.h> // Needed for X types used in the public interface
22
23VTK_ABI_NAMESPACE_BEGIN
24// Forward declarations
25
26class VTKRENDERINGWEBGPU_EXPORT VTK_MARSHALAUTO vtkXWebGPURenderWindow
28{
29public:
34
36
40 void PrintSelf(ostream& os, vtkIndent indent) override;
42
46 void Frame() override;
47
51 virtual void WindowInitialize();
52
59 bool WindowSetup() override;
60
66 void Finalize() override;
67
71 void SetFullScreen(vtkTypeBool) override;
72
76 void WindowRemap() override;
77
78 // Call X funcs to map unmap
79 void SetShowWindow(bool val) override;
80
84 virtual void PrefFullScreen();
85
98 void SetSize(int width, int height) override;
99 void SetSize(int a[2]) override { this->SetSize(a[0], a[1]); }
100
107 void SetStereoCapableWindow(vtkTypeBool capable) override;
108
112 const char* ReportCapabilities() override;
113
118
122 void* GetGenericDisplayId() override { return this->GetDisplayId(); }
123
124 void* GetGenericWindowId() override;
125 void* GetGenericParentId() override { return reinterpret_cast<void*>(this->ParentId); }
126
127 void* GetGenericDrawable() override { return reinterpret_cast<void*>(this->WindowId); }
128
133 int* GetScreenSize() VTK_SIZEHINT(2) override;
134
139 int* GetPosition() VTK_SIZEHINT(2) override;
140
145 Display* GetDisplayId();
146
150 bool EnsureDisplay() override;
151
153
158 void SetDisplayId(Display*);
160 void SetDisplayId(void*) override;
162
167 Window GetParentId();
168
170
174 void SetParentId(Window);
176 void SetParentId(void*) override;
178
183 Window GetWindowId();
184
186
190 void SetWindowId(Window);
192 void SetWindowId(void*) override;
194
198 void SetNextWindowId(Window);
199
205 void SetNextWindowId(void*) override;
206
210 void SetWindowName(const char*) override;
211
216 void SetIcon(vtkImageData* img) override;
217
222 bool InitializeFromCurrentContext() override;
223
227 bool GetPlatformSupportsRenderWindowSharing() override { return true; }
228
230
235 void SetPosition(int x, int y) override;
236 void SetPosition(int a[2]) override { this->SetPosition(a[0], a[1]); }
238
240
244 void HideCursor() override;
245 void ShowCursor() override;
247
251 void SetCurrentCursor(int) override;
252
259
263 void SetWindowInfo(const char* info) override;
264
268 void SetNextWindowInfo(const char* info) override;
269
273 void SetParentInfo(const char* info) override;
274
279 void Render() override;
280
281protected:
284
285 // Helper members
286 Window ParentId;
287 Window WindowId;
289 Display* DisplayId;
290 Colormap ColorMap;
295
296 // we must keep track of the cursors we are using
298 Cursor XCArrow;
299 Cursor XCSizeAll;
300 Cursor XCSizeNS;
301 Cursor XCSizeWE;
302 Cursor XCSizeNE;
303 Cursor XCSizeNW;
304 Cursor XCSizeSE;
305 Cursor XCSizeSW;
306 Cursor XCHand;
307 Cursor XCCustom;
308
309 std::string MakeDefaultWindowNameWithBackend() override;
310 void CreateAWindow() override;
311 void DestroyWindow() override;
313
314private:
316 void operator=(const vtkXWebGPURenderWindow&) = delete;
317};
318
319VTK_ABI_NAMESPACE_END
320#endif // vtkXWebGPURenderWindow_h
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
WebGPU rendering window.
WebGPU rendering window for the X Window system.
void * GetGenericWindowId() override
Dummy stubs for vtkWindow API.
virtual void WindowInitialize()
Initialize the window for rendering.
void CreateAWindow() override
Create a not-off-screen window.
void SetCurrentCursor(int) override
Change the shape of the cursor.
void Render() override
This computes the size of the render window before calling the supper classes render.
void * GetGenericParentId() override
Dummy stubs for vtkWindow API.
std::string MakeDefaultWindowNameWithBackend() override
Construct the window title as "Visualization Toolkit - <WindowSystem> <GraphicsBackend>" Ex: "Visuali...
void SetPosition(int a[2]) override
Set the position (x and y) of the rendering window in screen coordinates (in pixels).
void SetStereoCapableWindow(vtkTypeBool capable) override
Prescribe that the window be created in a stereo-capable mode.
virtual void PrefFullScreen()
Set the preferred window size to full screen.
void HideCursor() override
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
void SetNextWindowInfo(const char *info) override
Set the window info that will be used after WindowRemap()
~vtkXWebGPURenderWindow() override
bool WindowSetup() override
Initialize the rendering window.
vtkTypeBool GetEventPending() override
Check to see if a mouse button has been pressed or mouse wheel activated.
void SetPosition(int x, int y) override
Set the position (x and y) of the rendering window in screen coordinates (in pixels).
vtkTypeBool IsDirect() override
Is this render window using hardware acceleration? 0-false, 1-true.
void SetSize(int width, int height) override
Set the size (width and height in pixels) of the rendering window.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the VTK class.
void WindowRemap() override
Resize the window.
void Frame() override
End the rendering process and display the image.
void SetSize(int a[2]) override
Get the size (width and height) of the rendering window in screen coordinates (in pixels).
void SetShowWindow(bool val) override
Show or not Show the window.
void * GetGenericDrawable() override
Dummy stubs for vtkWindow API.
const char * ReportCapabilities() override
Get report of capabilities for the render window.
void Finalize() override
"Deinitialize" the rendering window.
void DestroyWindow() override
Destroy a not-off-screen window.
int * GetScreenSize() override
Get the current size of the screen in pixels.
void SetParentInfo(const char *info) override
Sets the X window id of the window that WILL BE created.
void SetFullScreen(vtkTypeBool) override
Change the window to fill the entire screen.
static vtkXWebGPURenderWindow * New()
Instantiate the class.
void SetWindowInfo(const char *info) override
Set this RenderWindow's X window id to a pre-existing window.
void * GetGenericDisplayId() override
Xwindow get set functions.
void ShowCursor() override
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_SIZEHINT(...)
#define VTK_MARSHAL_EXCLUDE_REASON_NOT_SUPPORTED
#define VTK_MARSHALAUTO
#define VTK_MARSHALEXCLUDE(reason)