GtkIMContext

Name

GtkIMContext -- 

Synopsis


#include <gtk/gtk.h>


struct      GtkIMContext;
void        gtk_im_context_set_client_window
                                            (GtkIMContext *context,
                                             GdkWindow *window);
void        gtk_im_context_get_preedit_string
                                            (GtkIMContext *context,
                                             gchar **str,
                                             PangoAttrList **attrs,
                                             gint *cursor_pos);
gboolean    gtk_im_context_filter_keypress  (GtkIMContext *context,
                                             GdkEventKey *event);
void        gtk_im_context_focus_in         (GtkIMContext *context);
void        gtk_im_context_focus_out        (GtkIMContext *context);
void        gtk_im_context_reset            (GtkIMContext *context);

Object Hierarchy


  GtkObject
   +----GtkIMContext

Signal Prototypes


"commit"    void        user_function      (GtkIMContext *imcontext,
                                            gstring arg1,
                                            gpointer user_data);
"preedit-changed"
            void        user_function      (GtkIMContext *imcontext,
                                            gpointer user_data);
"preedit-end"
            void        user_function      (GtkIMContext *imcontext,
                                            gpointer user_data);
"preedit-start"
            void        user_function      (GtkIMContext *imcontext,
                                            gpointer user_data);

Description

Details

struct GtkIMContext

struct GtkIMContext;


gtk_im_context_set_client_window ()

void        gtk_im_context_set_client_window
                                            (GtkIMContext *context,
                                             GdkWindow *window);

Set the client window for the input context; this is the GdkWindow in which the input appears. This window is used in order to correctly position status windows, and may also be used for purposes internal to the input method.

context : a GtkIMContext
window : the client window. This may be NULL to indicate that the previous client window no longer exists.


gtk_im_context_get_preedit_string ()

void        gtk_im_context_get_preedit_string
                                            (GtkIMContext *context,
                                             gchar **str,
                                             PangoAttrList **attrs,
                                             gint *cursor_pos);

Retrieve the current preedit string for the input context, and a list of attributes to apply to the string. This string should be displayed inserted at the insertion point.

context : a GtkIMContext
str : location to store the retrieved string. The string retrieved must be freed with g_free().
attrs : location to store the retrieved attribute list. When you are done with this list, you must unreference it with pango_attr_list_unref().
cursor_pos : location to store position of cursor (in bytes) within the preedit string.


gtk_im_context_filter_keypress ()

gboolean    gtk_im_context_filter_keypress  (GtkIMContext *context,
                                             GdkEventKey *event);

Allow an input method to internally handle a key press event. if this function returns TRUE, then no further processing should be done for this keystroke.

context : a GtkIMContext
event : the key event
Returns : TRUE if the input method handled the keystroke.


gtk_im_context_focus_in ()

void        gtk_im_context_focus_in         (GtkIMContext *context);

Notify the input method that the widget to which this input context corresponds has lost gained. The input method may, for example, change the displayed feedback to reflect this change.

context : a GtkIMContext


gtk_im_context_focus_out ()

void        gtk_im_context_focus_out        (GtkIMContext *context);

Notify the input method that the widget to which this input context corresponds has lost focus. The input method may, for example, change the displayed feedback or reset the contexts state to reflect this change.

context : a GtkIMContext


gtk_im_context_reset ()

void        gtk_im_context_reset            (GtkIMContext *context);

Notify the input method that a change such as a change in cursor position has been made. This will typically cause the input method to clear the preedit state.

context : a GtkIMContext

Signals

The "commit" signal

void        user_function                  (GtkIMContext *imcontext,
                                            gstring arg1,
                                            gpointer user_data);

imcontext :the object which received the signal.
arg1 : 
user_data :user data set when the signal handler was connected.


The "preedit-changed" signal

void        user_function                  (GtkIMContext *imcontext,
                                            gpointer user_data);

imcontext :the object which received the signal.
user_data :user data set when the signal handler was connected.


The "preedit-end" signal

void        user_function                  (GtkIMContext *imcontext,
                                            gpointer user_data);

imcontext :the object which received the signal.
user_data :user data set when the signal handler was connected.


The "preedit-start" signal

void        user_function                  (GtkIMContext *imcontext,
                                            gpointer user_data);

imcontext :the object which received the signal.
user_data :user data set when the signal handler was connected.