Codebase list mozc / upstream/1.6.1187.102 config / config.proto
upstream/1.6.1187.102

Tree @upstream/1.6.1187.102 (Download .tar.gz)

config.proto @upstream/1.6.1187.102raw · history · blame

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
// Copyright 2010-2012, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
//     * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//     * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

// Protocol messages to be used for mozc configuration.
syntax = "proto2";

package mozc.config;


message GeneralConfig {
  //////////////////////////////////////////////////////////////
  //
  // General config (1-9)
  //

  // config version, corresponding to the suffix of config file
  optional uint32 config_version = 1 [ default = 0 ];

  // The product version that wrote this config
  optional string last_modified_product_version = 2 [ default = "0.0.0.0" ];

  // last modified time in UTC second
  optional uint64 last_modified_time = 3 [ default = 0 ];

  // These fileds are not used now
  // platform of machine that wrote this config
  optional string platform = 4  [ default = "" ];

  // UI locale of machine that wrote this config
  optional string ui_locale = 5 [ default = "" ];

  // Whether to upload usage stats
  // This flag is used only for Android.
  optional bool upload_usage_stats = 6 [default = false];
};

message SyncConfig {
  optional bool use_config_sync = 1 [ default = false ];
  optional bool use_user_dictionary_sync = 2 [ default = false ];
  optional bool use_user_history_sync = 3 [ default = false ];
  optional bool use_learning_preference_sync = 4 [ default = false ];
  optional bool use_contact_list_sync = 5 [ default = false ];
};

message Config {
  // General config and logging/debugging:
  // We won't use 2-9 and 20-39 ids anymore for historical reasons.
  optional GeneralConfig general_config = 1;

  //////////////////////////////////////////////////////////////
  //
  // Logging/Debugging (10-19)
  //

  // set verbose level of logging library (FLAGS_v)
  optional int32 verbose_level = 10 [ default = 0 ];

  // This flag is not used
  optional bool DEPRECATED_log_all_commands = 11 [ default = false ];

  //////////////////////////////////////////////////////////////
  //
  // Misc fields (20-39)
  //

  // Incognito mode:
  // Disable all mutable operation if incognito_mode is true
  optional bool incognito_mode = 20 [default = false];

  // whether to show the set default dialog on startup
  optional bool check_default = 22 [ default = true ];

  // Presentation mode:
  // disable all suggestion temporally.
  optional bool presentation_mode = 23 [ default = false ];

  //////////////////////////////////////////////////////////////
  //
  // Basic features (40-79)
  //
  enum PreeditMethod {
    ROMAN = 0;
    KANA = 1;
  };

  // Roman/Kana
  optional PreeditMethod preedit_method = 40 [default = ROMAN];

  enum SessionKeymap {
    // If NONE is selected, it will be replaced with MSIME or KOTOERI.
    // NONE is used only for a placeholder, so a configuration program
    // should not show NONE as one of selections.  NONE should be the
    // last of the items due to the limitation of the Qt GUI's
    // implementation. Note that keymap number should be correspoinding
    // to the index of QComboBox in config dialog. Since NONE is not
    // used, we set -1 here.
    NONE = -1;
    CUSTOM = 0;
    ATOK = 1;
    MSIME = 2;
    KOTOERI = 3;
    MOBILE = 4;
  };
  optional SessionKeymap session_keymap = 41 [default = NONE];

  // custom keymap
  // TODO(taku): replace it with repeated field
  optional bytes custom_keymap_table = 42;

  // custom roman table
  optional bytes custom_roman_table = 43;

  enum PunctuationMethod {
    KUTEN_TOUTEN = 0;
    COMMA_PERIOD = 1;
    KUTEN_PERIOD = 2;
    COMMA_TOUTEN = 3;
  };
  optional PunctuationMethod punctuation_method = 45 [default = KUTEN_TOUTEN];

  enum SymbolMethod {
    CORNER_BRACKET_MIDDLE_DOT = 0;
    SQUARE_BRACKET_SLASH = 1;
    CORNER_BRACKET_SLASH = 2;
    SQUARE_BRACKET_MIDDLE_DOT = 3;
  };
  optional SymbolMethod symbol_method = 46 [default = CORNER_BRACKET_MIDDLE_DOT];

  enum FundamentalCharacterForm {
    FUNDAMENTAL_INPUT_MODE = 0;   // follow the input mode
    FUNDAMENTAL_FULL_WIDTH = 1;   // always FullWidth
    FUNDAMENTAL_HALF_WIDTH = 2;   // always HalfWidth
  };
  optional FundamentalCharacterForm space_character_form = 47 [ default = FUNDAMENTAL_INPUT_MODE ];

  // If this flag is true, Mozc toggles preedit method with some predefined
  // key events when IME is turned on.  Otherwise, Mozc ignores such kind of
  // key events so that their preferred can be preserved even when the toggle
  // key is pressed by accident.
  // As for Mozc, only Windows client supports such kind of toggle so this flag
  // is currently valid only on Windows.
  //
  // Background:
  //   Traditional Japanese IMEs have used "Roma-Ji" key in Japanese 106/109
  //   keyboard to toggle the preedit method between Roman and Kana style and
  //   this behavior was finally adopted into JIS X 4064:2002 as a basic
  //   functionality which is expected to support by a Japanese Input Method.
  //   However, people who are not aware of this functionality have been
  //   puzzled because the default key stroke is likely to be pressed
  //   by accident.
  optional bool use_keyboard_to_change_preedit_method = 48 [ default = false ];

  // User history learning
  enum HistoryLearningLevel {
    DEFAULT_HISTORY = 0;
    READ_ONLY = 1;
    NO_HISTORY = 2;
  };
  optional HistoryLearningLevel history_learning_level = 50 [default = DEFAULT_HISTORY];

  enum SelectionShortcut {
    NO_SHORTCUT = 0;
    SHORTCUT_123456789 = 1;
    SHORTCUT_ASDFGHJKL = 2;
  };
  optional SelectionShortcut selection_shortcut = 52 [default = SHORTCUT_123456789];

  // character form (Halfwidth/Fullwidth
  enum CharacterForm {
    HALF_WIDTH = 0;
    FULL_WIDTH = 1;
    LAST_FORM = 2;
    NO_CONVERSION = 3;
  };
  message CharacterFormRule {
    optional string group = 1;
    optional CharacterForm preedit_character_form = 2 [ default = FULL_WIDTH ];
    optional CharacterForm conversion_character_form = 3 [ default = FULL_WIDTH ];
  };
  repeated CharacterFormRule character_form_rules = 54;

  // auto IME turn off feature
  optional bool use_auto_ime_turn_off = 56 [ default = true ];

  // Toggle to use cascanding window for debuging.
  optional bool use_cascading_window = 58 [ default = true ];

  // Shift key mode switch
  enum ShiftKeyModeSwitch {
    OFF = 0;  // Case insensitive
    ASCII_INPUT_MODE = 1;  // MSIME, ATOK behavior
    KATAKANA_INPUT_MODE = 2;  // Kotoeri behavior
  };
  optional ShiftKeyModeSwitch shift_key_mode_switch = 59 [ default = ASCII_INPUT_MODE ];

  enum NumpadCharacterForm {
    NUMPAD_INPUT_MODE = 0;
    NUMPAD_FULL_WIDTH = 1;
    NUMPAD_HALF_WIDTH = 2;
    NUMPAD_DIRECT_INPUT = 3;
  };
  optional NumpadCharacterForm numpad_character_form = 60 [ default = NUMPAD_HALF_WIDTH ];

  enum AutoConversionKey {
    AUTO_CONVERSION_OFF = 0;
    AUTO_CONVERSION_KUTEN = 1;
    AUTO_CONVERSION_TOUTEN = 2;
    AUTO_CONVERSION_QUESTION_MARK = 4;
    AUTO_CONVERSION_EXCLAMATION_MARK = 8;
  };
  optional bool use_auto_conversion = 61 [ default = false ];

  // can't use AutoConversionKey as a type since
  // undefined enum type is not correctly handled.
  optional uint32 auto_conversion_key = 62 [ default = 13 ];

  // Mac only config items: yen_sign_character and use_japanese_layout.
  enum YenSignCharacter {
    YEN_SIGN = 0;
    BACKSLASH = 1;
  };
  // Mac-original JIS key layout has "yen-sign" key which generates
  // U+00A5 instead of U+005C and sometimes users get troubles with
  // them because they expect backslashes which are rendered as
  // yen-sign.  If this configuration is BACKSLASH, Mozc will
  // interpret U+005C even when the original key event is U+00A5.
  optional YenSignCharacter yen_sign_character = 63 [ default = YEN_SIGN ];

  // Use Japanese keyboard layout even when the user uses other
  // keyboard layouts.  In Mac OSX people can use several keyboard
  // layouts such like French or Spanish but some people want to use
  // Japanese layout for Japanese.  See http://b/2917320
  optional bool use_japanese_layout = 64 [ default = false ];

  //////////////////////////////////////////////////////////////
  //
  // Dictionary (80-99)
  //
  optional bool use_date_conversion = 80 [ default = true ];
  optional bool use_single_kanji_conversion = 81 [ default = true ];
  optional bool use_symbol_conversion = 82 [ default = true ];
  optional bool use_number_conversion = 83 [ default = true ];
  optional bool use_emoticon_conversion = 84 [ default = true ];
  optional bool use_calculator = 85 [ default = true ];
  optional bool use_t13n_conversion = 86 [ default = true ];
  optional bool use_zip_code_conversion = 87  [ default = true ];
  optional bool use_spelling_correction = 88  [ default = true ];

  message InformationListConfig {
    optional bool use_local_usage_dictionary = 1 [ default = true ];
    optional bool use_web_usage_dictionary = 2 [ default = false ];
    message WebServiceEntry {
      enum FormatType {
        AUTO_DETECT = 0;      // detect automatically.
        // We won't allow user to choose format type via config dialog now.
        GENERIC_XML = 1;      // XML/XHTML
        GENERIC_JSON = 2;     // JSON
        PREDEFINED_XML = 3;   // not supported for now.
        PREDEFINED_JSON = 4;  // not supported for now.
      };
      optional string name = 1 [ default = "" ];
      optional FormatType type = 2 [ default = AUTO_DETECT ];
      optional string url = 3 [ default = "" ];
      optional string xpath = 4 [ default = "" ];  // Xpath or JsonPath
    };
    repeated WebServiceEntry web_service_entries = 10;
  };
  optional InformationListConfig information_list_config = 90;

  //////////////////////////////////////////////////////////////
  //
  // Suggest (100-119)
  //
  // Use history-based suggest feature.
  optional bool use_history_suggest = 100 [ default = true ];

  // Use dictionary-based suggest feature.
  optional bool use_dictionary_suggest = 101 [ default = true ];

  // Use realtime conversion feature.
  optional bool use_realtime_conversion = 102 [ default = true ];

  // Size of suggestions.
  optional uint32 suggestions_size = 110 [ default = 3 ];

  //////////////////////////////////////////////////////////////
  //
  // Cloud (300-319)
  //
  // Configuration for cloud sync feature.
  optional SyncConfig sync_config = 300;

  // Allow the cloud handwriting.  The handwriting UI has to notice
  // user before activating the feature, and set this field to true
  // when the user permit.
  // NOTE: OSS version does not handle this field.
  optional bool allow_cloud_handwriting = 301 [ default = false ];


  // Multilingual config.  It resides here for historical reason.
  // TODO(mukai): apply extension for multilingual config.
  optional PinyinConfig pinyin_config = 996;
  optional HangulConfig hangul_config = 998;
  optional ChewingConfig chewing_config = 999;
};

