Struct xpcom::interfaces::nsIDOMSimpleGestureEvent
[−]
[src]
#[repr(C)]pub struct nsIDOMSimpleGestureEvent { /* fields omitted */ }
interface nsIDOMSimpleGestureEvent : nsIDOMMouseEvent
/**
* The nsIDOMSimpleGestureEvent interface is the datatype for all
* Mozilla-specific simple gesture events in the Document Object Model.
*
* The following events are generated:
*
* MozSwipeGestureMayStart - Generated when the user starts a horizontal
* swipe across the input device, but before we know whether the user
* is actually scrolling past a scroll edge.
* This event asks two questions: Should a swipe really be started, and
* in which directions should the user be able to swipe? The first
* question is answered by event listeners by calling or not calling
* preventDefault() on the event. Since a swipe swallows all scroll
* events, the default action of the swipe start event is *not* to
* start a swipe. Call preventDefault() if you want a swipe to be
* started. Doing so won't necessarily result in a swipe being started,
* it only communicates an intention. Once Gecko determines whether a
* swipe should actually be started, it will send a MozSwipeGestureStart
* event.
* The second question (swipe-able directions) is answered in the
* allowedDirections field.
*
* MozSwipeGestureStart - This event signals the start of a swipe.
* It guarantees a future MozSwipeGestureEnd event that will signal
* the end of a swipe animation.
*
* MozSwipeGestureUpdate - Generated periodically while the user is
* continuing a horizontal swipe gesture. The "delta" value represents
* the current absolute gesture amount. This event may even be sent
* after a MozSwipeGesture event fired in order to allow for fluid
* completion of a swipe animation. The direction value is meaningless
* on swipe update events.
*
* MozSwipeGestureEnd - Generated when the swipe animation is completed.
*
* MozSwipeGesture - Generated when the user releases a swipe across
* across the input device. This event signals that the actual swipe
* operation is complete, even though the animation might not be finished
* yet. This event can be sent without accompanying start / update / end
* events, and it can also be handled on its own if the consumer doesn't
* want to handle swipe animation events.
* Only the direction value has any significance, the delta value is
* meaningless.
*
* MozMagnifyGestureStart - Generated when the user begins the magnify
* ("pinch") gesture. The "delta" value represents the initial
* movement.
*
* MozMagnifyGestureUpdate - Generated periodically while the user is
* continuing the magnify ("pinch") gesture. The "delta" value
* represents the movement since the last MozMagnifyGestureStart or
* MozMagnifyGestureUpdate event.
*
* MozMagnifyGesture - Generated when the user has completed the
* magnify ("pinch") gesture. If you only want to receive a single
* event when the magnify gesture is complete, you only need to hook
* this event and can safely ignore the MozMagnifyGestureStart and the
* MozMagnifyGestureUpdate events. The "delta" value is the cumulative
* amount represented by the user's gesture.
*
* MozRotateGestureStart - Generated when the user begins the rotation
* gesture. The "delta" value represents the initial rotation.
*
* MozRotateGestureUpdate - Generated periodically while the user is
* continuing the rotation gesture. The "delta" value represents the
* rotation since the last MozRotateGestureStart or
* MozRotateGestureUpdate event.
*
* MozRotateGesture - Generated when the user has completed the
* rotation gesture. If you only want to receive a single event when
* the rotation gesture is complete, you only need to hook this event
* and can safely ignore the MozRotateGestureStart and the
* MozRotateGestureUpdate events. The "delta" value is the cumulative
* amount of rotation represented by the user's gesture.
*
* MozTapGesture - Generated when the user executes a two finger
* tap gesture on the input device. Client coordinates contain the
* center point of the tap.
* (XXX On OS X, only Lion (10.7) and up)
*
* MozPressTapGesture - Generated when the user executes a press
* and tap two finger gesture (first finger down, second finger down,
* second finger up, first finger up) on the input device.
* Client coordinates contain the center pivot point of the action.
* (XXX Not implemented on Mac)
*
* MozEdgeUIGesture - Generated when the user swipes the display to
* invoke edge ui.
* (XXX Win8 only)
*
* Default behavior:
*
* Some operating systems support default behaviors for gesture events
* when they are not handled by the application. Consumers should
* use event.preventDefault() to prevent default behavior when
* consuming events.
*/
Methods
impl nsIDOMSimpleGestureEvent
[src]
pub fn coerce<T: nsIDOMSimpleGestureEventCoerce>(&self) -> &T
[src]
Cast this nsIDOMSimpleGestureEvent
to one of its base interfaces.
impl nsIDOMSimpleGestureEvent
[src]
pub const DIRECTION_UP: i64
DIRECTION_UP: i64 = 1
pub const DIRECTION_DOWN: i64
DIRECTION_DOWN: i64 = 2
pub const DIRECTION_LEFT: i64
DIRECTION_LEFT: i64 = 4
pub const DIRECTION_RIGHT: i64
DIRECTION_RIGHT: i64 = 8
pub const ROTATION_COUNTERCLOCKWISE: i64
ROTATION_COUNTERCLOCKWISE: i64 = 1
pub const ROTATION_CLOCKWISE: i64
ROTATION_CLOCKWISE: i64 = 2
pub unsafe fn GetAllowedDirections(
&self,
aAllowedDirections: *mut uint32_t
) -> nsresult
[src]
&self,
aAllowedDirections: *mut uint32_t
) -> nsresult
attribute unsigned long allowedDirections;
pub unsafe fn SetAllowedDirections(
&self,
aAllowedDirections: uint32_t
) -> nsresult
[src]
&self,
aAllowedDirections: uint32_t
) -> nsresult
attribute unsigned long allowedDirections;
pub unsafe fn GetDirection(&self, aDirection: *mut uint32_t) -> nsresult
[src]
readonly attribute unsigned long direction;
pub unsafe fn GetDelta(&self, aDelta: *mut c_double) -> nsresult
[src]
readonly attribute double delta;
pub unsafe fn GetClickCount(&self, aClickCount: *mut uint32_t) -> nsresult
[src]
readonly attribute unsigned long clickCount;
Methods from Deref<Target = nsIDOMMouseEvent>
pub fn coerce<T: nsIDOMMouseEventCoerce>(&self) -> &T
[src]
Cast this nsIDOMMouseEvent
to one of its base interfaces.
pub const MOZ_SOURCE_UNKNOWN: i64
pub const MOZ_SOURCE_MOUSE: i64
pub const MOZ_SOURCE_PEN: i64
pub const MOZ_SOURCE_ERASER: i64
pub const MOZ_SOURCE_CURSOR: i64
pub const MOZ_SOURCE_TOUCH: i64
pub const MOZ_SOURCE_KEYBOARD: i64
pub unsafe fn GetScreenX(&self, aScreenX: *mut int32_t) -> nsresult
[src]
readonly attribute long screenX;
pub unsafe fn GetScreenY(&self, aScreenY: *mut int32_t) -> nsresult
[src]
readonly attribute long screenY;
pub unsafe fn GetMozMovementX(&self, aMozMovementX: *mut int32_t) -> nsresult
[src]
readonly attribute long mozMovementX;
pub unsafe fn GetMozMovementY(&self, aMozMovementY: *mut int32_t) -> nsresult
[src]
readonly attribute long mozMovementY;
pub unsafe fn GetClientX(&self, aClientX: *mut int32_t) -> nsresult
[src]
readonly attribute long clientX;
pub unsafe fn GetClientY(&self, aClientY: *mut int32_t) -> nsresult
[src]
readonly attribute long clientY;
pub unsafe fn GetCtrlKey(&self, aCtrlKey: *mut bool) -> nsresult
[src]
readonly attribute boolean ctrlKey;
pub unsafe fn GetShiftKey(&self, aShiftKey: *mut bool) -> nsresult
[src]
readonly attribute boolean shiftKey;
pub unsafe fn GetAltKey(&self, aAltKey: *mut bool) -> nsresult
[src]
readonly attribute boolean altKey;
pub unsafe fn GetMetaKey(&self, aMetaKey: *mut bool) -> nsresult
[src]
readonly attribute boolean metaKey;
pub unsafe fn GetButton(&self, aButton: *mut int16_t) -> nsresult
[src]
readonly attribute short button;
pub unsafe fn GetButtons(&self, aButtons: *mut uint16_t) -> nsresult
[src]
readonly attribute unsigned short buttons;
pub unsafe fn GetRelatedTarget(
&self,
aRelatedTarget: *mut *const nsIDOMEventTarget
) -> nsresult
[src]
&self,
aRelatedTarget: *mut *const nsIDOMEventTarget
) -> nsresult
readonly attribute nsIDOMEventTarget relatedTarget;
pub unsafe fn InitMouseEvent(
&self,
typeArg: &nsAString,
canBubbleArg: bool,
cancelableArg: bool,
viewArg: *const mozIDOMWindow,
detailArg: int32_t,
screenXArg: int32_t,
screenYArg: int32_t,
clientXArg: int32_t,
clientYArg: int32_t,
ctrlKeyArg: bool,
altKeyArg: bool,
shiftKeyArg: bool,
metaKeyArg: bool,
buttonArg: uint16_t,
relatedTargetArg: *const nsIDOMEventTarget
) -> nsresult
[src]
&self,
typeArg: &nsAString,
canBubbleArg: bool,
cancelableArg: bool,
viewArg: *const mozIDOMWindow,
detailArg: int32_t,
screenXArg: int32_t,
screenYArg: int32_t,
clientXArg: int32_t,
clientYArg: int32_t,
ctrlKeyArg: bool,
altKeyArg: bool,
shiftKeyArg: bool,
metaKeyArg: bool,
buttonArg: uint16_t,
relatedTargetArg: *const nsIDOMEventTarget
) -> nsresult
void initMouseEvent (in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in mozIDOMWindow viewArg, in long detailArg, in long screenXArg, in long screenYArg, in long clientXArg, in long clientYArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned short buttonArg, in nsIDOMEventTarget relatedTargetArg);
pub unsafe fn GetMozPressure(&self, aMozPressure: *mut c_float) -> nsresult
[src]
readonly attribute float mozPressure;
pub unsafe fn GetMozInputSource(
&self,
aMozInputSource: *mut uint16_t
) -> nsresult
[src]
&self,
aMozInputSource: *mut uint16_t
) -> nsresult
readonly attribute unsigned short mozInputSource;
pub unsafe fn GetModifierState(
&self,
keyArg: &nsAString,
_retval: *mut bool
) -> nsresult
[src]
&self,
keyArg: &nsAString,
_retval: *mut bool
) -> nsresult
bool getModifierState (in DOMString keyArg);
Trait Implementations
impl XpCom for nsIDOMSimpleGestureEvent
[src]
const IID: nsIID
IID: nsIID = nsID(3281516962, 16998, 17041, [178, 130, 62, 253, 109, 122, 252, 87])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsIDOMSimpleGestureEvent
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIDOMSimpleGestureEvent
[src]
type Target = nsIDOMMouseEvent
The resulting type after dereferencing.
fn deref(&self) -> &nsIDOMMouseEvent
[src]
Dereferences the value.