Back to index

im-sdk  12.3.91
Functions
iiim-interface.h File Reference
#include "gnome-im-switcher.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

gboolean gimlet_iiim_selection_set (GimletWindow *gimlet)
void gimlet_iiim_language_set (GimletWindow *gimlet, const gchar *iiim_lang)
void gimlet_iiim_conversion_mode_set (GimletWindow *gimlet, const gchar *conversion_mode)
void gimlet_iiim_hotkey_set (GimletWindow *, const gchar *)

Function Documentation

void gimlet_iiim_conversion_mode_set ( GimletWindow *  gimlet,
const gchar *  conversion_mode 
)

Definition at line 313 of file iiim-interface.c.

{
  g_return_if_fail (conversion_mode != NULL);

  gdk_property_change (gimlet->last_client,
                     gimlet->set_conversion_mode_atom,
                     gimlet->set_conversion_mode_atom,
                     8,
                     GDK_PROP_MODE_REPLACE,
                     (guchar *)conversion_mode,
                     strlen (conversion_mode) + 1); /* including last NULL */
}

Here is the caller graph for this function:

void gimlet_iiim_hotkey_set ( GimletWindow *  ,
const gchar *   
)

Definition at line 388 of file iiim-interface.c.

{
  char *hotkey;

  g_return_if_fail (trigger != NULL);

  hotkey = change_hotkey_with_trigger (gimlet->hotkey, trigger);

  gdk_property_change (gimlet->invisible->window,
                       gimlet->set_hotkey_atom,
                       gimlet->set_hotkey_atom,
                       8,
                       GDK_PROP_MODE_REPLACE,
                       (guchar *)hotkey,
                       strlen (hotkey) + 1); /* including last NULL */
}

Here is the call graph for this function:

Here is the caller graph for this function:

void gimlet_iiim_language_set ( GimletWindow *  gimlet,
const gchar *  iiim_lang 
)

Definition at line 298 of file iiim-interface.c.

{
  g_return_if_fail (iiim_lang != NULL);

  gdk_property_change (gimlet->last_client,
                     gimlet->set_current_input_language_atom,
                     gimlet->set_current_input_language_atom,
                     8,
                     GDK_PROP_MODE_REPLACE,
                     (guchar *)iiim_lang,
                     strlen (iiim_lang) + 1); /* including last NULL */
}

Here is the caller graph for this function:

gboolean gimlet_iiim_selection_set ( GimletWindow *  gimlet)

Definition at line 230 of file iiim-interface.c.

{
  GdkAtom atom = GDK_NONE;
  GdkWindow *owner = NULL;
  GdkDisplay *display;
  GdkScreen *screen;

  display = gtk_widget_get_display (GTK_WIDGET(gimlet->applet));
  screen = gtk_widget_get_screen (GTK_WIDGET(gimlet->applet));
  atom = gdk_atom_intern ("_IIIM_SWITCHER", FALSE);
  if (atom == GDK_NONE)
    return FALSE;

  owner = gdk_selection_owner_get_for_display (display, atom);
  if (owner)
    {
      g_warning ("There is IIIM input method switcher already.");
      return FALSE;
    }

  gimlet->invisible = gtk_invisible_new_for_screen (screen);
  gtk_widget_realize (gimlet->invisible);

  if (!gtk_selection_owner_set_for_display (display, 
                                       gimlet->invisible,
                                       atom,
                                       GDK_CURRENT_TIME))
    {
      g_warning ("Cannot become IIIM input method switcher selection atom owner.");
      return FALSE;
    }
  gimlet->selection = atom;

  atom = gdk_atom_intern ("_IIIM_SWITCHER_CURRENT_INPUT_LANGUAGE", FALSE);
  gimlet->set_current_input_language_atom = atom;

  atom = gdk_atom_intern ("_IIIM_SWITCHER_CURRENT_CLIENT", FALSE);
  gimlet->set_current_client_atom = atom;

  atom = gdk_atom_intern ("_IIIM_SWITCHER_INPUT_LANGUAGE_LIST", FALSE);
  gimlet->set_input_language_list_atom = atom;

  atom = gdk_atom_intern ("_IIIM_SWITCHER_STATUS_TEXT", FALSE);
  gimlet->set_status_text_atom = atom;

  atom = gdk_atom_intern ("_IIIM_SWITCHER_SET_CONVERSION_MODE", FALSE);
  gimlet->set_conversion_mode_atom = atom;

  atom = gdk_atom_intern ("_IIIM_SWITCHER_LANGUAGE_ENGINE_LIST", FALSE);
  gimlet->set_language_engine_list_atom = atom;

  atom = gdk_atom_intern ("_IIIM_SWITCHER_SET_HOTKEY", FALSE);
  gimlet->set_hotkey_atom = atom;

  gtk_widget_add_events (gimlet->invisible,
                      GDK_PROPERTY_CHANGE_MASK | GDK_STRUCTURE_MASK);

  g_signal_connect (G_OBJECT (gimlet->invisible),
                  "selection-request-event",
                  G_CALLBACK (selection_request_switcher_window),
                  gimlet);
  g_signal_connect (G_OBJECT (gimlet->invisible), "property-notify-event",
                  G_CALLBACK (property_notify_switcher_window),
                  gimlet);
  return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function: