[Uim] Suggestion: Renaming new API functions

YamaKen yamaken at bp.iij4u.or.jp
Tue Sep 28 17:21:23 EEST 2004


Hi Hiroyuki,

I would like to rename some new API functions that you had added
for upcoming release. Please try to understand my fearing. I'm
sorry for too late suggestion.

- uim_get_current_im_name(uc)

  This function name and the description in the comment
  indicates that 'this function returns the im-name of the
  context currently selected in the system'. But it's not
  truth. The function performs 'returns the im-name of the
  context PASSED AS ARGUMENT'. This difference will cause
  serious misunderstanding to API users. In fact, I had
  misunderstood.

  So I suggest an accurate name uim_get_im_name_of_context().


- uim_change_input_method_engine()

  This function should be renamed to uim_switch_im() since:

  1. All other IM-management APIs use 'im' as the name to
     represent 'input_method_engine'. This function should also
     use 'im' for consistency.
 
  2. The GUI tool uim-im-switcher already exists. So this
     function should also use the name 'switch' to consistently
     express the feature and indicate explicit relation with the
     tool.


In addition, I would also like to reorder arguments of a Scheme
procedure.

- register-im

  The new argument 'short-desc' had recently been added to the
  procedure as follows, but I think that the inserted position
  is inappropriate.

  (register-im name lang short-desc encoding init-arg init-handler ...)

  I felt that 'short-desc' has slashed 'lang' and 'encoding'
  unnaturally. What I felt is detailed as follows.

  * 'name', 'lang' and 'encoding' are primary attribute of IM,
    so it should be listed first and undivided

  * 'short-desc' is an auxiliary attribute of IM. Its
    variable-length string will sometimes give strange visual
    impression different from other argument groups.

  So I would like to change the ordering as follows. It does not
  slashing neither primary attributes nor handlers.

  (register-im name lang encoding short-desc init-arg init-handler ...)


Hiroyuki, what do you think about these issues? I would perform
all change if my opinion has been agreed with.

-------------------------------
YamaKen  yamaken at bp.iij4u.or.jp



More information about the uim mailing list