Top Fields Constructors Methods
org.lwjgl.opengl

pack-priv final Class MacOSXNativeMouse

extends EventQueue
Class Inheritance
Imports
java.nio.ByteBuffer, .IntBuffer, org.lwjgl.input.Mouse, org.lwjgl.LWJGLException, .BufferUtils, java.lang.reflect.*, java.lang.Integer, .Long

Field Summary

Modifier and TypeField and Description
private float
accum_dx

The accumulated mouse deltas returned by poll()

private float
private int
private final byte[]
private IntBuffer
private MacOSXDisplay
private final ByteBuffer
private boolean
private float
last_x

The last mouse position

private float
private static final int
private boolean
saved_control_state

Saved control key state for ctrl-click right button emulation

private int
private static final int
private ByteBuffer

Constructor Summary

AccessConstructor and Description
pack-priv
MacOSXNativeMouse(MacOSXDisplay display, ByteBuffer window_handle)

Method Summary

Modifier and TypeMethod and Description
protected void
addDelta(float dx, float dy)

public static long
createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays)

public static void
destroyCursor(long cursor_handle)

public synchronized boolean
public synchronized void
mouseMoved(float x, float y, float dx, float dy, float dz, long nanos)

private static native long
nCreateCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, int images_offset, IntBuffer delays, int delays_offset)

private static native void
nDestroyCursor(long cursor_handle)

public static native void
nGrabMouse(boolean grab)

private native void
private static native void
nSetCursor(long cursor_handle)

private native void
nSetCursorPosition(ByteBuffer window_handle, int x, int y)

private native void
public synchronized void
poll(IntBuffer coord_buffer, ByteBuffer buttons_buffer)

private void
putMouseEvent(byte button, byte state, int dz, long nanos)

protected void
putMouseEventWithCoords(byte button, byte state, int coord1, int coord2, int dz, long nanos)

public synchronized void
protected void
public synchronized void
setButton(int button, int state, long nanos)

public static void
setCursor(long cursor_handle)

private void
setCursorPos(float x, float y, long nanos)

public synchronized void
setCursorPosition(int x, int y)

public synchronized void
setGrabbed(boolean grabbed)

public synchronized void
Inherited from org.lwjgl.opengl.EventQueue:
clearEventscopyEventsputEvent

Field Detail

accum_dxback to summary
private float accum_dx

The accumulated mouse deltas returned by poll()

accum_dyback to summary
private float accum_dy
accum_dzback to summary
private int accum_dz
buttonsback to summary
private final byte[] buttons
delta_bufferback to summary
private IntBuffer delta_buffer
displayback to summary
private MacOSXDisplay display
eventback to summary
private final ByteBuffer event
grabbedback to summary
private boolean grabbed
last_xback to summary
private float last_x

The last mouse position

last_yback to summary
private float last_y
NUM_BUTTONSback to summary
private static final int NUM_BUTTONS
saved_control_stateback to summary
private boolean saved_control_state

Saved control key state for ctrl-click right button emulation

skip_eventback to summary
private int skip_event
WHEEL_SCALEback to summary
private static final int WHEEL_SCALE
window_handleback to summary
private ByteBuffer window_handle

Constructor Detail

MacOSXNativeMouseback to summary
pack-priv MacOSXNativeMouse(MacOSXDisplay display, ByteBuffer window_handle)

Method Detail

addDeltaback to summary
protected void addDelta(float dx, float dy)
createCursorback to summary
public static long createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException
destroyCursorback to summary
public static void destroyCursor(long cursor_handle)
isGrabbedback to summary
public synchronized boolean isGrabbed()
mouseMovedback to summary
public synchronized void mouseMoved(float x, float y, float dx, float dy, float dz, long nanos)
nCreateCursorback to summary
private static native long nCreateCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, int images_offset, IntBuffer delays, int delays_offset) throws LWJGLException
nDestroyCursorback to summary
private static native void nDestroyCursor(long cursor_handle)
nGrabMouseback to summary
public static native void nGrabMouse(boolean grab)
nRegisterMouseListenerback to summary
private native void nRegisterMouseListener(ByteBuffer window_handle)
nSetCursorback to summary
private static native void nSetCursor(long cursor_handle) throws LWJGLException
nSetCursorPositionback to summary
private native void nSetCursorPosition(ByteBuffer window_handle, int x, int y)
nUnregisterMouseListenerback to summary
private native void nUnregisterMouseListener(ByteBuffer window_handle)
pollback to summary
public synchronized void poll(IntBuffer coord_buffer, ByteBuffer buttons_buffer)
putMouseEventback to summary
private void putMouseEvent(byte button, byte state, int dz, long nanos)
putMouseEventWithCoordsback to summary
protected void putMouseEventWithCoords(byte button, byte state, int coord1, int coord2, int dz, long nanos)
registerback to summary
public synchronized void register()
resetCursorToCenterback to summary
protected void resetCursorToCenter()
setButtonback to summary
public synchronized void setButton(int button, int state, long nanos)
setCursorback to summary
public static void setCursor(long cursor_handle) throws LWJGLException
setCursorPosback to summary
private void setCursorPos(float x, float y, long nanos)
setCursorPositionback to summary
public synchronized void setCursorPosition(int x, int y)
setGrabbedback to summary
public synchronized void setGrabbed(boolean grabbed)
unregisterback to summary
public synchronized void unregister()