chromium/chromeos/ash/services/ime/public/mojom/input_method.mojom

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Updates to this file must be backwards-compatible, as it is used outside of
// the Chromium repo. This file should be updated first, before syncing in the
// other repos.

// Next MinVersion: 23

module ash.ime.mojom;

import "chromeos/ash/services/ime/public/mojom/japanese_settings.mojom";

// Do not modify this enum. If new values are needed, deprecate the entire enum.
[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.KeyEventType"]
enum KeyEventType {
  [Default] kKeyDown = 0,
  kKeyUp = 1,
};

// List of specific keys from:
// https://www.w3.org/TR/uievents-key/#named-key-attribute-values
//
// If a key is not listed here, then it means that the Chrome OS first-party
// IMEs do not handle it and it is safe for the OS to handle the key itself.
//
// Next ordinal: 18
[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.NamedDomKey"]
enum NamedDomKey {
  [Default] kOther = 0,
  kAlt = 1,
  kAltGraph = 2,
  kCapsLock = 3,
  kControl = 4,
  kShift = 5,
  kEnter = 6,
  kBackspace = 7,
  [MinVersion=2] kEscape = 10,
  // Korean keyboard specific keys
  [MinVersion=1] kHangeulMode = 8,
  [MinVersion=1] kHanjaMode = 9,
  // Navigation keys
  [MinVersion=2] kArrowDown = 11,
  [MinVersion=2] kArrowLeft = 12,
  [MinVersion=2] kArrowRight = 13,
  [MinVersion=2] kArrowUp = 14,
  [MinVersion=2] kPageDown = 15,
  [MinVersion=2] kPageUp = 16,
  [MinVersion=8] kTab = 17,
  // Function keys
  [MinVersion=16] kF1 = 18,
  [MinVersion=16] kF2 = 19,
  [MinVersion=16] kF3 = 20,
  [MinVersion=16] kF4 = 21,
  [MinVersion=16] kF5 = 22,
  [MinVersion=16] kF6 = 23,
  [MinVersion=16] kF7 = 24,
  [MinVersion=16] kF8 = 25,
  [MinVersion=16] kF9 = 26,
  [MinVersion=16] kF10 = 27,
  [MinVersion=16] kF11 = 28,
  [MinVersion=16] kF12 = 29,
};

// Represents a key pressed by the user, taking into account aspects like
// modifiers and keyboard layout.
//
// It is either a single Unicode codepoint corresponding to the key, or a
// NamedDomKey for special keys (e.g. Shift), as specified by:
// https://www.w3.org/TR/uievents/#dom-keyboardevent-key
//
// TODO(crbug.com/40202148): Note that this type must be marked [Extensible] in
// all deployed versions before new ordinals can be introduced, and [Extensible]
// requires specifying a [Default] field.
//
// Next ordinal: 2
[Stable, RenamedFrom="chromeos.ime.mojom.DomKey"]
union DomKey {
  // If the key is a key with a "named key attribute" in:
  // https://www.w3.org/TR/uievents-key/#named-key-attribute-value
  // then `named_key` is set to that named key.
  NamedDomKey named_key@0;

  // Otherwise, the key is represented as a single Unicode codepoint,
  // encoded in UTF-32.
  uint32 codepoint@1;
};

// Whether modifier keys are held down or not.
// Modifier keys are specified by:
// https://www.w3.org/TR/uievents-key/#keys-modifier
//
// Next ordinal: 6
[Stable, RenamedFrom="chromeos.ime.mojom.ModifierState"]
struct ModifierState {
  bool alt@0;
  bool alt_graph@1;
  bool caps_lock@2;
  bool control@3;
  bool meta@4;
  bool shift@5;
};

// Represents the physical location of the key on a set of standard keyboard
// layouts, as specified by:
// https://www.w3.org/TR/uievents-code/
//
// Avoid adding new values here if possible. If any value here is not used by
// Chrome OS first-party IMEs, consider deprecating the value.
//
// Next ordinal: 61
[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.DomCode"]
enum DomCode {
  [Default] kOther = 0,
  kBackquote = 1,
  kBackslash = 2,
  kBracketLeft = 3,
  kBracketRight = 4,
  kComma = 5,
  kDigit0 = 6,
  kDigit1 = 7,
  kDigit2 = 8,
  kDigit3 = 9,
  kDigit4 = 10,
  kDigit5 = 11,
  kDigit6 = 12,
  kDigit7 = 13,
  kDigit8 = 14,
  kDigit9 = 15,
  kEqual = 16,
  kIntlBackslash = 17,
  kIntlRo = 18,
  kIntlYen = 19,
  kKeyA = 20,
  kKeyB = 21,
  kKeyC = 22,
  kKeyD = 23,
  kKeyE = 24,
  kKeyF = 25,
  kKeyG = 26,
  kKeyH = 27,
  kKeyI = 28,
  kKeyJ = 29,
  kKeyK = 30,
  kKeyL = 31,
  kKeyM = 32,
  kKeyN = 33,
  kKeyO = 34,
  kKeyP = 35,
  kKeyQ = 36,
  kKeyR = 37,
  kKeyS = 38,
  kKeyT = 39,
  kKeyU = 40,
  kKeyV = 41,
  kKeyW = 42,
  kKeyX = 43,
  kKeyY = 44,
  kKeyZ = 45,
  kMinus = 46,
  kPeriod = 47,
  kQuote = 48,
  kSemicolon = 49,
  kSlash = 50,
  kBackspace = 51,
  kEnter = 52,
  kSpace = 53,
  kAltLeft = 54,
  kAltRight = 55,
  kShiftLeft = 56,
  kShiftRight = 57,
  kControlLeft = 58,
  kControlRight = 59,
  kCapsLock = 60,
  [MinVersion=18] kEscape = 61,
  [MinVersion=18] kTab = 62,
  [MinVersion=18] kNumpadMultiply = 63,
  [MinVersion=18] kKanaMode = 64,
  [MinVersion=18] kPageUp = 65,
  [MinVersion=18] kEnd = 66,
  [MinVersion=18] kDelete = 67,
  [MinVersion=18] kHome = 68,
  [MinVersion=18] kPageDown = 69,
  [MinVersion=18] kArrowUp = 70,
  [MinVersion=18] kArrowLeft = 71,
  [MinVersion=18] kArrowRight = 72,
  [MinVersion=18] kArrowDown = 73,
  [MinVersion=18] kNumpad0 = 74,
  [MinVersion=18] kNumpad1 = 75,
  [MinVersion=18] kNumpad2 = 76,
  [MinVersion=18] kNumpad3 = 77,
  [MinVersion=18] kNumpad4 = 78,
  [MinVersion=18] kNumpad5 = 79,
  [MinVersion=18] kNumpad6 = 80,
  [MinVersion=18] kNumpad7 = 81,
  [MinVersion=18] kNumpad8 = 82,
  [MinVersion=18] kNumpad9 = 83,
  [MinVersion=18] kNumpadSubtract = 84,
  [MinVersion=18] kNumpadAdd = 85,
  [MinVersion=18] kNumpadDecimal = 86,
  [MinVersion=18] kNumpadEnter = 87,
  [MinVersion=18] kNumpadDivide = 88,
};

// Information about a physical key event.
//
// Next ordinal: 4
[Stable, RenamedFrom="chromeos.ime.mojom.PhysicalKeyEvent"]
struct PhysicalKeyEvent {
  KeyEventType type@0;
  DomKey key@1;

  // Using this field is discouraged, as it makes it difficult for an IME to be
  // used with different keyboard layouts. Prefer to isolate locational logic in
  // the XKB layout file, if possible.
  DomCode code@2;

  ModifierState modifier_state@3;
};

// Do not modify this enum. If new values are needed, deprecate the entire enum.
[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.KeyEventResult"]
enum KeyEventResult {
  // The event should be handled by the system.
  [Default] kNeedsHandlingBySystem = 0,
  // The event was consumed by the IME and should not be handled by the system.
  kConsumedByIme = 1,
};

// Represents a directional text selection range.
// |anchor| is the index of where the selection began and |focus| is where the
// selection ended. The |anchor| can be before |focus| or vice versa depending
// on the direction the selection is in.
// See https://developer.mozilla.org/en-US/docs/Web/API/Selection
//
// Next ordinal: 2
[Stable, RenamedFrom="chromeos.ime.mojom.SelectionRange"]
struct SelectionRange {
   uint32 anchor@0;
   uint32 focus@1;
};

// Type of input field.
// Based off ui::TextInputType in ui/base/ime/text_input_type.h.
[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.InputFieldType"]
enum InputFieldType {
  // Does not support IME editing. IMEs should only send physical key events,
  // and not perform complex operations such as composition.
  kNoIME = 0,
  // Supports general text input.
  kText = 1,
  kSearch = 2,
  kTelephone = 3,
  kURL = 4,
  kEmail = 5,
  kNumber = 6,
  // Input represents a password. IMEs should ensure the password is not stored
  // without the user's permission.
  kPassword = 7,
};

// Next ordinal: 2
[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.AutocorrectMode"]
enum AutocorrectMode {
  // The IME must not perform autocorrect.
  [Default] kDisabled = 0,
  // The IME may perform autocorrect as the user is typing.
  kEnabled = 1,
};

// Next ordinal: 2
[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.PersonalizationMode"]
enum PersonalizationMode {
  // The IME should not use anything from the input field to update any
  // personalized data (e.g. to improve suggestions quality). Personalization
  // may be disabled if the content is privacy-sensitive (e.g. incognito mode in
  // Chrome browser), or if using personalization does not make sense (e.g.
  // playing a typing game may pollute the IME dictionary with uncommon words).
  kDisabled = 0,
  // The IME may use the input field contents for personalization.
  kEnabled = 1,
};

// Next ordinal: 2
[Stable, Extensible]
enum TextPredictionMode {
  // The IME must not display text predictions.
  [Default] kDisabled = 0,
  // The IME may display text predictions as the user is typing, but not
  // guaranteed to (e.g. if the user disabled text predictions in the IME
  // settings).
  kEnabled = 1,
};

// Next ordinal: 4
[Stable, RenamedFrom="chromeos.ime.mojom.InputFieldInfo"]
struct InputFieldInfo {
  InputFieldType type@0;
  AutocorrectMode autocorrect@1;
  PersonalizationMode personalization@2;
  [MinVersion=10] TextPredictionMode text_prediction@3;
};

// Next ordinal: 8
//
// TODO(crbug.com/40202148): Note that this type must be marked [Extensible] in
// all deployed versions before new ordinals can be introduced, and [Extensible]
// requires specifying a [Default] field.
[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.InputMethodSettings"]
union InputMethodSettings {
  KoreanSettings korean_settings@0;
  LatinSettings latin_settings@1;
  PinyinSettings pinyin_settings@2;
  ZhuyinSettings zhuyin_settings@3;
  [MinVersion=14, Default] bool null_settings@4;
  [MinVersion=15] JapaneseSettings japanese_settings@5;
  [MinVersion=19] VietnameseTelexSettings vietnamese_telex_settings@6;
  [MinVersion=19] VietnameseVniSettings vietnamese_vni_settings@7;
};

// Next ordinal: 9
[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.KoreanLayout"]
enum KoreanLayout {
  [Default] kDubeolsik = 0,
  kDubeolsikOldHangeul = 1,
  kSebeolsik390 = 2,
  kSebeolsikFinal = 3,
  kSebeolsikNoShift = 4,
  kSebeolsikOldHangeul = 5,
  kDeprecatedSebeolsikDubeol = 6,
  kDeprecatedRomaja = 7,
  kDeprecatedAhnmatae = 8,
};

// Next ordinal: 2
[Stable, RenamedFrom="chromeos.ime.mojom.KoreanSettings"]
struct KoreanSettings {
  // Whether to allow users to type multiple syllables in one composition.
  bool input_multiple_syllables@0;

  // The keyboard layout used by the IME.
  KoreanLayout layout@1;
};

// Next ordinal: 2
[Stable, RenamedFrom="chromeos.ime.mojom.LatinSettings"]
struct LatinSettings {
  // Whether to enable autocorrect as the user is typing.
  bool autocorrect@0;

  // Whether to enable predictive writing as the user is typing.
  [MinVersion=5] bool predictive_writing@1;
};

// Fuzzy Pinyin allows users to input similar sounding syllables as if they were
// the same thing. For example, if `an_ang` is enabled, then inputting the "an"
// syllable will also show results for "ang".
// This is useful for users with different regional accents.
// Next ordinal: 12
[Stable, RenamedFrom="chromeos.ime.mojom.FuzzyPinyinSettings"]
struct FuzzyPinyinSettings {
  bool an_ang@0;
  bool en_eng@1;
  bool ian_iang@2;
  bool k_g@3;
  bool r_l@4;
  bool uan_uang@5;
  bool c_ch@6;
  bool f_h@7;
  bool in_ing@8;
  bool l_n@9;
  bool s_sh@10;
  bool z_zh@11;
};

// Next ordinal: 3
[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.PinyinLayout"]
enum PinyinLayout {
  [Default] kUsQwerty = 0,
  kDvorak = 1,
  kColemak = 2,
};

// Next ordinal: 7
[Stable, RenamedFrom="chromeos.ime.mojom.PinyinSettings"]
struct PinyinSettings {
  [MinVersion=6] FuzzyPinyinSettings? fuzzy_pinyin@0;
  [MinVersion=6] PinyinLayout layout@1;
  [MinVersion=6] bool use_hyphen_and_equals_to_page_candidates@2;
  [MinVersion=6] bool use_comma_and_period_to_page_candidates@3;
  [MinVersion=6] bool default_to_chinese@4;
  [MinVersion=6] bool default_to_full_width_characters@5;
  [MinVersion=6] bool default_to_full_width_punctuation@6;
};

// JapaneseSettings are preference values for the Japanese engine as stored
// in PrefService. The value names closely match how they are defined in prefs.
// Next ordinal: 14
[Stable]
struct JapaneseSettings {
  [Stable, Extensible]
  enum InputMode {
    [Default] kUnspecified = 0,
    kRomaji = 1,
    kKana = 2,
  };

  [Stable, Extensible]
  enum PunctuationStyle {
    [Default] kUnspecified = 0,
    kKutenTouten = 1,
    kCommaPeriod = 2,
    kKutenPeriod = 3,
    kCommaTouten = 4,
  };

  [Stable, Extensible]
  enum SymbolStyle {
    [Default] kUnspecified = 0,
    kCornerBracketMiddleDot = 1,
    kSquareBracketSlash = 2,
    kCornerBracketSlash = 3,
    kSquareBracketMiddleDot = 4,
  };

  [Stable, Extensible]
  enum SpaceInputStyle {
    [Default] kUnspecified = 0,
    kInputMode = 1,
    kFullWidth = 2,
    kHalfWidth = 3,
  };

  [Stable, Extensible]
  enum SelectionShortcut {
    [Default] kUnspecified = 0,
    kDigits123456789 = 1,
    kAsdfghjkl = 2,
    kNoShortcut = 3,
  };

  [Stable, Extensible]
  enum KeymapStyle {
    [Default] kUnspecified = 0,
    kCustom = 1,
    kAtok = 2,
    kMsime = 3,
    kKotoeri = 4,
    kMobile = 5,
    kChromeos = 6,
  };

  [Stable, Extensible]
  enum ShiftKeyModeStyle {
    [Default] kUnspecified = 0,
    kOff = 1,
    kAlphanumeric = 2,
    kKatakana = 3,
  };

  // This is a legacy field that is no longer used.
  JpUnusedStruct? unused@0;

  [MinVersion=22] InputMode input_mode@1;
  [MinVersion=22] PunctuationStyle punctuation_style@2;
  [MinVersion=22] SymbolStyle symbol_style@3;
  [MinVersion=22] SpaceInputStyle space_input_style@4;
  [MinVersion=22] SelectionShortcut selection_shortcut@5;
  [MinVersion=22] KeymapStyle keymap_style@6;
  [MinVersion=22] bool automatically_switch_to_halfwidth@7;
  [MinVersion=22] ShiftKeyModeStyle shift_key_mode_style@8;
  [MinVersion=22] bool use_input_history@9;
  [MinVersion=22] bool use_system_dictionary@10;
  [MinVersion=22] uint32 number_of_suggestions@11;
  [MinVersion=22] bool disable_personalized_suggestions@12;
  [MinVersion=22] bool automatically_send_statistics_to_google@13;
};

// Next ordinal: 3
[Stable, Extensible,RenamedFrom="chromeos.ime.mojom.ZhuyinLayout"]
enum ZhuyinLayout {
  [Default] kStandard = 0,
  kIbm = 1,
  kEten = 2,
};

// The keys used to select candidates for Zhuyin.
// There is a limited set of possible shortcut schemes.
// Each scheme can be represented by a string, where the 1st character of the
// string is used to select the 1st candidate, the 2nd character for the 2nd
// candidate and so on.
// See the default enum value for an example.
//
// Next ordinal: 5
[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.ZhuyinSelectionKeys"]
enum ZhuyinSelectionKeys {
  // Corresponds to '1234567890'.
  // '1' selects the 1st candidate, '2' selects the 2nd, and so on, and '0'
  // selects the 10th candidate.
  [Default] k1234567890 = 0,
  // Corresponds to 'asdfghjkl;'.
  kAsdfghjkl = 1,
  // Corresponds to 'asdfzxcv89'.
  kAsdfzxcv89 = 2,
  // Corresponds to 'asdfjkl789'.
  kAsdfjkl789 = 3,
  // Corresponds to '1234qweras'.
  k1234Qweras = 4,
};

// Next ordinal: 3
[Stable, RenamedFrom="chromeos.ime.mojom.ZhuyinSettings"]
struct ZhuyinSettings {
  [MinVersion=7] ZhuyinLayout layout@0;
  [MinVersion=7] ZhuyinSelectionKeys selection_keys@1;

  // Maximum number of candidates to display per page.
  [MinVersion=7] uint32 page_size@2;
};

// Next ordinal: 2
// TODO(crbug.com/40202148): Note that this type must be marked [Extensible] in
// all deployed versions before new ordinals can be introduced, and [Extensible]
// requires specifying a [Default] field.
// TODO(b/217279530): Consider removing this or unifying it with
// InputMethodSettings.
[Stable]
union InputMethodQuickSettings {
  ChineseQuickSettings chinese_settings@0;
  JapaneseQuickSettings japanese_settings@1;
};

[Stable, Extensible]
enum ChineseLanguageMode {
  // In Chinese mode, the IME outputs Chinese characters.
  [Default] kChinese = 0,
  // In raw mode, the IME will only output latin-script characters.
  kRaw = 1
};

// All Chinese IMEs have the same set of quick settings.
// Next ordinal: 3
[Stable]
struct ChineseQuickSettings {
  ChineseLanguageMode mode@0;
  bool full_width_characters@1;
  bool full_width_punctuation@2;
};

// Next ordinal: 6
[Stable, Extensible]
enum JapaneseInputMode {
  [Default] kHiragana = 0,
  kKatakana = 1,
  kWideLatin = 2,
  kHalfWidthKatakana = 3,
  kLatin = 4,
  kDirectInput = 5,
};

// Next ordinal: 1
[Stable]
struct JapaneseQuickSettings {
  JapaneseInputMode mode@0;
};

// Next ordinal: 3
[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.SuggestionMode"]
enum SuggestionMode {
  [Default] kUnknown = 0,

  // A completion suggestion is text that completes an incomplete word. For
  // example, the text "hello wor" may have a completion candidate like the
  // following "hello world".
  kCompletion = 1,

  // A prediction suggestion is text that we predict may come after some other
  // text that contains completed words. For example, the text "hello " may
  // produce a prediction suggestion such as "hello world".
  kPrediction = 2,
};

// Next ordinal: 6
[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.SuggestionType"]
enum SuggestionType {
  [Default] kUnknown = 0,
  kAssistivePersonalInfo = 1,
  kAssistiveEmoji = 2,
  kMultiWord = 3,
  [MinVersion=13] kGrammar = 4,
  [MinVersion=13] kLongpressDiacritic = 5,
};

// Specifies an assistive suggestion candidate that may, or may not be, shown
// to the user in the assistive window.
// Next ordinal: 4
[Stable, RenamedFrom="chromeos.ime.mojom.SuggestionCandidate"]
struct SuggestionCandidate {
  SuggestionMode mode@0;
  SuggestionType type@1;
  // The text suggested by this candidate to the user.
  string text@2;
  // How much of suggested_text has already been typed by the user.
  [MinVersion=13] int32 confirmed_length@3;
};

// Next ordinal: 7
[Stable, Extensible]
enum AssistiveWindowType {
  [Default] kHidden = 0,
  kUndo = 1,
  kEmojiSuggestion = 2,
  kPersonalInfoSuggestion = 3,
  kGrammarSuggestion = 4,
  kMultiWordSuggestion = 5,
  kLongpressDiacriticsSuggestion = 6,
};

// Next ordinal: 5
[Stable, Extensible]
enum AutocorrectSuggestionProvider {
  [Default] kUnknown = 0,
  kUsEnglishPrebundled = 1,
  kUsEnglishDownloaded = 2,
  kUsEnglish840 = 3,
  [MinVersion=21] kUsEnglish840V2 = 4,
};

// Next ordinal: 1
[Stable]
struct InputMethodMetadata {
  // What kind of assistive window is shown currently to the user.
  AutocorrectSuggestionProvider autocorrect_suggestion_provider@0;
};

// Next ordinal: 2
[Stable]
struct AssistiveWindow {
  // What kind of assistive window is shown currently to the user.
  AssistiveWindowType type@0;

  // Contains all candidates that are currently showing in the window. This
  // field captures both "single" assistive candidates, and "multiple choice"
  // assistive candidates.
  array<SuggestionCandidate> candidates@1;
};

// An input method that is provided natively by the IME Service.
// The browser process uses this interface to communicate with IMEs hosted in
// a Chrome utility process, and this interface uses the InputMethodHost
// interface to communicate back to the browser process.
//
// Next ordinal: 10
[Stable, RenamedFrom="chromeos.ime.mojom.InputMethod"]
interface InputMethod {
  // DEPRECATED: Called when there's a new focused input field.
  OnFocusDeprecated@0(InputFieldInfo input_field_info,
                      [MinVersion=4] InputMethodSettings? settings);

  // Called when there's a new focused input field.
  // `deprecated_settings` is DEPRECATED.
  [MinVersion=9]
  OnFocus@6(InputFieldInfo input_field_info,
            InputMethodSettings? deprecated_settings)
    => (bool success, [MinVersion=17] InputMethodMetadata? metadata);

  // Called when the input field loses focus.
  OnBlur@1();

  // Processes a PhysicalKeyEvent and returns the processing result.
  ProcessKeyEvent@2(PhysicalKeyEvent event) => (KeyEventResult result);

  // Informs the IME that the surrounding text has changed.
  // |text| is the text around the current text cursor position, including any
  // composition text. To improve efficiency, |text| may not contain all the
  // text that is in the current input field, but it's guaranteed to contain at
  // least the text within the text selection.
  // |offset| is the index of |text| relative to the full input field. If set to
  // 0, then |text| represents the full contents of the input field.
  // |selection_range| is relative to |text|.
  OnSurroundingTextChanged@3(string text,
                           uint32 offset,
                           SelectionRange selection_range);

  // Informs the IME that composition was canceled by the system. This can
  // for example happen if the user presses the Escape key.
  OnCompositionCanceledBySystem@4();

  // Informs the IME that a candidate from the candidates window was selected by
  // the user. This is usually from the user clicking the candidate.
  // |selected_candidate_index| is the index of the selected candidate.
  [MinVersion=3] OnCandidateSelected@5(uint32 selected_candidate_index);

  // Informs the IME that the user has changed the input method quick settings.
  [MinVersion=11] OnQuickSettingsUpdated@7(InputMethodQuickSettings settings);

  // Returns whether the input method is ready to accept key events from a test.
  // Used for end-to-end testing via Tast.
  [MinVersion=12, Sync] IsReadyForTesting@8() => (bool ready);

  // Called when any changes are made to the assistive window (a suggestion is
  // shown, dismissed, accepted etc).
  [MinVersion=13] OnAssistiveWindowChanged@9(AssistiveWindow window);
};

// Settings for Vietnamese Telex input method.
//
// Next ordinal: 5
[Stable]
struct VietnameseTelexSettings {
  // Allow flexible diacritic assignment.
  bool allow_flexible_diacritics@0;

  // Defines the placement of tone marks for some syllables.
  // If false, use "old style" placement.
  bool new_style_tone_mark_placement@1;

  // When a horn modifier is applied to "uo", it will add horns to both u and o.
  bool enable_insert_double_horn_on_uo@2;

  // Type the horn modifier trigger to get u-horn.
  bool enable_w_for_u_horn_shortcut@3;

  // Show an underline for the text under composition mode.
  [MinVersion=20] bool show_underline_for_composition_text@4;
};

// Settings for Vietnamese VNI input method.
//
// Next ordinal: 4
[Stable]
struct VietnameseVniSettings {
  // Allow flexible diacritic assignment.
  bool allow_flexible_diacritics@0;

  // Defines the placement of tone marks for some syllables.
  // If false, use "old style" placement.
  bool new_style_tone_mark_placement@1;

  // When a horn modifier is applied to "uo", it will add horns to both u and o.
  bool enable_insert_double_horn_on_uo@2;

  // Show an underline for the text under composition mode.
  [MinVersion=20] bool show_underline_for_composition_text@3;
};