blob: 3e2821cb38ce0ddc1739cfb88f726e94f59ed72e [file] [log] [blame]
// Copyright 2010, 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 Config {
//////////////////////////////////////////////////////////////
//
// 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 = "" ];
//////////////////////////////////////////////////////////////
//
// 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 inf incognito_mode is true
optional bool incognito_mode = 20 [default = false];
// This flag is not used
optional bool DEPRECATED_upload_usage_stats = 21 [default = false];
// whether to show the set default dialog on startup
optional bool check_default = 22 [ default = true ];
//////////////////////////////////////////////////////////////
//
// 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;
};
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 ];
// 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 ];
//////////////////////////////////////////////////////////////
//
// 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 ];
//////////////////////////////////////////////////////////////
//
// 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 ];
// size of suggestions
optional uint32 suggestions_size = 110 [ default = 3 ];
};