home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / doc / uim-common / HELPER-CANDWIN < prev    next >
Encoding:
Text File  |  2008-10-19  |  3.9 KB  |  136 lines

  1. To separate GUI toolkit dependent part from independent part, uim-xim
  2. uses external helper program to show candidate selection window.  This
  3. file describes communication protocol between uim-xim and its helper
  4. program .
  5.  
  6. uim-candwin-[xaw|gtk|qt] is executed from uim-xim and receives/sends
  7. messages via pipe.
  8.  
  9.                message
  10.   +-------+ ------------>  +--------------+
  11.   |uim-xim|    (pipe)      |HELPER-CANDWIN|
  12.   +-------+ <------------  +--------------+
  13.                message
  14.  
  15. Recieving Message format BNF
  16.   session  = messages
  17.   messages = messages message | message
  18.   message  = (activate   |
  19.           select     |
  20.           move       |
  21.           show       |
  22.           hide       |
  23.           deactivate |
  24.           set_nr_candidates |
  25.           set_page_candidates |
  26.           show_page  |
  27.           show_caret_state |
  28.           update_caret_state |
  29.           hide_caret_state) "\n"
  30.   charset_specifier = "charset=" charset "\n"
  31.   charset = "UTF-8" | "EUC-JP" | "GB18030" |
  32.             <or any name that can be specified as iconv_open(3) argument>
  33.   str = str <any characters except for '\0', '\t', or '\n'> | ""
  34.   num = /[0-9]+/
  35.  
  36.   1. activate
  37.    Activating the candidate window with display_limit value,
  38.    and add heading labels and candidates to it. The order of
  39.    candidates must be as is.
  40.  
  41.    activate = "activate" "\n" label
  42.    label = charset_specifier display_limit_str "\n" candidate_strs
  43.    display_limit_str = display_limit_label num
  44.    display_limit_label = "display_limit="
  45.    candidate_strs = candidate_str candidate_str candidate_str ....
  46.    candidate_str = cand_head "\t" cand_candidate "\n"
  47.    cand_head = str
  48.    cand_candidate = str
  49.  
  50.   2. select
  51.     Selecting the specified candidate in helper-candwin window.
  52.  
  53.     select = "select" "\n" num "\n"
  54.  
  55.   3. move
  56.     Moving the helper-candwin window.
  57.  
  58.     move = "move" "\n" XPos "\n" YPos "\n"
  59.     XPos = num
  60.     YPos = num
  61.  
  62.   4. show
  63.     Showing the candidate window
  64.  
  65.     show = "show" "\n"
  66.  
  67.   5. hide
  68.     Hide the candidate window
  69.  
  70.     hide = "hide" "\n"
  71.  
  72.   6. deactivate
  73.     Deactivating the candidate window
  74.  
  75.     deactivate = "deactivate" "\n"
  76.  
  77.   7. set_nr_candidates
  78.     Activating the candidate window with nr_cands and display_limit
  79.     value.  This can be used as a replacement of 'activate' message in
  80.     combination with following 'set_page_candidates' and 'show_page'
  81.     message for the efficient candidate page handling.
  82.  
  83.     activate = "set_nr_candidates" "\n" nr_cands "\n" display_limit "\n"
  84.     nr_cands = num
  85.     display_limit = num
  86.  
  87.   8. set_page_candidates
  88.     Set heading labels and candidates to the selected page of the
  89.     candidate window. The order of candidates must be as is.
  90.  
  91.     set_page_candidates = "set_page_candidates" "\n" label
  92.     label = charset_specifier page_str "\n" candidate_strs
  93.     page_str = page_label num
  94.     page_label = "page="
  95.     candidate_strs = candidate_str candidate_str candidate_str ....
  96.     candidate_str = cand_head "\t" cand_candidate "\n"
  97.     cand_head = str
  98.     cand_candidate = str
  99.  
  100.   9. show_page
  101.     Selecting the specified page of the candidate window.
  102.  
  103.     show_page = "show_page" "\n" num "\n"
  104.  
  105.   10. show_caret_state
  106.     Show caret state of the input mode
  107.  
  108.     show_caret_state = "show_caret_state" "\n" timeout "\n" caret_state "\n"
  109.     timeout = num
  110.     caret_state = str
  111.  
  112.   11. update_caret_state
  113.     Update caret state of the input mode
  114.  
  115.     update_caret_state = "update_caret_state" "\n"
  116.  
  117.   12. hide_caret_state
  118.     Hide caret state of the input mode
  119.  
  120.     hide_caret_state = "hide_caret_state" "\n"
  121.  
  122. Sending Message format BNF
  123.   session  = messages
  124.   messages = messages message | message
  125.   message  = ( index ) "\n"
  126.   charset_specifier = "charset=" charset "\n"
  127.   charset = "UTF-8" | "EUC-JP" | "GB18030" |
  128.             <or any name that can be specified as iconv_open(3) argument>
  129.   str = str <any characters except for '\0', '\t' or '\n'> | ""
  130.   num = /[0-9]+/
  131.  
  132.   1. index
  133.     Sending index of selected candidate with mouse pointer to uim-xim.
  134.  
  135.     index = "index" "\n" num "\n"
  136.