Top Description Fields Constructors Methods
com.sun.glass.ui.gtk.screencast

public final Class ScreencastHelper

extends Object
Class Inheritance
Imports
com.sun.glass.ui.Screen, com.sun.javafx.geom.Rectangle, java.util.List, .Set, .Timer, .TimerTask, java.util.function.Function, java.util.stream.IntStream

Helper class for grabbing pixels from the screen using the org.freedesktop.portal.ScreenCast API

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
private static final int
private static final boolean
private static final int
private static final int
pack-priv static final boolean
private static final Timer
private static volatile TimerTask
private static final int
private static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static int
clipRound(final double coordinate)

private static synchronized native void
private static boolean
debugReturnValue(int retVal)

public static synchronized void
getRGBPixels(int x, int y, int width, int height, int[] pixelArray)

private static native int
getRGBPixelsImpl(int x, int y, int width, int height, int[] pixelArray, int[] affectedScreensBoundsArray, String token)

private static List<Rectangle>
public static boolean
private static native boolean
loadPipewire(int method, boolean isDebug)

private static void
public static synchronized void
remoteDesktopKey(boolean isPress, int key)

private static synchronized native int
remoteDesktopKeyImpl(boolean isPress, int key, String token)

public static synchronized void
remoteDesktopMouseButton(boolean isPress, int buttons)

private static synchronized native int
remoteDesktopMouseButtonImpl(boolean isPress, int buttons, String token)

public static synchronized void
remoteDesktopMouseMove(int x, int y)

private static synchronized native int
remoteDesktopMouseMoveImpl(int x, int y, String token)

public static synchronized void
private static synchronized native int
remoteDesktopMouseWheelImpl(int wheelAmt, String token)

private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DELAY_BEFORE_SESSION_CLOSEback to summary
private static final int DELAY_BEFORE_SESSION_CLOSE
DENIEDback to summary
private static final int DENIED
ERRORback to summary
private static final int ERROR
IS_NATIVE_LOADEDback to summary
private static final boolean IS_NATIVE_LOADED
NO_STREAMSback to summary
private static final int NO_STREAMS
OUT_OF_BOUNDSback to summary
private static final int OUT_OF_BOUNDS
SCREENCAST_DEBUGback to summary
pack-priv static final boolean SCREENCAST_DEBUG
timerCloseSessionback to summary
private static final Timer timerCloseSession
timerTaskback to summary
private static volatile TimerTask timerTask
XDG_METHOD_REMOTE_DESKTOPback to summary
private static final int XDG_METHOD_REMOTE_DESKTOP
XDG_METHOD_SCREENCASTback to summary
private static final int XDG_METHOD_SCREENCAST

Constructor Detail

ScreencastHelperback to summary
private ScreencastHelper()

Method Detail

clipRoundback to summary
public static int clipRound(final double coordinate)
closeSessionback to summary
private static synchronized native void closeSession()
debugReturnValueback to summary
private static boolean debugReturnValue(int retVal)
getRGBPixelsback to summary
public static synchronized void getRGBPixels(int x, int y, int width, int height, int[] pixelArray)
getRGBPixelsImplback to summary
private static native int getRGBPixelsImpl(int x, int y, int width, int height, int[] pixelArray, int[] affectedScreensBoundsArray, String token)
getSystemScreensBoundsback to summary
private static List<Rectangle> getSystemScreensBounds()
isAvailableback to summary
public static boolean isAvailable()
loadPipewireback to summary
private static native boolean loadPipewire(int method, boolean isDebug)
performWithTokenback to summary
private static void performWithToken(Function<String, Integer> func)
remoteDesktopKeyback to summary
public static synchronized void remoteDesktopKey(boolean isPress, int key)
remoteDesktopKeyImplback to summary
private static synchronized native int remoteDesktopKeyImpl(boolean isPress, int key, String token)
remoteDesktopMouseButtonback to summary
public static synchronized void remoteDesktopMouseButton(boolean isPress, int buttons)
remoteDesktopMouseButtonImplback to summary
private static synchronized native int remoteDesktopMouseButtonImpl(boolean isPress, int buttons, String token)
remoteDesktopMouseMoveback to summary
public static synchronized void remoteDesktopMouseMove(int x, int y)
remoteDesktopMouseMoveImplback to summary
private static synchronized native int remoteDesktopMouseMoveImpl(int x, int y, String token)
remoteDesktopMouseWheelback to summary
public static synchronized void remoteDesktopMouseWheel(int wheel)
remoteDesktopMouseWheelImplback to summary
private static synchronized native int remoteDesktopMouseWheelImpl(int wheelAmt, String token)
timerCloseSessionRestartback to summary
private static void timerCloseSessionRestart()