]> Pileus Git - ~andy/gtk/blobdiff - modules/input/imcedilla.c
printing: Don't load custom paper sizes in file backend
[~andy/gtk] / modules / input / imcedilla.c
index 34c2336ba23c82d5ac687812649307deadc12b89..9b230f4227d04cc00d62c62a4ba1a3c6ed110ca1 100644 (file)
  * 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/>.
  *
  * Author: Owen Taylor <otaylor@redhat.com>
  *
  */
 
+#include "config.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_cedilla = 0;
 
@@ -36,7 +36,7 @@ static void cedilla_init (GtkIMContextSimple *im_context);
 static void
 cedilla_register_type (GTypeModule *module)
 {
-  static const GTypeInfo object_info =
+  const GTypeInfo object_info =
   {
     sizeof (GtkIMContextSimpleClass),
     (GBaseInitFunc) NULL,
@@ -63,12 +63,12 @@ cedilla_register_type (GTypeModule *module)
  * used extensively.
  */
 static guint16 cedilla_compose_seqs[] = {
-  GDK_dead_acute,      GDK_C,  0,      0,      0,      0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
-  GDK_dead_acute,      GDK_c,  0,      0,      0,      0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
-  GDK_Multi_key,       GDK_apostrophe, GDK_C,  0,      0,      0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
-  GDK_Multi_key,       GDK_apostrophe, GDK_c,  0,      0,      0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
-  GDK_Multi_key,       GDK_C,  GDK_apostrophe, 0,      0,      0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
-  GDK_Multi_key,       GDK_c,  GDK_apostrophe, 0,      0,      0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
+  GDK_KEY_dead_acute,  GDK_KEY_C,      0,      0,      0,      0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
+  GDK_KEY_dead_acute,  GDK_KEY_c,      0,      0,      0,      0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
+  GDK_KEY_Multi_key,   GDK_KEY_apostrophe,     GDK_KEY_C,  0,      0,      0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
+  GDK_KEY_Multi_key,   GDK_KEY_apostrophe,     GDK_KEY_c,  0,      0,      0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
+  GDK_KEY_Multi_key,   GDK_KEY_C,  GDK_KEY_apostrophe, 0,      0,      0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
+  GDK_KEY_Multi_key,   GDK_KEY_c,  GDK_KEY_apostrophe, 0,      0,      0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
 };
 
 static void
@@ -88,39 +88,41 @@ cedilla_init (GtkIMContextSimple *im_context)
 static const GtkIMContextInfo cedilla_info = { 
   "cedilla",                      /* ID */
   N_("Cedilla"),                   /* Human readable name */
-  "gtk+",                         /* Translation domain */
-   GTK_LOCALEDIR,                 /* Dir for bindtextdomain (not strictly needed for "gtk+") */
-  "fr:pt"                         /* Languages for which this module is the default */
+  GETTEXT_PACKAGE,                /* Translation domain */
+  GTK_LOCALEDIR,                  /* Dir for bindtextdomain */
+  "az:ca:co:fr:gv:oc:pt:sq:tr:wa"  /* Languages for which this module is the default */
 };
 
 static const GtkIMContextInfo *info_list[] = {
   &cedilla_info
 };
 
-void
-im_module_init (GTypeModule *module)
+#ifndef INCLUDE_IM_cedilla
+#define MODULE_ENTRY(type, function) G_MODULE_EXPORT type im_module_ ## function
+#else
+#define MODULE_ENTRY(type, function) type _gtk_immodule_cedilla_ ## function
+#endif
+
+MODULE_ENTRY (void, init) (GTypeModule *module)
 {
   cedilla_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, "cedilla") == 0)
-    return GTK_IM_CONTEXT (g_object_new (type_cedilla, NULL));
+    return g_object_new (type_cedilla, NULL);
   else
     return NULL;
 }