[maemo-developers] hardware keys -- proposal for alternate XKeys

2006-03-24 Thread Kemal Hadimli
Hello,

With the current hardware key arrengement in maemo, using some special
keys (F4...F8) in external (read: Bluetooth) keyboards is a problem.
It's not apparent with daily applications, but with fullscreen apps
that require full keyboard support (think using rdesktop/vncviewer
with a BT keyboard), it becomes an issue. The user wants to send an
F4 key to the running application, the menu pops up instead. If the
app isn't a full blown hildon app (ie. using bare xlib) then the user
can send F4, but now the hardware key Menu has no use. (sidenote --
of course for an app to support the menu key it has to be
hildonized)

Proposal:
Move the hardware keys to unused XKey values. This way, with the F
keys free, apps (mostly the ones that are supposed to be used with
bluetooth keyboards, like vncviewer/rdesktop) can use them freely.

Loud thinking:
This could be fixed in a maemo release, or this could be optional.
Making it optional wouldn't break the precompiled apps, but I'm not
sure if that's enough to keep broken code in maemo. For instance, an
application could send a D-Bus message, requesting the new hw key
method to be activated. And after that message is received by hildon,
the hardware keys sent to that application would be the new key
sequences.

STRONG suggestion:
In the future, a hildonGetXKeyValue() (don't you just love
pascalCasing) type of function should be implemented. This function
should be used in applications instead of macros for determining
hardware key values. This way, when the key values change again in a
future release it wouldn't be a problem for the current binaries.
Optionally, apps should be free to cache the keyvalues (ie. querying
the key values at initialization and using the prequeried values in
event handlers) for optimization purposes. The codebase might look
something like this:

typedef enum {
HILDON_HOMEKEY = 0,
HILDON_MENUKEY,
HILDON_ESCKEY,
HILDON_LEFTKEY,
HILDON_RIGHTKEY,
HILDON_UPKEY,
HILDON_DOWNKEY,
HILDON_ACTIONKEY,
HILDON_FULLSCREENKEY,
HILDON_MINUSKEY,
HILDON_PLUSKEY
} HildonKey;

XKey hildonGetXKeyValue(HildonKey hk)
{
XKey ourkey;

/*

Insert code here that looks up the real XKey (or GdkKey) value of HildonKey

*/

return(ourkey);
}


A possible combination for the keys is:
XK_Prior and XK_Next for the rocker keys (+/-)
XK_Select or XK_Execute for the D-pad middle key (might not be necessary)
XK_Menu for the menu key
XK_Cancel for the ESC key (might not be necessary)
and so on (look in /usr/X11R6/include/X11/keysymdef.h for possible
keyvals, there are a lot of them)


--
Kemal
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


[maemo-developers] WLAN and bluetooth modem on at the same time?

2006-03-24 Thread Teemu Harju
Hi,Is it somehow possible to use the WLAN and bluetooth modem with my phone at the same time on Nokia 770? The UI doesn't seem to allow this, but are there some scripts that I could run from Xterm to achieve this? My idea would be to use the Nokia 770 as a gateway from ad-hoc WLAN to public Internet via 3G. I'd probably need to make some changes to the routing tables also, but that I think I could figure those out if I got both connections up.
Regards,Teemu-- Teemu Harjuhttp://www.teemuharju.net
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] Optimized memory copying functions for Nokia770

2006-03-24 Thread Siarhei Siamashka

Simon Pickering wrote:


I don't know what version flash image that c760 was running, but my c750
produces better results. I compiled your test program in two versions - arm4
and arm5 using the default toolchains built by bitbake + OpenEmbedded for
the Zaurus sl-5500 and c7x0 machines respectively.


I'll ask for this information.


Note that OpenZaurus uses significantly more up-to-date versions of
libraries, etc. than the standard Sharp images, so this probably accounts
for the difference in speed that you see below. If you want more info on the
actual lib versions and patches then let me know.

I ran these two binaries on my Zaurus sl-5500 and Zaurus sl-c750 (both
running the latest OpenZaurus 3.5.4 flash image), and on my Nokia-770. The
arm5 binary ran fine on the arm4 arch sl-5500, obviously there were no arm5
instructions included, but the times are slightly different - I don't know
whether this is to do with background processes or something to do with the
compiler (though I don't suppose the compiler really has much to do in this
case.)

