use of org.kde.kdeconnect.NetworkPacket in project kdeconnect-android by KDE.
the class PresenterPlugin method stopPointer.
public void stopPointer() {
device.getAndRemoveUnsentPacket(NetworkPacket.PACKET_REPLACEID_PRESENTERPOINTER);
NetworkPacket np = new NetworkPacket(PACKET_TYPE_PRESENTER);
np.set("stop", true);
device.sendPacket(np);
}
use of org.kde.kdeconnect.NetworkPacket in project kdeconnect-android by KDE.
the class PresenterPlugin method sendEsc.
public void sendEsc() {
NetworkPacket np = new NetworkPacket(PACKET_TYPE_MOUSEPAD_REQUEST);
np.set("specialKey", SpecialKeysMap.get(KeyEvent.KEYCODE_ESCAPE));
device.sendPacket(np);
}
use of org.kde.kdeconnect.NetworkPacket in project kdeconnect-android by KDE.
the class PresenterPlugin method sendPointer.
public void sendPointer(float xDelta, float yDelta) {
NetworkPacket np = device.getAndRemoveUnsentPacket(NetworkPacket.PACKET_REPLACEID_PRESENTERPOINTER);
if (np == null) {
np = new NetworkPacket(PACKET_TYPE_PRESENTER);
} else {
xDelta += np.getInt("dx");
yDelta += np.getInt("dy");
}
np.set("dx", xDelta);
np.set("dy", yDelta);
device.sendPacket(np, NetworkPacket.PACKET_REPLACEID_PRESENTERPOINTER);
}
use of org.kde.kdeconnect.NetworkPacket in project kdeconnect-android by KDE.
the class PresenterPlugin method sendPrevious.
public void sendPrevious() {
NetworkPacket np = new NetworkPacket(PACKET_TYPE_MOUSEPAD_REQUEST);
np.set("specialKey", SpecialKeysMap.get(KeyEvent.KEYCODE_PAGE_UP));
device.sendPacket(np);
}
use of org.kde.kdeconnect.NetworkPacket in project kdeconnect-android by KDE.
the class RunCommandPlugin method sendSetupPacket.
void sendSetupPacket() {
NetworkPacket np = new NetworkPacket(RunCommandPlugin.PACKET_TYPE_RUNCOMMAND_REQUEST);
np.set("setup", true);
device.sendPacket(np);
}
Aggregations