mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-07-28 19:58:55 +00:00
Add GET_CLIPBOARD device event
Add the first device event, used to forward the device clipboard to the computer.
This commit is contained in:
parent
ec71a3f66a
commit
f9d2d99166
5 changed files with 141 additions and 0 deletions
27
server/src/main/java/com/genymobile/scrcpy/DeviceEvent.java
Normal file
27
server/src/main/java/com/genymobile/scrcpy/DeviceEvent.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
package com.genymobile.scrcpy;
|
||||
|
||||
public final class DeviceEvent {
|
||||
|
||||
public static final int TYPE_GET_CLIPBOARD = 0;
|
||||
|
||||
private int type;
|
||||
private String text;
|
||||
|
||||
private DeviceEvent() {
|
||||
}
|
||||
|
||||
public static DeviceEvent createGetClipboardEvent(String text) {
|
||||
DeviceEvent event = new DeviceEvent();
|
||||
event.type = TYPE_GET_CLIPBOARD;
|
||||
event.text = text;
|
||||
return event;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue