TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
iOSWindow Struct Referenceabstract
Inheritance diagram for iOSWindow:
iUnknown

Detailed Description

OS Window interface.

Public Member Functions

virtual iOSWindowGetParent () const =0
 Get the parent window if any. {Property}. More...
 
virtual void SetClientAreaWindow (tIntPtr aHandle)=0
 Set a child window that should always be set to cover the window's client area. {Property}. More...
 
virtual tIntPtr GetClientAreaWindow () const =0
 Get the client area window of this window. {Property}. More...
 
virtual tIntPtr GetPID () const =0
 Get the process that created this window. {Property}. More...
 
virtual tIntPtr GetHandle () const =0
 Get the os handle of the window. {Property}. More...
 
virtual tBool GetIsHandleOwned () const =0
 Get whether the handle of the window is owned (aka will be destroyed) by the window object. {Property}. More...
 
virtual void ActivateWindow ()=0
 Activate the window if the application is in the foreground. More...
 
virtual tBool GetIsActive () const =0
 Get whether the window is active or not. {Property}. More...
 
virtual tBool SwitchIn (tU32 anReason)=0
 Send a switch in message and set the window in active state. More...
 
virtual tBool SwitchOut (tU32 anReason)=0
 Send a switch out message and set the window in inactive state. More...
 
virtual void SetTitle (const achar *aaszTitle)=0
 Set the window's title. {Property}. More...
 
virtual const acharGetTitle () const =0
 Get the window's title. {Property}. More...
 
virtual void SetStyle (tOSWindowStyleFlags aStyle)=0
 Set the window's style. {Property}. More...
 
virtual tOSWindowStyleFlags GetStyle () const =0
 Get the window's style. {Property}. More...
 
virtual void SetShow (tOSWindowShowFlags aStyle)=0
 Set the window shown status. {Property}. More...
 
virtual tOSWindowShowFlags GetShow () const =0
 Get the window shown status. {Property}. More...
 
virtual void SetZOrder (eOSWindowZOrder aZOrder)=0
 Set the window's ZOrder. {Property}. More...
 
virtual eOSWindowZOrder GetZOrder () const =0
 Get the window's ZOrder. {Property}. More...
 
virtual void SetSize (const sVec2i &avSize)=0
 Set the window's size. {Property}. More...
 
virtual sVec2i GetSize () const =0
 Get the window's size. {Property}. More...
 
virtual void SetPosition (const sVec2i &avPos)=0
 Set the window's position. {Property}. More...
 
virtual sVec2i GetPosition () const =0
 Get the window's position. {Property}. More...
 
virtual void SetRect (const sRecti &aRect)=0
 Set the window's rectangle. {Property}. More...
 
virtual sRecti GetRect () const =0
 Get the window's rectangle. {Property}. More...
 
virtual void SetClientSize (const sVec2i &avSize)=0
 Set the window's client size. {Property}. More...
 
virtual sVec2i GetClientSize () const =0
 Get the window's client size. {Property}. More...
 
virtual tMessageHandlerSinkLstGetMessageHandlers () const =0
 Get the window's message handlers. {Property}. More...
 
virtual tBool UpdateWindow (tBool abBlockingMessages)=0
 Update the window's message pump and others. More...
 
virtual void CenterWindow ()=0
 Center the window in the middle of the current screen/parent window. More...
 
virtual tBool GetRequestedClose () const =0
 Get whether window closing has been requested. {Property}. More...
 
virtual void SetRequestedClose (tBool abRequested)=0
 Set the close requested flags. {Property}. More...
 
virtual void SetCursor (eOSCursor aCursor)=0
 Set the current OS cursor. {Property}. More...
 
virtual eOSCursor GetCursor () const =0
 Get the current OS cursor. {Property}. More...
 
virtual tBool InitCustomCursor (tIntPtr aID, tU32 anWidth, tU32 anHeight, tU32 anHotSpotX, tU32 anHotSpotY, const tU32 *apData)=0
 Initialize the custom cursor. More...
 
