Re: IME and GTK Input Method Contexts



On Mon, Jun 23, 2008 at 10:25 PM, Girish <girish a geodesic com> wrote:
aniket ray wrote:

Hi,
Is there a way to find out if an IME is active or not, within a gtk
application.
I tried sending key events to the GtkIMContext using
gtk_im_context_filter_keypress. This seems to be returning true, even
if no ime is active.


What i want to achieve is that if no IME is active, i want to handle
the keypress following my logic, else i want the ime to handle it.


 In key press call back itself you can catch the events. Return TRUE after
handling those events (value will be stored in event->keyval). If you return
FALSE, default event handlers will handle those events. It means user
defined callback will get the priority.

Thanks but that does not really help me.
I'm looking for a way to find out if an ime is ready to handle key
press events or not.
The gtk documentation states that gtk_im_context_filter_keypress
returns TRUE if the input method handled the keystroke.
The problem that i seem to be facing is that this function is
returning true, even if i don't have any input method editor enabled.

So i did a
if(gtk_im_context_filter_keypress(sIMContext, event))
 //do minor logic, remaining logic in the commit and preedit_changed
callback
else
 //process event


The problem i am facing is that gtk_im_context_filter_keypress is
always returning true.


Thanks,
aniket
_______________________________________________
gtk-i18n-list mailing list
gtk-i18n-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-i18n-list



--

----------------------------------------------------------------------
Girish A J
Software-Engineer,                              Ph: (80) 6655 1000   Ext 121
Geodesic Information Systems Ltd.       Fax:(80) 6655 1029
Nagashetty Halli.
Bangalore - 560 094
URL  http://www.geodesic.com http://www.mundu.com
--------------------------------------------------------------------------


Thanks,
aniket



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