Re: Intent to implement: Touchpad event

2014-09-12 Thread Kershaw Chang
Hi Jonas,

That’s a good point.
I agree with you that we should only expose this to certified or
privileged apps.

Thanks and regards,
Kershaw

於 2014/9/12 上午1:22,Jonas Sicking jo...@sicking.cc 寫道:

Hi Kershaw,

Has there been any discussions with other browser vendors about this
API? Or is there an official standard somewhere for them?

If not, I don't think that we'll want to expose this to the web at
large. It would still be fine to expose to certified apps, or even to
expose to privileged apps under a permission.

Does this sound ok?

/ Jonas

On Wed, Sep 10, 2014 at 11:18 PM, Kershaw Chang kech...@mozilla.com
wrote:
 Hi All,

 Summary:
 Touchpad(trackpad) is a common feature on laptop computers. Currently,
the
 finger activities on touchpad are translated to touch event and mouse
event.
 However, the coordinates of touch event and mouse event are actually
 associated to display [1]. For some cases, we need to expose the
absolute
 coordinates that are associated to touchpad itself to the application.
 That's why AOSP also defines another input source type for touchpad
[2]. The
 x and y coordinates of touchpad event are relative to the size of
touchpad.

 Use case:
 Handwriting recognition application will be benefited from this touchpad
 event. Currently, OS X supports handwriting input by touchpad [3].

 Idea of implementation:
 The webidl of touchpad event is like touch event except that x and y
 coordinates are relative to touchpad rather than display.

 --- /dev/null
 +++ b/dom/webidl/Touchpad.webidl
 +
 +[Func=mozilla::dom::Touchpad::PrefEnabled]
 +interface Touchpad {
 +  readonlyattribute long identifier;
 +  readonlyattribute EventTarget? target;
 +  readonlyattribute long touchpadX;
 +  readonlyattribute long touchpadY;
 +  readonlyattribute long radiusX;
 +  readonlyattribute long radiusY;
 +  readonlyattribute floatrotationAngle;
 +  readonlyattribute floatforce;
 +};

 --- /dev/null
 +++ b/dom/webidl/TouchpadEvent.webidl
 +
 +interface WindowProxy;
 +
 +[Func=mozilla::dom::TouchpadEvent::PrefEnabled]
 +interface TouchPadEvent : UIEvent {
 +  readonly attribute TouchpadList touches;
 +  readonly attribute TouchpadList targetTouches;
 +  readonly attribute TouchpadList changedTouches;
 +
 +  readonly attribute short   button;
 +  readonly attribute boolean altKey;
 +  readonly attribute boolean metaKey;
 +  readonly attribute boolean ctrlKey;
 +  readonly attribute boolean shiftKey;
 +
 +  [Throws]
 +  void initTouchpadEvent(DOMString type,
 + boolean canBubble,
 + boolean cancelable,
 + WindowProxy? view,
 + long detail,
 + short button,
 + boolean ctrlKey,
 + boolean altKey,
 + boolean shiftKey,
 + boolean metaKey,
 + TouchPadList? touches,
 + TouchPadList? targetTouches,
 + TouchPadList? changedTouches);
 +};

 --- /dev/null
 +++ b/dom/webidl/TouchpadList.webidl
 +
 +[Func=mozilla::dom::TouchpadList::PrefEnabled]
 +interface TouchpadList {
 +  [Pure]
 +  readonly attribute unsigned long length;
 +  getter Touchpad? item(unsigned long index);
 +};
 +
 +/* Mozilla extension. */
 +partial interface TouchpadList {
 +  Touchpad? identifiedTouch(long identifier);
 +};

 Platform converge: all

 Welcome for any suggestion or feedback.
 Thanks.

 [1]
 
http://developer.android.com/reference/android/view/InputDevice.html#SOUR
CE_
 CLASS_POINTER
 [2]
 
http://developer.android.com/reference/android/view/InputDevice.html#SOUR
CE_
 CLASS_POSITION
 [3] http://support.apple.com/kb/HT4288

 Best regards,
 Kershaw


 ___
 dev-webapi mailing list
 dev-web...@lists.mozilla.org
 https://lists.mozilla.org/listinfo/dev-webapi


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: Touchpad event

