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) "\n" "\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

  3. move
    Moving the helper-candwin window.

    move = "move" "\n" XPos "\n" YPos
    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"

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\n"
