Author: yamakenz
Date: Sat Dec 29 05:09:51 2007
New Revision: 5069

Modified:
  trunk/doc/COMPATIBILITY
  trunk/uim/uim.c
  trunk/uim/uim.h

Log:
* uim/uim.h
 - (uim_set_client_encoding): New function decl
* uim/uim.c
 - (uim_set_client_encoding): New function
* doc/COMPATIBILITY
 - Add section "New API for client encoding change"


Modified: trunk/doc/COMPATIBILITY
==============================================================================
--- trunk/doc/COMPATIBILITY     (original)
+++ trunk/doc/COMPATIBILITY     Sat Dec 29 05:09:51 2007
@@ -57,6 +57,23 @@

The changes are described below in most recently updated order.
------------------------------------------------------------------------------
+Summary: New API for client encoding change
+Affects: bridge developers
+Updates: C API, libuim ABI
+Version: 1.5.0
+Revision: ac5069
+Date: 2007-12-29
+Modifier: Etsushi, YamaKen
+Related: bug #13622
+URL:
+Changes:
+      (new) uim_set_client_encoding()
+Description:
+  Some bridges such as uim.el need to change its client-side encoding
+  in response to an IM-side encoding change caused by an IM-switching
+  and notified via the configuration_changed callback. This API
+  provides the proper way for it.
+------------------------------------------------------------------------------
Summary: uim-scm API truth predicates reorganization in uim 1.5.0
Affects: uim developers, IM developers
Updates: C API (uim-scm), libuim ABI

Modified: trunk/uim/uim.c
==============================================================================
--- trunk/uim/uim.c     (original)
+++ trunk/uim/uim.c     Sat Dec 29 05:09:51 2007
@@ -559,6 +559,22 @@
 * Optional APIs                                                *
 ****************************************************************/
void
+uim_set_client_encoding(uim_context uc, const char *encoding)
+{
+  if (UIM_CATCH_ERROR_BEGIN())
+    return;
+
+  assert(uim_scm_gc_any_contextp());
+  assert(uc);
+  assert(encoding);
+
+  free(uc->client_encoding);
+  uc->client_encoding = uim_strdup(encoding);
+
+  UIM_CATCH_ERROR_END();
+}
+
+void
uim_set_configuration_changed_cb(uim_context uc,
                                 void (*changed_cb)(void *ptr))
{

Modified: trunk/uim/uim.h
==============================================================================
--- trunk/uim/uim.h     (original)
+++ trunk/uim/uim.h     Sat Dec 29 05:09:51 2007
@@ -578,6 +578,15 @@
int
uim_release_key(uim_context uc, int key, int state);

+/**
+ * Change client encoding of an input context.
+ *
+ * @param uc input context
+ * @param encoding client encoding name
+ *
+ * @see uim_create_context
+ */
+void uim_set_client_encoding(uim_context uc, const char *encoding);


/* im list */

Reply via email to