Class GLFWNativeX11
- java.lang.Object
-
- org.lwjgl.glfw.GLFWNativeX11
-
public class GLFWNativeX11 extends java.lang.Object
Native bindings to the GLFW library's X11 native access functions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GLFWNativeX11.Functions
Contains the function pointers loaded fromGLFW.getLibrary()
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
glfwGetX11Adapter(long monitor)
Returns theRRCrtc
of the specified monitor.static long
glfwGetX11Display()
Returns theDisplay
used by GLFW.static long
glfwGetX11Monitor(long monitor)
Returns theRROutput
of the specified monitor.static java.lang.String
glfwGetX11SelectionString()
Returns the contents of the current primary selection as a string.static long
glfwGetX11Window(long window)
Returns theWindow
of the specified window.static void
glfwSetX11SelectionString(java.lang.CharSequence string)
Sets the current primary selection to the specified string.static void
glfwSetX11SelectionString(java.nio.ByteBuffer string)
Sets the current primary selection to the specified string.static long
nglfwGetX11SelectionString()
Unsafe version of:GetX11SelectionString
static void
nglfwSetX11SelectionString(long string)
Unsafe version of:SetX11SelectionString
-
-
-
Method Detail
-
glfwGetX11Display
public static long glfwGetX11Display()
Returns theDisplay
used by GLFW.Note: This function may be called from any thread. Access is not synchronized.
- Returns:
- The
Display
used by GLFW, orNULL
if an error occurred. - Since:
- version 3.0
-
glfwGetX11Adapter
public static long glfwGetX11Adapter(long monitor)
Returns theRRCrtc
of the specified monitor.Note: This function may be called from any thread. Access is not synchronized.
- Parameters:
monitor
- the GLFW monitor- Returns:
- The
RRCrtc
of the specified monitor, orNone
if an error occurred. - Since:
- version 3.1
-
glfwGetX11Monitor
public static long glfwGetX11Monitor(long monitor)
Returns theRROutput
of the specified monitor.Note: This function may be called from any thread. Access is not synchronized.
- Parameters:
monitor
- the GLFW monitor- Returns:
- The
RROutput
of the specified monitor, orNone
if an error occurred. - Since:
- version 3.1
-
glfwGetX11Window
public static long glfwGetX11Window(long window)
Returns theWindow
of the specified window.Note: This function may be called from any thread. Access is not synchronized.
- Parameters:
window
- a GLFW window- Returns:
- The
Window
of the specified window, orNone
if an error occurred. - Since:
- version 3.0
-
nglfwSetX11SelectionString
public static void nglfwSetX11SelectionString(long string)
Unsafe version of:SetX11SelectionString
-
glfwSetX11SelectionString
public static void glfwSetX11SelectionString(java.nio.ByteBuffer string) public static void glfwSetX11SelectionString(java.lang.CharSequence string)
Sets the current primary selection to the specified string.This function must only be called from the main thread.
- Parameters:
string
- a UTF-8 encoded string. The specified string is copied before this function returns.- Since:
- version 3.3
-
nglfwGetX11SelectionString
public static long nglfwGetX11SelectionString()
Unsafe version of:GetX11SelectionString
-
glfwGetX11SelectionString
@Nullable public static java.lang.String glfwGetX11SelectionString()
Returns the contents of the current primary selection as a string.If the selection is empty or if its contents cannot be converted,
NULL
is returned and aFORMAT_UNAVAILABLE
error is generated.The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the next call to
GetX11SelectionString
orSetX11SelectionString
, or until the library is terminated.This function must only be called from the main thread.
- Returns:
- the contents of the selection as a UTF-8 encoded string, or
NULL
if an error occurred - Since:
- version 3.3
-
-