2014-09-12 Thread Ehsan Akhgari
On Thu, Sep 11, 2014 at 7:02 PM, Jonas Sicking jo...@sicking.cc wrote:

 On Thu, Sep 11, 2014 at 3:21 PM, Ehsan Akhgari ehsan.akhg...@gmail.com
 wrote:
  On 2014-09-11, 5:54 PM, smaug wrote:
  If we just needs new coordinates, couldn't we extend the existing event
 interfaces with some new properties?
 
  Yeah, this seems like the way to go to me as well.

 Do we currently dispatch pointer events on desktop when the user
 places a finger on a laptop touchpad? Or do we just dispatch events
 when the user then moves the finger and thus move the on-screen
 pointer?


I'm not sure about our implementation, but if I'm reading the spec
correctly, we should be firing an event when you place your first finger on
the touchpad.


 If we only dispatch events to indicate pointer movement, then I don't
 think simply extending existing interfaces will be possible.

 Similarly, what happens if you touch multiple fingers to the touchpad?
 Do we fire events as the second and third finger is placed on the
 touchpad? If not, we similarly need additional events to be fired.


Again, if I'm reading the spec correctly, we should be firing multiple
events in that case.

-- 
Ehsan
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Intent to implement: Touchpad event

2014-09-11 Thread Kershaw Chang
Hi All,

Summary:
Touchpad(trackpad) is a common feature on laptop computers. Currently, the
finger activities on touchpad are translated to touch event and mouse event.
However, the coordinates of touch event and mouse event are actually
associated to display [1]. For some cases, we need to expose the absolute
coordinates that are associated to touchpad itself to the application.
That’s why AOSP also defines another input source type for touchpad [2]. The
x and y coordinates of touchpad event are relative to the size of touchpad.

Use case:
Handwriting recognition application will be benefited from this touchpad
event. Currently, OS X supports handwriting input by touchpad [3].

Idea of implementation:
The webidl of touchpad event is like touch event except that x and y
coordinates are relative to touchpad rather than display.

--- /dev/null
+++ b/dom/webidl/Touchpad.webidl
+
+[Func=mozilla::dom::Touchpad::PrefEnabled]
+interface Touchpad {
+  readonlyattribute long identifier;
+  readonlyattribute EventTarget? target;
+  readonlyattribute long touchpadX;
+  readonlyattribute long touchpadY;
+  readonlyattribute long radiusX;
+  readonlyattribute long radiusY;
+  readonlyattribute floatrotationAngle;
+  readonlyattribute floatforce;
+};

--- /dev/null
+++ b/dom/webidl/TouchpadEvent.webidl
+
+interface WindowProxy;
+
+[Func=mozilla::dom::TouchpadEvent::PrefEnabled]
+interface TouchPadEvent : UIEvent {
+  readonly attribute TouchpadList touches;
+  readonly attribute TouchpadList targetTouches;
+  readonly attribute TouchpadList changedTouches;
+
+  readonly attribute short   button;
+  readonly attribute boolean altKey;
+  readonly attribute boolean metaKey;
+  readonly attribute boolean ctrlKey;
+  readonly attribute boolean shiftKey;
+
+  [Throws]
+  void initTouchpadEvent(DOMString type,
+ boolean canBubble,
+ boolean cancelable,
+ WindowProxy? view,
+ long detail,
+ short button,
+ boolean ctrlKey,
+ boolean altKey,
+ boolean shiftKey,
+ boolean metaKey,
+ TouchPadList? touches,
+ TouchPadList? targetTouches,
+ TouchPadList? changedTouches);
+};

--- /dev/null
+++ b/dom/webidl/TouchpadList.webidl
+
+[Func=mozilla::dom::TouchpadList::PrefEnabled]
+interface TouchpadList {
+  [Pure]
+  readonly attribute unsigned long length;
+  getter Touchpad? item(unsigned long index);
+};
+
+/* Mozilla extension. */
+partial interface TouchpadList {
+  Touchpad? identifiedTouch(long identifier);
+};

