[go: up one dir, main page]

glfwGetX11SelectionString

Function glfwGetX11SelectionString 

Source
pub unsafe extern "C" fn glfwGetX11SelectionString() -> *const i8
Expand description

@brief 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 a @ref GLFW_FORMAT_UNAVAILABLE error is generated.

@return The contents of the selection as a UTF-8 encoded string, or NULL if an error occurred.

@errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_PLATFORM_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR.

@pointer_lifetime The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the next call to @ref glfwGetX11SelectionString or @ref glfwSetX11SelectionString, or until the library is terminated.

@thread_safety This function must only be called from the main thread.

@sa @ref clipboard @sa glfwSetX11SelectionString @sa glfwGetClipboardString

@since Added in version 3.3.

@ingroup native