|
Gateware Libraries
R6.5A
Beta Build
|
A thread-safe window creation and management library. More...
#include <GWindow.h>


Public Member Functions | |
| virtual GReturn | OpenWindow ()=0 |
| Initializes a window handle and displays a window. More... | |
| virtual GReturn | ProcessWindowEvents ()=0 |
| Flushes and processes all messages from the window's event queue. More... | |
| virtual GReturn | ReconfigureWindow (int _x, int _y, int _width, int _height, GWindowStyle _style)=0 |
| Gives the currently opened window the specified size, position and style. More... | |
| virtual GReturn | SetWindowName (const char *_newName)=0 |
| Changes de text displayed at the top bar of the window. More... | |
| virtual GReturn | MoveWindow (int _x, int _y)=0 |
| Repositions the currently opened window to the specified x and y pixels on screen. More... | |
| virtual GReturn | ResizeWindow (int _width, int _height)=0 |
| Resizes the currently opened window to the specified width and height. More... | |
| virtual GReturn | Maximize ()=0 |
| Resizes the currently opened window to the native maximum resolution. More... | |
| virtual GReturn | Minimize ()=0 |
| Minimizes the currently opened window. More... | |
| virtual GReturn | ChangeWindowStyle (GWindowStyle _style)=0 |
| Sets the currently opened window's style to the specified style. More... | |
| virtual GReturn | GetWidth (unsigned int &_outWidth)=0 |
| Returns the width in pixels of the currently opened window. More... | |
| virtual GReturn | GetHeight (unsigned int &_outHeight)=0 |
| Returns the height in pixels of the currently opened window. More... | |
| virtual GReturn | GetClientWidth (unsigned int &_outClientWidth)=0 |
| Returns the client width in pixels of the currently opened window. More... | |
| virtual GReturn | GetClientHeight (unsigned int &_outClientHeight)=0 |
| Returns the client height in pixels of the currently opened window. More... | |
| virtual GReturn | GetX (unsigned int &_outX)=0 |
| Returns the X position in pixels of the currently opened window. More... | |
| virtual GReturn | GetY (unsigned int &_outY)=0 |
| Returns the Y position in pixels of the currently opened window. More... | |
| virtual GReturn | GetClientTopLeft (unsigned int &_outX, unsigned int &_outY)=0 |
| Gets the location of the top-left pixel of the opened window's client area. More... | |
| virtual GReturn | GetWindowHandle (unsigned int _handleSize, void **_outWindowHandle)=0 |
| Returns the platform specific window handle to the currently opened window. More... | |
| virtual GReturn | IsFullscreen (bool &_outIsFullscreen)=0 |
| Returns a bool specifying whether or not the currently opened window is fullscreen. More... | |
| virtual GReturn | GetLastEvent (GWindowInputEvents &_LastEvent)=0 |
| Returns the last input event that has happened to the window. More... | |
Public Member Functions inherited from GW::CORE::GBroadcasting | |
| virtual GReturn | RegisterListener (GListener *_addListener, unsigned long long _eventMask)=0 |
| Any listener added to this class must receive all events unless otherwise specified by the _eventMask (optional). More... | |
| virtual GReturn | DeregisterListener (GListener *_removeListener)=0 |
| A successfully deregistered listener will no longer receive events and have its reference count decremented by one. More... | |
Public Member Functions inherited from GW::CORE::GInterface | |
| virtual GReturn | GetCount (unsigned int &_outCount)=0 |
| Return the total number of active references to this object. More... | |
| virtual GReturn | IncrementCount ()=0 |
| Increase the total number of active references to this object. More... | |
| virtual GReturn | DecrementCount ()=0 |
| Decrease the total number of active references to this object. More... | |
| virtual GReturn | RequestInterface (const GUUIID &_interfaceID, void **_outputInterface)=0 |
| Requests an interface that may or may not be supported by this object. More... | |
A thread-safe window creation and management library.
This library is used to create, move, resize, and destroy a window. Methods exist to query information from the window as well. The window is also a broadcaster, meaning a GListener can be written to receive events from it.
|
pure virtual |
Sets the currently opened window's style to the specified style.
GWindowStyle will be overwritten and the window resized or moved accordingly.
| [in] | _style | The GWindowStyle to change the window to. |
| SUCCESS | The window style was successfully changed. |
| REDUNDANT_OPERATION | No window exists to change. |
|
pure virtual |
Returns the client height in pixels of the currently opened window.
| 0 | The window is minimized. |
| -1 | No window exists to query size from. |
| else | Height was successfully queried and returned. |
|
pure virtual |
Gets the location of the top-left pixel of the opened window's client area.
| [out] | _outX | Will contain the X location of the top-left pixel. |
| [out] | _outY | Will contain the Y location of the top-left pixel. |
| -1 | No window exists to query position from. |
| else | Position was successfully queried and returned. |
|
pure virtual |
Returns the client width in pixels of the currently opened window.
Client height is the height of the window's drawable area.
| 0 | The window is minimized. |
| -1 | No window exists to query size from. |
| else | Width was successfully queried and returned. |
|
pure virtual |
Returns the height in pixels of the currently opened window.
Client width is the width of the window's drawable area.
| 0 | The window is minimized. |
| -1 | No window exists to query size from. |
| else | Height was successfully queried and returned. |
|
pure virtual |
Returns the last input event that has happened to the window.
| [out] | GWindowInputEvent | you pass-in will be updated to the lastest event that was called. |
| FAILURE | The Gateware's internal event tracker wasn't a valid event. |
| SUCCESS | The function run successfully and out-param is filled out. |
|
pure virtual |
Returns the width in pixels of the currently opened window.
| 0 | The window is minimized. |
| -1 | No window exists to query size from. |
| else | Width was successfully queried and returned. |
|
pure virtual |
Returns the platform specific window handle to the currently opened window.
On Windows the void* is an HWND, on Linux a LINUX_WINDOW, and on Mac an NSWindow. Methods exist to query window information right from these handles.
| void* | The void* data to the window handle. |
|
pure virtual |
Returns the X position in pixels of the currently opened window.
| -1 | No window exists to query position from. |
| else | X position was successfully queried and returned. |
|
pure virtual |
Returns the Y position in pixels of the currently opened window.
| -1 | No window exists to query position from. |
| else | Y position was successfully queried and returned. |
|
pure virtual |
Returns a bool specifying whether or not the currently opened window is fullscreen.
| true | The window is fullscreen. |
| false | The window is not fullscreen. |
|
pure virtual |
Resizes the currently opened window to the native maximum resolution.
GWindowStyle will be overwritten to be the fullscreen version if it is not already.
| SUCCESS | The window was successfully maximized. |
| REDUNDANT_OPERATION | No window exists to maximize. |
|
pure virtual |
Minimizes the currently opened window.
GWindowStyle will be overwritten to be the minimized style if it is not already.
| SUCCESS | The window was successfully minimized. |
| REDUNDANT_OPERATION | No window exists to minimize or window is already maximized. |
|
pure virtual |
Repositions the currently opened window to the specified x and y pixels on screen.
If position parameters are less than 0 then 0 will be used. If position parameters are greater than native resoultion, maximum native resolution parameters will be used.
| [in] | _x | The x position on screen to move the window to. |
| [in] | _y | The y position on screen to move the window to. |
| SUCCESS | The window was successfully moved. |
| INVALID_ARGUMENT | The style passed in is invalid |
| REDUNDANT_OPERATION | No window exists to move. |
|
pure virtual |
Initializes a window handle and displays a window.
The window is opened with the size, position and style specified in the parameters passed into the CreateGWindow function. Parameters were checked for invalid values during the initialization of the window after creation, so it is assumed the window has valid parameters before this function is called.
| SUCCESS | The window was successfully created and displayed. |
| REDUNDANT_OPERATION | The GWindow object already has a window open |
| FAILURE | The window could not be created. |
|
pure virtual |
Flushes and processes all messages from the window's event queue.
This function is meant to be called once a frame in an application's main loop. This function will break when all waiting messages have been processed and the event queue is empty.
| SUCCESS | The messages were successfully processed and removed. |
| REDUNDANT_OPERATION | No window exists process. |
|
pure virtual |
Gives the currently opened window the specified size, position and style.
If width and height are equal to or greater than the native resolution, the passed in GWindowStyle will be overwritten to be the fullscreen version if it is not already. If position parameters are less than 0 then 0 will be used. If position parameters are greater than native resoultion, maximum native resolution parameters will be used.
| [in] | _x | The x position on screen to move the window to. |
| [in] | _y | The y position on screen to move the window to. |
| [in] | _width | The width to give the window. |
| [in] | _height | The height to give the window. |
| [in] | _style | The style to give to the window. (see GWindowStyle for style options) |
| SUCCESS | The window successfully had its attributes changed. |
| INVALID_ARGUMENT | One of the size parameters are outside the limits of the hardware. |
| REDUNDANT_OPERATION | No window exists to edit. |
|
pure virtual |
Resizes the currently opened window to the specified width and height.
If width and height are greater than the native resolution, the GWindowStyle will be overwritten to be the fullscreen version if it is not already. If position parameters are less than 0 then 0 will be used. If position parameters are greater than native resoultion, maximum native resolution parameters will be used.
| [in] | _x | The width to resize the window to. |
| [in] | _y | The height to resize the window to. |
| SUCCESS | The window was successfully resized. |
| INVALID_ARGUMENT | One of the size parameters are less than or equal to 0. |
| REDUNDANT_OPERATION | No window exists to resize. |
|
pure virtual |
Changes de text displayed at the top bar of the window.
| [in] | _style | The style to give to the window. (see GWindowStyle for style options) |
| SUCCESS | The window successfully had its text changed. |
| INVALID_ARGUMENT | The string passed in contains invalid characters or is null. |
| REDUNDANT_OPERATION | No window exists to edit. |