[openi18n-im:01551] Re: merge if_GetHotKeyInfo() to if_GetIfInfo()

Federic Zhang <[email protected]> Mon, 10 Oct 2005 11:16:23 +0800
Newsgroups gmane.comp.internationalization.input-methods
Message-ID <[email protected]>
Kasha,

It's right action.

-federic

>Hi all,
>
>I've committed the attached change to merge if_GetHotKeyInfo()
>to if_GetIfInfo().  Please let me know if you have any concern.
>
>Best regards,
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> rev 2842
> From:
> AShiZaWa KaZuNoRi <[email protected]>
> Date:
> Fri, 7 Oct 2005 19:03:33 +0900 (JST)
> To:
> [email protected]
>
> To:
> [email protected]
>
>
>------------------------------------------------------------------------
>r2842 | kasha | 2005-10-07 19:00:47 +0900 (Fri, 07 Oct 2005) | 6 lines
>Changed paths:
>   M /trunk/iiimsf/lib/iml/ChangeLog
>   M /trunk/iiimsf/lib/iml/SunIMConf.c
>   M /trunk/include/ChangeLog
>   M /trunk/include/iml/SunIMMthd.h
>   M /trunk/leif/unit/ChangeLog
>   M /trunk/leif/unit/leif/le.c
>
>Merge if_GetHotKeyInfo to if_GetInfo so that LE need not export
>two symbols.  iiimd now gets if_GetHotKeyInfo function via
>if_GetInfo() with IF_HOTKEY_INFO IF_Attribute.  For
>compatibility, iiimd still looks up if_GetHotKeyInfo symbol.
>
>
>------------------------------------------------------------------------
>Index: leif/unit/leif/le.c
>===================================================================
>--- leif/unit/leif/le.c	(revision 2841)
>+++ leif/unit/leif/le.c	(revision 2842)
>@@ -182,6 +182,9 @@
> 	  case IF_NEED_THREAD_LOCK:
> 	   args->value = (IMArgVal) True;
> 	   break;
>+	  case IF_HOTKEY_INFO:
>+	   args->value = (IMArgVal) if_GetHotKeyInfo;
>+	   break;
> 	  default:
> 	   break;
> 	}
>Index: leif/unit/ChangeLog
>===================================================================
>--- leif/unit/ChangeLog	(revision 2841)
>+++ leif/unit/ChangeLog	(revision 2842)
>@@ -1,3 +1,8 @@
>+2005-10-07  AShiZaWa KaZuNoRi  <[email protected]>
>+
>+	* leif/le.c (if_GetIfInfo): set if_GetHotKeyInfo for
>+	IF_HOTKEY_INFO request.
>+
> 2005-09-06  AShiZaWa KaZuNoRi  <[email protected]>
> 
> 	* leif/key_event.c:  include <alloca.h>
>Index: iiimsf/lib/iml/SunIMConf.c
>===================================================================
>--- iiimsf/lib/iml/SunIMConf.c	(revision 2841)
>+++ iiimsf/lib/iml/SunIMConf.c	(revision 2842)
>@@ -156,7 +156,8 @@
> #ifdef ENABLE_EIMIL
>   int if_EIMIL_handle_idx;
> #endif
>-  IMArg p[11] ; /* XXX FIXME Magic number */
>+  int if_hotkey_idx;
>+  IMArg p[12] ; /* XXX FIXME Magic number */
>     
> #ifndef	WIN32
>   get_le_info = (void *(*) ()) dlsym(module, PROCNAME);
>@@ -185,6 +186,7 @@
> #endif
>   IMSetArg(p[count], IF_SUPPORTED_KEYRELEASE, NULL); if_keyrelease_idx = count++;
>   IMSetArg(p[count], IF_SUPPORTED_IMEINFO, NULL); if_imeinfo_idx = count++;
>+  IMSetArg(p[count], IF_HOTKEY_INFO, NULL); if_hotkey_idx = count++;
> 
>   (*get_le_info) (p, count);
>     
>@@ -198,7 +200,11 @@
>   If->imeinfo_list = (IMEInfo *) p[if_imeinfo_idx].value;
> 
>   /* hotkey infomation */
>-  get_hotkey_info = (void *(*) ()) dlsym(module, HOTKEY_PROCNAME);
>+
>+  get_hotkey_info = (void *(*)())p[if_hotkey_idx].value;
>+  if (NULL == get_hotkey_info) {
>+    get_hotkey_info = (void *(*) ()) dlsym(module, HOTKEY_PROCNAME);
>+  }
>   if (get_hotkey_info) {
>     If->hkm = (*get_hotkey_info)(If->lename);
>   } else
>Index: iiimsf/lib/iml/ChangeLog
>===================================================================
>--- iiimsf/lib/iml/ChangeLog	(revision 2841)
>+++ iiimsf/lib/iml/ChangeLog	(revision 2842)
>@@ -1,3 +1,10 @@
>+2005-10-07  AShiZaWa KaZuNoRi  <[email protected]>
>+
>+	* SunIMConf.c (get_ifinfo): merge if_GetHotKeyInfo to if_GetInfo.
>+	iiimd now gets if_GetHotKeyInfo function via if_GetInfo() with
>+	IF_HOTKEY_INFO IF_Attribute.  For compatibility, iiimd still looks
>+	up if_GetHotKeyInfo symbol.
>+
> 2005-10-04  AShiZaWa KaZuNoRi  <[email protected]>
> 
> 	* SunIM.c: disable obsolete ns code with
>Index: include/iml/SunIMMthd.h
>===================================================================
>--- include/iml/SunIMMthd.h	(revision 2841)
>+++ include/iml/SunIMMthd.h	(revision 2842)
>@@ -434,8 +434,11 @@
> 
> 	/* LE extension */
> 	IF_SUPPORTED_KEYRELEASE,
>-	IF_SUPPORTED_IMEINFO
>+	IF_SUPPORTED_IMEINFO,
> 
>+	/* HOTKEY */
>+	IF_HOTKEY_INFO
>+
> }   IF_Attribute;
> 
> typedef enum {
>Index: include/ChangeLog
>===================================================================
>--- include/ChangeLog	(revision 2841)
>+++ include/ChangeLog	(revision 2842)
>@@ -1,3 +1,8 @@
>+2005-10-07  AShiZaWa KaZuNoRi  <[email protected]>
>+
>+	* iml/SunIMMthd.h (IF_Attribute): add IF_HOTKEY_INFO for
>+	if_GetHotKeyInfo.
>+
> 2005-10-04  AShiZaWa KaZuNoRi  <[email protected]>
> 
> 	* iiimp/iiimp-data.h: disable obsolete ns code with
>  
>