Platform converge: all

Welcome for any suggestion or feedback.
Thanks.

[1] 
http://developer.android.com/reference/android/view/InputDevice.html#SOURCE_
CLASS_POINTER
[2] 
http://developer.android.com/reference/android/view/InputDevice.html#SOURCE_
CLASS_POSITION
[3] http://support.apple.com/kb/HT4288

Best regards,
Kershaw


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: Touchpad event

2014-09-11 Thread Ms2ger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/11/2014 08:18 AM, Kershaw Chang wrote:

First of all, you neglected to explain the standardization situation
here. Is this feature being standardized? If not, why not? How do
other browser vendors feel about it?

 +interface TouchPadEvent : UIEvent { +  [Throws] +  void
 initTouchpadEvent(DOMString type, + boolean
 canBubble, + boolean cancelable, +
 WindowProxy? view, + long detail, +
 short button, + boolean ctrlKey, +
 boolean altKey, + boolean shiftKey, +
 boolean metaKey, + TouchPadList? touches, +
 TouchPadList? targetTouches, +
 TouchPadList? changedTouches);

Regardless of whether this feature is something we'd want to
implement, we most definitely shouldn't introduce new init*Event methods.

Ms2ger
-BEGIN PGP SIGNATURE-

iQEcBAEBAgAGBQJUEVzEAAoJEOXgvIL+s8n2YWYH/i9h3e3GvQ9dPrYYg72F/mdD
BXdyHiyKarz4dSI8H0UJHwDhCtBKi92AskHhCeT3l4KX4h7pX87144LYNYiZ9qzv
rMXDFvf5Oo8M4uaEPo82z1M2OW6jADuFCfs4SeK+1aqW5DLRRMlYiGfop4yeGp+g
m81ciytaLr08ro6+K+HgIP/zCo5KLtvp54kGLRg0EMqWnNE4SxG8Nrvm/xe65udz
+3z21DhapAu8jMFhJ2JeAy+0ivu0pnCm0JUXiLmOCmzweSlO1w3Qr5KGwWqS9qjA
6k74T7+Pp95cFgELK03IvhWyQCHNLhPdH/qJex59jF2i7N9SV47FGMOq8wjLFBU=
=UeuN
-END PGP SIGNATURE-
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: Touchpad event

2014-09-11 Thread Mounir Lamouri
On Thu, 11 Sep 2014, at 18:26, Ms2ger wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On 09/11/2014 08:18 AM, Kershaw Chang wrote:
 
 First of all, you neglected to explain the standardization situation
 here. Is this feature being standardized? If not, why not? How do
 other browser vendors feel about it?

Where does this stand in the current Touch Events vs Pointer Events
situation, is the intent to re-use of those or create yet another
standard?

-- Mounir
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: Touchpad event

2014-09-11 Thread Kershaw Chang
Hi Ms2ger,

Please see my response below.

Thanks and regards,
Kershaw

於 2014/9/11 下午4:26,Ms2ger ms2...@gmail.com 寫道:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/11/2014 08:18 AM, Kershaw Chang wrote:

First of all, you neglected to explain the standardization situation
here. Is this feature being standardized? If not, why not? How do
other browser vendors feel about it?
Sorry that I missed the standardization part.
I think this feature is not standardized, since I cannot find any
discussion or draft from w3c or whatwg. The most closed is that Google
defines one input source type for touchpad in AOSP.

In most cases, I think the inputs from touchpad can be translated to touch
event or mouse event. Only few applications need the raw data from
touchpad. That’s why we don’t see others discussing about this.



 +interface TouchPadEvent : UIEvent { +  [Throws] +  void
 initTouchpadEvent(DOMString type, + boolean
 canBubble, + boolean cancelable, +
 WindowProxy? view, + long detail, +
 short button, + boolean ctrlKey, +
 boolean altKey, + boolean shiftKey, +
 boolean metaKey, + TouchPadList? touches, +
 TouchPadList? targetTouches, +
 TouchPadList? changedTouches);

Regardless of whether this feature is something we'd want to
implement, we most definitely shouldn't introduce new init*Event methods.
Thanks for this suggestion. Actually, this webidl is copied from touch
event. I don’t quite understand about this. Could you please explain more?


Ms2ger
-BEGIN PGP SIGNATURE-

iQEcBAEBAgAGBQJUEVzEAAoJEOXgvIL+s8n2YWYH/i9h3e3GvQ9dPrYYg72F/mdD
BXdyHiyKarz4dSI8H0UJHwDhCtBKi92AskHhCeT3l4KX4h7pX87144LYNYiZ9qzv
rMXDFvf5Oo8M4uaEPo82z1M2OW6jADuFCfs4SeK+1aqW5DLRRMlYiGfop4yeGp+g
m81ciytaLr08ro6+K+HgIP/zCo5KLtvp54kGLRg0EMqWnNE4SxG8Nrvm/xe65udz
+3z21DhapAu8jMFhJ2JeAy+0ivu0pnCm0JUXiLmOCmzweSlO1w3Qr5KGwWqS9qjA
6k74T7+Pp95cFgELK03IvhWyQCHNLhPdH/qJex59jF2i7N9SV47FGMOq8wjLFBU=
=UeuN
-END PGP SIGNATURE-
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: Touchpad event

2014-09-11 Thread Kershaw Chang
Hi Mounir,

The finger activity on touchpad can be still translated to touch event and
mouse event as usual. But for the application that wants to know the
absolute finger position on touchpad, we will need this new touchpad event.
So, this proposal is about creating new standard rather than re-using.

Best regards,
Kershaw

於 2014/9/11 下午6:49,Mounir Lamouri mou...@lamouri.fr 寫道:

On Thu, 11 Sep 2014, at 18:26, Ms2ger wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On 09/11/2014 08:18 AM, Kershaw Chang wrote:
 
 First of all, you neglected to explain the standardization situation
 here. Is this feature being standardized? If not, why not? How do
 other browser vendors feel about it?

Where does this stand in the current Touch Events vs Pointer Events
situation, is the intent to re-use of those or create yet another
standard?

-- Mounir
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: Touchpad event

2014-09-11 Thread Jonas Sicking
Hi Kershaw,

Has there been any discussions with other browser vendors about this
API? Or is there an official standard somewhere for them?

If not, I don't think that we'll want to expose this to the web at
large. It would still be fine to expose to certified apps, or even to
expose to privileged apps under a permission.

Does this sound ok?

/ Jonas

On Wed, Sep 10, 2014 at 11:18 PM, Kershaw Chang kech...@mozilla.com wrote:
 Hi All,

 Summary:
 Touchpad(trackpad) is a common feature on laptop computers. Currently, the
 finger activities on touchpad are translated to touch event and mouse event.
 However, the coordinates of touch event and mouse event are actually
 associated to display [1]. For some cases, we need to expose the absolute
 coordinates that are associated to touchpad itself to the application.
 That's why AOSP also defines another input source type for touchpad [2]. The
 x and y coordinates of touchpad event are relative to the size of touchpad.

 Use case:
 Handwriting recognition application will be benefited from this touchpad
 event. Currently, OS X supports handwriting input by touchpad [3].

 Idea of implementation:
 The webidl of touchpad event is like touch event except that x and y
 coordinates are relative to touchpad rather than display.

 --- /dev/null
 +++ b/dom/webidl/Touchpad.webidl
 +
 +[Func=mozilla::dom::Touchpad::PrefEnabled]
 +interface Touchpad {
 +  readonlyattribute long identifier;
 +  readonlyattribute EventTarget? target;
 +  readonlyattribute long touchpadX;
 +  readonlyattribute long touchpadY;
 +  readonlyattribute long radiusX;
 +  readonlyattribute long radiusY;
 +  readonlyattribute floatrotationAngle;
 +  readonlyattribute floatforce;
 +};

 --- /dev/null
 +++ b/dom/webidl/TouchpadEvent.webidl
 +
 +interface WindowProxy;
 +
 +[Func=mozilla::dom::TouchpadEvent::PrefEnabled]
 +interface TouchPadEvent : UIEvent {
 +  readonly attribute TouchpadList touches;
 +  readonly attribute TouchpadList targetTouches;
 +  readonly attribute TouchpadList changedTouches;
 +
 +  readonly attribute short   button;
 +  readonly attribute boolean altKey;
 +  readonly attribute boolean metaKey;
 +  readonly attribute boolean ctrlKey;
 +  readonly attribute boolean shiftKey;
 +
 +  [Throws]
 +  void initTouchpadEvent(DOMString type,
 + boolean canBubble,
 + boolean cancelable,
 + WindowProxy? view,
 + long detail,
 + short button,
 + boolean ctrlKey,
 + boolean altKey,
 + boolean shiftKey,
 + boolean metaKey,
 + TouchPadList? touches,
 + TouchPadList? targetTouches,
 + TouchPadList? changedTouches);
 +};

 --- /dev/null
 +++ b/dom/webidl/TouchpadList.webidl
 +
 +[Func=mozilla::dom::TouchpadList::PrefEnabled]
 +interface TouchpadList {
 +  [Pure]
 +  readonly attribute unsigned long length;
 +  getter Touchpad? item(unsigned long index);
 +};
 +
 +/* Mozilla extension. */
 +partial interface TouchpadList {
 +  Touchpad? identifiedTouch(long identifier);
 +};

 Platform converge: all

 Welcome for any suggestion or feedback.
 Thanks.

 [1]
 http://developer.android.com/reference/android/view/InputDevice.html#SOURCE_
 CLASS_POINTER
 [2]
 http://developer.android.com/reference/android/view/InputDevice.html#SOURCE_
 CLASS_POSITION
 [3] http://support.apple.com/kb/HT4288

 Best regards,
 Kershaw


 ___
 dev-webapi mailing list
 dev-web...@lists.mozilla.org
 https://lists.mozilla.org/listinfo/dev-webapi
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: Touchpad event

2014-09-11 Thread Chris Peterson

On 9/11/14 3:49 AM, Mounir Lamouri wrote:

On Thu, 11 Sep 2014, at 18:26, Ms2ger wrote:

First of all, you neglected to explain the standardization situation
here. Is this feature being standardized? If not, why not? How do
other browser vendors feel about it?


Where does this stand in the current Touch Events vs Pointer Events
situation, is the intent to re-use of those or create yet another
standard?


AFAIK, Blink does not intend [1] to implement Pointer Events. Should new 
web features avoid extending Pointer Events?



chris

[1] https://code.google.com/p/chromium/issues/detail?id=162757#c64
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: Touchpad event

2014-09-11 Thread smaug
What would be the event types for touchpad events?
We must not add yet another types of events to handle pointer type of events.


And besides, touch event model is rather horrible, so if we for some strange 
reason need
totally new events, I'd prefer using something closer to pointer events.


-Olli




On 09/11/2014 09:18 AM, Kershaw Chang wrote:
 Hi All,
 
 Summary:
 Touchpad(trackpad) is a common feature on laptop computers. Currently, the
 finger activities on touchpad are translated to touch event and mouse event.
 However, the coordinates of touch event and mouse event are actually
 associated to display [1]. For some cases, we need to expose the absolute
 coordinates that are associated to touchpad itself to the application.
 That’s why AOSP also defines another input source type for touchpad [2]. The
 x and y coordinates of touchpad event are relative to the size of touchpad.
 
 Use case:
 Handwriting recognition application will be benefited from this touchpad
 event. Currently, OS X supports handwriting input by touchpad [3].
 
 Idea of implementation:
 The webidl of touchpad event is like touch event except that x and y
 coordinates are relative to touchpad rather than display.
 
 --- /dev/null
 +++ b/dom/webidl/Touchpad.webidl
 +
 +[Func=mozilla::dom::Touchpad::PrefEnabled]
 +interface Touchpad {
 +  readonlyattribute long identifier;
 +  readonlyattribute EventTarget? target;
 +  readonlyattribute long touchpadX;
 +  readonlyattribute long touchpadY;
 +  readonlyattribute long radiusX;
 +  readonlyattribute long radiusY;
 +  readonlyattribute floatrotationAngle;
 +  readonlyattribute floatforce;
 +};
 
 --- /dev/null
 +++ b/dom/webidl/TouchpadEvent.webidl
 +
 +interface WindowProxy;
 +
 +[Func=mozilla::dom::TouchpadEvent::PrefEnabled]
 +interface TouchPadEvent : UIEvent {
 +  readonly attribute TouchpadList touches;
 +  readonly attribute TouchpadList targetTouches;
 +  readonly attribute TouchpadList changedTouches;
 +
 +  readonly attribute short   button;
 +  readonly attribute boolean altKey;
 +  readonly attribute boolean metaKey;
 +  readonly attribute boolean ctrlKey;
 +  readonly attribute boolean shiftKey;
 +
 +  [Throws]
 +  void initTouchpadEvent(DOMString type,
 + boolean canBubble,
 + boolean cancelable,
 + WindowProxy? view,
 + long detail,
 + short button,
 + boolean ctrlKey,
 + boolean altKey,
 + boolean shiftKey,
 + boolean metaKey,
 + TouchPadList? touches,
 + TouchPadList? targetTouches,
 + TouchPadList? changedTouches);
 +};
 
 --- /dev/null
 +++ b/dom/webidl/TouchpadList.webidl
 +
 +[Func=mozilla::dom::TouchpadList::PrefEnabled]
 +interface TouchpadList {
 +  [Pure]
 +  readonly attribute unsigned long length;
 +  getter Touchpad? item(unsigned long index);
 +};
 +
 +/* Mozilla extension. */
 +partial interface TouchpadList {
 +  Touchpad? identifiedTouch(long identifier);
 +};
 
 Platform converge: all
 
 Welcome for any suggestion or feedback.
 Thanks.
 
 [1]
 http://developer.android.com/reference/android/view/InputDevice.html#SOURCE_
 CLASS_POINTER
 [2]
 http://developer.android.com/reference/android/view/InputDevice.html#SOURCE_
 CLASS_POSITION
 [3] http://support.apple.com/kb/HT4288
 
 Best regards,
 Kershaw
 
 

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: Touchpad event

2014-09-11 Thread smaug
If we just needs new coordinates, couldn't we extend the existing event 
interfaces with some new properties?


-Olli


On 09/12/2014 12:52 AM, smaug wrote:
 What would be the event types for touchpad events?
 We must not add yet another types of events to handle pointer type of events.
 
 
 And besides, touch event model is rather horrible, so if we for some strange 
 reason need
 totally new events, I'd prefer using something closer to pointer events.
 
 
 -Olli
 
 
 
 
 On 09/11/2014 09:18 AM, Kershaw Chang wrote:
 Hi All,

 Summary:
 Touchpad(trackpad) is a common feature on laptop computers. Currently, the
 finger activities on touchpad are translated to touch event and mouse event.
 However, the coordinates of touch event and mouse event are actually
 associated to display [1]. For some cases, we need to expose the absolute
 coordinates that are associated to touchpad itself to the application.
 That’s why AOSP also defines another input source type for touchpad [2]. The
 x and y coordinates of touchpad event are relative to the size of touchpad.

 Use case:
 Handwriting recognition application will be benefited from this touchpad
 event. Currently, OS X supports handwriting input by touchpad [3].

 Idea of implementation:
 The webidl of touchpad event is like touch event except that x and y
 coordinates are relative to touchpad rather than display.

 --- /dev/null
 +++ b/dom/webidl/Touchpad.webidl
 +
 +[Func=mozilla::dom::Touchpad::PrefEnabled]
 +interface Touchpad {
 +  readonlyattribute long identifier;
 +  readonlyattribute EventTarget? target;
 +  readonlyattribute long touchpadX;
 +  readonlyattribute long touchpadY;
 +  readonlyattribute long radiusX;
 +  readonlyattribute long radiusY;
 +  readonlyattribute floatrotationAngle;
 +  readonlyattribute floatforce;
 +};

 --- /dev/null
 +++ b/dom/webidl/TouchpadEvent.webidl
 +
 +interface WindowProxy;
 +
 +[Func=mozilla::dom::TouchpadEvent::PrefEnabled]
 +interface TouchPadEvent : UIEvent {
 +  readonly attribute TouchpadList touches;
 +  readonly attribute TouchpadList targetTouches;
 +  readonly attribute TouchpadList changedTouches;
 +
 +  readonly attribute short   button;
 +  readonly attribute boolean altKey;
 +  readonly attribute boolean metaKey;
 +  readonly attribute boolean ctrlKey;
 +  readonly attribute boolean shiftKey;
 +
 +  [Throws]
 +  void initTouchpadEvent(DOMString type,
 + boolean canBubble,
 + boolean cancelable,
 + WindowProxy? view,
 + long detail,
 + short button,
 + boolean ctrlKey,
 + boolean altKey,
 + boolean shiftKey,
 + boolean metaKey,
 + TouchPadList? touches,
 + TouchPadList? targetTouches,
 + TouchPadList? changedTouches);
 +};

 --- /dev/null
 +++ b/dom/webidl/TouchpadList.webidl
 +
 +[Func=mozilla::dom::TouchpadList::PrefEnabled]
 +interface TouchpadList {
 +  [Pure]
 +  readonly attribute unsigned long length;
 +  getter Touchpad? item(unsigned long index);
 +};
 +
 +/* Mozilla extension. */
 +partial interface TouchpadList {
 +  Touchpad? identifiedTouch(long identifier);
 +};

 Platform converge: all

 Welcome for any suggestion or feedback.
 Thanks.

 [1]
 http://developer.android.com/reference/android/view/InputDevice.html#SOURCE_
 CLASS_POINTER
 [2]
 http://developer.android.com/reference/android/view/InputDevice.html#SOURCE_
 CLASS_POSITION
 [3] http://support.apple.com/kb/HT4288

 Best regards,
 Kershaw


 

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: Touchpad event

2014-09-11 Thread smaug

On 09/11/2014 08:26 PM, Chris Peterson wrote:

On 9/11/14 3:49 AM, Mounir Lamouri wrote:

On Thu, 11 Sep 2014, at 18:26, Ms2ger wrote:

First of all, you neglected to explain the standardization situation
here. Is this feature being standardized? If not, why not? How do
other browser vendors feel about it?


Where does this stand in the current Touch Events vs Pointer Events
situation, is the intent to re-use of those or create yet another
standard?


AFAIK, Blink does not intend [1] to implement Pointer Events. Should new web 
features avoid extending Pointer Events?




Unclear. We should still push for pointer events if just possible.
Blink hasn't proposed anything better and their reasoning to drop pointer 
events doesn't make sense.
But the situation is a bit tricky atm. TouchEvents API is worse than Pointer 
Events and web devs seem to prefer
pointer events model, so do I, but if blink won't have pointer events...


-Olli





chris

[1] https://code.google.com/p/chromium/issues/detail?id=162757#c64


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: Touchpad event

2014-09-11 Thread Ehsan Akhgari
On 2014-09-11, 5:54 PM, smaug wrote:
 If we just needs new coordinates, couldn't we extend the existing event 
 interfaces with some new properties?

Yeah, this seems like the way to go to me as well.

 On 09/12/2014 12:52 AM, smaug wrote:
 What would be the event types for touchpad events?
 We must not add yet another types of events to handle pointer type of events.


 And besides, touch event model is rather horrible, so if we for some strange 
 reason need
 totally new events, I'd prefer using something closer to pointer events.


 -Olli




 On 09/11/2014 09:18 AM, Kershaw Chang wrote:
 Hi All,

 Summary:
 Touchpad(trackpad) is a common feature on laptop computers. Currently, the
 finger activities on touchpad are translated to touch event and mouse event.
 However, the coordinates of touch event and mouse event are actually
 associated to display [1]. For some cases, we need to expose the absolute
 coordinates that are associated to touchpad itself to the application.
 That’s why AOSP also defines another input source type for touchpad [2]. The
 x and y coordinates of touchpad event are relative to the size of touchpad.

 Use case:
 Handwriting recognition application will be benefited from this touchpad
 event. Currently, OS X supports handwriting input by touchpad [3].

 Idea of implementation:
 The webidl of touchpad event is like touch event except that x and y
 coordinates are relative to touchpad rather than display.

 --- /dev/null
 +++ b/dom/webidl/Touchpad.webidl
 +
 +[Func=mozilla::dom::Touchpad::PrefEnabled]
 +interface Touchpad {
 +  readonlyattribute long identifier;
 +  readonlyattribute EventTarget? target;
 +  readonlyattribute long touchpadX;
 +  readonlyattribute long touchpadY;
 +  readonlyattribute long radiusX;
 +  readonlyattribute long radiusY;
 +  readonlyattribute floatrotationAngle;
 +  readonlyattribute floatforce;
 +};

 --- /dev/null
 +++ b/dom/webidl/TouchpadEvent.webidl
 +
 +interface WindowProxy;
 +
 +[Func=mozilla::dom::TouchpadEvent::PrefEnabled]
 +interface TouchPadEvent : UIEvent {
 +  readonly attribute TouchpadList touches;
 +  readonly attribute TouchpadList targetTouches;
 +  readonly attribute TouchpadList changedTouches;
 +
 +  readonly attribute short   button;
 +  readonly attribute boolean altKey;
 +  readonly attribute boolean metaKey;
 +  readonly attribute boolean ctrlKey;
 +  readonly attribute boolean shiftKey;
 +
 +  [Throws]
 +  void initTouchpadEvent(DOMString type,
 + boolean canBubble,
 + boolean cancelable,
 + WindowProxy? view,
 + long detail,
 + short button,
 + boolean ctrlKey,
 + boolean altKey,
 + boolean shiftKey,
 + boolean metaKey,
 + TouchPadList? touches,
 + TouchPadList? targetTouches,
 + TouchPadList? changedTouches);
 +};

 --- /dev/null
 +++ b/dom/webidl/TouchpadList.webidl
 +
 +[Func=mozilla::dom::TouchpadList::PrefEnabled]
 +interface TouchpadList {
 +  [Pure]
 +  readonly attribute unsigned long length;
 +  getter Touchpad? item(unsigned long index);
 +};
 +
 +/* Mozilla extension. */
 +partial interface TouchpadList {
 +  Touchpad? identifiedTouch(long identifier);
 +};

 Platform converge: all

 Welcome for any suggestion or feedback.
 Thanks.

 [1]
 http://developer.android.com/reference/android/view/InputDevice.html#SOURCE_
 CLASS_POINTER
 [2]
 http://developer.android.com/reference/android/view/InputDevice.html#SOURCE_
 CLASS_POSITION
 [3] http://support.apple.com/kb/HT4288

 Best regards,
 Kershaw



 
 ___
 dev-platform mailing list
 dev-platform@lists.mozilla.org
 https://lists.mozilla.org/listinfo/dev-platform
 

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: Touchpad event

2014-09-11 Thread Jonas Sicking
On Thu, Sep 11, 2014 at 3:21 PM, Ehsan Akhgari ehsan.akhg...@gmail.com wrote:
 On 2014-09-11, 5:54 PM, smaug wrote:
 If we just needs new coordinates, couldn't we extend the existing event 
 interfaces with some new properties?

 Yeah, this seems like the way to go to me as well.

Do we currently dispatch pointer events on desktop when the user
places a finger on a laptop touchpad? Or do we just dispatch events
when the user then moves the finger and thus move the on-screen
pointer?

If we only dispatch events to indicate pointer movement, then I don't
think simply extending existing interfaces will be possible.

Similarly, what happens if you touch multiple fingers to the touchpad?
Do we fire events as the second and third finger is placed on the
touchpad? If not, we similarly need additional events to be fired.

/ Jonas
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform