Commit eccd33b2 authored by 8's avatar 8 Committed by Hidetoshi Tajima
Browse files

Add focus_in and focus_out implementation to im_context_class as

2000-12-08    <tajima@eng.sun.com>

        * modules/input/gtkimcontextxim.c (gtk_im_context_xim_class_init):
          Add focus_in and focus_out implementation to im_context_class
          as gtk_im_context_xim_focus_in and gtk_im_context_xim_focus_out.
parent ad3f7d96
......@@ -38,6 +38,8 @@ static void gtk_im_context_xim_set_client_window (GtkIMContext *co
static gboolean gtk_im_context_xim_filter_keypress (GtkIMContext *context,
GdkEventKey *key);
static void gtk_im_context_xim_reset (GtkIMContext *context);
static void gtk_im_context_xim_focus_in (GtkIMContext *context);
static void gtk_im_context_xim_focus_out (GtkIMContext *context);
static void gtk_im_context_xim_get_preedit_string (GtkIMContext *context,
gchar **str,
PangoAttrList **attrs,
......@@ -209,6 +211,8 @@ gtk_im_context_xim_class_init (GtkIMContextXIMClass *class)
im_context_class->filter_keypress = gtk_im_context_xim_filter_keypress;
im_context_class->reset = gtk_im_context_xim_reset;
im_context_class->get_preedit_string = gtk_im_context_xim_get_preedit_string;
im_context_class->focus_in = gtk_im_context_xim_focus_in;
im_context_class->focus_out = gtk_im_context_xim_focus_out;
gobject_class->finalize = gtk_im_context_xim_finalize;
}
......@@ -361,6 +365,32 @@ gtk_im_context_xim_filter_keypress (GtkIMContext *context,
return FALSE;
}
static void
gtk_im_context_xim_focus_in (GtkIMContext *context)
{
GtkIMContextXIM *context_xim = GTK_IM_CONTEXT_XIM (context);
XIC ic = gtk_im_context_xim_get_ic (context_xim);
if (!ic)
return;
XSetICFocus (ic);
return;
}
static void
gtk_im_context_xim_focus_out (GtkIMContext *context)
{
GtkIMContextXIM *context_xim = GTK_IM_CONTEXT_XIM (context);
XIC ic = gtk_im_context_xim_get_ic (context_xim);
if (!ic)
return;
XUnsetICFocus (ic);
return;
}
static void
gtk_im_context_xim_reset (GtkIMContext *context)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment