Back to index

im-sdk  12.3.91
gtkimcontextiiim.h
Go to the documentation of this file.
00001 /* GTK - The GIMP Toolkit
00002  * Copyright (C) 2000 Red Hat Software
00003  *
00004  * This library 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 __GTK_IM_CONTEXT_IIIM_H__
00021 #define __GTK_IM_CONTEXT_IIIM_H__
00022 
00023 #include <config.h>
00024 #include <gtk/gtkimcontext.h>
00025 #include <gtk/gtk.h>
00026 #include <iiimcf.h>
00027 
00028 G_BEGIN_DECLS
00029 
00030 #ifdef ENABLE_NLS
00031 #include<libintl.h>
00032 #define _(String) dgettext(GETTEXT_PACKAGE,String)
00033 #ifdef gettext_noop
00034 #define N_(String) gettext_noop(String)
00035 #else
00036 #define N_(String) (String)
00037 #endif
00038 #else /* NLS is disabled */
00039 #define _(String) (String)
00040 #define N_(String) (String)
00041 #define textdomain(String) (String)
00042 #define gettext(String) (String)
00043 #define dgettext(Domain,String) (String)
00044 #define dcgettext(Domain,String,Type) (String)
00045 #define bindtextdomain(Domain,Directory) (Domain) 
00046 #endif
00047 
00048 extern GType gtk_type_im_context_iiim;
00049 
00050 #define GTK_TYPE_IM_CONTEXT_IIIM              gtk_type_im_context_iiim
00051 #define GTK_IM_CONTEXT_IIIM(obj)              (GTK_CHECK_CAST ((obj), GTK_TYPE_IM_CONTEXT_IIIM, GtkIMContextIIIM))
00052 #define GTK_IM_CONTEXT_IIIM_CLASS(klass)      (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IM_CONTEXT_IIIM, GtkIMContextIIIMClass))
00053 #define GTK_IS_IM_CONTEXT_IIIM(obj)           (GTK_CHECK_TYPE ((obj), GTK_TYPE_IM_CONTEXT_IIIM))
00054 #define GTK_IS_IM_CONTEXT_IIIM_CLASS(klass)   (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IM_CONTEXT_IIIM))
00055 #define GTK_IM_CONTEXT_IIIM_GET_CLASS(obj)    (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_IM_CONTEXT_IIIM, GtkIMContextIIIMClass))
00056 
00057 typedef struct _GtkIMContextIIIM       GtkIMContextIIIM;
00058 typedef struct _GtkIMContextIIIMClass  GtkIMContextIIIMClass;
00059 
00060 typedef struct _GtkIIIMInfo GtkIIIMInfo;
00061 
00062 typedef struct _SwitcherInfo SwitcherInfo;
00063 typedef struct _SwitcherContext SwitcherContext;
00064 typedef struct _StatusWindow StatusWindow;
00065 
00066 struct _GtkIMContextIIIM
00067 {
00068   GtkIMContext object;
00069   GtkIMContext *slave;
00070 
00071   GtkIIIMInfo *iiim_info;
00072   GdkWindow *client_window;
00073   GtkWidget *client_widget;
00074 
00075   /* The status window for this input context; we claim the
00076    * status window when we are focused and have created an XIC
00077    */
00078   StatusWindow *status_window;
00079 
00080   SwitcherContext *switcher_context; /* per context */
00081 
00082   gchar *current_language;
00083 
00084   IIIMCF_context context;
00085   IIIMCF_lookup_choice lookup_choice;
00086 
00087   GtkWidget *candidate;
00088   GdkRectangle cursor;
00089   GSList *keylist;
00090   GdkEventKey  saved_key;
00091 
00092   guint candidate_start :1;
00093   guint use_preedit : 1;
00094   guint finalizing : 1;
00095   guint in_toplevel : 1;
00096   guint has_focus : 1;
00097 
00098   struct _aux *aux;
00099 };
00100 
00101 struct _GtkIMContextIIIMClass
00102 {
00103   GtkIMContextClass parent_class;
00104 };
00105 
00106 #define TRIGGER_KEY_LABEL "TRIGGER KEYS"
00107 
00108 void im_context_iiim_register_type (GTypeModule *type_module);
00109 GtkIMContext *im_context_iiim_new (void);
00110 
00111 void im_context_iiim_shutdown (void);
00112 
00113 extern void im_context_initialize_with_input_language (GtkIMContextIIIM *context_iiim,
00114                                                  gchar *new_lang);
00115 extern void im_context_change_conversion_mode (GtkIMContextIIIM *context_iiim,
00116                                           gchar *conv_mode);
00117 extern SwitcherInfo* im_info_get_switcher_info (GtkIIIMInfo *info);
00118 extern void im_info_set_switcher_info (GtkIIIMInfo *info, SwitcherInfo *sw_info);
00119 extern GdkScreen *im_info_get_screen (GtkIIIMInfo *info);
00120 extern IIIMCF_handle im_info_get_handle (GtkIIIMInfo *info);
00121 
00122 extern void im_context_aux_set_values (GtkIMContextIIIM *context_iiim,
00123                                    IIIMCF_event ev);
00124 extern void im_context_aux_get_values (GtkIMContextIIIM *context_iiim,
00125                                    IIIMCF_event ev);
00126 G_END_DECLS
00127 
00128 #endif
00129 
00130 /* Local Variables: */
00131 /* c-file-style: "gnu" */
00132 /* End: */