Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
Public Member Functions | Static Public Member Functions | List of all members
SR::Window Class Referenceabstract

Interface class to represent the application window in the SR system. More...

#include <window.h>

Public Member Functions

virtual SR_HWND getHandle ()=0
 Get the handle used by the operating system associated with the window. More...
 
virtual SR_recti getLocation ()=0
 Get the location of the window with respect to the primary display. More...
 
virtual bool isWindowPartVisible (unsigned int xOffset, unsigned int yOffset, unsigned int width, unsigned int height)=0
 Determine whether a window is (partially) visible. More...
 

Static Public Member Functions

static Windowcreate (SRContext &context, SR_HWND window)
 Create a Window class compatible with the current operating system (Windows) More...
 

Detailed Description

Interface class to represent the application window in the SR system.

Member Function Documentation

◆ create()

static Window * SR::Window::create ( SRContext context,
SR_HWND  window 
)
static

Create a Window class compatible with the current operating system (Windows)

Parameters
contextis the context of the application
windowis the handle to the window
Returns
pointer to SR::Window class to represent an application window in the SR system

The pointer returned by this function should be deleted by the application when it wants the memory cleaned up

◆ getHandle()

virtual SR_HWND SR::Window::getHandle ( )
pure virtual

Get the handle used by the operating system associated with the window.

Returns
a SR_HWND window handle

The returned SR_HWND handle can be cast to HWND and used in Windows API functions

◆ getLocation()

virtual SR_recti SR::Window::getLocation ( )
pure virtual

Get the location of the window with respect to the primary display.

Returns
a rectangle representing the window location in the full display configuration

◆ isWindowPartVisible()

virtual bool SR::Window::isWindowPartVisible ( unsigned int  xOffset,
unsigned int  yOffset,
unsigned int  width,
unsigned int  height 
)
pure virtual

Determine whether a window is (partially) visible.

The provided offset and size of the weaving surface will be clipped to the window size. Any checks about whether or not the window is occluded will be limited to the bounds of the window. Windows spawned as children of the windowHandle will be ignored as they are considered part of the main weaving window.

Parameters
windowHandleis a handle to the window as used in windows API functions
xOffsetto where the weaving surface starts (could be 0 for all the way on the left side of the window)
yOffsetto where the weaving surface starts (could be 0 for all the way on the top side of the window)
widthof the weaving surface
heightof the weaving surface
Returns
true if the window is (partially) visible
Exceptions
std::runtime_errorif windowHandle is not a valid window handle (HWND)

The documentation for this class was generated from the following file: