qnx.display.IowWindow

IowWindow

Properties | Methods | Events


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.

Class information:
BlackBerry 10 Version:   10.0.0

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
  autoResize : Boolean
Indicates if the window should be re-sized to match the window buffer size.
IowWindow
  backgroundColor : uint
The background color 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
  deviceOrientation : int
Orientation of the device when this window has focus.
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
  groupFocus : Boolean
Indicates if the window has group focus.
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
  passInputEvents : Boolean
Indicates if pointer and touch events captured by the window are also passed to windows below it.
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
  
localToGlobal(point:Point):Point
Convert a window relative point to one that is display relative.
IowWindow
  
lockScroll():Boolean
Prevent scrolling of window based on the softKeyboardInputAreaOfInterest.
IowWindow
  
moveWindow(distance:int):int
Move the window with keyboard focus vertically by the indicated number of pixels.
IowWindow
  
Restores the ability of the window to be scrolled.
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 window gains keyboard focus for a window group.IowWindow
   Dispatched when the window loses keyboard focus for a window group.IowWindow
   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

acceptsFocus


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

alpha


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

autoResize


autoResize:Boolean

Indicates if the window should be re-sized to match the window buffer size. Normally if the window is re-sized by setting NativeWindow.bounds, the size of the window on the screen is re-sized to match, if the two sizes were originally the same. If autoResize is false, AIR will never automatically update the window size.


Implementation

public function get autoResize():Boolean
public function set autoResize(value:Boolean):void

backgroundColor


backgroundColor:uint

The background color of the window. This is the color that is drawn in any parts of the window that do not correspond to any part of the window buffer.


Implementation

public function get backgroundColor():uint
public function set backgroundColor(value:uint):void

bufferProtection


bufferProtection:int

Gets or sets the DRM buffer locking value.


Implementation

public function get bufferProtection():int
public function set bufferProtection(value:int):void

clipHeight


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

clipWidth


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

clipX


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

clipY


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

deviceOrientation


deviceOrientation:int

Orientation of the device when this window has focus. This is set automatically for normal applications as a result of orientation change requests from the system. The device orientation is used to determine when and by how much the window must be moved to avoid being covered by the virtual keyboard. The allowed values are 0, 90, 180 and 270.


Implementation

public function get deviceOrientation():int
public function set deviceOrientation(value:int):void

dialogGroup


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

displayIndex


displayIndex:int  [read-only]

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


Implementation

public function get displayIndex():int

effect


effect:IowWindowEffect


Implementation

public function get effect():IowWindowEffect
public function set effect(value:IowWindowEffect):void

group


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

groupFocus


groupFocus:Boolean

Indicates if the window has group focus. If a window has group focus and the group itself has keyboard focus, keyboard input will be sent to this window or a child of the window.


Implementation

public function get groupFocus():Boolean
public function set groupFocus(value:Boolean):void

height


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

id


id:String

Gets or sets the ID of the window.


Implementation

public function get id():String
public function set id(value:String):void

idleMode


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

numBuffers


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

ownWindow


ownWindow:Boolean  [read-only]

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


Implementation

public function get ownWindow():Boolean

passInputEvents


passInputEvents:Boolean

Indicates if pointer and touch events captured by the window are also passed to windows below it. The default is false meaning that events delivered to this window are not passed to others.


Implementation

public function get passInputEvents():Boolean
public function set passInputEvents(value:Boolean):void

pid


pid:int  [read-only]

Gets the process ID that is associated with the window.


Implementation

public function get pid():int

rotation


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

scaleQuality


scaleQuality:int  [write-only]

Sets the scale quality level.


Implementation

public function set scaleQuality(value:int):void

sensitivity


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

IowWindowSensitivity

srcHeight


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

srcWidth


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

srcX


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

srcY


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

state


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

surfaceHeight


surfaceHeight:int  [read-only]

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


Implementation

public function get surfaceHeight():int

surfaceWidth


surfaceWidth:int  [read-only]

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


Implementation

public function get surfaceWidth():int

swapInterval


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

transparency


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

IowWindowTransparency

valid


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

visible


visible:Boolean

Gets or sets the visibility of the window.


Implementation

public function get visible():Boolean
public function set visible(value:Boolean):void

width


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

windowClass


windowClass:String  [read-only]

Gets the window class that is associated with the window.


Implementation

public function get windowClass():String

x


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

y


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

zOrder


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()


public function IowWindow()

Creates an IowWindow instance.

Method Detail

close()


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()


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()


public function duplicateWindow():IowWindow

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

Returns

IowWindow

getAirWindow()


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()


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()


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.

localToGlobal()


public function localToGlobal(point:Point):Point

Convert a window relative point to one that is display relative.

Parameters

point:Point — Point to convert

Returns

Point — The converted point

lockScroll()


public function lockScroll():Boolean

Prevent scrolling of window based on the softKeyboardInputAreaOfInterest. scrolling will still occur if the area would be hidden by the virtual keyboard or the top of the screen but otherwise will remain fixed.

Returns

Boolean — true if successful, false if the window does not have focus.

moveWindow()


public function moveWindow(distance:int):int

Move the window with keyboard focus vertically by the indicated number of pixels.

Parameters

distance:int — Number of pixels to move window by.

Returns

int — Returns the cumulative number of pixels moved.

releaseScroll()


public function releaseScroll():void

Restores the ability of the window to be scrolled.

sendMouseEvent()


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()


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

groupFocusGained


Event Object Type: qnx.events.IowWindowEvent
IowWindowEvent.type property = qnx.events.IowWindowEvent.GROUP_FOCUS_GAINED

Dispatched when the window gains keyboard focus for a window group.

groupFocusLost


Event Object Type: qnx.events.IowWindowEvent
IowWindowEvent.type property = qnx.events.IowWindowEvent.GROUP_FOCUS_LOST

Dispatched when the window loses keyboard focus for a window group.

snapshotCreated


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

Dispatched when the snapshot operation completes successfully.

snapshotFailed


Event Object Type: qnx.events.IowWindowSnapshotEvent
IowWindowSnapshotEvent.type property = qnx.events.IowWindowSnapshotEvent.SNAPSHOT_FAILED

Dispatched when the snapshot operation fails.

windowCreated


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 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 Object Type: qnx.events.IowWindowEvent
IowWindowEvent.type property = qnx.events.IowWindowEvent.WINDOW_STATE_CHANGED

Dispatched when the state of the window changes.

windowVisibilityChanged


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.





comments powered by Disqus