[Uim] surrounding text

Etsushi Kato ek.kato at gmail.com
Mon Oct 2 13:47:31 EEST 2006


Hi YamaKen,

I've update uim's surrounding text support in libuim, and implemented
its support in GTK+ bridge.  Please review the attached patch.  I'm
going to commit if you think these are OK.


Here is the detail about my modification.

 o change return value of request_surrounding_text_cb as 'int' in
order to check whether an application support surrounding text
 o change the meaning of offset in delete_surrounding_text_cb
 o add surrounding_text member in struct uim_context_
 o add reverse_conv member in struct uim_context_ to convert string
with client encoding into IM encoding
 o add im-get-surrounding procedure in scheme side to get string when
getting #t with im-request-surrounding


I've checked this works in GTK+ bridge with a test code using skk.scm,
but I need a comment about the implementation.

In request_surrounding_text_cb, bridge notifies libuim of current
surrounding text using uim_set_surrounding_text(uc, text, cursor_pos,
len), and I implemented a procedure to retrieve it from IM side;
im-get-surrounding procedure which returns a list as ("text"
cursor_pos len).  I use uim_set_surrounding_text() interface already
implemented in uim.c, but I don't think 'len' is needed here (and in
struct surrounding_text).  What do you think?

Cheers,
-- 
Etsushi Kato
ek.kato at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: surrounding.diff
Type: application/octet-stream
Size: 8172 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/uim/attachments/20061002/8861cc34/attachment.obj 


More information about the uim mailing list