PVRShell Structs#

Shell::PointerNormalisedLocation#

Nested Relationships#

This struct is a nested type of Shell.

Struct Documentation#

struct PointerNormalisedLocation

Contains a pointer location in unsigned normalised coordinates (0..1).

Public Functions

inline PointerNormalisedLocation()

Constructor. Undefined values.

Public Members

float x

The x location of the cursor, where 0=left and 1=right.

float y

The y location of the cursor, where 0=top and 1=bottom.

Shell::PointingDeviceState#

Nested Relationships#

This struct is a nested type of Shell.

Struct Documentation#

struct PointingDeviceState

Contains the state of a pointing device (mouse, touch screen).

Public Functions

inline PointingDeviceState()

Constructor.

inline PointerLocation position() const

Get the current (i.e. last known) location of the mouse/pointing device pointer.

Returns:

The location of the pointer.

inline PointerLocation dragStartPosition() const

Get the location of the mouse/pointing device pointer when the last drag started.

Returns:

The location of a drag action’s starting point.

inline bool isPressed(int8_t buttonIndex) const

Query if a specific button is pressed.

Parameters:

buttonIndex – The index of the button (0 up to 6).

Returns:

True if the button exists and is pressed. False otherwise.

inline bool isDragging() const

Check if a drag action has started.

Returns:

True if during a dragging action.

Protected Attributes

PointerLocation _pointerLocation

Location of the pointer.

PointerLocation _dragStartLocation

Location of a drag starting point.

int8_t _buttons

Buttons pressed.

Shell::PrivatePointerState#

Nested Relationships#

This struct is a nested type of Shell.

Inheritance Relationships#

Base Type#

Struct Documentation#

struct PrivatePointerState : public pvr::platform::Shell::PointingDeviceState#

Public Functions

inline void startDragging()#
inline void endDragging()#
inline void setButton(int8_t buttonIndex, bool pressed)#
inline void setPointerLocation(PointerLocation pointerLocation)#

ShellData#

Struct Documentation#

struct ShellData#

Internal. Contains and tracks internal data necessary to power the pvr::Shell.

Public Functions

inline ShellData()#

Default constructor.

Public Members

Time timer#

A timer.

uint64_t timeAtInitApplication#

The time when initApplication is called.

uint64_t lastFrameTime#

The time take for the last frame.

uint64_t currentFrameTime#

The time taken for the current frame.

std::string exitMessage#

A message to print upon exitting the application.

ShellOS *os#

An abstraction of the OS specific shell.

DisplayAttributes attributes#

A set of display attributes.

CommandLineParser *commandLine#

A Command line parser.

int32_t captureFrameStart#

The frame at which to start capturing frames.

int32_t captureFrameStop#

The frame at which to stop capturing frames.

uint32_t captureFrameScale#

A scaling factor to apply to each captured frame.

bool trapPointerOnDrag#

Whether to trap the pointer when dragging.

bool forceFrameTime#

Indicates whether frame time animation should be used.

uint32_t fakeFrameTime#

The fake time used for each frame.

bool exiting#

Indicates that the application is exiting.

uint32_t frameNo#

The current frame number.

bool forceReleaseInitWindow#

Forces a release cycle to happen, calling ReleaseView and then recreating the window as well.

bool forceReleaseInitView#

Forces a release cycle to happen, calling ReleaseView. The window is not recreated.

int32_t dieAfterFrame#

Specifies a frame after which the application will exit.

float dieAfterTime#

Specifies a time after which the application will exit.

int64_t startTime#

Indicates the time at which the application was started.

bool safetyCritical#

Indicates whether the application should be ran as Safety Critical (only Vulkan API currently).

bool jsonGeneration#

Indicates whether the application should be ran in .json pipeline file generation mode (only Vulkan API currently).

bool outputInfo#

Indicates that the output information should be printed.

bool weAreDone#

Indicates that the application is finished.

float FPS#

The current frames per second.

bool showFPS#

Indicates whether the current fps should be printed.

Api contextType#

The API used.

Api minContextType#

The minimum API supported.

ShellEvent#

Struct Documentation#

struct ShellEvent#

Contains all data of a system event.

Public Types

enum ShellEventType#

The type of the shell event.

Values:

enumerator SystemEvent#

Fired on any system event.

enumerator PointingDeviceDown#

Fired when a mouse button or touch is first held down.

enumerator PointingDeviceUp#

Fired when the mouse button or touch is lifted.

enumerator PointingDeviceMove#

Fired when the mouse or a touch is moved.

enumerator KeyDown#

Fired when a key is first pushed down.

enumerator KeyUp#

Fired when a key is lifted.

Public Members

enum pvr::platform::ShellEvent::ShellEventType type#

The type of the event.

PointerLocationStore location#

The location of the mouse/touch, if a mouse/touch event.

uint8_t buttonIdx#

The button id, if a mouse/touch event.

pvr::SystemEvent systemEvent#

The type of the event.

Keys key#

The keyboard key, if a keyboard event.

union pvr::platform::ShellEvent::[anonymous] [anonymous]#

Unnamed union storing the event data. Depending on event type, different members can/should be accessed.

ShellOS::Capabilities#

Nested Relationships#

This struct is a nested type of ShellOS.

Struct Documentation#

struct Capabilities

Capabilities that may be different between platforms.

Public Members

Capability resizable

A window with this capability can be resized while the program is running (e.g windows, X11, but not Android)

Capability movable

A window with this capability can be moved while the program is running (e.g windows and X11, but not Android)

SpecialKeyCode#

Struct Documentation#

struct SpecialKeyCode#

Public Members

const char *str#
Keys key#

WindowsOSData#

Struct Documentation#

struct WindowsOSData#

OS specific data for windows.

Public Functions

inline WindowsOSData()#

Public Members

int cmdShow#

The mode that this window should be shown with (minimized, maximized etc.)

ConfigureEvent#

Struct Documentation#

struct ConfigureEvent#

A window configuration event (e.g. resize)

Public Members

int x#

x coordinate of the left of the window

int y#

y coordinate of the bottom of the window

int width#

Width.

int height#

Height.

int border_width#

Border.

PointerLocationStore#

Inheritance Relationships#

Derived Type#

Struct Documentation#

struct PointerLocationStore#

A storage structure for the pointer location.

Subclassed by pvr::PointerLocation

Public Functions

inline PointerLocationStore operator+(const PointerLocationStore &rhs)#

Operator+.

Parameters:

rhs – Another PointerLocationStore.

Returns:

The new PointerLocationStore

inline PointerLocationStore operator-(const PointerLocationStore &rhs)#

Operator-.

Parameters:

rhs – Another PointerLocationStore.

Returns:

The new PointerLocationStore

inline void operator+=(const PointerLocationStore &rhs)#

Operator+=.

Parameters:

rhs – Another PointerLocationStore.

inline void operator-=(const PointerLocationStore &rhs)#

Operator-=.

Parameters:

rhs – Another PointerLocationStore.

Public Members

int16_t x#

The x position.

int16_t y#

The y position.