APIdia Launch Partner
Top Description Constructors Methods
com.badlogic.gdx.backends.lwjgl3

public Class Lwjgl3Clipboard

extends Object
implements Clipboard
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.utils.Clipboard
Imports
org.lwjgl.glfw.GLFW, com.badlogic.gdx.Gdx, com.badlogic.gdx.utils.Clipboard

Clipboard implementation for desktop that uses the system clipboard via GLFW.
Author
mzechner

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getContents()

Implements com.badlogic.gdx.utils.Clipboard.getContents.

gets the current content of the clipboard if it contains text for WebGL app, getting the system clipboard is currently not supported.

public boolean
hasContents()

Implements com.badlogic.gdx.utils.Clipboard.hasContents.

Check if the clipboard has contents.

public void
setContents(String content)

Implements com.badlogic.gdx.utils.Clipboard.setContents.

Sets the content of the system clipboard.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Lwjgl3Clipboardback to summary
public Lwjgl3Clipboard()

Method Detail

getContentsback to summary
public String getContents()

Implements com.badlogic.gdx.utils.Clipboard.getContents.

Doc from com.badlogic.gdx.utils.Clipboard.getContents.

gets the current content of the clipboard if it contains text for WebGL app, getting the system clipboard is currently not supported. It works only inside the app

Annotations
@Override
hasContentsback to summary
public boolean hasContents()

Implements com.badlogic.gdx.utils.Clipboard.hasContents.

Doc from com.badlogic.gdx.utils.Clipboard.hasContents.

Check if the clipboard has contents. Recommended to use over getContents() for privacy reasons, if you only want to check if there's something on the clipboard. For instance, calling getContents() on iOS shows a privacy notification since iOS 14, while hasContents() does not.

Annotations
@Override
setContentsback to summary
public void setContents(String content)

Implements com.badlogic.gdx.utils.Clipboard.setContents.

Doc from com.badlogic.gdx.utils.Clipboard.setContents.

Sets the content of the system clipboard. for WebGL app, clipboard content might not be set if user denied permission, setting clipboard is not synchronous so you can't rely on getting same content just after setting it

Annotations
@Override