VTK  9.6.2
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
11
12#ifndef vtkXWebGPURenderWindow_h
13#define vtkXWebGPURenderWindow_h
14
15#include "vtkRenderingWebGPUModule.h" // For export macro
17#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
18#include <X11/Xlib.h> // Needed for X types used in the public interface
19
20VTK_ABI_NAMESPACE_BEGIN
21// Forward declarations
22
23class VTKRENDERINGWEBGPU_EXPORT VTK_MARSHALAUTO vtkXWebGPURenderWindow
25{
26public:
31
33
37 void PrintSelf(ostream& os, vtkIndent indent) override;
39
43 void Frame() override;
44
48 virtual void WindowInitialize();
49
56 bool WindowSetup() override;
57
63 void Finalize() override;
64
68 void SetFullScreen(vtkTypeBool) override;
69
73 void WindowRemap() override;
74
75 // Call X funcs to map unmap
76 void SetShowWindow(bool val) override;
77
81 virtual void PrefFullScreen();
82
95 void SetSize(int width, int height) override;
96 void SetSize(int a[2]) override { this->SetSize(a[0], a[1]); }
97
104 void SetStereoCapableWindow(vtkTypeBool capable) override;
105
109 const char* ReportCapabilities() override;
110
115
119 void* GetGenericDisplayId() override { return this->GetDisplayId(); }
120
121 void* GetGenericWindowId() override;
122 void* GetGenericParentId() override { return reinterpret_cast<void*>(this->ParentId); }
123
124 void* GetGenericDrawable() override { return reinterpret_cast<void*>(this->WindowId); }
125
130 int* GetScreenSize() VTK_SIZEHINT(2) override;
131
136 int* GetPosition() VTK_SIZEHINT(2) override;
137
142 Display* GetDisplayId();
143
147 bool EnsureDisplay() override;
148
150
155 void SetDisplayId(Display*);
157 void SetDisplayId(void*) override;
159
164 Window GetParentId();
165
167
171 void SetParentId(Window);
173 void SetParentId(void*) override;
175
180 Window GetWindowId();
181
183
187 void SetWindowId(Window);
189 void SetWindowId(void*) override;
191
195 void SetNextWindowId(Window);
196
202 void SetNextWindowId(void*) override;
203
207 void SetWindowName(const char*) override;
208
213 void SetIcon(vtkImageData* img) override;
214
220
224 bool GetPlatformSupportsRenderWindowSharing() override { return true; }
225
227
232 void SetPosition(int x, int y) override;
233 void SetPosition(int a[2]) override { this->SetPosition(a[0], a[1]); }
235
237
241 void HideCursor() override;
242 void ShowCursor() override;
244
248 void SetCurrentCursor(int) override;
249
256
260 void SetWindowInfo(const char* info) override;
261
265 void SetNextWindowInfo(const char* info) override;
266
270 void SetParentInfo(const char* info) override;
271
276 void Render() override;
277
278protected:
281
282 // Helper members
283 Window ParentId;
284 Window WindowId;
286 Display* DisplayId;
287 Colormap ColorMap;
292
293 // we must keep track of the cursors we are using
295 Cursor XCArrow;
296 Cursor XCSizeAll;
297 Cursor XCSizeNS;
298 Cursor XCSizeWE;
299 Cursor XCSizeNE;
300 Cursor XCSizeNW;
301 Cursor XCSizeSE;
302 Cursor XCSizeSW;
303 Cursor XCHand;
304 Cursor XCCustom;
305
306 std::string MakeDefaultWindowNameWithBackend() override;
307 void CreateAWindow() override;
308 void DestroyWindow() override;
310
311private:
313 void operator=(const vtkXWebGPURenderWindow&) = delete;
314};
315
316VTK_ABI_NAMESPACE_END
317#endif // vtkXWebGPURenderWindow_h
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:29
void * GetGenericWindowId() override
Dummy stubs for vtkWindow API.
virtual void WindowInitialize()
Initialize the window for rendering.
Window GetParentId()
Get this RenderWindow's parent X window id.
void CreateAWindow() override
Create a not-off-screen window.
void SetCurrentCursor(int) override
Change the shape of the cursor.
bool EnsureDisplay() override
Ensure RenderWindow's X display is opened.
void SetWindowName(const char *) override
Set name of rendering window.
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.
Display * GetDisplayId()
Get this RenderWindow's X display id.
bool GetPlatformSupportsRenderWindowSharing() override
Does this platform support render window data sharing.
void SetNextWindowId(Window)
Specify the X window id to use if a WindowRemap is done.
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().
void SetDisplayId(Display *)
Set the X display id for this RenderWindow to use to a pre-existing X display id.
~vtkXWebGPURenderWindow() override
bool InitializeFromCurrentContext() override
Initialize the render window from the information associated with the currently activated native grap...
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).
void SetIcon(vtkImageData *img) override
For window manager that supports it, set the icon displayed in the taskbar and the title bar.
vtkTypeBool IsDirect() override
Is this render window using hardware acceleration?
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 SetParentId(Window)
Sets the parent of the window that WILL BE created.
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 SetWindowId(Window)
Set this RenderWindow's X window id to a pre-existing window.
Window GetWindowId()
Get this RenderWindow's X window id.
void DestroyWindow() override
Destroy a not-off-screen window.
int * GetPosition() override
Get the position (x and y) of the rendering window in screen coordinates (in pixels).
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)