Packageqnx.display
Classpublic class IowWindow
InheritanceIowWindow Inheritance flash.events.EventDispatcher

The IowWindow class contains properties that define the appearance and behavior of your application display window.

See also

IowWindowTransparency
IowWindowSensitivity


Public Properties
 PropertyDefined By
  acceptsFocus : Boolean
Gets or sets a value that determines if the window accepts keyboard focus when tappped.
IowWindow
  alpha : Number
Gets or sets the global alpha property of the window.
IowWindow
  bufferProtection : int
Gets or sets the DRM buffer locking value.
IowWindow
  clipHeight : int
Gets or sets the height of the clip area for the window (in screen coordinates).
IowWindow
  clipWidth : int
Gets or sets the width of the clip area for the window (in screen coordinates).
IowWindow
  clipX : int
Gets or sets the x coordinate of the clip area for the window (in screen coordinates).
IowWindow
  clipY : int
Gets or sets the y coordinate of the clip area for the window (in screen coordinates).
IowWindow
  dialogGroup : String
[static] Gets or sets the window group that is used for internally displayed dialogs.
IowWindow
  displayIndex : int
[read-only] Gets the index of the display on which the window is currently displayed.
IowWindow
  effect : IowWindowEffect
IowWindow
  group : String
Gets or sets the group property of the window.
IowWindow
  height : int
Gets or sets the height of the window.
IowWindow
  id : String
Gets or sets the ID of the window.
IowWindow
  idleMode : String
Provides finer grain control than NativeApplication.systemIdleMode for cases where there are multiple displays.
IowWindow
  numBuffers : int
Gets or sets the number of buffers.
IowWindow
  ownWindow : Boolean
[read-only] Gets a Boolean that determines if this window belongs to this process.
IowWindow
  pid : int
[read-only] Gets the process ID that is associated with the window.
IowWindow
  rotation : int
Gets or sets the orientation of the window with respect to the device.
IowWindow
  scaleQuality : int
[write-only] Sets the scale quality level.
IowWindow
  sensitivity : String
Gets or sets the sensitivity of the window to pointer events.
IowWindow
  srcHeight : int
Gets or sets the height of the sub-area of the window that is to be displayed.
IowWindow
  srcWidth : int
Gets or sets the width of the sub-area of the window that is to be displayed.
IowWindow
  srcX : int
Gets or sets the x coordinate of the upper left hand corner of the sub-area of the window to be displayed.
IowWindow
  srcY : int
Gets or sets the y coordinate of the upper left hand corner of the sub-area of the window to be displayed.
IowWindow
  state : String
[read-only] Gets the state of the window.
IowWindow
  surfaceHeight : int
[read-only] Gets or sets the height of the surface that is associated with the window.
IowWindow
  surfaceWidth : int
[read-only] Gets or sets the width of the surface that is associated with the window.
IowWindow
  swapInterval : int
Gets or sets the swap interval of the window.
IowWindow
  transparency : String
Determines how the window is blended with underlying windows.
IowWindow
  valid : Boolean
[read-only] Gets a value that indicates whether or not the the window currently exists.
IowWindow
  visible : Boolean
Gets or sets the visibility of the window.
IowWindow
  width : int
Gets or sets the width of the window.
IowWindow
  windowClass : String
[read-only] Gets the window class that is associated with the window.
IowWindow
  x : int
Gets or sets the x coordinate of the upper left corner of the window.
IowWindow
  y : int
Gets or sets the y coordinate of the upper left corner of the window.
IowWindow
  zOrder : int
Gets or sets the z-Order property of the window.
IowWindow
Public Methods
 MethodDefined By
  
Creates an IowWindow instance.
IowWindow
  
close():void
Closes the window.
IowWindow
  
createSnapshot(width:int, height:int, id:String = null, asWindow:Boolean = false):Boolean
Creates a snapshot of the window given a width and height.
IowWindow
  
Creates a second IowWindow instance that shares the buffers of the original window.
IowWindow
  
getAirWindow(nativeWin:NativeWindow = null):IowWindow
[static] Returns an IowWindow object for one of the AIR player's windows.
IowWindow
  
