Page 1 of 1

GapiDraw and cross platform text input

PostPosted: Feb 9, 2005 @ 5:14pm
by Thomas Sempf

PostPosted: Feb 11, 2005 @ 1:19am
by InexorableTash
When doing text input you might want to switch from fullscreen (GAPI-based) GapiDraw to windowed (GDI-based). Then you just write a normal Windows Mobile app so far as the SIP is concerned. Asking GAPI to only Flip part of the screen is asking for problems - how big is the SIP, how is Flip implemented on various devices, etc.

And then there is the issue of actually having a text entry panel - I haven't done any SmartPhone programming but rather than trying to recreate the capabilities of a text editor you could create an invisible (offscreen, etc) Edit control and have focus there, and shadow the display of the edit control into the GapiDraw surface (e.g. ask for the text & caret position, rely on notifications to update, etc)

Out of curiosity, how were you planning to handle character rendering? (A GDI font rendering function in GapiDraw would be a handy thing to have around.)

PostPosted: Feb 14, 2005 @ 9:32am
by Thomas Sempf
For the character rendering we planned to use GDI functions like DrawText, but I haven't tested yet if it works or not. Text drawing is really a problem at the moment with GapiDraw, because you can't even use the GD DrawText function under Symbian and Win32/PocketPC the same way, due to the fact that _TCHAR is defined as char under Symbain and as wchar under Win32 (the is also true for pathes you use for creating surfaces). So, you have to convert all strings under Symbian from Unicode to ASCII before calling DrawText or CreateSurface. A little bit annoying. Some more advance text rendering support would be warmly welcome; otherwise GD is really nice framework for all kind of programs.

PostPosted: Feb 14, 2005 @ 11:22am
by Johan

PostPosted: Feb 14, 2005 @ 12:00pm
by Thomas Sempf