chrome/os/nacl-hangul/js/ime.js
/**
 * Hangul IME with IME extension API based on Native Client and libhangul.
 *
 * @constructor
 */
Hangul IME with IME extension API based on Native Client and libhangul.
@constructor
Hangul IME with IME extension API based on Native Client and libhangul . @constructor
function HangulIme() {
  this.context_ = null;
  this.engineID_ = '';
  this.candidateWindowVertical_ = true;
  this.candidateWindowPageSize_ = 10;
  this.inputText_ = '';
  this.commitText_ = null;
  this.hangul_ = '';
  this.hangulLengths_ = [];
  this.segment_ = null;
  this.cursor_ = 0;
  this.state_ = HangulIme.State.RESET;
  this.autoHanjaConversion_ = false;
  this.naclModule_ = null;
  this.ignoreKeySet_ = {};
  var ignoreKeys = [{
    'key': 'ChromeOSSwitchWindow',
    'ctrlKey': true
  }, {
    'key': 'ChromeOSSwitchWindow',
    'ctrlKey': true,
    'shiftKey': true
  }];
  for (var i = 0; i < ignoreKeys.length; i++) {
    this.ignoreKeySet_[this.stringifyKeyAndModifiers_(ignoreKeys[i])] = true;
  }
  this.menuItems_ = [{
    'id': HangulIme.Menu.HANGUL_MODE,
    'label': 'Hangul Mode',
    'style': 'radio',
    'checked': true
  }, {
    'id': HangulIme.Menu.HANJA_MODE,
    'label': 'Hanja Mode',
    'style': 'radio',
    'checked': false
  }];
  this.currentKeyboard_ = HangulIme.keyboardLayouts[0];
  this.clear_();
}
function HangulIme ( ) { this . context_ = null ; this . engineID_ = '' ; this . candidateWindowVertical_ = true ; this . candidateWindowPageSize_ = 10 ; this . inputText_ = '' ; this . commitText_ = null ; this . hangul_ = '' ; this . hangulLengths_ = [ ] ; this . segment_ = null ; this . cursor_ = 0 ; this . state_ = HangulIme . State . RESET ; this . autoHanjaConversion_ = false ; this . naclModule_ = null ; this . ignoreKeySet_ = { } ; var ignoreKeys = [ { 'key' : 'ChromeOSSwitchWindow' , 'ctrlKey' : true } , { 'key' : 'ChromeOSSwitchWindow' , 'ctrlKey' : true , 'shiftKey' : true } ] ; for ( var i = 0 ; i < ignoreKeys . length ; i ++ ) { this . ignoreKeySet_ [ this . stringifyKeyAndModifiers_ ( ignoreKeys [ i ] ) ] = true ; } this . menuItems_ = [ { 'id' : HangulIme . Menu . HANGUL_MODE , 'label' : 'Hangul Mode' , 'style' : 'radio' , 'checked' : true } , { 'id' : HangulIme . Menu . HANJA_MODE , 'label' : 'Hanja Mode' , 'style' : 'radio' , 'checked' : false } ] ; this . currentKeyboard_ = HangulIme . keyboardLayouts [ 0 ] ; this . clear_ ( ) ; }
Hangul IME with IME extension API based on Native Client and libhangul.
Hangul IME with IME extension API based on Native Client and libhangul .
/**
   * Context information which is provided by Chrome.
   *
   * @type {?Object}
   * @private
   */ /**
   * Engine id which is specified on manifest.js.
   *
   * @type {string}
   * @private
   */ /**
   * Show vertical candidates window rather than horizontal.
   *
   * @type {boolean}
   * @private
   */ /**
   * Number of candidates per page on candidates window.
   *
   * @type {number}
   * @private
   */ /**
   * Raw input text.
   *
   * @type {string}
   * @private
   */ /**
   * Commit text. This is a volatile property, and will be cleared by
   * {@code HangulIme.commit_}.
   *
   * @type {?string}
   * @private
   */ /**
   * Editing hangul text.
   *
   * @type {string}
   * @private
   */ /**
   * Matched lengths of every hangul character.
   *
   * @type {Array.<number>}
   * @private
   */ /**
   * Segment information.
   *
   * @type {HangulIme.Segment}
   * @private
   */ /**
   * Cursor position.
   *
   * @type {number}
   * @private
   */ /**
   * The state of the IME.
   *
   * @type {HangulIme.State}
   * @private
   */ /**
   * Flag of conversion to Hanja automatically when typing.
   *
   * @type {boolean}
   * @private
   */ /**
   * Native Client Module
   *
   * @type {Object}
   * @private
   */ /**
   * Ignore key table not to handle some keys.
   *
   * @type {Object}
   * @private
   */ /**
   * Menu items of this IME.
   *
   * @type {Array}
   * @private
   */ /**
   * Current keyboard layout
   *
   * @type {Object}
   * @private
   */