/** * Copies {@code src.length} ints from {@code src} to the memory pointed to by * this {@link IntPtr}. * * @param src the source. */ public void set(int[] src) { set(src, 0, src.length); }
/** * Creates a new {@link IntPtr} and initializes it with the specified value. * * @param value the value. */ public IntPtr(int value) { set(value); }
public static GLKVector3 project(GLKVector3 object, GLKMatrix4 model, GLKMatrix4 projection, int[] viewport) { IntPtr ptr = new IntPtr(); ptr.set(viewport); return project(object, model, projection, ptr); } public static GLKVector3 unproject(GLKVector3 window, GLKMatrix4 model, GLKMatrix4 projection, int[] viewport, BooleanPtr success) {
@Callback private static void cbProcess(@Pointer long clientData, AudioQueueProcessingTap aqTap, int numberFrames, AudioTimeStamp timeStamp, AudioQueueProcessingTapMutableFlags flags, IntPtr outNumberFrames, AudioBufferList data) { synchronized (callbacks) { int outFrames = callbacks.get(clientData).process(aqTap, numberFrames, timeStamp, flags, data); outNumberFrames.set(outFrames); } }
@Callback private static final OSStatus cbWrite(@Pointer long clientData, long position, int requestCount, @Pointer long buffer, IntPtr actualCount) { synchronized (callbacks) { try { int actualWrite = callbacks.get(clientData).write(position, requestCount, VM.newDirectByteBuffer(buffer, requestCount)); actualCount.set(actualWrite); } catch (OSStatusException e) { return e.getStatus(); } return OSStatus.NO_ERR; } } @Callback
@Bridge(symbol="GLKMathUnproject", optional=true) private static native @ByVal GLKVector3 unproject(@ByVal GLKVector3 window, @ByVal GLKMatrix4 model, @ByVal GLKMatrix4 projection, IntPtr viewport, BooleanPtr success); /*</methods>*/
@Callback private static final OSStatus cbRead(@Pointer long clientData, long position, int requestCount, @Pointer long buffer, IntPtr actualCount) { synchronized (callbacks) { try { int actualRead = callbacks.get(clientData).read(position, requestCount, VM.newDirectByteBuffer(buffer, requestCount)); actualCount.set(actualRead); } catch (OSStatusException e) { return e.getStatus(); } return OSStatus.NO_ERR; } } @Callback
/** * Creates a new {@link IntPtr} and initializes it with the specified value. * * @param value the value. */ public IntPtr(int value) { set(value); }
/** * Copies {@code src.length} ints from {@code src} to the memory pointed to by * this {@link IntPtr}. * * @param src the source. */ public void set(int[] src) { set(src, 0, src.length); }
/** * Copies {@code src.length} ints from {@code src} to the memory pointed to by * this {@link IntPtr}. * * @param src the source. */ public void set(int[] src) { set(src, 0, src.length); }
/** * Creates a new {@link IntPtr} and initializes it with the specified value. * * @param value the value. */ public IntPtr(int value) { set(value); }
/** * Copies {@code src.length} ints from {@code src} to the memory pointed to by * this {@link IntPtr}. * * @param src the source. */ public void set(int[] src) { set(src, 0, src.length); }
/** * Creates a new {@link IntPtr} and initializes it with the specified value. * * @param value the value. */ public IntPtr(int value) { set(value); }
/** * Copies {@code src.length} ints from {@code src} to the memory pointed to by * this {@link IntPtr}. * * @param src the source. */ public void set(int[] src) { set(src, 0, src.length); }
/** * Copies {@code src.length} ints from {@code src} to the memory pointed to by * this {@link IntPtr}. * * @param src the source. */ public void set(int[] src) { set(src, 0, src.length); }
public static GLKVector3 project(GLKVector3 object, GLKMatrix4 model, GLKMatrix4 projection, int[] viewport) { IntPtr ptr = new IntPtr(); ptr.set(viewport); return project(object, model, projection, ptr); } public static GLKVector3 unproject(GLKVector3 window, GLKMatrix4 model, GLKMatrix4 projection, int[] viewport, BooleanPtr success) {
public static GLKVector3 project(GLKVector3 object, GLKMatrix4 model, GLKMatrix4 projection, int[] viewport) { IntPtr ptr = new IntPtr(); ptr.set(viewport); return project(object, model, projection, ptr); } public static GLKVector3 unproject(GLKVector3 window, GLKMatrix4 model, GLKMatrix4 projection, int[] viewport, BooleanPtr success) {
@Callback private static void cbProcess(@Pointer long clientData, AudioQueueProcessingTap aqTap, int numberFrames, AudioTimeStamp timeStamp, AudioQueueProcessingTapMutableFlags flags, IntPtr outNumberFrames, AudioBufferList data) { synchronized (callbacks) { int outFrames = callbacks.get(clientData).process(aqTap, numberFrames, timeStamp, flags, data); outNumberFrames.set(outFrames); } }
@Callback private static void cbProcess(@Pointer long clientData, AudioQueueProcessingTap aqTap, int numberFrames, AudioTimeStamp timeStamp, AudioQueueProcessingTapMutableFlags flags, IntPtr outNumberFrames, AudioBufferList data) { synchronized (callbacks) { int outFrames = callbacks.get(clientData).process(aqTap, numberFrames, timeStamp, flags, data); outNumberFrames.set(outFrames); } }
@Callback private static final OSStatus cbWrite(@Pointer long clientData, long position, int requestCount, @Pointer long buffer, IntPtr actualCount) { synchronized (callbacks) { try { int actualWrite = callbacks.get(clientData).write(position, requestCount, VM.newDirectByteBuffer(buffer, requestCount)); actualCount.set(actualWrite); } catch (OSStatusException e) { return e.getStatus(); } return OSStatus.NO_ERR; } } @Callback