Back to index

im-sdk  12.3.91
imiiim.c
Go to the documentation of this file.
00001 /* GTK - The GIMP Toolkit
00002  * Copyright (C) 2000 Red Hat Software
00003  * Copyright (C) 2003 Motonobu Ichimura
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the
00017  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018  * Boston, MA 02111-1307, USA.
00019  */
00020 
00021 /* $Id: imiiim.c,v 1.3 2003/11/18 04:12:01 tajima Exp $ */
00022 
00023 #include <config.h>
00024 #include "gtk/gtkimmodule.h"
00025 #include "gtkimcontextiiim.h"
00026 #include <string.h>
00027 
00028 static const GtkIMContextInfo iiim_info = { 
00029   "iiim",                       /* ID */
00030   N_("Internet/Intranet Input Method"), /* Human readable name */
00031   GETTEXT_PACKAGE,             /* Translation domain */
00032   IIIMGCFLOCALEDIR,            /* Dir for bindtextdomain */
00033   ""                            /* Languages for which this module is the default */
00034 };
00035 
00036 static const GtkIMContextInfo *info_list[] = {
00037   &iiim_info
00038 };
00039 
00040 void
00041 im_module_init (GTypeModule *type_module)
00042 {
00043   im_context_iiim_register_type (type_module);
00044 }
00045 
00046 void 
00047 im_module_exit (void)
00048 {
00049   im_context_iiim_shutdown ();
00050 }
00051 
00052 void 
00053 im_module_list (const GtkIMContextInfo ***contexts,
00054               int                      *n_contexts)
00055 {
00056   *contexts = info_list;
00057   *n_contexts = G_N_ELEMENTS (info_list);
00058 }
00059 
00060 GtkIMContext *
00061 im_module_create (const gchar *context_id)
00062 {
00063   if (strcmp (context_id, "iiim") == 0)
00064     return im_context_iiim_new ();
00065   else
00066     return NULL;
00067 }
00068 
00069 /* Local Variables: */
00070 /* c-file-style: "gnu" */
00071 /* End: */