Add GET_CLIPBOARD device event

Add the first device event, used to forward the device clipboard to the
computer.
This commit is contained in:
Romain Vimont 2019-05-30 00:24:26 +02:00
commit f9d2d99166
5 changed files with 141 additions and 0 deletions

View 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;
}
}