virtual tIntPtr GetCustomCursorID () const =0
 Get the custom cursor user id. {Property}. More...
 
virtual void SetCursorPosition (const sVec2i &avCursorPos)=0
 Set the cursor position. {Property}. More...
 
virtual sVec2i GetCursorPosition () const =0
 Get the last recorded cursor position. {Property}. More...
 
virtual void SetCursorCapture (tBool abCapture)=0
 Set the cursor capture. {Property}. More...
 
virtual tBool GetCursorCapture () const =0
 Get the cursor capture state. {Property}. More...
 
virtual tBool GetIsCursorOverClient () const =0
 Get whether the mouse cursor is in the client area of the window. {Property}. More...
 
virtual void TryClose ()=0
 Try to close the window (this is equivalent to pressing the close button on the window). More...
 
virtual void SetDropTarget (tBool abDropTarget)=0
 Set whether the window is a drop target. {Property}. More...
 
virtual tBool GetDropTarget () const =0
 Get whether the window is a drop target. {Property}. More...
 
virtual void Clear ()=0
 Explicitly clear the window's content. More...
 
virtual tBool RedrawWindow ()=0
 Force redraw of the full window. More...
 
virtual tU32 GetMonitor () const =0
 Get the monitor index the window is on. {Property}. More...
 
virtual tBool SetFullScreen (tU32 anMonitor)=0
 Set the window to fullsreen, set to eInvalidHandle to return to windowed. {Property}. More...
 
virtual tU32 GetFullScreen () const =0
 Get the monitor on which the window is fullscreend, eInvalidHandle if it's not fullscreen. {Property}. More...
 
virtual tBool GetIsMinimized () const =0
 Get whether the window is currently minimized. {Property}. More...
 
virtual tBool GetIsMaximized () const =0
 Get whether the window is currently maximzed. {Property}. More...
 
virtual void SetFocus ()=0
 Set focus on this window. More...
 
virtual tBool GetHasFocus () const =0
 Get whether the window has focus. {Property}. More...
 
virtual void SetRefreshTimer (tF32 afTime)=0
 Set the rate of the refresh timer in seconds. {Property}. More...
 
virtual tF32 GetRefreshTimer () const =0
 Get the rate of the refresh timer. {Property}. More...
 
virtual tIntPtr GetParentHandle () const =0
 Get the parent window handle if any. {Property}. More...
 
virtual tU32 IsParentWindow (tIntPtr aHandle) const =0
 Check whether the specified window is a parent window of this window. More...
 
virtual tBool AttachGraphicsAPI (iOSGraphicsAPI *apAPI)=0
 Attach a graphics API to the window. More...
 
virtual iOSGraphicsAPIGetGraphicsAPI () const =0
 Get the graphics API attached to the window. {Property}. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual iOSWindow* GetParent ( ) const
pure virtual

Get the parent window if any. {Property}.

Remarks
This is valid only if the window has been created explicitly with a parent window. To retrieve the 'OS' parent window use GetParentHandle instead.
virtual void SetClientAreaWindow ( tIntPtr  aHandle)
pure virtual

Set a child window that should always be set to cover the window's client area. {Property}.

virtual tIntPtr GetClientAreaWindow ( ) const
pure virtual

Get the client area window of this window. {Property}.

virtual tIntPtr GetPID ( ) const
pure virtual

Get the process that created this window. {Property}.

virtual tIntPtr GetHandle ( ) const
pure virtual

Get the os handle of the window. {Property}.

virtual tBool GetIsHandleOwned ( ) const
pure virtual

Get whether the handle of the window is owned (aka will be destroyed) by the window object. {Property}.

virtual void ActivateWindow ( )
pure virtual

Activate the window if the application is in the foreground.

virtual tBool GetIsActive ( ) const
pure virtual

Get whether the window is active or not. {Property}.

virtual tBool SwitchIn ( tU32  anReason)
pure virtual