getExternalWindow(pid:int, id:String):IowWindow
[static] Returns an IowWindow object associated with the window of an external application.
IowWindow
  
keepWindow(keep:Boolean):void
Determines whether or not the window will be destroyed when the owning process dies.
IowWindow
  
sendMouseEvent(pressed:Boolean, x:int, y:int):void
Sends a mouse event to the window.
IowWindow
  
setWindowProperty(propertyId:int, value:int):void
Sets the general window properties, given a property ID and an integer value.
IowWindow
Events
 Event Summary Defined By
   Dispatched when the snapshot operation completes successfully.IowWindow
   Dispatched when the snapshot operation fails.IowWindow
   Dispatched when a window is created.IowWindow
   Dispatched when a window is destroyed.IowWindow
   Dispatched when the state of the window changes.IowWindow
   Dispatched when the visibility of the window changes.IowWindow
Property Detail
acceptsFocusproperty
acceptsFocus:Boolean

Gets or sets a value that determines if the window accepts keyboard focus when tappped. If true the window takes keyboard focus, otherwise false.


Implementation
    public function get acceptsFocus():Boolean
    public function set acceptsFocus(value:Boolean):void
alphaproperty 
alpha:Number

Gets or sets the global alpha property of the window.


Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
bufferProtectionproperty 
bufferProtection:int

Gets or sets the DRM buffer locking value.


Implementation
    public function get bufferProtection():int
    public function set bufferProtection(value:int):void
clipHeightproperty 
clipHeight:int

Gets or sets the height of the clip area for the window (in screen coordinates).


Implementation
    public function get clipHeight():int
    public function set clipHeight(value:int):void
clipWidthproperty 
clipWidth:int

Gets or sets the width of the clip area for the window (in screen coordinates).


Implementation
    public function get clipWidth():int
    public function set clipWidth(value:int):void
clipXproperty 
clipX:int

Gets or sets the x coordinate of the clip area for the window (in screen coordinates).


Implementation
    public function get clipX():int
    public function set clipX(value:int):void
clipYproperty 
clipY:int

Gets or sets the y coordinate of the clip area for the window (in screen coordinates).


Implementation
    public function get clipY():int
    public function set clipY(value:int):void
dialogGroupproperty 
dialogGroup:String

Gets or sets the window group that is used for internally displayed dialogs.

This must match the group ID of an existing window. If set to null, dialogs are created without a group.


Implementation
    public static function get dialogGroup():String
    public static function set dialogGroup(value:String):void
displayIndexproperty 
displayIndex:int  [read-only]

Gets the index of the display on which the window is currently displayed.


Implementation
    public function get displayIndex():int
effectproperty 
effect:IowWindowEffect


Implementation
    public function get effect():IowWindowEffect
    public function set effect(value:IowWindowEffect):void
groupproperty 
group:String

Gets or sets the group property of the window. All windows in the same group are tied together so that moving, scaling, or changing the visibility of the top level window in a group affects all group members.


Implementation
    public function get group():String
    public function set group(value:String):void
heightproperty 
height:int

Gets or sets the height of the window. If this is different than srcHeight, the window is stretched or shrunk.


Implementation
    public function get height():int
    public function set height(value:int):void
idproperty 
id:String

Gets or sets the ID of the window.


Implementation
    public function get id():String
    public function set id(value:String):void
idleModeproperty 
idleMode:String

Provides finer grain control than NativeApplication.systemIdleMode for cases where there are multiple displays. Allows one display to be kept on while allowing others to turn off. The values for for this property are defined by the SystemIdleMode class.


Implementation
    public function get idleMode():String
    public function set idleMode(value:String):void
numBuffersproperty 
numBuffers:int

Gets or sets the number of buffers. Valid values are 1 and 2.


Implementation
    public function get numBuffers():int
    public function set numBuffers(value:int):void
ownWindowproperty 
ownWindow:Boolean  [read-only]

Gets a Boolean that determines if this window belongs to this process.


Implementation
    public function get ownWindow():Boolean
