To separate GUI toolkit dependent part from independent part, uim-xim
uses external helper program to show candidate selection window.  This
file describes communication protocol between uim-xim and its helper
program .

uim-candwin-[xaw|gtk|qt] is executed from uim-xim and receives/sends
messages via pipe.

               message
  +-------+ ------------>  +--------------+
  |uim-xim|    (pipe)      |HELPER-CANDWIN|
  +-------+ <------------  +--------------+
               message

Recieving Message format BNF
  session  = messages
  messages = messages message | message
  message  = (activate   |
	      select     |
	      move       |
	      show       |
	      hide       |
	      deactivate |
	      show_caret_state |
	      update_caret_state |
	      hide_caret_state) "\n"
  charset_specifier = "charset=" charset "\n"
  charset = "UTF-8" | "EUC-JP" | "GB18030" |
            <or any name that can be specified as iconv_open(3) argument>
  str = str <any characters except for '\0', '\t', or '\n'> | ""
  num = /[0-9]+/

  1. activate
   Activating the candidate window with display_limit value,
   and add heading labels and candidates to it. The order of
   candidates must be as is.

   activate = "activate" "\n" label
   label = charset_specifier display_limit_str "\n" candidate_strs
   display_limit_str = display_limit_label num
   display_limit_label = "display_limit"
   candidate_strs = candidate_str candidate_str candidate_str ....
   candidate_str = cand_head "\t" cand_candidate "\n"
   cand_head = str
   cand_candidate = str

  2. select
    Selecting the specified candidate in helper-candwin window.

    select = "select" "\n" num "\n"

  3. move
    Moving the helper-candwin window.

    move = "move" "\n" XPos "\n" YPos "\n"
    XPos = num
    YPos = num

  4. show
    Showing the candidate window

    show = "show" "\n"

  5. hide
    Hide the candidate window

    hide = "hide" "\n"

  6. deactivate
    Deactivating the candidate window

    deactivate = "deactivate" "\n"

  7. show_caret_state
    Show caret state of the input mode

    show_caret_state = "show_caret_state" "\n" timeout "\n" caret_state "\n"
    timeout = num
    caret_state = str

  8. update_caret_state
    Update caret state of the input mode

    update_caret_state = "update_caret_state" "\n"

  9. hide_caret_state
    Hide caret state of the input mode

    hide_caret_state = "hide_caret_state" "\n"

Sending Message format BNF
  session  = messages
  messages = messages message | message
  message  = ( index ) "\n"
  charset_specifier = "charset=" charset "\n"
  charset = "UTF-8" | "EUC-JP" | "GB18030" |
            <or any name that can be specified as iconv_open(3) argument>
  str = str <any characters except for '\0', '\t' or '\n'> | ""
  num = /[0-9]+/

  1. index
    Sending index of selected candidate with mouse pointer to uim-xim.

    index = "index" "\n" num "\n"
