W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2012

Overhauling Pointer Lock (was Mouse Lock) to FullScreen API pattern

From: Vincent Scheib <scheib@google.com>
Date: Fri, 27 Jan 2012 21:06:08 -0800
Message-ID: <CAK-EfXkGovWEm_Y0=shkamBZzMh8RLoTV-YQzDeLobi6r=v3Tg@mail.gmail.com>
To: Webapps WG <public-webapps@w3.org>
Cc: Jonas Sicking <jonas@sicking.cc>, Chris Pearce <cpearce@mozilla.com>, David Humphrey <David.Humphrey@senecac.on.ca>, Olli@pettay.fi, "Robert O'Callahan" <rocallahan@mozilla.com>
The spec for Pointer Lock has been moved[1]. It was also renamed from the
previous "Mouse Lock".

While landing the initial implementation in WebKit Darin Fisher pointed out
that the Fullscreen API[2] had strong overlap with the pointer lock spec in
dealing with entering and exiting a state targeting a particular element.
To simplify the web platform, and because these features will often be used
together, I'm planning on revamping the pointer lock specification to match
the Fullscreen spec as closely as possible.

Specifically, using:

partial interface Element {
  void requestPointerLock();
};

partial interface Document {
  readonly attribute boolean pointerLockEnabled;
  readonly attribute Element pointerLockElement;

  void exitPointerLock();
};

Events: pointerlockerror, pointerlockchange

iframe attribute: allowpointerlock

The previous MouseEvent addition of movement is unchanged:

partial interface MouseEvent {
    readonly attribute long movementX;
    readonly attribute long movementY;
};

Stakeholders of the Mozilla/Firefox implementation have indicated support
for this transition.

Comments / Feedback welcome!

[1] http://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html
[2] http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html
Received on Saturday, 28 January 2012 05:07:00 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:50 GMT