Back to index

im-sdk  12.3.91
gnome-im-switcher.h
Go to the documentation of this file.
00001 /* GNOME INPUT METHOD SWITCHER
00002  * Copyright 2003 Sun Microsystems Inc.
00003  *
00004  * This is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the
00016  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017  * Boston, MA 02111-1307, USA.
00018  */
00019 
00020 #ifndef __GNOME_IM_SWITCHER_H
00021 #define __GNOME_IM_SWITCHER_H
00022 
00023 #include <gnome.h>
00024 #include <panel-applet.h>
00025 #include "status-placement.h"
00026 
00027 #define TRIGGER_KEY_LABEL "TRIGGER KEYS"
00028 
00029 typedef struct _QuickAccessMenu QuickAccessMenu;
00030 
00031 struct _QuickAccessMenu 
00032 {
00033   GtkWidget *widget;
00034   GtkWidget *vbox;
00035   GSList *active_languages;
00036 };
00037 
00038 typedef struct _GimletWindow GimletWindow;
00039 
00040 typedef enum
00041 {
00042   FOLLOW_APPLICATION,
00043 #ifdef MEANINGLESS_OPTION_PERHAPS
00044   FOLLOW_CURRENT_LOCALE,
00045   FOLLOW_OPTION_MENU,
00046 #endif
00047   FOLLOW_QUICK_ACCESS_MENU
00048 } InputLanguagePolicy;
00049 
00050 #define GIMLET_PALETTE_SIZE 10
00051 
00052 struct _GimletWindow
00053 {
00054   PanelApplet *applet;
00055   GtkWidget   *about_dialog;
00056   GtkTooltips *tooltips;
00057 
00058   GtkWidget *drawing_area;
00059   GtkWidget *status_label;
00060 
00061   QuickAccessMenu *quick_access_menu;
00062 
00063   /* language selection dialog */
00064   GtkWidget *edit_languages_dialog;
00065   GtkWidget *edit_hotkey_dialog;
00066 
00067   /* preference*/
00068   GtkWidget *edit_preferences_dialog;
00069 #ifdef MEANINGLESS_OPTION_PERHAPS
00070   GtkWidget *input_language_option_menu;
00071   gchar *iiim_lang_in_option_menu;
00072 #endif
00073 
00074   guint conversion_on_start : 1;
00075   InputLanguagePolicy input_lang_policy;
00076 
00077   /* communitcations with IIIM clients */
00078   GtkWidget *invisible;
00079   GdkAtom  selection;
00080   GdkAtom  set_current_input_language_atom;
00081   GdkAtom  set_current_client_atom;
00082   GdkAtom  set_status_text_atom;
00083   GdkAtom  set_input_language_list_atom;
00084   GdkAtom  set_language_engine_list_atom;
00085   GdkAtom  set_conversion_mode_atom;
00086   GdkAtom  set_hotkey_atom;
00087 
00088   /* input method settings */
00089   gboolean im_enabled;
00090   gboolean status_enabled;
00091   gboolean lookup_enabled;
00092   IMStatusPlacement status_placement;
00093 
00094   /* fix me, the next three should be per client */
00095   GdkWindow *last_client;
00096   gchar *current_iiim_lang;
00097   gchar **client_lang_list;
00098 
00099   gboolean conversion_mode;
00100 
00101   gchar *le_list;
00102 
00103   gchar *hotkey;
00104 };
00105 
00106 #endif /* __GNOME_IM_SWITCHER_H */