API of uim

libuim contains following two types functionality
 (1)uim core
 (2)uim helper
uim core handles key events, mode switching, input method
enumeration, candidate lookup and so on. On the other hand,
uim helper handles status shareing on the desktop.

Core Library
 Functions
  uim_init()
  uim_create_context()
  uim_set_preedit_cb()
  uim_release_context()
  uim_reset_context()
  uim_get_nr_im()
  uim_get_im_name()
  uim_get_im_language()
  uim_press_key()
  uim_release_key()
  uim_get_nr_modes()
  uim_get_mode_name()
  uim_set_mode_list_update_cb()
  uim_prop_list_update()
  uim_prop_label_update()
  uim_set_prop_list_update_cb()
  uim_set_prop_label_update_cb()
  uim_prop_activate()
  uim_get_current_mode()
  uim_set_mode()
  uim_set_mode_cb()
  uim_set_candidate_cb()
  uim_get_candidate()
  uim_get_candidate_index()
  uim_set_candidate_index()
Helper Library
  uim_helper_init_client_fd()
  uim_helper_close_client_fd();
  uim_helper_client_focus_in();
  uim_helper_client_focus_out();
  uim_helper_client_get_prop_list()
  uim_helper_read_proc()
  uim_helper_get_message()
  uim_helper_send_message()


--------------------------------functions--------------------------------
(note)
 Call back functions can be called asynchronously. However,
 they can not be called if other call back function is running.


int uim_init(void)
 arguments: void
 return value: 0 on success, otherwise -1
 description:
  Initialize uim library.
  Initialize and allocate resources to start input.
  This function must be called before any other uim functions
  are called. If this function is called when uim is already
  initialized, the call has no effect.


void uim_quit(void)
 arguments: void
 return value: void
 description:
  Finalize uim library. Free all resources allocated by uim.


uim_context uim_create_context(void *ptr, char *enc,
                               char *lang, char *engine,
                               void (*commit_cb)(void *ptr, char *str))
 arguments: ptr
            enc
            lang
            engine
            commit_cb
 return value: uim_context
 desctiption:
  Create input context.
  *[ptr] is a cookie value which is passed as an argument of uim's
   call back functions.
  *[enc] name of encoding, say "UTF-8"
  *[lang],[engine] 
  *[commit_cb] is a call back function. It is called when there
   comes some string to commit. 1st argument of this call back
   function is the value passed by the uim_create_context call.
   2nd argument is the string commited.
