LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-31-2011, 12:49 PM   #1
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
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.
 
Old 08-08-2011, 03:35 PM   #2
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799

Original Poster
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
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.
 
0 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pentax .PEF RAW to JPEG batch conversion utility needed Tom Brown Linux - Software 4 12-27-2010 07:36 PM
Advice seeked for GTK/Glade use. theKbStockpiler Programming 4 12-24-2010 01:17 AM
Password conversion ... or any other advice andy2008 Linux - Server 2 11-06-2010 02:37 PM
Advice - upgrading gtk+2 tdos20 Slackware 4 02-25-2010 09:48 PM
Code Conversion Help Needed fpfernando Programming 2 10-09-2005 11:36 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration