Interface LibX11

  • All Superinterfaces:
    com.sun.jna.Library

    public interface LibX11
    extends com.sun.jna.Library
    JNA interface to the Xlib native library.

    The only exposed API is that used to initialise XLib for multi-threaded access.

    Usage is simple, at the start of an application:

     int result = LibX11.INSTANCE.XInitThreads();
     // "result" will be non-zero if the native library call succeeded
     
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.jna.Library

        com.sun.jna.Library.Handler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static LibX11 INSTANCE
      Native library instance.
      • Fields inherited from interface com.sun.jna.Library

        OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_TYPE_MAPPER
    • Field Detail

      • INSTANCE

        static final LibX11 INSTANCE
        Native library instance.

        Conceivably Xlib could be present on Windows.

    • Method Detail

      • XInitThreads

        int XInitThreads()
        Initialise Xlib support for concurrent threads.

        Invoking this at the start of an application can reduce the chance of a fatal JVM crash when using multiple media players.

        Returns:
        non-zero on success, zero on failure (or if threading is not supported)