Record Class GLFWwindow

java.lang.Object
java.lang.Record
dev.pfaff.glass.glfw.GLFWwindow

public record GLFWwindow(GLFW glfw, MemorySegment handle) extends Record
See Also:
  • Field Details

    • MH_glfwMakeContextCurrent

      public static final MethodHandle MH_glfwMakeContextCurrent
    • MH_glfwGetCurrentContext

      public static final MethodHandle MH_glfwGetCurrentContext
    • MH_glfwSwapInterval

      public static final MethodHandle MH_glfwSwapInterval
    • MH_glfwExtensionSupported

      public static final MethodHandle MH_glfwExtensionSupported
    • MH_glfwCreateWindow

      public static final MethodHandle MH_glfwCreateWindow
    • MH_glfwWindowHint

      public static final MethodHandle MH_glfwWindowHint
    • MH_glfwDestroyWindow

      public static final MethodHandle MH_glfwDestroyWindow
    • MH_glfwWindowShouldClose

      public static final MethodHandle MH_glfwWindowShouldClose
    • MH_glfwGetFramebufferSize

      public static final MethodHandle MH_glfwGetFramebufferSize
    • MH_glfwGetWindowSize

      public static final MethodHandle MH_glfwGetWindowSize
    • MH_glfwGetWindowContentScale

      public static final MethodHandle MH_glfwGetWindowContentScale
    • MH_glfwGetWindowAttrib

      public static final MethodHandle MH_glfwGetWindowAttrib
    • MH_glfwGetClipboardString

      public static final MethodHandle MH_glfwGetClipboardString
    • MH_glfwSetClipboardString

      public static final MethodHandle MH_glfwSetClipboardString
    • MH_glfwSwapBuffers

      public static final MethodHandle MH_glfwSwapBuffers
    • MH_glfwShowWindow

      public static final MethodHandle MH_glfwShowWindow
    • MH_glfwHideWindow

      public static final MethodHandle MH_glfwHideWindow
    • MH_glfwSetWindowSize

      public static final MethodHandle MH_glfwSetWindowSize
  • Constructor Details

    • GLFWwindow

      public GLFWwindow(GLFW glfw, MemorySegment handle)
      Creates an instance of a GLFWwindow record class.
      Parameters:
      glfw - the value for the glfw record component
      handle - the value for the handle record component
  • Method Details

    • setIntegerHint

      public static void setIntegerHint(GLFW glfw, WindowHint hint, int value)
    • setBooleanHint

      public static void setBooleanHint(GLFW glfw, WindowHint hint, boolean value)
    • create

      public static @NonNull GLFWwindow create(GLFW glfw, int width, int height, String title, @Nullable GLFWmonitor monitor, @Nullable GLFWwindow share)
    • getCurrentContext

      public static @Nullable GLFWwindow getCurrentContext(GLFW glfw)
    • makeContextCurrent

      public void makeContextCurrent()
    • destroy

      public void destroy()
    • shouldClose

      public boolean shouldClose()
    • setVisibility

      public void setVisibility(boolean value)
    • getWindowSize

      public GLFWwindow.WindowSize getWindowSize()
    • getFramebufferSize

      public GLFWwindow.FramebufferSize getFramebufferSize()
    • getWindowContentScale

      public GLFWwindow.ContentScale getWindowContentScale()
    • getWindowAttrib

      public int getWindowAttrib(WindowAttrib attrib)
    • getBooleanWindowAttrib

      public boolean getBooleanWindowAttrib(WindowAttrib attrib)
    • getClipboardString

      public @Nullable String getClipboardString()
      Returns:
      the contents of the clipboard if UTF-8 encoded or convertible, or null if empty or inconvertible.
    • setClipboardString

      public void setClipboardString(String string)
    • swapBuffers

      public void swapBuffers()
    • setSwapInterval

      public static void setSwapInterval(GLFW glfw, int interval)
    • setWindowSize

      public void setWindowSize(int width, int height)
    • isExtensionSupported

      public static boolean isExtensionSupported(GLFW glfw, String name)
      Returns:
      whether the named extension is supported by the current context.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • glfw

      public GLFW glfw()
      Returns the value of the glfw record component.
      Returns:
      the value of the glfw record component
    • handle

      public MemorySegment handle()
      Returns the value of the handle record component.
      Returns:
      the value of the handle record component