Provides functionality to handle Window creation and management.
Options that can be requested at window creation time.
Members
Private structure representing a system window.
The size of a window in graphics rendering coordinates. The width and height of a window should correspond to the size of the graphics surface used for drawing that would be created to back that window.
Members
Description
Creates and returns a new system window with the given options
, which may be NULL
. The function returns kSbWindowInvalid
if it cannot create the requested SbWindow
due to policy, unsatisfiable options, or any other reason.
If options
are not specified, this function uses all defaults, which must work on every platform. In general, it defaults to creating a fullscreen window at the highest 16:9 resolution possible. If the platform does not support fullscreen windows, then it creates a normal, windowed window.
Some devices are fullscreen-only, including many production targets for Starboard. In those cases, only one SbWindow may be created, and it must be fullscreen. Additionally, in those cases, the requested size will actually be the requested resolution.
An SbWindow must be created to receive window-based events, like input events, even on fullscreen-only devices. These events are dispatched to the Starboard entry point.
Declaration and definitions
#include "starboard/window.h" SbWindow SbWindowCreate(const SbWindowOptions* /*options*/) { return kSbWindowInvalid; }
Parameters
Description
Destroys window
, reclaiming associated resources.
Declaration and definitions
#include "starboard/window.h" bool SbWindowDestroy(SbWindow /*window*/) { return false; }
Parameters
Description
Gets the platform-specific handle for window
, which can be passed as an EGLNativeWindowType to initialize EGL/GLES. This return value is entirely platform-specific, so there are no constraints about expected ranges.
Declaration and definitions
#include "starboard/window.h" void* SbWindowGetPlatformHandle(SbWindow /*window*/) { return NULL; }
Parameters
Description
Retrieves the dimensions of window
and sets size
accordingly. This function returns true
if it completes successfully. If the function returns false
, then size
will not have been modified.
Declaration and definitions
#include "starboard/window.h" bool SbWindowGetSize(SbWindow /*window*/, SbWindowSize* /*size*/) { return false; }
Parameters
Description
Returns whether the given window handle is valid.
Declaration
static SB_C_INLINE bool SbWindowIsValid(SbWindow window) { return window != kSbWindowInvalid; }
Parameters
Description
Sets the default options for system windows.
Declaration and definitions
#include "starboard/window.h" void SbWindowSetDefaultOptions(SbWindowOptions* /*options*/) { }
Parameters