jeudi, octobre 30, 2008

appleremote02 (part 1)

Since Florian Heckl approved the appleremote01 cws (thanks to him !), we can say the Apple Remote has big chances to be integrated in the Mac OS X version of OpenOffice.org 3.1.

UPGRADE : appleremote01 is in the coming DEV300_m35 !! :-)

The code is ready since a while (in september is was ready), but as usual, the QA is a bottleneck : we simply losed month for this feature integration :-/

Well, without wait more, I started the appleremote02, who will improve the process, making the change more "portable". All details are given there appleremote02 cws description (I'll add information progressively).

The plan is to use another type of events, for instance NSApplicationDefined , and pass the buttonIdentifier as parameter (data1 ).

More techincaly, I created a new events subtype ( AppleRemoteControlEvent), and this new event type will be detected by the NSApp in AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent ).

I didn't change anything to the butttons, but I'll probably add new effects, like contextual menus, once they will be properly handled.

First results :

* in Fullscreen
Received the following event from the Apple Remote : 16
Received the following event from the Apple Remote : 2
Received the following event from the Apple Remote : 32
Received the following event from the Apple Remote : 64

.. and so on

* In normal mode, we receive only menu + play buttons as expected

Looks ok so far :-)

Status of the changes:

Done (but code not commited, because appleremote01 is not integrated ) :

* remove the event sending the keycode
* implement new method, sending new event type, including the buttonIdentifier value
* implement glu code for intercepting the event and receiving the value of the message
* new libAppleRemote builds without any glitch

Planned :

* turn the notification into the right constant ( COMMAND_MEDIA and co defined in vcl/inc/vcl/cmdevt.hxx )
* build
* test
* verify

To be continued ...

Libellés : , , , ,