LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Advice needed for GTK conversion of QWO (https://www.linuxquestions.org/questions/programming-9/advice-needed-for-gtk-conversion-of-qwo-894771/)

lumak 07-31-2011 12:49 PM

Advice needed for GTK conversion of QWO
 
QWO http://www.nongnu.org/qwo/
is an Input method used by the Open Moko project and I was interested in creating a GTK version with a few additions and a predictive method.


Basically I need at least a 9x9 grid of non uniform regions (not always square) that can notify the program of mouse press/release and enter/exit events into each cell.

So after looking at the default widgets, it looks like I have to create a new widget or use clutter. Clutter would be overkill for anybody not using Gnome 3.

Any one have any ideas?


Arguably I could make my additions to the main program. However, my target is not the openmoko platform.

Thanks for any input.

lumak 08-08-2011 03:35 PM

Think I got it for now...

Unicode SVG file to define the regions and letters used.

libxml to parse the SVG file and turn them into cairo contexts

draw the important shapes to the screen, letters/symbols, approximate grid, background, etc. and save to memory the regions to check for entry/exit.

check the sample points against where they would fall in the cairo context using cairo_in_fill()

produce the letter or string based on what regions were clipped with the mouse.

Nice aspect of this is that I don't have to worry about multi-language support too much if the visible glyph of the letters are actually shapes in the svg file and the real value/key code is stored in a property value.


All times are GMT -5. The time now is 02:25 PM.