mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-17 21:44:20 +01: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:
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user