// Config for Chinese PinYin input.  Those items are based on the libpyzy
// configurations and current ChromeOS ibus-pinyin config items.
message PinyinConfig {
  // These default values are not used on ChromeOS.

  // Corrects some typos or not.  (e.g. gn -> ng)
  optional bool correct_pinyin = 1 [default = true];
  // Accepts pinyin which is based on the pronunciation of Mandarin Chinese.
  optional bool fuzzy_pinyin = 2 [default = false];
  optional bool select_with_shift = 3 [default = false];
  optional bool paging_with_minus_equal = 4 [default = true];
  optional bool paging_with_comma_period = 5 [default = true];
  optional bool auto_commit = 6 [default = false];
  optional bool double_pinyin = 7 [default = false];
  optional bool initial_mode_chinese = 8 [default = true];
  optional bool initial_mode_full_width_word = 9 [default = false];
  optional bool initial_mode_full_width_punctuation = 10 [default = true];
  optional bool initial_mode_simplified_chinese = 11 [default = true];

  // Double pinyin shcema list.
  // MSPY = 0;
  // ZRM = 1;
  // ABC = 2;
  // ZGPY = 3;
  // PYJJ = 4;
  // XHE = 5;
  optional int32 double_pinyin_schema = 12 [default = 0];
};


// Config for Korean hangul input.
message HangulConfig {
  enum KeyboardTypes {
    KEYBOARD_Dubeolsik = 0;
    KEYBOARD_DubeolsikYetgeul = 1;
    KEYBOARD_SebeolsikDubeol = 2;
    KEYBOARD_Sebeolsik390 = 3;
    KEYBOARD_SebeolsikFinal = 4;
    KEYBOARD_SebeolsikNoshift = 5;
    KEYBOARD_SebeolsikYetgeul = 6;
    KEYBOARD_Romaja = 7;
    KEYBOARD_Ahnmatae = 8;
  };
  optional KeyboardTypes  keyboard_type = 1 [ default = KEYBOARD_Dubeolsik ];

  // custom hanja keymap
  repeated bytes hanja_keys = 2;
};

// Config for Taiwanese chewing input.  Those items are based on the
// libchewing configurations and current ChromeOS ibus-chewing config
// items.
message ChewingConfig {
  optional bool automatic_shift_cursor = 1 [ default = false ];
  optional bool add_phrase_direction = 2 [ default = false ];
  optional bool easy_symbol_input = 3 [ default = false ];
  optional bool escape_cleans_all_buffer = 4 [ default = false ];
  optional bool force_lowercase_english = 5 [ default = false ];
  // does not make sense with the current code because libchewing does
  // not care this item.
  // TODO(mukai): implement it.
  optional bool plain_zhuyin = 6 [ default = false ];
  optional bool phrase_choice_rearward = 7 [ default = true ];
  optional bool space_as_selection = 8 [ default = true ];
  optional uint32 maximum_chinese_character_length = 9 [ default = 40 ];
  optional uint32 candidates_per_page = 10 [ default = 10 ];
  enum KeyboardType {
    DEFAULT = 0;
    HSU = 1;
    IBM = 2;
    GIN_YIEH = 3;
    ETEN = 4;
    ETEN26 = 5;
    DVORAK = 6;
    DVORAK_HSU = 7;
    DACHEN_26 = 8;
    HANYU = 9;
  };
  optional KeyboardType keyboard_type = 11 [ default = DEFAULT ];
  enum SelectionKeys {
    SELECTION_1234567890 = 0;
    SELECTION_asdfghjkl = 1;
    SELECTION_asdfzxcv89 = 2;
    SELECTION_asdfjkl789 = 3;
    SELECTION_aoeuqjkix = 4;
    SELECTION_aoeuhtnsid = 5;
    SELECTION_aoeuidhtns = 6;
    SELECTION_1234qweras = 7;
  };
  optional SelectionKeys selection_keys = 12 [ default = SELECTION_1234567890 ];
  enum HsuSelectionKeys {
    HSU_asdfjkl789 = 0;
    HSU_asdfzxcv89 = 1;
  };
  optional HsuSelectionKeys hsu_selection_keys = 13
      [ default = HSU_asdfjkl789 ];
};