forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
ad3f7d9653
commit
eccd33b2e7
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user