pidproperty 
pid:int  [read-only]

Gets the process ID that is associated with the window.


Implementation
    public function get pid():int
rotationproperty 
rotation:int

Gets or sets the orientation of the window with respect to the device. The allowed values are 0, 90, 180 and 270.


Implementation
    public function get rotation():int
    public function set rotation(value:int):void
scaleQualityproperty 
scaleQuality:int  [write-only]

Sets the scale quality level.


Implementation
    public function set scaleQuality(value:int):void
sensitivityproperty 
sensitivity:String

Gets or sets the sensitivity of the window to pointer events. Constants for the valid values of this property are given by the IowWindowSensitivity class.


Implementation
    public function get sensitivity():String
    public function set sensitivity(value:String):void

See also

srcHeightproperty 
srcHeight:int

Gets or sets the height of the sub-area of the window that is to be displayed.


Implementation
    public function get srcHeight():int
    public function set srcHeight(value:int):void
srcWidthproperty 
srcWidth:int

Gets or sets the width of the sub-area of the window that is to be displayed.


Implementation
    public function get srcWidth():int
    public function set srcWidth(value:int):void
srcXproperty 
srcX:int

Gets or sets the x coordinate of the upper left hand corner of the sub-area of the window to be displayed.


Implementation
    public function get srcX():int
    public function set srcX(value:int):void
srcYproperty 
srcY:int

Gets or sets the y coordinate of the upper left hand corner of the sub-area of the window to be displayed.


Implementation
    public function get srcY():int
    public function set srcY(value:int):void
stateproperty 
state:String  [read-only]

Gets the state of the window. The possible states are defined by the IowWindowState class. The state property applies only to top level application windows owned by the application.


Implementation
    public function get state():String
surfaceHeightproperty 
surfaceHeight:int  [read-only]

Gets or sets the height of the surface that is associated with the window.


Implementation
    public function get surfaceHeight():int
surfaceWidthproperty 
surfaceWidth:int  [read-only]

Gets or sets the width of the surface that is associated with the window.


Implementation
    public function get surfaceWidth():int
swapIntervalproperty 
swapInterval:int

Gets or sets the swap interval of the window.

The swap interval determines the maximum update rate of the window. A value of 1 allows an update on every frame (say 60fps), a value of 2 means every second frame (30fps).


Implementation
    public function get swapInterval():int
    public function set swapInterval(value:int):void
transparencyproperty 
transparency:String

Determines how the window is blended with underlying windows.

Constants for the valid values of this property are given by the IowWindowTransparency class.


Implementation
    public function get transparency():String
    public function set transparency(value:String):void

See also

validproperty 
valid:Boolean  [read-only]

Gets a value that indicates whether or not the the window currently exists. true if the window exists, otherwise false.


Implementation
    public function get valid():Boolean
visibleproperty 
visible:Boolean

Gets or sets the visibility of the window.


Implementation
    public function get visible():Boolean
    public function set visible(value:Boolean):void
widthproperty 
width:int

Gets or sets the width of the window. If this is different than srcWidth, then the window is stretched or shrunk.


Implementation
    public function get width():int
    public function set width(value:int):void
windowClassproperty 
windowClass:String  [read-only]

Gets the window class that is associated with the window.


Implementation
    public function get windowClass():String
xproperty 
x:int

Gets or sets the x coordinate of the upper left corner of the window.


Implementation
    public function get x():int
    public function set x(value:int):void
yproperty 
y:int

Gets or sets the y coordinate of the upper left corner of the window.


Implementation
    public function get y():int
    public function set y(value:int):void
zOrderproperty 
zOrder:int

Gets or sets the z-Order property of the window.


Implementation
    public function get zOrder():int
    public function set zOrder(value:int):void
Constructor Detail
IowWindow()Constructor
public function IowWindow()

Creates an IowWindow instance.

Method Detail
close()method
public function close():void

Closes the window.

This function can only close snapshot windows. Non-snapshot windows that belong to the current process must be closed using the NativeWindow that is associated with them. Windows that belong to external processes cannot be closed.

createSnapshot()method 
public function createSnapshot(width:int, height:int, id:String = null, asWindow:Boolean = false):Boolean

Creates a snapshot of the window given a width and height.

When complete, a SNAPSHOT_CREATED event is fired that contains a bitmap or window with the snapshot. Only a single snapshot can be created at a time.

Parameters

width:int — The width of snapshot image.
 
height:int — The height of snapshot image.
 
id:String (default = null) — A string ID to be associated with the snapshot
 
asWindow:Boolean (default = false) — If true the snapshot is created as a new window, otherwise it is created as a bitmap.

Returns
Boolean — Returns true if snapshot request is queued, or false if the window does not exist, or is busy taking another snapshot.
duplicateWindow()method 
public function duplicateWindow():IowWindow

Creates a second IowWindow instance that shares the buffers of the original window.

Returns
IowWindow
getAirWindow()method 
public static function getAirWindow(nativeWin:NativeWindow = null):IowWindow

Returns an IowWindow object for one of the AIR player's windows.

By default, this function returns the application's main window.

Parameters

nativeWin:NativeWindow (default = null)

Returns
IowWindow — An IowWindow instance.
getExternalWindow()method 
public static function getExternalWindow(pid:int, id:String):IowWindow

Returns an IowWindow object associated with the window of an external application.

The window does not have to exist at the time the method is called. You can attach an event listener to listen for composition manager window creation and destruction events.

Parameters

pid:int — The process ID to match, or -1 to match any process ID.
 
id:String — The string ID of the window to match or null to match any ID.

Returns
IowWindow — The window.
keepWindow()method 
public function keepWindow(keep:Boolean):void

Determines whether or not the window will be destroyed when the owning process dies. This is only useful for a window manager.

Parameters

keep:Boolean — If true, the window will be kept if the owner dies. If false the window will not be kept.

sendMouseEvent()method 
public function sendMouseEvent(pressed:Boolean, x:int, y:int):void

Sends a mouse event to the window.

Parameters

pressed:Booleantrue if the event should indicate that the button is pressed.
 
x:int — The x coordinate of event relative to upper left corner of window.
 
y:int — The y coordinate of event relative to upper left corner of window.

setWindowProperty()method 
public function setWindowProperty(propertyId:int, value:int):void

Sets the general window properties, given a property ID and an integer value.

Parameters

propertyId:int — The window property to set.
 
value:int — The value of the property.

Event Detail
snapshotCreated Event
Event Object Type: qnx.events.IowWindowSnapshotEvent
IowWindowSnapshotEvent.type property = qnx.events.IowWindowSnapshotEvent.SNAPSHOT_CREATED

Dispatched when the snapshot operation completes successfully.
snapshotFailed Event  
Event Object Type: qnx.events.IowWindowSnapshotEvent
IowWindowSnapshotEvent.type property = qnx.events.IowWindowSnapshotEvent.SNAPSHOT_FAILED

Dispatched when the snapshot operation fails.
windowCreated Event  
Event Object Type: qnx.events.IowWindowEvent
IowWindowEvent.type property = qnx.events.IowWindowEvent.WINDOW_CREATED

Dispatched when a window is created.

The event is dispatched to both the IowWindow object that is associated with the window (based on pid and id properties) as well as to the main AIR window.

windowDestroyed Event  
Event Object Type: qnx.events.IowWindowEvent
IowWindowEvent.type property = qnx.events.IowWindowEvent.WINDOW_DESTROYED

Dispatched when a window is destroyed.

The event is dispatched by both the IowWindow object that is associated with the window (based on pid and id properties) as well as to the main AIR window.

windowStateChanged Event  
Event Object Type: qnx.events.IowWindowEvent
IowWindowEvent.type property = qnx.events.IowWindowEvent.WINDOW_STATE_CHANGED

Dispatched when the state of the window changes.
windowVisibilityChanged Event  
Event Object Type: qnx.events.IowWindowEvent
IowWindowEvent.type property = qnx.events.IowWindowEvent.WINDOW_VISIBILITY_CHANGED

Dispatched when the visibility of the window changes.

This applies to the AIR window only.