[haiku-development] Keymap management backend.

  • From: Alexandre Deckner <alex@xxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 03 Sep 2008 16:58:49 +0200

Hi devs,
I started adding a few extensions to the keymap management in the input server as it was suggested by Axel in the commit list discussion for r24924 . This greatly simplifies the code and allow fixing bugs and to further enhance the Keymap preflet , and has all kinds of nice implications like easy keymap switching and keymap change on readonly systems. Well everything is said in the aforementioned thread.

It's 50% done, but now comes my first implementation question:
Since i'm creating a new api, wouldn't it be better to add these new calls in a new (small) c++ api, instead of extending InterfaceDefs.h ?

I tried to extend the C interface but it felt really ugly and time consuming (i pass on the details but i lost hours on c strings and tables). Besides it also add some uglyness in the client apps. Awkward, when you know that the client apps and the i.s are written in lovely Be-style c++ .

Now i've put the few static methods i need in a separate c++ api that talks directly with the i.s. It works well, allowed me to progress faster, and it really feels better :)

Should i pursue with this approach? If yes, how to integrate it nicely? For now i've just put a InputServerAPI.cpp/h in the same places as InterfaceDefs.h/cpp and it works so far.

Thanks for your attention,
Alex



Other related posts: