Add G_GNUC_DEPRECATED mark on ibus_keymap_new
authorPeng Huang <shawn.p.huang@gmail.com>
Mon, 1 Feb 2010 05:02:28 +0000 (13:02 +0800)
committerPeng Huang <shawn.p.huang@gmail.com>
Mon, 1 Feb 2010 05:02:28 +0000 (13:02 +0800)
src/ibuskeymap.c
src/ibuskeymap.h

index 6abade0..b9fb725 100644 (file)
@@ -230,6 +230,12 @@ _keymap_destroy_cb (IBusKeymap *keymap,
 }
 
 IBusKeymap *
+ibus_keymap_new (const gchar *name)
+{
+    return ibus_keymap_get (name);
+}
+
+IBusKeymap *
 ibus_keymap_get (const gchar *name)
 {
     g_assert (name != NULL);
index a0b3edc..34d2654 100644 (file)
@@ -103,6 +103,22 @@ struct _IBusKeymapClass {
 GType            ibus_keymap_get_type               (void);
 
 /**
+ * ibus_keymap_new:
+ * @name: The keymap file to be loaded, such as 'us', 'jp'.
+ * @returns: An IBusKeymap associated with the giving name; or NULL if failed.
+ *
+ * Get an IBusKeymap associated with the giving name.
+ *
+ * This function loads the keymap file specified in @name
+ * in the IBUS_DATA_DIR/keymaps directory.
+ *
+ * Deprecated: This function has been deprecated and should
+ * not be used in newly written code. Please use ibus_keymap_get().
+ */
+IBusKeymap        *ibus_keymap_new                  (const gchar        *name)
+    G_GNUC_DEPRECATED;
+
+/**
  * ibus_keymap_get:
  * @name: The keymap file to be loaded, such as 'us', 'jp'.
  * @returns: An IBusKeymap associated with the giving name; or NULL if failed.