Re: XIM String Conversion Callback



Theppitak Karoonboonayanan <thep links nectec or th> writes:

> Hello,
> 
> Now I am working on a Thai XIM, which needs context-sensitive input
> sequence check. (The need to restrict the input sequence was once discussed
> when we talked about Thai rendering in Pango.) To do the job, I have been
> pointed to the String Conversion Callback of the XIM for accessing the
> application's buffer. And that needs the XIM client to call XSetICValues()
> with XNStringConversionCallback key. But I don't find such code in GDK 1.2.8.
>
> So, the question is: has the callback be supported any where in GTK+?

GTK+-1.2 does not support XNStringConversionCallback.

GTK+-1.3 also does not include support for context and recoversion
yet, though that may change. There are two basic reasons why I did not
add it initially:

 - It adds sigificant complexity, and I wanted to see if I could
   avoid adding that complexity.
 
 - I don't understand either the Xlib interfaces or the problem very
   well, so I didn't know exactly how to set it up.

Reconversion is especially tricky and I'm not sure it should be
joined together with context.
 

For getting context, my current idea of how it should look is:

 GtkIMContext should have a signal ::retrieve_context() which has parameters
 indicating the desired context region.

 When the owner of the context (the GtkEntry, for example), gets this
 signal, it should call:

  gtk_im_context_set_context (GtkIMContext *im_context,
                              gint          position,
                              gchar        *context_text,
                              gint          length);

 Where position is the offset (in bytes, not including the 
 preedit string) of the start of the context string from the cursor 
 position.

Regards,
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]