Back to index

im-sdk  12.3.91
Classes | Defines | Typedefs | Functions | Variables
gtkimcontextiiim.h File Reference
#include <config.h>
#include <gtk/gtkimcontext.h>
#include <gtk/gtk.h>
#include <iiimcf.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _GtkIMContextIIIM
struct  _GtkIMContextIIIMClass

Defines

#define _(String)   (String)
#define N_(String)   (String)
#define textdomain(String)   (String)
#define gettext(String)   (String)
#define dgettext(Domain, String)   (String)
#define dcgettext(Domain, String, Type)   (String)
#define bindtextdomain(Domain, Directory)   (Domain)
#define GTK_TYPE_IM_CONTEXT_IIIM   gtk_type_im_context_iiim
#define GTK_IM_CONTEXT_IIIM(obj)   (GTK_CHECK_CAST ((obj), GTK_TYPE_IM_CONTEXT_IIIM, GtkIMContextIIIM))
#define GTK_IM_CONTEXT_IIIM_CLASS(klass)   (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IM_CONTEXT_IIIM, GtkIMContextIIIMClass))
#define GTK_IS_IM_CONTEXT_IIIM(obj)   (GTK_CHECK_TYPE ((obj), GTK_TYPE_IM_CONTEXT_IIIM))
#define GTK_IS_IM_CONTEXT_IIIM_CLASS(klass)   (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IM_CONTEXT_IIIM))
#define GTK_IM_CONTEXT_IIIM_GET_CLASS(obj)   (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_IM_CONTEXT_IIIM, GtkIMContextIIIMClass))
#define TRIGGER_KEY_LABEL   "TRIGGER KEYS"

Typedefs

typedef struct _GtkIMContextIIIM
typedef struct _GtkIMContextIIIMClass
typedef struct _GtkIIIMInfo
typedef struct _SwitcherInfo
typedef struct _SwitcherContext
typedef struct _StatusWindow

Functions

void im_context_iiim_register_type (GTypeModule *type_module)
GtkIMContext * im_context_iiim_new (void)
void im_context_iiim_shutdown (void)
 im_context_iiim_shutdown:
void im_context_initialize_with_input_language (GtkIMContextIIIM *context_iiim, gchar *new_lang)
void im_context_change_conversion_mode (GtkIMContextIIIM *context_iiim, gchar *conv_mode)
SwitcherInfo * im_info_get_switcher_info (GtkIIIMInfo *info)
void im_info_set_switcher_info (GtkIIIMInfo *info, SwitcherInfo *sw_info)
GdkScreen * im_info_get_screen (GtkIIIMInfo *info)
IIIMCF_handle im_info_get_handle (GtkIIIMInfo *info)
void im_context_aux_set_values (GtkIMContextIIIM *context_iiim, IIIMCF_event ev)
void im_context_aux_get_values (GtkIMContextIIIM *context_iiim, IIIMCF_event ev)

Variables

GType gtk_type_im_context_iiim

Class Documentation

struct _GtkIMContextIIIM

Definition at line 66 of file gtkimcontextiiim.h.

Collaboration diagram for _GtkIMContextIIIM:
Class Members
struct _aux * aux
GtkWidget * candidate
guint candidate_start:1
GtkWidget * client_widget
GdkWindow * client_window
IIIMCF_context context
gchar * current_language
GdkRectangle cursor
guint finalizing: 1
guint has_focus: 1
GtkIIIMInfo * iiim_info
guint in_toplevel: 1
GSList * keylist
IIIMCF_lookup_choice lookup_choice
GtkIMContext object
GdkEventKey saved_key
GtkIMContext * slave
StatusWindow * status_window
SwitcherContext * switcher_context
guint use_preedit: 1
struct _GtkIMContextIIIMClass

Definition at line 101 of file gtkimcontextiiim.h.

Class Members
GtkIMContextClass parent_class

Define Documentation