Results as follows:

[results skipped]



Compiling for arm4 or arm5 should not make any difference as all the
code that is benchmarked is not generated by compiler anyway (standard
functions are in standard libraries, tested functions are implemented as
inline assembler). Slight times differences should be ignored and are
just random deviations (+-1MB/s does not change overall picture much).

From these results looks like that:

Optimized memset works good on all tested platforms, providing the
same or much better results. Memset performance is critical for clearing
bitmaps to some color and drawing rectangles, so optimizing it makes
sense.

The same code for memcpy works good for Nokia 770 and StrongARM, but
XScale needs different optimizations. Seems like reading memory is
important here, maybe prefetch (PLD instruction) could improve
performance. I tried using prefetch when writing optimized memcpy for
Nokia 770, but it did not have any effect at all. But prefetch requires
armv5, so it affects portability.

An interesting observation is standard memset vs. memcpy performance on
StrongARM. In spite of doing more work, memcpy is even faster :)

It would be interesting to make some tests on PXA270 too.

___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


[maemo-developers] osso-ic.o ? where is it ?

2006-03-24 Thread Ade Bamigboye
Hi 

Anyone know where osso.o is ? I am assuming that this implements
osso-ic.h. If it is not can anyone tell us what is needed to get
functions in osso-ic.h to compile ?

Regards
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


[maemo-developers] Shameless request for developper help

2006-03-24 Thread Lionel Dricot
(I tought it was better to post this mail here than the user-mailing list,
sorry if you read it twice)


Hello,

Since I tried the FBreader 0.7.3 package, I cannot launch my
extra-applications anymore (as told on maemo-users).

Thanks to the great help I received on IRC, we discovered that
extra-applets (like CPU/mem applet) are still launched !

In order to understand what my problem is I tried to change the source in
the CPU/mem applet to add two simple function :

- one that launch and xterm (to see if it works)
- the other to backup my .gpe folder to my MMC card so I can reflash the
whole system.

Unfortunatly, I'm stuck at my parent's house for a few days and I
discovered that they don't have enough disk space to install the whole
maemo SDK ! I tried to clean up everything without success.

So, I'm asking here for help. Can anybody here take the time to modify the
source of CPU/mem and make a deb for me ? I don't think I have nothing to
offer in exchange except a few visitors to the website of your project
(I've a quite popular weblog).. I'm simply stuck with my broken 770 and
the computer of my mother :-( So, it's a call for help.

The modification seems really easy :

Adding this to line 298  (with correct PATH, I have no idea of what are
the correct ones):

static void
activate_xterm_item(GtkMenuItem *item, gpointer data)
{
  g_spawn_command_line_async(??/xterm, error);
}

static void
activate_gpe_item(GtkMenuItem *item, gpointer data)
{
  g_spawn_command_line_async(cp -r /home/user/??.gpe /media/mmc1/, error);
}


Adding this to line 459 :

/* Xterm */
  info-menu_xterm = gtk_menu_item_new_with_label(Launch Terminal);
gtk_menu_shell_append(GTK_MENU_SHELL(info-menu),
  info-menu_xterm);
  g_signal_connect(G_OBJECT(info-menu_xterm),
  activate,
  G_CALLBACK(activate_xterm_item),
  data);
/* Backup GPE */
  info-menu_xterm = gtk_menu_item_new_with_label(Backup GPE);
gtk_menu_shell_append(GTK_MENU_SHELL(info-menu),
  info-menu_gpe);
  g_signal_connect(G_OBJECT(info-menu_gpe),
  activate,
  G_CALLBACK(activate_gpe_item),
  data);


It might work. I have no idea since I never developped with Maemo..


Thanks a lot for your support and for all advices I received on IRC. I
understand that my request is a bit can-someonde-do-it-for-me but it's
my only chance to have my calendar for the next week...

I really feel guilty to post this..

Lionel

PS : anyway, softwares for the 770 rocks !!! Thanks everyone. I'm
specially thankful to the scummvm porter but I use a lot of others and
they are great. :-)



___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers