qnx.events.QNXApplicationEvent

QNXApplicationEvent

Methods | Constants


Packageqnx.events
Classpublic class QNXApplicationEvent
InheritanceQNXApplicationEvent Inheritance flash.events.Event

The QNXApplicationEvent class contains application-specific event functionality including the low-memory event and the top swipe event.

Class information:
BlackBerry 10 Version:   10.0.0
Found in:  QNXDevice.ane

See also

QNXApplication



Public Methods

 MethodDefined By
  
QNXApplicationEvent(type:String)
Constructor for a QNXApplicationEvent instance.
QNXApplicationEvent

Public Constants

 ConstantDefined By
  LOW_MEMORY : String = lowMemory
[static] Dispatched when the device is running low on memory.
QNXApplicationEvent
  OPEN_FILE_FAILURE : String = openFileFailure
[static] Dispatched when a file has failed to opened by calling the QNXApplication.openFile() method.
QNXApplicationEvent
  OPEN_FILE_SUCCESS : String = openFileSuccess
[static] Dispatched when a file has successfully opened by calling the QNXApplication.openFile() method.
QNXApplicationEvent
  SWIPE_DOWN : String = swipeDown
[static] Dispatched when a user swipes down from the top bezel of the device onto the screen.
QNXApplicationEvent
  SWIPE_START : String = swipeStart
[static] Dispatched when a user starts a swipes down from the top bezel of the device onto the screen.
QNXApplicationEvent

Constructor Detail

QNXApplicationEvent()


public function QNXApplicationEvent(type:String)

Constructor for a QNXApplicationEvent instance.

Parameters

type:String — The type of event.

Constant Detail

LOW_MEMORY


public static const LOW_MEMORY:String = lowMemory

Dispatched when the device is running low on memory.

When this event is received you should save the state and free as many resources as possible. When the device is running low on memory, it will begin terminating applications in order to free up more memory.

The QNXApplicationEvent.LOW_MEMORY constant defines the value of the type property of the event object for an lowMemory event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
typeQNXApplicationEvent.LOW_MEMORY

OPEN_FILE_FAILURE


public static const OPEN_FILE_FAILURE:String = openFileFailure

Dispatched when a file has failed to opened by calling the QNXApplication.openFile() method.

The QNXApplicationEvent.OPEN_FILE_FAILURE constant defines the value of the type property of the event object for an openFileFailure event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
typeQNXApplicationEvent.OPEN_FILE_FAILURE

See also

qnx.system.QNXApplication.openFile()

OPEN_FILE_SUCCESS


public static const OPEN_FILE_SUCCESS:String = openFileSuccess

Dispatched when a file has successfully opened by calling the QNXApplication.openFile() method.

The QNXApplicationEvent.OPEN_FILE_SUCCESS constant defines the value of the type property of the event object for an openFileSuccess event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
typeQNXApplicationEvent.OPEN_FILE_SUCCESS

See also

qnx.system.QNXApplication.openFile()

SWIPE_DOWN


public static const SWIPE_DOWN:String = swipeDown

Dispatched when a user swipes down from the top bezel of the device onto the screen.

NOTE: You cannot listen for this event and the QNXApplicationEvent.SWIPE_START event at the same time. You must choose one method or the other.

This event can be used to provide an application menu for your application. The following listing shows a simple drop-down menu that renders when the user swipes down from the top bezel of the device:

QNXApplication.qnxApplication.addEventListener(QNXApplicationEvent.SWIPE_DOWN, showAppMenu);
private function showAppMenu(event:QNXApplicationEvent):void
{
    if(! _menu.isVisible())
    {
        _menu.show();
    }
}
public function show():void
{
    _active = true;
    Tweener.addTween(this, {y:VISIBLE_Y, time:SLIDE_TIME, transition:"linear"});
}
         

The QNXApplicationEvent.SWIPE_DOWN constant defines the value of the type property of the event object for an swipeDown event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
typeQNXApplicationEvent.SWIPE_DOWN

SWIPE_START


public static const SWIPE_START:String = swipeStart

Dispatched when a user starts a swipes down from the top bezel of the device onto the screen.

NOTE: You cannot listen for this event and the QNXApplicationEvent.SWIPE_DOWN event at the same time. You must choose one method or the other.

This event can be used to provide an application menu for your application. When the event is received applications can detect the mouse position allowing the menu to follow the users finger.

The QNXApplicationEvent.SWIPE_START constant defines the value of the type property of the event object for an swipeStart event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
typeQNXApplicationEvent.SWIPE_START





comments powered by Disqus