Skip to content

Commit fba11c9

Browse files
author
Jakub Kulhan
committed
autoupdated protocol.json & generated files
1 parent 4da19f4 commit fba11c9

6 files changed

Lines changed: 260 additions & 1 deletion

File tree

gen-src/ChromeDevtoolsProtocol/Domain/InputDomain.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use ChromeDevtoolsProtocol\Model\Input\DispatchTouchEventRequest;
1111
use ChromeDevtoolsProtocol\Model\Input\DragInterceptedEvent;
1212
use ChromeDevtoolsProtocol\Model\Input\EmulateTouchFromMouseEventRequest;
13+
use ChromeDevtoolsProtocol\Model\Input\ImeSetCompositionRequest;
1314
use ChromeDevtoolsProtocol\Model\Input\InsertTextRequest;
1415
use ChromeDevtoolsProtocol\Model\Input\SetIgnoreInputEventsRequest;
1516
use ChromeDevtoolsProtocol\Model\Input\SetInterceptDragsRequest;
@@ -60,6 +61,12 @@ public function emulateTouchFromMouseEvent(ContextInterface $ctx, EmulateTouchFr
6061
}
6162

6263

64+
public function imeSetComposition(ContextInterface $ctx, ImeSetCompositionRequest $request): void
65+
{
66+
$this->internalClient->executeCommand($ctx, 'Input.imeSetComposition', $request);
67+
}
68+
69+
6370
public function insertText(ContextInterface $ctx, InsertTextRequest $request): void
6471
{
6572
$this->internalClient->executeCommand($ctx, 'Input.insertText', $request);

gen-src/ChromeDevtoolsProtocol/Domain/InputDomainInterface.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use ChromeDevtoolsProtocol\Model\Input\DispatchTouchEventRequest;
1010
use ChromeDevtoolsProtocol\Model\Input\DragInterceptedEvent;
1111
use ChromeDevtoolsProtocol\Model\Input\EmulateTouchFromMouseEventRequest;
12+
use ChromeDevtoolsProtocol\Model\Input\ImeSetCompositionRequest;
1213
use ChromeDevtoolsProtocol\Model\Input\InsertTextRequest;
1314
use ChromeDevtoolsProtocol\Model\Input\SetIgnoreInputEventsRequest;
1415
use ChromeDevtoolsProtocol\Model\Input\SetInterceptDragsRequest;
@@ -81,6 +82,17 @@ public function dispatchTouchEvent(ContextInterface $ctx, DispatchTouchEventRequ
8182
public function emulateTouchFromMouseEvent(ContextInterface $ctx, EmulateTouchFromMouseEventRequest $request): void;
8283

8384

85+
/**
86+
* This method sets the current candidate text for ime. Use imeCommitComposition to commit the final text. Use imeSetComposition with empty string as text to cancel composition.
87+
*
88+
* @param ContextInterface $ctx
89+
* @param ImeSetCompositionRequest $request
90+
*
91+
* @return void
92+
*/
93+
public function imeSetComposition(ContextInterface $ctx, ImeSetCompositionRequest $request): void;
94+
95+
8496
/**
8597
* This method emulates inserting text that doesn't come from a key press, for example an emoji keyboard or an IME.
8698
*
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\Input;
4+
5+
/**
6+
* Request for Input.imeSetComposition command.
7+
*
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <jakub.kulhan@gmail.com>
11+
*/
12+
final class ImeSetCompositionRequest implements \JsonSerializable
13+
{
14+
/**
15+
* The text to insert
16+
*
17+
* @var string
18+
*/
19+
public $text;
20+
21+
/**
22+
* selection start
23+
*
24+
* @var int
25+
*/
26+
public $selectionStart;
27+
28+
/**
29+
* selection end
30+
*
31+
* @var int
32+
*/
33+
public $selectionEnd;
34+
35+
/**
36+
* replacement start
37+
*
38+
* @var int|null
39+
*/
40+
public $replacementStart;
41+
42+
/**
43+
* replacement end
44+
*
45+
* @var int|null
46+
*/
47+
public $replacementEnd;
48+
49+
50+
public static function fromJson($data)
51+
{
52+
$instance = new static();
53+
if (isset($data->text)) {
54+
$instance->text = (string)$data->text;
55+
}
56+
if (isset($data->selectionStart)) {
57+
$instance->selectionStart = (int)$data->selectionStart;
58+
}
59+
if (isset($data->selectionEnd)) {
60+
$instance->selectionEnd = (int)$data->selectionEnd;
61+
}
62+
if (isset($data->replacementStart)) {
63+
$instance->replacementStart = (int)$data->replacementStart;
64+
}
65+
if (isset($data->replacementEnd)) {
66+
$instance->replacementEnd = (int)$data->replacementEnd;
67+
}
68+
return $instance;
69+
}
70+
71+
72+
public function jsonSerialize()
73+
{
74+
$data = new \stdClass();
75+
if ($this->text !== null) {
76+
$data->text = $this->text;
77+
}
78+
if ($this->selectionStart !== null) {
79+
$data->selectionStart = $this->selectionStart;
80+
}
81+
if ($this->selectionEnd !== null) {
82+
$data->selectionEnd = $this->selectionEnd;
83+
}
84+
if ($this->replacementStart !== null) {
85+
$data->replacementStart = $this->replacementStart;
86+
}
87+
if ($this->replacementEnd !== null) {
88+
$data->replacementEnd = $this->replacementEnd;
89+
}
90+
return $data;
91+
}
92+
93+
94+
/**
95+
* Create new instance using builder.
96+
*
97+
* @return ImeSetCompositionRequestBuilder
98+
*/
99+
public static function builder(): ImeSetCompositionRequestBuilder
100+
{
101+
return new ImeSetCompositionRequestBuilder();
102+
}
103+
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\Input;
4+
5+
use ChromeDevtoolsProtocol\Exception\BuilderException;
6+
7+
/**
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <jakub.kulhan@gmail.com>
11+
*/
12+
final class ImeSetCompositionRequestBuilder
13+
{
14+
private $text;
15+
private $selectionStart;
16+
private $selectionEnd;
17+
private $replacementStart;
18+
private $replacementEnd;
19+
20+
21+
/**
22+
* Validate non-optional parameters and return new instance.
23+
*/
24+
public function build(): ImeSetCompositionRequest
25+
{
26+
$instance = new ImeSetCompositionRequest();
27+
if ($this->text === null) {
28+
throw new BuilderException('Property [text] is required.');
29+
}
30+
$instance->text = $this->text;
31+
if ($this->selectionStart === null) {
32+
throw new BuilderException('Property [selectionStart] is required.');
33+
}
34+
$instance->selectionStart = $this->selectionStart;
35+
if ($this->selectionEnd === null) {
36+
throw new BuilderException('Property [selectionEnd] is required.');
37+
}
38+
$instance->selectionEnd = $this->selectionEnd;
39+
$instance->replacementStart = $this->replacementStart;
40+
$instance->replacementEnd = $this->replacementEnd;
41+
return $instance;
42+
}
43+
44+
45+
/**
46+
* @param string $text
47+
*
48+
* @return self
49+
*/
50+
public function setText($text): self
51+
{
52+
$this->text = $text;
53+
return $this;
54+
}
55+
56+
57+
/**
58+
* @param int $selectionStart
59+
*
60+
* @return self
61+
*/
62+
public function setSelectionStart($selectionStart): self
63+
{
64+
$this->selectionStart = $selectionStart;
65+
return $this;
66+
}
67+
68+
69+
/**
70+
* @param int $selectionEnd
71+
*
72+
* @return self
73+
*/
74+
public function setSelectionEnd($selectionEnd): self
75+
{
76+
$this->selectionEnd = $selectionEnd;
77+
return $this;
78+
}
79+
80+
81+
/**
82+
* @param int|null $replacementStart
83+
*
84+
* @return self
85+
*/
86+
public function setReplacementStart($replacementStart): self
87+
{
88+
$this->replacementStart = $replacementStart;
89+
return $this;
90+
}
91+
92+
93+
/**
94+
* @param int|null $replacementEnd
95+
*
96+
* @return self
97+
*/
98+
public function setReplacementEnd($replacementEnd): self
99+
{
100+
$this->replacementEnd = $replacementEnd;
101+
return $this;
102+
}
103+
}

protocol.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11020,6 +11020,40 @@
1102011020
}
1102111021
]
1102211022
},
11023+
{
11024+
"name": "imeSetComposition",
11025+
"description": "This method sets the current candidate text for ime. Use imeCommitComposition to commit the final text. Use imeSetComposition with empty string as text to cancel composition.",
11026+
"experimental": true,
11027+
"parameters": [
11028+
{
11029+
"name": "text",
11030+
"description": "The text to insert",
11031+
"type": "string"
11032+
},
11033+
{
11034+
"name": "selectionStart",
11035+
"description": "selection start",
11036+
"type": "integer"
11037+
},
11038+
{
11039+
"name": "selectionEnd",
11040+
"description": "selection end",
11041+
"type": "integer"
11042+
},
11043+
{
11044+
"name": "replacementStart",
11045+
"description": "replacement start",
11046+
"optional": true,
11047+
"type": "integer"
11048+
},
11049+
{
11050+
"name": "replacementEnd",
11051+
"description": "replacement end",
11052+
"optional": true,
11053+
"type": "integer"
11054+
}
11055+
]
11056+
},
1102311057
{
1102411058
"name": "insertText",
1102511059
"description": "This method emulates inserting text that doesn't come from a key press, for example an emoji keyboard or an IME.",

protocol.json.md5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
30cd2ea1cb9bed9146fc5658de312789 protocol.json
1+
7420665760e586c06ca048bcdd70e15c protocol.json

0 commit comments

Comments
 (0)