Send a switch in message and set the window in active state.

Parameters
anReasonis an id that can be used to identify why the switch occurred,
See also
ni::eOSWindowSwitchReason
Remarks
Return eTrue if the active state changed and the SwitchIn message has been sent, else eFalse.
virtual tBool SwitchOut ( tU32  anReason)
pure virtual

Send a switch out message and set the window in inactive state.

Parameters
anReasonis an id that can be used to identify why the switch occurred,
See also
ni::eOSWindowSwitchReason
Remarks
Return eTrue if the active state changed and the SwitchOut message has been sent, else eFalse.
virtual void SetTitle ( const achar aaszTitle)
pure virtual

Set the window's title. {Property}.

virtual const achar* GetTitle ( ) const
pure virtual

Get the window's title. {Property}.

virtual void SetStyle ( tOSWindowStyleFlags  aStyle)
pure virtual

Set the window's style. {Property}.

virtual tOSWindowStyleFlags GetStyle ( ) const
pure virtual

Get the window's style. {Property}.

virtual void SetShow ( tOSWindowShowFlags  aStyle)
pure virtual

Set the window shown status. {Property}.

virtual tOSWindowShowFlags GetShow ( ) const
pure virtual

Get the window shown status. {Property}.

virtual void SetZOrder ( eOSWindowZOrder  aZOrder)
pure virtual

Set the window's ZOrder. {Property}.

virtual eOSWindowZOrder GetZOrder ( ) const
pure virtual

Get the window's ZOrder. {Property}.

virtual void SetSize ( const sVec2i avSize)
pure virtual

Set the window's size. {Property}.

virtual sVec2i GetSize ( ) const
pure virtual

Get the window's size. {Property}.

virtual void SetPosition ( const sVec2i avPos)
pure virtual

Set the window's position. {Property}.

virtual sVec2i GetPosition ( ) const
pure virtual

Get the window's position. {Property}.

virtual void SetRect ( const sRecti aRect)
pure virtual

Set the window's rectangle. {Property}.

virtual sRecti GetRect ( ) const
pure virtual

Get the window's rectangle. {Property}.

virtual void SetClientSize ( const sVec2i avSize)
pure virtual

Set the window's client size. {Property}.

virtual sVec2i GetClientSize ( ) const
pure virtual

Get the window's client size. {Property}.

virtual tMessageHandlerSinkLst* GetMessageHandlers ( ) const
pure virtual

Get the window's message handlers. {Property}.

virtual tBool UpdateWindow ( tBool  abBlockingMessages)
pure virtual

Update the window's message pump and others.

Remarks
abBlockingMessage specifies whether UpdateWindow should wait for at least one os window message/event before returning.
Returns
eTrue if any window message has been processed, else eFalse if the UpdateWindow didnt do anything. In general the application's update should be called only when UpdateWindow return eFalse.
virtual void CenterWindow ( )
pure virtual

Center the window in the middle of the current screen/parent window.

virtual tBool GetRequestedClose ( ) const
pure virtual

Get whether window closing has been requested. {Property}.

virtual void SetRequestedClose ( tBool  abRequested)
pure virtual

Set the close requested flags. {Property}.

virtual void SetCursor ( eOSCursor  aCursor)
pure virtual

Set the current OS cursor. {Property}.

virtual eOSCursor GetCursor ( ) const
pure virtual

Get the current OS cursor. {Property}.

virtual tBool InitCustomCursor ( tIntPtr  aID,
tU32  anWidth,
tU32  anHeight,
tU32  anHotSpotX,
tU32  anHotSpotY,
const tU32 apData 
)
pure virtual

Initialize the custom cursor.

