Interface Display.PointerIcon
-
- All Superinterfaces:
PixelRectangle
- Enclosing class:
- Display
public static interface Display.PointerIcon extends PixelRectangle
Native PointerIcon handle.Instances can be created via
Display
'screatePointerIcon(pngResource, ..)
orcreatePointerIcon(pixelrect, ..)
.Instance is
destroy()
'ed automatically if it'sassociated Display
is destroyed.Instance can be re-validated after destruction via
#validate()
.Display.PointerIcon
must not bedestroyed
while in use!Display.PointerIcon
may bedestroyed
manually after use, i.e. when noWindow
uses them
anymore. However, this is not required.PointerIcons can be used via
Window.setPointerIcon(PointerIcon)
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jogamp.nativewindow.util.PixelRectangle
PixelRectangle.GenericPixelRect
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
destroy()
Destroys this instance.Display
getDisplay()
PointImmutable
getHotspot()
Returns the hotspot.int
getStride()
Always neatly packed, i.e.int
hashCode()
Computes a hash code over: display pixelformat size stride isGLOriented pixels hotspot Dismissing the native handle!boolean
isGLOriented()
Always false, i.e.boolean
isValid()
Returns true if valid, otherwise false.-
Methods inherited from interface com.jogamp.nativewindow.util.PixelRectangle
getPixelformat, getPixels, getSize, toString
-
-
-
-
Method Detail
-
getStride
int getStride()
Always neatly packed, i.e. width * bytes_per_pixel.Returns stride in byte-size, i.e. byte count from one line to the next.
Must be >=
PixelRectangle.getPixelformat()
.bytesPerPixel()
*PixelRectangle.getSize()
.getWidth()
.- Specified by:
getStride
in interfacePixelRectangle
-
isGLOriented
boolean isGLOriented()
Always false, i.e. origin is TOP-LEFT.Returns
true
if the memory is laid out in OpenGL's coordinate system, origin at bottom left. Otherwise returnsfalse
, i.e. origin at top left.- Specified by:
isGLOriented
in interfacePixelRectangle
-
hashCode
int hashCode()
Computes a hash code over:- display
- pixelformat
- size
- stride
- isGLOriented
- pixels
- hotspot
The hashCode shall be computed only once with first call and stored for later retrieval to enhance performance.
Computes a hash code over:
- pixelformat
- size
- stride
- isGLOriented
- pixels
The hashCode shall be computed only once with first call and stored for later retrieval to enhance performance.
- Specified by:
hashCode
in interfacePixelRectangle
- Overrides:
hashCode
in classObject
-
getDisplay
Display getDisplay()
- Returns:
- the associated Display
-
getHotspot
PointImmutable getHotspot()
Returns the hotspot.
-
isValid
boolean isValid()
Returns true if valid, otherwise false.A PointerIcon instance becomes invalid if it's
associated Display
is destroyed.
-
destroy
void destroy()
Destroys this instance.Will be called automatically if it's
associated Display
is destroyed.
-
-