]> Pileus Git - ~andy/gtk/blobdiff - modules/input/imti-er.c
stylecontext: Do invalidation on first resize container
[~andy/gtk] / modules / input / imti-er.c
index c0c65e64116c04522b39802b994db1e12228e0a4..ec1af41afb13d361616fa3edfd46159b68b48bb2 100644 (file)
@@ -13,9 +13,7 @@
  * Library General Public License for more details.
  *
  * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  *
  * Original author: Owen Taylor <otaylor@redhat.com>
  * 
  *
  */
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 
-#include <gdk/gdkkeysyms.h>
+#include "gtk/gtk.h"
+#include "gdk/gdkkeysyms.h"
 
-#include "gtk/gtkintl.h"
-#include "gtk/gtkimcontextsimple.h"
 #include "gtk/gtkimmodule.h"
+#include "gtk/gtkintl.h"
 
 GType type_ti_er_translit = 0;
 
@@ -42,7 +41,7 @@ static void ti_er_init (GtkIMContextSimple *im_context);
 static void
 ti_er_register_type (GTypeModule *module)
 {
-  static const GTypeInfo object_info =
+  const GTypeInfo object_info =
   {
     sizeof (GtkIMContextSimpleClass),
     (GBaseInitFunc) NULL,
@@ -139,8 +138,8 @@ ti_er_register_type (GTypeModule *module)
 static guint16 ti_er_compose_seqs[] = {
   /* do punctuation and numerals here */
 
-  '\'',   0, 0, 0, 0, 0, GDK_dead_grave,  /* hopefully this has no side effects */
-  '\'', '\'', 0, 0, 0, 0, GDK_apostrophe,
+  '\'',   0, 0, 0, 0, 0, GDK_KEY_dead_grave,  /* hopefully this has no side effects */
+  '\'', '\'', 0, 0, 0, 0, GDK_KEY_apostrophe,
   '\'', '1', 0, 0, 0, 0, 0x1369,
   '\'', '1', '0', 0, 0, 0, 0x1372,
   '\'', '1', '0', '0', 0, 0, 0x137b,
@@ -429,8 +428,8 @@ static guint16 ti_er_compose_seqs[] = {
   SYLW('x', 0x1238)
   SYL('y', 0x12e8)
   SYLW('z', 0x12d8)
-  GDK_Shift_L, GDK_space, 0, 0, 0, 0, 0x1361,
-  GDK_Shift_R, GDK_space, 0, 0, 0, 0, 0x1361,
+  GDK_KEY_Shift_L, GDK_KEY_space, 0, 0, 0, 0, 0x1361,
+  GDK_KEY_Shift_R, GDK_KEY_space, 0, 0, 0, 0, 0x1361,
 };
 
 static void
@@ -450,7 +449,7 @@ ti_er_init (GtkIMContextSimple *im_context)
 static const GtkIMContextInfo ti_er_info = { 
   "ti_er",                /* ID */
   N_("Tigrigna-Eritrean (EZ+)"),         /* Human readable name */
-  "gtk+",                 /* Translation domain */
+  GETTEXT_PACKAGE,        /* Translation domain */
    GTK_LOCALEDIR,         /* Dir for bindtextdomain (not strictly needed for "gtk+") */
   "ti"                    /* Languages for which this module is the default */
 };
@@ -459,30 +458,32 @@ static const GtkIMContextInfo *info_list[] = {
   &ti_er_info
 };
 
-void
-im_module_init (GTypeModule *module)
+#ifndef INCLUDE_IM_ti_er
+#define MODULE_ENTRY(type, function) G_MODULE_EXPORT type im_module_ ## function
+#else
+#define MODULE_ENTRY(type, function) type _gtk_immodule_ti_er_ ## function
+#endif
+
+MODULE_ENTRY (void, init) (GTypeModule *module)
 {
   ti_er_register_type (module);
 }
 
-void 
-im_module_exit (void)
+MODULE_ENTRY (void, exit) (void)
 {
 }
 
-void 
-im_module_list (const GtkIMContextInfo ***contexts,
-               int                      *n_contexts)
+MODULE_ENTRY (void, list) (const GtkIMContextInfo ***contexts,
+                          int                      *n_contexts)
 {
   *contexts = info_list;
   *n_contexts = G_N_ELEMENTS (info_list);
 }
 
-GtkIMContext *
-im_module_create (const gchar *context_id)
+MODULE_ENTRY (GtkIMContext *, create) (const gchar *context_id)
 {
   if (strcmp (context_id, "ti_er") == 0)
-    return GTK_IM_CONTEXT (g_object_new (type_ti_er_translit, NULL));
+    return g_object_new (type_ti_er_translit, NULL);
   else
     return NULL;
 }