Parameters
aIDis an id provided by the user that should be used to identify the current custom cursor type.
anWidthis the width of the cursor data
anHeightis the heigh of the cursor data
anHotSpotX
anHotSpotY
apDatais the data of the cursor, should be a U32[w*h] array. If NULL InitCustomCursor returns eTrue if the specified custom cursor size is supported, else eFalse.
Returns
eTrue if the specified cursor size is supported, eFalse otherwise.
Remarks
If eOSCursor_Custom is used as cursor type and no custom cursor as been successfully initialized the Arrow cursor is used as fallback.
virtual tIntPtr GetCustomCursorID ( ) const
pure virtual

Get the custom cursor user id. {Property}.

Remarks
The id is always 0 when custom cursor initialization with valid apData failed.
virtual void SetCursorPosition ( const sVec2i avCursorPos)
pure virtual

Set the cursor position. {Property}.

Remarks
The cursor position is in client coordinate.
virtual sVec2i GetCursorPosition ( ) const
pure virtual

Get the last recorded cursor position. {Property}.

Remarks
The cursor position is in client coordinate.
virtual void SetCursorCapture ( tBool  abCapture)
pure virtual

Set the cursor capture. {Property}.

Remarks
Depending on the platform this will confine the cursor to this window or only redirect all window messages to this window.
virtual tBool GetCursorCapture ( ) const
pure virtual

Get the cursor capture state. {Property}.

virtual tBool GetIsCursorOverClient ( ) const
pure virtual

Get whether the mouse cursor is in the client area of the window. {Property}.

virtual void TryClose ( )
pure virtual

Try to close the window (this is equivalent to pressing the close button on the window).

virtual void SetDropTarget ( tBool  abDropTarget)
pure virtual

Set whether the window is a drop target. {Property}.

virtual tBool GetDropTarget ( ) const
pure virtual

Get whether the window is a drop target. {Property}.

virtual void Clear ( )
pure virtual

Explicitly clear the window's content.

virtual tBool RedrawWindow ( )
pure virtual

Force redraw of the full window.

virtual tU32 GetMonitor ( ) const
pure virtual

Get the monitor index the window is on. {Property}.

virtual tBool SetFullScreen ( tU32  anMonitor)
pure virtual

Set the window to fullsreen, set to eInvalidHandle to return to windowed. {Property}.

virtual tU32 GetFullScreen ( ) const
pure virtual

Get the monitor on which the window is fullscreend, eInvalidHandle if it's not fullscreen. {Property}.

virtual tBool GetIsMinimized ( ) const
pure virtual

Get whether the window is currently minimized. {Property}.

virtual tBool GetIsMaximized ( ) const
pure virtual

Get whether the window is currently maximzed. {Property}.

virtual void SetFocus ( )
pure virtual

Set focus on this window.

virtual tBool GetHasFocus ( ) const
pure virtual

Get whether the window has focus. {Property}.

virtual void SetRefreshTimer ( tF32  afTime)
pure virtual

Set the rate of the refresh timer in seconds. {Property}.

Remarks
By default windows are purely event driven so they won't be refershed/painted unless a message is sent to it for that purpose. UpdateWindow() waits for messages to arrive before continuing. The refersh timer allows UpdateWindow to continue at the specified time interval if no message is received.
Pass a value <= 0 to disable the refresh timer.
virtual tF32 GetRefreshTimer ( ) const
pure virtual

Get the rate of the refresh timer. {Property}.

virtual tIntPtr GetParentHandle ( ) const
pure virtual

Get the parent window handle if any. {Property}.

Remarks
This returns the 'OS' parent window regardless of whether the window has been created explicitly with a parent window.
virtual tU32 IsParentWindow ( tIntPtr  aHandle) const
pure virtual

Check whether the specified window is a parent window of this window.

Returns
0 if not, 1 if its the direct parent, 2 if its the parent of the parent, etc...
virtual tBool AttachGraphicsAPI ( iOSGraphicsAPI apAPI)
pure virtual

Attach a graphics API to the window.

Remarks
This is OS and graphics driver dependant.
Only one graphics API can be attached to a window during its lifetime.
virtual iOSGraphicsAPI* GetGraphicsAPI ( ) const
pure virtual

Get the graphics API attached to the window. {Property}.