Skip to content

Commit

Permalink
Automated g4 rollback of changelist 586135894.
Browse files Browse the repository at this point in the history
*** Reason for rollback ***

Mozc's renderer_command.proto is shared between internal Bazel build and
external Bazel build [1].

The problem is that there seems to be no simple way to specify
'--experimental_editions' option in cc_proto_library in Bazel yet.

Thus renderer_command.proto cannot be converted to Edition until we
figure out a way to enable Edition in OSS Bazel build.

 [1]: https://github.com/google/mozc/blob/master/src/protocol/renderer_command.proto

*** Original change description ***

Migrate C++ protos to Editions (go/editions)

WARNING: We have determined that these protos are only used in C++.  If this is incorrect, or if you plan on using them in other languages within the next few months, a clean rollback should be safe.  Please notify us if you hit any issues.

This change has been verified to be behavior preserving both in the generated code and on the wire.  The only potential changes are for code that uses syntax-dependent reflection.  We've already migrated most of...

***

PiperOrigin-RevId: 586334075
  • Loading branch information
yukawa authored and hiroyuki-komatsu committed Nov 29, 2023
1 parent 50ab4cc commit 2eb2901
Showing 1 changed file with 37 additions and 59 deletions.
96 changes: 37 additions & 59 deletions src/protocol/renderer_command.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,108 +33,92 @@
// sent from client to renderer. The messages structure of
// RendererCommand and its child messages are here:

edition = "2023";
syntax = "proto2";

package mozc.commands;

import "protocol/commands.proto";

option features.enum_type = CLOSED;
option features.utf8_validation = UNVERIFIED;

message RendererCommand {
message Rectangle {
int32 left = 1;
int32 top = 2;
int32 right = 3;
int32 bottom = 4;
optional int32 left = 1;
optional int32 top = 2;
optional int32 right = 3;
optional int32 bottom = 4;
}

message Point {
int32 x = 1;
int32 y = 2;
optional int32 x = 1;
optional int32 y = 2;
}

enum CommandType {
NOOP = 0; // No operation

UPDATE = 1; // Update the current window

NOOP = 0; // No operation
UPDATE = 1; // Update the current window
SHUTDOWN = 2; // shutdown renderer
}

CommandType type = 1 [default = NOOP];
optional CommandType type = 1 [default = NOOP];

// set visibility
// if visible is false, the content of output
// is basically ignored.
bool visible = 2 [default = false];
optional bool visible = 2 [default = false];

Output output = 3;
optional Output output = 3;

// Preedit rectangle
Rectangle preedit_rectangle = 4;
optional Rectangle preedit_rectangle = 4;

// An equivalent to IMECHARPOSITION in IMM32. (For Windows only)
// TODO(yukawa): make a common candidate form format for all platforms.
message CharacterPosition {
uint32 position = 1;
Point top_left = 2;
uint32 line_height = 3;
Rectangle document_area = 4;

optional uint32 position = 1;
optional Point top_left = 2;
optional uint32 line_height = 3;
optional Rectangle document_area = 4;
// A quick solution for vertical writing support.
// Strictly speaking, this is not part of IMECHARPOSITION in IMM32.
bool vertical_writing = 5;
optional bool vertical_writing = 5;
}

// Visual information about mode indicator.
message IndicatorInfo {
Status status = 1;
optional Status status = 1;
}

// Application information Mozc UI is attaching
message ApplicationInfo {
uint32 process_id = 1;
uint32 thread_id = 2;

optional uint32 process_id = 1;
optional uint32 thread_id = 2;
// used in Windows:
// WHND of the message-only window:
uint32 receiver_handle = 3;

optional uint32 receiver_handle = 3;
// used in Windows:
// HWND of the window where composition is displayed.
uint32 target_window_handle = 4;
optional uint32 target_window_handle = 4;

reserved 5;

reserved composition_font;
reserved "composition_font";

// Represents IM Framework used in the client.
// Currently only Windows IM frameworks are supported.
enum InputFrameworkType {
UNKNOWN_FRAMEWORK = 0; // Default. For backward compatibility.

TSF = 1;

reserved 2;

reserved IMM32;

reserved "IMM32";
IMKit = 3;
IBus = 4;
}

// Specifies which IM Framework is used in the client.
InputFrameworkType input_framework = 6 [default = UNKNOWN_FRAMEWORK];
optional InputFrameworkType input_framework = 6
[default = UNKNOWN_FRAMEWORK];

reserved 7;

reserved composition_form;
reserved "composition_form";

reserved 8;

reserved candidate_form;
reserved "candidate_form";

// used in Windows:
// Indicates if a UI element is expected to be displayed or not. Note
Expand All @@ -143,40 +127,34 @@ message RendererCommand {
// regardless of the visibility specified in this field.
enum UIVisibility {
ShowUIDefault = 0;

reserved 1;

reserved ShowCompositionWindow;

reserved "ShowCompositionWindow";
ShowCandidateWindow = 2;
ShowSuggestWindow = 4;
}

// used in Windows:
int32 ui_visibilities = 9 [default = 0]; // ShowUIDefault
optional int32 ui_visibilities = 9 [default = 0]; // ShowUIDefault

// used in Windows:
// Specifies the target position in composition window.
CharacterPosition composition_target = 10;
optional CharacterPosition composition_target = 10;

reserved 11;

reserved caret_info;
reserved "caret_info";

reserved 12;

reserved message_sender_type;
reserved "message_sender_type";

// A string representation of PangoFontDescription
// http://developer.gnome.org/pango/stable/pango-Fonts.html#pango-font-description-from-string
// This field is not application specific information but temporaly locate
// here.
// TODO(nona): Make new message if necessary.
string pango_font_description = 13;
optional string pango_font_description = 13;

// used in Windows:
IndicatorInfo indicator_info = 14;
optional IndicatorInfo indicator_info = 14;
}

ApplicationInfo application_info = 5;
optional ApplicationInfo application_info = 5;
}

0 comments on commit 2eb2901

Please sign in to comment.