nsIDOMMozTouchEvent 编辑

The nsIDOMMozTouchEvent interface describes a raw touch event. This provides a mechanism for working with events from touch screens. This differs from tracking mouse events in that touch events can be generated independently for each finger touching the screen. This lets you process multi-finger touch gestures and actions.

dom/interfaces/events/nsIDOMMozTouchEvent.idlScriptable Please add a summary to this article.   Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Inherits from: nsIDOMMouseEvent

Method overview

void initMozTouchEvent(in DOMString typeArg,
                       in boolean canBubbleArg,
                       in boolean cancelableArg,
                       in nsIDOMAbstractView 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,
                       in unsigned long streamIdArg);

 Attributes

AttributeTypeDescription
streamIdunsigned long
A unique identifier for each finger, so that each finger's movement can be tracked separately. This is a random number that is guaranteed to remain the same for each finger during all MozTouchMove events between the corresponding MozTouchDown and MozTouchUp events.

Methods

initMozTouchEvent()

Initializes the touch event.

void initSimpleGestureEvent(
  in DOMString typeArg,
  in boolean canBubbleArg,
  in boolean cancelableArg,
  in nsIDOMAbstractView 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,
  in unsigned long streamIdArg
);
Parameters
streamIdArg
The value to assign to the streamId attribute; this uniquely identifies the finger generating the touch events.

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:95 次

字数:4214

最后编辑:6 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文