org.gstreamer.event
Class NavigationEvent

java.lang.Object
  extended by org.gstreamer.lowlevel.NativeValue
      extended by org.gstreamer.lowlevel.Handle
          extended by org.gstreamer.lowlevel.NativeObject
              extended by org.gstreamer.lowlevel.RefCountedObject
                  extended by org.gstreamer.MiniObject
                      extended by org.gstreamer.Event
                          extended by org.gstreamer.event.NavigationEvent

public class NavigationEvent
extends Event

Navigation events are usually used for communicating user requests, such as mouse or keyboard movements, to upstream elements.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.gstreamer.lowlevel.NativeObject
org.gstreamer.lowlevel.NativeObject.Initializer
 
Field Summary
 
Fields inherited from class org.gstreamer.lowlevel.NativeObject
defaultInit, LIFECYCLE, ownsHandle
 
Constructor Summary
NavigationEvent(org.gstreamer.lowlevel.NativeObject.Initializer init)
          This constructor is for internal use only.
NavigationEvent(Structure structure)
          Creates a new navigation event from the given description.
 
Method Summary
static NavigationEvent createKeyEvent(java.lang.String event, java.lang.String key)
          Creates a new key navigation event.
static NavigationEvent createKeyPressEvent(java.lang.String key)
          Creates a new key press navigation event.
static NavigationEvent createKeyReleaseEvent(java.lang.String key)
          Creates a new key release navigation event.
static NavigationEvent createMouseButtonPressEvent(double x, double y, int button)
          Creates a mouse button press navigation event.
static NavigationEvent createMouseButtonReleaseEvent(double x, double y, int button)
          Creates a mouse button release navigation event.
static NavigationEvent createMouseEvent(java.lang.String event, double x, double y, int button)
          Creates a mouse navigation event.
static NavigationEvent createMouseMoveEvent(double x, double y, int button)
          Creates a mouse move navigation event.
 java.lang.String toString()
          Gets a human-readable string representation of this navigation event.
 
Methods inherited from class org.gstreamer.Event
getStructure
 
Methods inherited from class org.gstreamer.MiniObject
disposeNativeHandle, isWritable, makeWritable, objectFor, ref, unref
 
Methods inherited from class org.gstreamer.lowlevel.NativeObject
classFor, disown, dispose, equals, finalize, getNativeAddress, handle, hashCode, initializer, initializer, instanceFor, invalidate, isDisposed, nativeValue, objectFor, objectFor
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NavigationEvent

public NavigationEvent(org.gstreamer.lowlevel.NativeObject.Initializer init)
This constructor is for internal use only.

Parameters:
init - initialization data.

NavigationEvent

public NavigationEvent(Structure structure)
Creates a new navigation event from the given description.

Unless you really need a custom navigation event, use one of the static convenience methods for creating navigation events.

Parameters:
structure - the description of the navigation event.
Method Detail

toString

public java.lang.String toString()
Gets a human-readable string representation of this navigation event.

Overrides:
toString in class org.gstreamer.lowlevel.NativeObject
Returns:
a string

createMouseEvent

public static NavigationEvent createMouseEvent(java.lang.String event,
                                               double x,
                                               double y,
                                               int button)
Creates a mouse navigation event.

Parameters:
event - the type of mouse event.
x - the X location of the mouse cursor
y - the Y location of the mouse cursor
button - the button(s) currently pressed
Returns:
a new navigation event

createMouseMoveEvent

public static NavigationEvent createMouseMoveEvent(double x,
                                                   double y,
                                                   int button)
Creates a mouse move navigation event.

Parameters:
x - the X location of the mouse cursor
y - the Y location of the mouse cursor
button - the button(s) currently pressed
Returns:
a new navigation event

createMouseButtonPressEvent

public static NavigationEvent createMouseButtonPressEvent(double x,
                                                          double y,
                                                          int button)
Creates a mouse button press navigation event.

Parameters:
x - the X location of the mouse cursor
y - the Y location of the mouse cursor
button - the button(s) currently pressed
Returns:
a new navigation event

createMouseButtonReleaseEvent

public static NavigationEvent createMouseButtonReleaseEvent(double x,
                                                            double y,
                                                            int button)
Creates a mouse button release navigation event.

Parameters:
x - the X location of the mouse cursor
y - the Y location of the mouse cursor
button - the button(s) currently pressed
Returns:
a new navigation event

createKeyEvent

public static NavigationEvent createKeyEvent(java.lang.String event,
                                             java.lang.String key)
Creates a new key navigation event.

Parameters:
event - the type of key event.
key - the ascii key code for the key.
Returns:
a new navigation event

createKeyPressEvent

public static NavigationEvent createKeyPressEvent(java.lang.String key)
Creates a new key press navigation event.

Parameters:
key - the ascii key code for the key.
Returns:
a new navigation event

createKeyReleaseEvent

public static NavigationEvent createKeyReleaseEvent(java.lang.String key)
Creates a new key release navigation event.

Parameters:
key - the ascii key code for the key.
Returns:
a new navigation event