diff options
author | HideToshi Tajima <tajima@happy.sunsoft.eng.sun.com> | 2001-03-14 22:03:24 +0000 |
---|---|---|
committer | Hidetoshi Tajima <tajima@src.gnome.org> | 2001-03-14 22:03:24 +0000 |
commit | 02f376a91fcc7c4a1e0600bea8fcca07f5fb1c98 (patch) | |
tree | 17dba998f725edbe35dc33f91dc5cc76a066dda6 /gtk/gtkimcontext.c | |
parent | cf89a05f075bfd3207266cb4fd9f3d5948f3857d (diff) | |
download | gtk+-02f376a91fcc7c4a1e0600bea8fcca07f5fb1c98.tar.gz |
add set_cursor_pos() virtual method
2001-03-14 HideToshi Tajima <tajima@happy.sunsoft.eng.sun.com>
* gtk/gtkimmulticontext.c (gtk_im_multicontext_set_cursor_pos):
* gtk/gtkimcontext.c (gtk_im_context_set_cursor_pos):
* gtk/gtkimcontext.h (struct _GtkIMContextClass): add
set_cursor_pos() virtual method
* modules/input/gtkimcontextxim.c (gtk_im_context_xim_class_init):
(gtk_im_context_xim_set_cursor_pos): add implementation for
set_cursor_pos() method
* gtk/gtkentry.c (recompute_idle_func): set current cursor
position to input methods
Diffstat (limited to 'gtk/gtkimcontext.c')
-rw-r--r-- | gtk/gtkimcontext.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gtk/gtkimcontext.c b/gtk/gtkimcontext.c index 371985e9fd..bbb858d744 100644 --- a/gtk/gtkimcontext.c +++ b/gtk/gtkimcontext.c @@ -284,3 +284,24 @@ gtk_im_context_reset (GtkIMContext *context) } +/** + * gtk_im_context_set_cursor_pos: + * @context: a #GtkIMContext + * + * Notify the input method that a change in cursor + * position has been made. + **/ +void +gtk_im_context_set_cursor_pos (GtkIMContext *context, + GdkRectangle *area) +{ + GtkIMContextClass *klass; + + g_return_if_fail (context != NULL); + g_return_if_fail (GTK_IS_IM_CONTEXT (context)); + + klass = GTK_IM_CONTEXT_GET_CLASS (context); + if (klass->set_cursor_pos) + klass->set_cursor_pos (context, area); +} + |