OLD | NEW |
(Empty) | |
| 1 Index: commands.proto |
| 2 =================================================================== |
| 3 --- commands.proto (revision 58) |
| 4 +++ commands.proto (working copy) |
| 5 @@ -219,6 +219,13 @@ |
| 6 }; |
| 7 |
| 8 |
| 9 +message Rectangle { |
| 10 + required int32 x = 1; |
| 11 + required int32 y = 2; |
| 12 + required int32 width = 3; |
| 13 + required int32 height = 4; |
| 14 +} |
| 15 + |
| 16 message SessionCommand { |
| 17 enum CommandType { |
| 18 // Revert the session, this is usually similar to type ESC several times. |
| 19 @@ -255,6 +262,12 @@ |
| 20 |
| 21 // Change cursor position in preedit. |
| 22 MOVE_CURSOR = 11; |
| 23 + |
| 24 + // The client can send the current caret position whenever the caret |
| 25 + // position is changed. The caret position is used for suggest window |
| 26 + // position calculation. This is an optional message. If client can show |
| 27 + // suggest window on the correct position, this message can be ignored. |
| 28 + SEND_CARET_LOCATION = 12; |
| 29 }; |
| 30 required CommandType type = 1; |
| 31 |
| 32 @@ -269,6 +282,10 @@ |
| 33 |
| 34 // New cursor position in preedit. Used with MOVE_CURSOR. |
| 35 optional uint32 cursor_position = 5; |
| 36 + |
| 37 + // Specify the current caret location, this is used for suggest window |
| 38 + // position calculation. Used with SEND_CARET_LOCATION. |
| 39 + optional Rectangle caret_rectangle = 9; |
| 40 }; |
| 41 |
| 42 message Context { |
| 43 @@ -582,6 +599,20 @@ |
| 44 HORIZONTAL = 1; |
| 45 }; |
| 46 optional Direction direction = 14 [ default = VERTICAL ]; |
| 47 + |
| 48 + // This position is used for suggest window position. |
| 49 + optional Rectangle composition_rectangle = 15; |
| 50 + optional Rectangle caret_rectangle = 16; |
| 51 + |
| 52 + enum CandidateWindowLocation{ |
| 53 + // Shows candidate window under the caret. This is used for prediction and |
| 54 + // conversion |
| 55 + CARET = 0; |
| 56 + // Shows candidate window aligned with composition area. This is used for |
| 57 + // suggestion. |
| 58 + COMPOSITION = 1; |
| 59 + } |
| 60 + optional CandidateWindowLocation window_location = 17; |
| 61 }; |
| 62 |
| 63 message Status { |
OLD | NEW |