05-01-2012 05:33 PM
I understand that a user can use a blackberry smartphone
as mouse to remotely control the apps on the
playbook thru the Bridge.
So, for an app to support this, it needs to handle mouse events. I understand
that The SCREEN_EVENT_POINTER is the screen event type the
system sends to the app with the property SCREEN_PROPERTY_BUTTONS
indicating which mouse button is clicked. But there is no other information
--no Mouse Down/Up/Move information available.
Question:
Does the system generate one SCREEN_EVENT_POINTER event each time the user
clicks the mouse (down and up), or two POINTER events (one down, one up)?
And how about 'dragging' the mouse?
Any info will be greatly appreciated. I do not own a Blackberry
smartphone and the simulator does not work on my
Thinkpad T420 either, so I am not able to test it. Thanks.
05-02-2012 08:49 AM
>Does the system generate one SCREEN_EVENT_POINTER event each time the user clicks the mouse (down and up), or two POINTER events (one down, one up)?
Two SCREEN_EVENT_POINTER different events and every event has current mouse pointer coordinates, this is how you detect dragging. I use it on Simulator, did not have a chance to test it on Playbook as simply don't have mouse "connected" to PB.
05-02-2012 01:28 PM
Thanks for the info on Simulator.
So, 1st SCREEN_EVENT_POINTER (mouse down) at pos1 (SCREEN_PROPERTY_SOURCE_POSITION),
2nd SCREEN_EVENT_POINTER (mouse up), at pos2 (ditto)
If (pos1 <> pos2), then
the mouse was dragged to pos2 as well
else
just a simple click at pos1
The apps will not receive any intermedate events to indicate a move:
If the user clicks <0,0> and keeps the mouse button down,
then release the button at <1000, 600>.
There will only be two SCREEN_EVENT_POINTER events.
How about using a real blackberry smartphone to 'click' a native app thru the Bridge,
is the above description still true?
05-02-2012 01:34 PM
>The apps will not receive any intermedate events to indicate a move:
> If the user clicks <0,0> and keeps the mouse button down,
> then release the button at <1000, 600>.
> There will only be two SCREEN_EVENT_POINTER events.
Wrong, you'll receive lots of SCREEN_EVENT_POINTER events and every one will be indicating current mouse postion and state of buttons.
No idea about the bridge and different events should be tracked/used to react to PlayBook's tapping, dragging.
05-02-2012 01:50 PM
Yes. That makes more sense.
Then, each mouse 'click' will create at least two SCREEN_EVENT_POINTER events (down and up).
If the mouse is being dragged in the meantime, a series of POINTER events will also be sent by the system.
Are they also come in pairs? How can one tell that the mouse is finally being 'released'? Thanks.
05-02-2012 01:52 PM
Just try it and you'll see -)
05-02-2012 02:03 PM
05-02-2012 02:40 PM
05-02-2012 03:15 PM
>I really want to. But I was not able to make the Simulator (1.08, 2.0.0, 2.0.1) work on my laptop.
Then in what way are you going to develop? without deploying/debugging at all?
05-02-2012 03:59 PM
BGmot wrote:>I really want to. But I was not able to make the Simulator (1.08, 2.0.0, 2.0.1) work on my laptop.
Then in what way are you going to develop? without deploying/debugging at all?
Well, that is a different question. In my case, someone else will do the test for me. But I need to understand the solutions first, before I give it a try.
I am hoping someone from RIM will give a more definitive answer for such an easy question. Given such inadequate documentation for playbook ndk developers to follow, RIM should at least provide adequate support in this forum. But,...