// Copyright 2010-2011, 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 client/server communication
// and client/renderer communication.
//
// The Command message contains all the input/output values for
// client/server commnication. The messages structure of Command and
// its child messages are here:
syntax = "proto2";
import "config/config.proto";
import "session/candidates.proto";
package mozc.commands;
// This enum is used by SessionCommand::input_mode with
// CHANGE_INPUT_MODE and Output::mode.
enum CompositionMode {
DIRECT = 0;
HIRAGANA = 1;
FULL_KATAKANA = 2;
HALF_ASCII = 3;
FULL_ASCII = 4;
HALF_KATAKANA = 5;
NUM_OF_COMPOSITIONS = 6;
}
message KeyEvent {
enum SpecialKey {
NO_SPECIALKEY = 0;
DIGIT = 1;
ON = 2;
OFF = 3;
SPACE = 4;
ENTER = 5;
LEFT = 6;
RIGHT = 7;
UP = 8;
DOWN = 9;
ESCAPE = 10;
DEL = 11; // not DELETE because DELETE is reserved in MSVC
BACKSPACE = 12;
HENKAN = 13;
MUHENKAN = 14;
KANA = 15; // VK_DBE_HIRAGANA(Win), kVK_JIS_Kana(Mac)
// TODO(toshiyuki): It is better to rename this to HIRAGANA
// In Windows, we have Katakana and it may confusing.
HOME = 16;
END = 17;
TAB = 18;
F1 = 19;
F2 = 20;
F3 = 21;
F4 = 22;
F5 = 23;
F6 = 24;
F7 = 25;
F8 = 26;
F9 = 27;
F10 = 28;
F11 = 29;
F12 = 30;
PAGE_UP = 31;
PAGE_DOWN = 32;
INSERT = 33;
F13 = 34;
F14 = 35;
F15 = 36;
F16 = 37;
F17 = 38;
F18 = 39;
F19 = 40;
F20 = 41;
F21 = 42;
F22 = 43;
F23 = 44;
F24 = 45;
EISU = 46; // alphanumeric VK_DBE_ALPHANUMERIC(Win), kVK_JIS_Eisu(Mac)
NUMPAD0 = 47;
NUMPAD1 = 48;
NUMPAD2 = 49;
NUMPAD3 = 50;
NUMPAD4 = 51;
NUMPAD5 = 52;
NUMPAD6 = 53;
NUMPAD7 = 54;
NUMPAD8 = 55;
NUMPAD9 = 56;
MULTIPLY = 57; // Numpad [*]
ADD = 58; // Numpad [+]
SEPARATOR = 59; // Numpad [enter]
SUBTRACT = 60; // Numpad [-]
DECIMAL = 61; // Numpad [.]
DIVIDE = 62; // Numpad [/]
EQUALS = 63; // Numpad [=]
ASCII = 64;
HANKAKU = 65;
KANJI = 66;
KATAKANA = 67; // VK_DBE_KATAKANA(Win)
CAPS_LOCK = 68;
HANJA = 69;
NUM_SPECIALKEYS = 70;
};
// CTRL, ALT and SHIFT cover both LEFT and RIGHT keys. If the
// difference between LEFT and RIGHT is no matter, using CTRL (or ALT, SHIFT)
// is preferred.
// Mozc key translation logic is as follows
//
// ---- Modifier Keys -----
// | |
// | B |
// ---------+------ -- -----+-------
// | | D | | E | |
// | A +---- +--------+-------- C |
// | | F | |
// --Special Keys-- ---Other Keys---
//
// A:Press only a special key
// => Send special key event with no modifier.
// B:Press only modifier keys
// => Send modifier key event with no key_code.
// C:Press an other key
// => Send KeyEvent with no modifier.
// D:Press a special key with one or more modifier keys
// => Send special key event with modifiers.
// E:Press an other key with one or more modifier keys
// => If combined key is printable, replace keycodes. Otherwise, just send
// with modifier keys. Note that, unless the whole combined key is
// printable, keycodes are not replaced even if a subset of combined key is
// printable.
// F:Otherwise
// => Send nothing.
//
// Following example shows expected behaviours.
// E.g. )
// case | Pressed Key | translated key event
// ----------------------------------------------------
// A | SP | special_key = 4
// A | F1 | special_key = 19
// B | CTRL | modifier_key = {CTRL}
// B | SHIFT | modifier_key = {SHIFT}
// B | CTRL+SHIFT | modifier_key = {CTRL,SHIFT}
// C | 'a' | key_code = \x61 = 'a'
// D | CTRL+BS | special_key = 12, modifier_key = {CTRL}
// D | CTRL+SHIFT+BS | special_key = 12, modifier_key = {CTRL,SHIFT}
// E | SHIFT+'a' | key_code = \x41 = 'A'
// E | CTRL+'a' | key_code = \x61, modifier_key = {CTRL}
// E | CTRL+ALT+'a' | key_code = \x61, modifier_key = {CTRL,ALT}
// E | CTRL+SHIFT+'a'| key_code = \x61, modifier_key = {CTRL,SHIFT}
// F | CTRL+BS+SP | send nothing
//
// In addition, we treat CAPS lock independently besides alphabet keys,
// though it is a member of modifier keys. Following example shows currently
// expected behaviours with Caps lock set.
//
// E.g. ) While CAPS is set on.
// Pressed Key | translated key event
// ----------------------------------------------------
// 'a' | key_code = \x41 = 'A', modifier_key = {CAPS}
// SHIFT+'a' | key_code = \x61 = 'a', modifier_key = {CAPS}
// CTRL+'a' | key_code = \x41, modifier_key = {CTRL,CAPS}
// CTRL+ALT+'a' | key_code = \x41, modifier_key = {CTRL,ALT,CAPS}
// CTRL+SHIFT+'a'| key_code = \x41, modifier_key = {CTRL,SHIFT,CAPS}
//
// However, only in short-cut judgement, we should convert capital characters
// into lower cases.
// TODO(peria): Specify exceptions with CAPS, and unify with the above table.
enum ModifierKey {
CTRL = 1;
ALT = 2;
SHIFT = 4;
KEY_DOWN = 8;
KEY_UP = 16;
LEFT_CTRL = 32;
LEFT_ALT = 64;
LEFT_SHIFT = 128;
RIGHT_CTRL = 256;
RIGHT_ALT = 512;
RIGHT_SHIFT = 1024;
CAPS = 2048;
};
optional uint32 key_code = 1; // Printable key in ASCII.
optional uint32 modifiers = 2; // Going to be obsolete.
optional SpecialKey special_key = 3; // Unprintable key listed above.
repeated ModifierKey modifier_keys = 4; // ModifierKeys
// String used for preedit. Kana characters and strings typed from
// a software keyboard are supposed to be stored here. To set kana
// value, key_code=1 should be stored an ascii character for the
// kana key.
optional string key_string = 5;
enum InputStyle {
// Follow the current input mode (default).
FOLLOW_MODE = 0;
// Do not transliterate key_string and use it as-is.
AS_IS = 1;
// Immediately output key_string on the precomposition mode.
// Same with AS_IS on the preedit mode.
DIRECT_INPUT = 2;
};
optional InputStyle input_style = 6 [default = FOLLOW_MODE];
// Input mode
optional CompositionMode mode = 7;
};
message SessionCommand {
enum CommandType {
// Revert the session, this is usually similar to type ESC several times.
REVERT = 1;
// Commit the session, this is usually similar to type Enter.
// SUBMIT session command is accepted in any status.
// Pre-condition:
// - Any states of IME are acceptable.
// Post-condition:
// - Preedit text becomes empty.
SUBMIT = 2;
// Select the specified candidate word by id. This command is
// usually used with mouse clicking.
SELECT_CANDIDATE = 3;
// Set the focus to the candidate by id. This is usually used
// with mouse dragging. The difference from SELECT_CANDIDATE is
// that HIGHLIGHT_CANDIDATE does not close the candidate window
// while SELECT_CANDIDATE closes the candidate window.
HIGHLIGHT_CANDIDATE = 4;
// Specify the input mode. This command should be used with
// composition_mode.
SWITCH_INPUT_MODE = 5;
// Return the current status such as composition mode, preedit method, etc.
GET_STATUS = 6;
SUBMIT_CANDIDATE = 7;
// Perform reverse conversion.
CONVERT_REVERSE = 8;
// Perform Undo.
UNDO = 9;
// Reset convert history and revert current composition.
// This is usually used by moving cursor with mouse clicking.
RESET_CONTEXT = 10;
// Change cursor position in preedit.
MOVE_CURSOR = 11;
// Specify the input field type.
SWITCH_INPUT_FIELD_TYPE = 12;
// Client side event information for collecting usage statistics
USAGE_STATS_EVENT = 13;
// Expand suggestion candidates.
// Usual suggestion algorithm is not "rich" but "fast" because suggestion
// is executed every key event (On the other hand predicition is "rich"
// because prediction is executed only when a user types TAB key).
// This command expands suggestion candidate but IME state is
// kept as is (Note : PredictAndConvert key command does almost the same
// thing but it changes IME state to prediction).
EXPAND_SUGGESTION = 15;
// The client can send the current caret position whenever the caret
// position is changed. The caret position is used for suggest window
// position calculation. This is an optional message. If client can show
// suggest window on the correct position, this message can be ignored.
SEND_CARET_LOCATION = 16;
// Number of commands.
// When new command is added, the command should use below number
// and NUM_OF_COMMANDS should be incremented.
NUM_OF_COMMANDS = 17;
};
required CommandType type = 1;
// Unique number specifying a candidate word.
optional int32 id = 2;
// This is used with SWITCH_INPUT_MODE.
optional CompositionMode composition_mode = 3;
// Text argument. This is used by CONVERT_REVERSE at this moment.
optional string text = 4;
// New cursor position in preedit. Used with MOVE_CURSOR.
optional uint32 cursor_position = 5;
// Input field type.
// The types are based on the input types defined in HTML5.
// http://dev.w3.org/html5/spec/Overview.html#attr-input-type
// Other types are to be added later.
enum InputFieldType {
// No restrictions nor special functions. The IME operates as usual.
NORMAL = 1;
// Password field. Text is hidden after input.
PASSWORD = 2;
// Telephone number
TEL = 3;
// Number
NUMBER = 4;
};
// Type of the input field being focused.
optional InputFieldType input_field_type = 6;
// Client side event for collecting usage statistics
enum UsageStatsEvent {
INFOLIST_WINDOW_SHOW = 1;
INFOLIST_WINDOW_HIDE = 2;
}
optional UsageStatsEvent usage_stats_event = 7;
// Specify the current caret location, this is used for suggest window
// position calculation. Used with SEND_CARET_LOCATION.
optional Rectangle caret_rectangle = 8;
};
message Context {
// Former part of surrounding text.
optional string preceding_text = 1;
// Latter part of surrounding text.
optional string following_text = 2;
};
// Clients' capability.
// Users cannot modify this.
// The server has to obey this capability.
message Capability {
// Bit fields to notify what the client can do.
enum TextDeletionCapabilityType {
NO_TEXT_DELETION_CAPABILITY = 0;
// Can delete preceding text which is adjacent to preedit.
DELETE_PRECEDING_TEXT = 1;
};
optional TextDeletionCapabilityType text_deletion = 1
[default = NO_TEXT_DELETION_CAPABILITY];
};
// Note there is another ApplicationInfo inside RendererCommand.
// Since Input is not using nested message, define ApplicationInfo here.
message ApplicationInfo {
optional uint32 process_id = 1;
optional uint32 thread_id = 2;
};
message Input {
enum CommandType {
NONE = 0;
CREATE_SESSION = 1;
DELETE_SESSION = 2;
SEND_KEY = 3;
// Check only if the key event will be consumed. This command is
// for TSF on Windows. You do not need to use this command, if it
// is not necessary.
TEST_SEND_KEY = 4;
// Evaluate the command specified by SessionCommand. The output
// format should be the same with an output of a SEND_KEY command.
SEND_COMMAND = 5;
// Config accessors.
// There are three configurations.
// Stored config, Imposed config, One-shot config.
// Stored config : Set by SET_CONFIG command.
// Its lifetime is permanent (stored into a storage).
// GET_CONFIG returns stored config.
// Imposed config : Set by SET_IMPOSED_CONFIG. Its lifetime is the
// same as the process (*not* stored into a storage as opposed to Stored
// config).
// Imposed config is prioritized over Stored config.
// Only the values explicitly set are effective and override ones in Stored
// config. In typical usage, most fields are not set.
// GET_CONFIG's result is *not* affected by imposed config
// (stored config returns).
// One-shot config : Set by each key events.
// It is effective while the key event is processed.
// This is prioritized over Imposed config.
// Like as Imposed config, some fields can be omitted.
// TODO(matsuzakit): Rename (GET|SET)_CONFIG to (GET|SET)_STORED_CONFIG
GET_CONFIG = 6;
SET_CONFIG = 7;
SET_IMPOSED_CONFIG = 22;
// sync dictionary/history data to local file
SYNC_DATA = 8;
// shutdowon server safely
SHUTDOWN = 9;
// reload mutable data (like config, user-dic, history)
RELOAD = 10;
// clear user history data
CLEAR_USER_HISTORY = 11;
// clear user prediction data
CLEAR_USER_PREDICTION = 12;
// clear unused prediction
CLEAR_UNUSED_USER_PREDICTION = 16;
// clean up sessions
// shutdwon if session is empty and
// mozc_server is launched with timeout mode
CLEANUP = 13;
// no operation
// can be used for pinging the server
NO_OPERATION = 14;
// Number of commands.
// When new command is added, the command should use below number
// and NUM_OF_COMMANDS should be incremented.
NUM_OF_COMMANDS = 26;
};
required CommandType type = 1;
// Session ID created by CREATE_SESSION.
optional uint64 id = 2;
// Key combinations used for SEND_KEY or TEST_SEND_KEY.
optional KeyEvent key = 3;
// Command sent to the session layer used with SEND_COMMAND.
optional SessionCommand command = 4;
// Input config
optional mozc.config.Config config = 5;
// Context data
optional Context context = 6;
// Client capability
optional Capability capability = 7;
// Application information, like process id.
// Server may be able to change the behavior by seeing the
// the program name.
optional ApplicationInfo application_info = 8;
};
// Result contains data to be submitted to the host application by the
// ime client.
message Result {
enum ResultType {
NONE = 0;
STRING = 1;
};
required ResultType type = 1;
// The result of conversion.
required string value = 2;
// Source of the value. It is almost always the reading of the value.
optional string key = 3;
};
// Preedit represents a composition data, which is rendered on the
// host application by the ime client. On Japanese IME, the both
// Preedit and Conversion statuses are represented by this message.
message Preedit {
required uint32 cursor = 1;
// The string data of Preedit is separated into Segment messages
// presenting the ime server's status. On Preedit status of
// Japanese IME, there are up to three segments; left side chars of
// cursor, forcused char, right side chars of cursor. On Conversion
// status of Japanese IME, the messages literally represent the
// segments of the conversion.
repeated group Segment = 2 {
enum Annotation {
NONE = 0;
UNDERLINE = 1;
HIGHLIGHT = 2;
};
required Annotation annotation = 3;
required string value = 4;
// The length of value in characters. This is NOT a number in
// bytes or logical character units. So, the length of "abc" and
// "あいう" should be 3, "ヴ" should be 1 and "ヴ" and "う゛"
// should be 2.
required uint32 value_length = 5;
// Source of the value. It is almost always the reading of the value.
optional string key = 6;
};
// The position of the first segment whose annotation is 'HIGHLIGHT'. Not set
// if there are no such segments.
optional uint32 highlighted_position = 3;
};
message Status {
// Whether IME is ON or OFF
optional bool activated = 1;
// Composition mode when IME is activated.
optional CompositionMode mode = 2;
};
// This messsage contains which characters are to be deleted by client.
// E.g. if current composition and surrounding text are
// "この感じは漢字は"
// ^^^^^^
// and we send DeletionRange with offset == -3 and length == 3, then they will
// be rendered like:
// "この漢字は"
// ^^^^^^
message DeletionRange {
// Offset of start of range.
optional int32 offset = 1;
// Length of the range.
optional int32 length = 2;
};
message Output {
optional uint64 id = 1;
// This variable is going to be obsolete.
optional CompositionMode mode = 2;
optional bool consumed = 3;
optional Result result = 4;
optional Preedit preedit = 5;
optional Candidates candidates = 6;
optional KeyEvent key = 7;
// when URL is non empty, UI can open the page with a browser,
// after finishing the all rendering part.
// We are using this feature for bug-report system.
optional string url = 8;
// Output config
optional mozc.config.Config config = 9;
// PreeditMethod: this is the default input mode of the session.
// If the user's config is "kana-input", it returns KANA. Only
// CreateSession response will have this field.
enum PreeditMethod {
ASCII = 0;
KANA = 1;
};
optional PreeditMethod preedit_method = 10 [default = ASCII];
// ErrorCode:
// if SessionHandler::EvalCommand() returns false,
// return output with error_code = SESSION_FAILURE;
enum ErrorCode {
SESSION_SUCCESS = 0;
SESSION_FAILURE = 1;
};
optional ErrorCode error_code = 11 [ default = SESSION_SUCCESS ];
// number of microseconds that have elapsed for processing the request.
optional uint32 elapsed_time = 12 [ default = 0 ];
// The current IME status.
optional Status status = 13;
// All flatten candidate words stored in 1D array. This value is
// filled only when the content is changed.
optional CandidateList all_candidate_words = 14;
// Performed command name in the server
optional string performed_command = 15;
// Range of characters to be deleted by client.
optional DeletionRange deletion_range = 16;
// if launch_tool_mode is set, MozcTool is supposed to be launched
// by client.
enum ToolMode {
NO_TOOL = 0; // no need to launch tool
CONFIG_DIALOG = 1;
DICTIONARY_TOOL = 2;
WORD_REGISTER_DIALOG = 3;
};
optional ToolMode launch_tool_mode = 17 [ default = NO_TOOL ];
// Callback request to the client.
message Callback {
// Callback command to be sent from the client to the server. The
// optional values such as id and composition_mode can be modified
// or added by the client.
optional SessionCommand session_command = 1;
};
optional Callback callback = 18;
};
message Command {
required Input input = 1;
required Output output = 2;
};
message CommandList {
// This message is used for unittest.
repeated Command commands = 1;
};
// TODO(team): Make a new proto file into which RendererCommand is moved.
message RendererCommand {
message Rectangle {
optional int32 left = 1;
optional int32 top = 2;
optional int32 right = 3;
optional int32 bottom = 4;
};
message Point {
optional int32 x = 1;
optional int32 y = 2;
};
enum CommandType {
NOOP = 0; // No operation
UPDATE = 1; // Update the current window
SHUTDOWN = 2; // shutdown renderer
};
optional CommandType type = 1 [ default = NOOP ];
// set visibility
// if visible is false, the content of output
// is basically ignored.
optional bool visible = 2 [ default = false ];
optional Output output = 3;
// Preedit rectangle
optional Rectangle preedit_rectangle = 4;
// TODO(yukawa): make a common font format for all platforms.
message WinLogFont {
optional int32 height = 1 [ default = 0 ];
optional int32 width = 2 [ default = 0 ];
optional int32 escapement = 3 [ default = 0 ];
optional int32 orientation = 4 [ default = 0 ];
optional int32 weight = 5 [ default = 0 ]; // FW_DONTCARE
optional bool italic = 6 [ default = false ];
optional bool underline = 7 [ default = false ];
optional bool strike_out = 8 [ default = false ];
optional int32 char_set = 9 [ default = 1 ]; // DEFAULT_CHARSET
optional int32 out_precision = 10 [ default = 0 ]; // OUT_DEFAULT_PRECIS
optional int32 clip_precision = 11 [ default = 0 ]; // CLIP_DEFAULT_PRECIS
optional int32 quality = 12 [ default = 0 ]; // DEFAULT_QUALITY
optional int32 pitch_and_family = 13 [ default = 0 ]; // DEFAULT_PITCH
optional string face_name = 14; // should be within 32 TCHARs (w/ '\0')
};
// An equivalent to COMPOSITIONFORM in IMM32. (For Windows only)
// TODO(yukawa): make a common composition form format for all platforms.
message CompositionForm {
// These constants correspond to CFS_* in Imm.h
enum Style {
DEFAULT = 0; // CFS_DEFAULT
RECT = 1; // CFS_RECT
POINT = 2; // CFS_POINT
FORCE_POSITION = 32; // CFS_FORCE_POSITION
};
// Use |style_bits| instead because there are some applications which
// specify a combination of style bits like CFS_RECT + CFS_POINT.
optional Style DEPRECATED_style = 1;
optional Point current_position = 2;
optional Rectangle area = 3;
optional uint32 style_bits = 4 [ default = 0 ]; // 0 means Style::DEFAULT
};
// This message is not ready to be externally released.
// An equivalent to CANDIDATEFORM in IMM32. (For Windows only)
// TODO(yukawa): make a common candidate form format for all platforms.
message CandidateForm {
// These constants correspond to CFS_* in Imm.h
enum Style {
DEFAULT = 0; // CFS_DEFAULT
CANDIDATEPOS = 64; // CFS_CANDIDATEPOS
EXCLUDE = 128; // CFS_EXCLUDE
};
// Use |style_bits| instead in case there is an applications which
// specifies a combination of style bits.
optional Style DEPRECATED_style = 1;
optional Point current_position = 2;
optional Rectangle area = 3;
optional uint32 style_bits = 4 [ default = 0 ]; // 0 means Style::DEFAULT
};
// This message is not ready to be externally released.
// An equivalent to IMECHARPOSITION in IMM32. (For Windows only)
// TODO(yukawa): make a common candidate form format for all platforms.
message CharacterPosition {
optional uint32 position = 1;
optional Point top_left = 2;
optional uint32 line_height = 3;
optional Rectangle document_area = 4;
}
// This message is a subset of Win32 GUITHREADINFO. (For Windows only)
// TODO(yukawa): make a common candidate form format for all platforms.
message CaretInfo {
optional bool blinking = 1 [ default = false ];
optional Rectangle caret_rect = 2;
optional uint32 target_window_handle = 3;
}
// Application information Mozc UI is attaching
message ApplicationInfo {
optional uint32 process_id = 1;
optional uint32 thread_id = 2;
// used in Windows:
// WHND of the message-only window:
optional uint32 receiver_handle = 3;
// used in Windows:
// HWND of the window where composition is displayed.
optional uint32 target_window_handle = 4;
// used in Windows:
// Preffered font for composition string.
optional WinLogFont composition_font = 5;
// Represents IM Framework used in the client.
// Currently only Windows IM frameworks are supported.
// TODO(team): Add other IM frameworks.
enum InputFrameworkType {
UNKNOWN_FRAMEWORK = 0; // Default. For backward compatibility.
TSF = 1;
IMM32 = 2;
};
// used in Windows:
// Specifies which IM Framework is used in the client.
// TODO(team): Support other IM frameworks.
optional InputFrameworkType input_framework = 6
[ default = UNKNOWN_FRAMEWORK ];
// used in Windows:
// Specifies where and how the renderer process shows the composition
// window (if necessary).
optional CompositionForm composition_form = 7;
// used in Windows:
// Specifies where and how the renderer process shows the candidate
// window (if necessary).
// Currently only one candidate window is supported.
// TODO(yukawa): support multiple candidate windows.
optional CandidateForm candidate_form = 8;
// used in Windows:
// Indicates if a UI element is expected to be displayed or not. Note
// taht |RendererCommand::visible| should be prior to these flags, that is,
// you should hide all UI elements if |RendererCommand::visible| is false
// regardless of the visibility specified in this field.
enum UIVisibility {
ShowUIDefault = 0;
ShowCompositionWindow = 1;
ShowCandidateWindow = 2;
ShowSuggestWindow = 4;
};
// used in Windows:
optional int32 ui_visibilities = 9 [ default = 0 ]; // ShowUIDefault
// used in Windows:
// Specifies the target position in composition window.
optional CharacterPosition composition_target = 10;
// used in Windows:
// Represents caret information.
optional CaretInfo caret_info = 11;
// Renderer sends RendererCommand to renderer itself in order to
// extend InfoList.
enum MessageSenderType {
CLIENT = 0;
RENDERER = 1;
};
optional MessageSenderType message_sender_type = 12 [ default = CLIENT ];
};
optional ApplicationInfo application_info = 5;
};