#define _ (   String)    (String)

Definition at line 39 of file gtkimcontextiiim.h.

#define bindtextdomain (   Domain,
  Directory 
)    (Domain)

Definition at line 45 of file gtkimcontextiiim.h.

#define dcgettext (   Domain,
  String,
  Type 
)    (String)

Definition at line 44 of file gtkimcontextiiim.h.

#define dgettext (   Domain,
  String 
)    (String)

Definition at line 43 of file gtkimcontextiiim.h.

#define gettext (   String)    (String)

Definition at line 42 of file gtkimcontextiiim.h.

#define GTK_IM_CONTEXT_IIIM (   obj)    (GTK_CHECK_CAST ((obj), GTK_TYPE_IM_CONTEXT_IIIM, GtkIMContextIIIM))

Definition at line 51 of file gtkimcontextiiim.h.

#define GTK_IM_CONTEXT_IIIM_CLASS (   klass)    (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IM_CONTEXT_IIIM, GtkIMContextIIIMClass))

Definition at line 52 of file gtkimcontextiiim.h.

#define GTK_IM_CONTEXT_IIIM_GET_CLASS (   obj)    (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_IM_CONTEXT_IIIM, GtkIMContextIIIMClass))

Definition at line 55 of file gtkimcontextiiim.h.

#define GTK_IS_IM_CONTEXT_IIIM (   obj)    (GTK_CHECK_TYPE ((obj), GTK_TYPE_IM_CONTEXT_IIIM))

Definition at line 53 of file gtkimcontextiiim.h.

#define GTK_IS_IM_CONTEXT_IIIM_CLASS (   klass)    (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IM_CONTEXT_IIIM))

Definition at line 54 of file gtkimcontextiiim.h.

Definition at line 50 of file gtkimcontextiiim.h.

#define N_ (   String)    (String)

Definition at line 40 of file gtkimcontextiiim.h.

#define textdomain (   String)    (String)

Definition at line 41 of file gtkimcontextiiim.h.

#define TRIGGER_KEY_LABEL   "TRIGGER KEYS"

Definition at line 106 of file gtkimcontextiiim.h.


Typedef Documentation

typedef struct _GtkIIIMInfo

Definition at line 60 of file gtkimcontextiiim.h.

typedef struct _GtkIMContextIIIM

Definition at line 57 of file gtkimcontextiiim.h.

typedef struct _GtkIMContextIIIMClass

Definition at line 58 of file gtkimcontextiiim.h.

typedef struct _StatusWindow

Definition at line 64 of file gtkimcontextiiim.h.

typedef struct _SwitcherContext

Definition at line 63 of file gtkimcontextiiim.h.

typedef struct _SwitcherInfo

Definition at line 62 of file gtkimcontextiiim.h.


Function Documentation

void im_context_aux_get_values ( GtkIMContextIIIM *  context_iiim,
IIIMCF_event  ev 
)

Definition at line 3031 of file gtkimcontextiiim.c.

