Class GLFWHandle

java.lang.Object
com.blackrook.gloop.glfw.GLFWHandle
Direct Known Subclasses:
GLFWCursor, GLFWMonitor, GLFWWindow

public abstract class GLFWHandle extends Object
Generic GLFW handle type. This wraps an allocated memory address.
Author:
Matthew Tropiano
  • Constructor Details

    • GLFWHandle

      protected GLFWHandle()
      Allocates a new GLFW handle.
  • Method Details

    • getHandle

      public abstract long getHandle()
      Returns:
      this handle's GLFW address handle.
    • isCreated

      public abstract boolean isCreated()
      Returns:
      true if this handle was allocated, false if not.
    • destroy

      public abstract void destroy()
      Destroys this handle. Does nothing if already destroyed.
      Throws:
      GLFWException - if a problem occurs during free.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(GLFWHandle handle)
      Tests if this GLFW handle equals the provided one.
      Parameters:
      handle - the handle to test.
      Returns:
      true if so, false if not.
    • finalize

      public void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • toString

      public String toString()
      Overrides:
      toString in class Object