{
  forward_event(context_iiim, ev, NULL);
  iiim_event_dispatch (context_iiim);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void im_context_aux_set_values ( GtkIMContextIIIM *  context_iiim,
IIIMCF_event  ev 
)

Definition at line 3023 of file gtkimcontextiiim.c.

{
  forward_event(context_iiim, ev, NULL);
  iiim_event_dispatch (context_iiim);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void im_context_change_conversion_mode ( GtkIMContextIIIM *  context_iiim,
gchar *  conv_mode 
)

Definition at line 2968 of file gtkimcontextiiim.c.

{
  IIIMCF_event event;

  if (conv_mode && !strcmp ((gchar*)conv_mode, "on"))
    {
      IIIMF_status st;
      st = iiimcf_create_trigger_notify_event (CONV_ON, &event);
      if (st != IIIMF_STATUS_SUCCESS)
       return;
    }
  else if (conv_mode && !strcmp ((gchar*)conv_mode, "off"))
    {
      IIIMF_status st;
      st = iiimcf_create_trigger_notify_event (CONV_OFF, &event);
      if (st != IIIMF_STATUS_SUCCESS)
       return;
    }
  if (forward_event(context_iiim, event, NULL))
    iiim_event_dispatch (context_iiim);
}

Here is the call graph for this function:

Here is the caller graph for this function:

GtkIMContext* im_context_iiim_new ( void  )

Definition at line 2421 of file gtkimcontextiiim.c.

{
  GtkIMContextIIIM *result;

  result =
    GTK_IM_CONTEXT_IIIM (g_object_new (GTK_TYPE_IM_CONTEXT_IIIM, NULL));

  return GTK_IM_CONTEXT (result);
}

Here is the caller graph for this function:

void im_context_iiim_register_type ( GTypeModule *  type_module)

Definition at line 277 of file gtkimcontextiiim.c.

{
  static const GTypeInfo im_context_iiim_info = {
    sizeof (GtkIMContextIIIMClass),
    (GBaseInitFunc) NULL,
    (GBaseFinalizeFunc) NULL,
    (GClassInitFunc) im_context_iiim_class_init,
    NULL,
    NULL,
    sizeof (GtkIMContextIIIM),
    0,
    (GInstanceInitFunc) im_context_iiim_init,
  };

  gtk_type_im_context_iiim =
    g_type_module_register_type (type_module,
                             GTK_TYPE_IM_CONTEXT,
                             "GtkIMContextIIIM",
                             &im_context_iiim_info, 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void im_context_iiim_shutdown ( void  )

im_context_iiim_shutdown:

Destroys all the status windows that are kept by the IIIM contexts. This function should only be called by the IIIM module exit routine.

Definition at line 2815 of file gtkimcontextiiim.c.

{
  GSList *tmp_list;
  GtkIIIMInfo *info = NULL;

  DEBUG_DO (g_message ("shutdown\n"));
  if (iiim)
    iiimcf_destroy_handle (iiim);
  iiimcf_finalize ();
  iiim_is_initialized = FALSE;
  while (status_windows)
    status_window_free (status_windows->data);

  tmp_list = open_iiims;
  while (tmp_list)
    {
      info = tmp_list->data;
      g_signal_handler_disconnect (info->settings, info->status_set);
      im_info_switcher_shutdown (info);
      tmp_list = tmp_list->next;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void im_context_initialize_with_input_language ( GtkIMContextIIIM *  context_iiim,
gchar *  new_lang 
)

Definition at line 2839 of file gtkimcontextiiim.c.

{
  IIIMCF_language iiim_lang = NULL;
  IIIMF_status st;
  IIIMCF_attr attr;
  IIIMCF_event ev;
  gboolean conversion_mode = FALSE;
  gchar **names;
  gchar *le_name = NULL;
  gint i = 0, n;
  const IIIMP_card16 *u16idname, *u16hrn, *u16domain;
  gboolean found_le = FALSE;
  IIIMCF_input_method *pims;

  if (context_iiim == NULL || context_iiim->context == NULL)
    return;

  if (new_lang)
    {
      names = g_strsplit(new_lang, ":", -1);
      new_lang = names[0];
      le_name = names[1];

      iiim_lang = get_input_language (context_iiim,
                                  new_lang,
                                  TRUE);
      if (iiim_lang != NULL)
       {
         g_free (context_iiim->current_language);
         context_iiim->current_language = g_strdup (new_lang);
       }
      else
       /* invalid new lang */
       return;
    }
  else
    iiim_lang = get_input_language (context_iiim,
                                context_iiim->current_language,
                                FALSE);

  if (le_name != NULL)
    {
      char *idname = NULL;
      /* probably le_name consists of 'lename' and 'imename' which are separated by '-' */
      const char *ime_delimiter = "-";
      char **le_ime = g_strsplit (le_name, ime_delimiter, -1);
      char *lename = le_ime[0], *imename = le_ime[1];

      st = iiimcf_get_supported_input_methods (iiim, &n, &pims);
      if (st != IIIMF_STATUS_SUCCESS)
       return;

      for (i = 0; i < n; i++)
       {
         st = iiimcf_get_input_method_desc (pims[i], &u16idname, &u16hrn, &u16domain);
         if (st != IIIMF_STATUS_SUCCESS)
           return;

         idname = format_iiimcf_string (u16hrn);
          if (idname != NULL && strcmp (lename, idname) == 0)
           {
             /* update the pims[i]->imname with the new imname that contains imename */
             if (imename)
               {
               IIIMP_card16 *imname = format_utf8_string (le_name);
               iiimcf_set_input_method_name (pims[i], imname);
              }

             g_free (idname);
             found_le = TRUE;
             break;
           }
         if (idname != NULL) {
           g_free (idname);
           idname = NULL;
         }
       }
       g_free (le_ime);
    }
  /* save conversion mode to restore this after switching */
  st = iiimcf_get_current_conversion_mode (context_iiim->context,
                                      &conversion_mode);

  /* to cancel any remaining preedit text */
  if (!context_iiim->finalizing)
    g_signal_emit_by_name (context_iiim, "preedit_changed");

  /* clear candidate if any */
  if (context_iiim->candidate_start == TRUE)
    {
      iiim_destroy_candidate_window (context_iiim);
      context_iiim->candidate_start = FALSE;
    }

  context_iiim->lookup_choice = NULL;

  st = iiimcf_create_attr (&attr);
  if (st != IIIMF_STATUS_SUCCESS)
    return;
  if (found_le)
      iiimcf_attr_put_ptr_value (attr, IIIMCF_ATTR_INPUT_METHOD,
                             pims[i]);
  if (iiim_lang)
    iiimcf_attr_put_ptr_value (attr, IIIMCF_ATTR_INPUT_LANGUAGE,
                            iiim_lang);
  st = iiimcf_context_set_attr(context_iiim->context, attr);
  iiimcf_destroy_attr (attr);
  if (st != IIIMF_STATUS_SUCCESS)
    return;

  st = iiimcf_create_seticfocus_event (&ev);

  if (st != IIIMF_STATUS_SUCCESS)
    return;

  forward_event(context_iiim, ev, NULL);
  if (conversion_mode)
    {
      st = iiimcf_create_trigger_notify_event (CONV_ON, &ev);
      if (st != IIIMF_STATUS_SUCCESS)
       return;
      forward_event(context_iiim, ev, NULL);
    }
  iiim_event_dispatch (context_iiim);
}

Here is the call graph for this function:

Here is the caller graph for this function:

IIIMCF_handle im_info_get_handle ( GtkIIIMInfo *  info)

Definition at line 3000 of file gtkimcontextiiim.c.

{
  if (info == NULL)
    return NULL;
  return info->iiim;
}

Here is the caller graph for this function:

GdkScreen* im_info_get_screen ( GtkIIIMInfo *  info)

Definition at line 2992 of file gtkimcontextiiim.c.

{
  if (info == NULL)
    return NULL;
  return info->screen;
}

Here is the caller graph for this function:

SwitcherInfo* im_info_get_switcher_info ( GtkIIIMInfo *  info)

Definition at line 3008 of file gtkimcontextiiim.c.

{
  if (info == NULL)
    return NULL;
  return info->switcher_info;
}

Here is the caller graph for this function:

void im_info_set_switcher_info ( GtkIIIMInfo *  info,
SwitcherInfo *  sw_info 
)

Definition at line 3016 of file gtkimcontextiiim.c.

{
  info->switcher_info = sw_info;
}

Here is the caller graph for this function:


Variable Documentation

Definition at line 266 of file gtkimcontextiiim.c.