public void setHostCallback(AUHostCallback callback, AUScope scope) throws OSStatusException { long cid = callbackId.getAndIncrement(); AUHostCallbackInfo struct = new AUHostCallbackInfo(cid, new FunctionPtr(cbHostGetBeatAndTempo), new FunctionPtr(cbHostGetMusicalTimeLocation), new FunctionPtr(cbHostGetTransportState), new FunctionPtr(cbHostGetTransportState2)); setProperty(AUGenericProperty.HostCallbacks, struct, scope); synchronized (hostCallbacks) { hostCallbacks.put(cid, callback); } } public AUInputSamplesInOutputCallback getInputSamplesInOutputCallback(AUScope scope) throws OSStatusException {
public void setInputSamplesInOutputCallback(AUInputSamplesInOutputCallback callback, AUScope scope) throws OSStatusException { long cid = callbackId.getAndIncrement(); AUInputSamplesInOutputCallbackStruct struct = new AUInputSamplesInOutputCallbackStruct(new FunctionPtr(cbInputSamplesInOutput), cid); setProperty(AUGenericProperty.InputSamplesInOutput, struct, scope); synchronized (isioCallbacks) { isioCallbacks.put(cid, callback); } } public void scheduleAudioSlice(AUScheduledAudioSlice slice, AUScope scope) throws OSStatusException {
public void setRenderCallback(AURenderCallback callback, AUScope scope) throws OSStatusException { long cid = callbackId.getAndIncrement(); AURenderCallbackStruct struct = new AURenderCallbackStruct(new FunctionPtr(cbRender), cid); setProperty(AUGenericProperty.SetRenderCallback, struct, scope); synchronized (renderCallbacks) { renderCallbacks.put(cid, callback); } } public void setHostCallback(AUHostCallback callback, AUScope scope) throws OSStatusException {
/** * @since Available in iOS 3.2 and later. */ public List<CTFontDescriptor> getMatchingFontDescriptorsSorted(SortCallback sortCallback) { long refconId = CTFontCollection.refconId.getAndIncrement(); synchronized (sortCallbacks) { sortCallbacks.put(refconId, sortCallback); } return getMatchingFontDescriptorsSorted(new FunctionPtr(cbSort), refconId); } /*<methods>*/
public void registerExternalChangeCallback(ExternalChangeCallback callback) { long refconId = ABAddressBook.changeCallbackId.getAndIncrement(); registerExternalChangeCallback(new FunctionPtr(cbExternalChange), refconId); synchronized (externalChangeCallbacks) { externalChangeCallbacks.put(refconId, callback); } } public void unregisterExternalChangeCallback(ExternalChangeCallback callback) {
public void setCallback(String name, OperatorCallback callback) { if (localInfoId == -1) { localInfoId = CGPDFOperatorTable.infoId.getAndIncrement(); } setCallback(name, new FunctionPtr(cbOperator)); synchronized (callbacks) { callbacks.put(localInfoId, callback); } } /*<methods>*/
public CTRunDelegate() { CTRunDelegateCallbacks callbacks = new CTRunDelegateCallbacks(); callbacks.setGetAscent(new FunctionPtr(cbGetAscent)); callbacks.setGetDescent(new FunctionPtr(cbGetDescent)); callbacks.setGetWidth(new FunctionPtr(cbGetWidth)); long refconId = CTRunDelegate.refconId.getAndIncrement(); delegate = CTRunDelegateIntern.create(callbacks, refconId); synchronized(runCallbacks) { runCallbacks.put(refconId, this); } } /*<constructors>*//*</constructors>*/
public void setInvalidationCallBack(InvalidationCallback callback) { invalidationCallback = callback; if (callback == null) { setInvalidationCallBack0(null); } else { setInvalidationCallBack0(new FunctionPtr(cbInvalidate)); } } public static CFRunLoopSource createRunLoopSource(CFMachPort port, @MachineSizedSInt long order) {
public void setInvalidationCallBack(InvalidationCallback callback) { invalidationCallback = callback; if (callback == null) { setInvalidationCallBack0(null); } else { setInvalidationCallBack0(new FunctionPtr(cbInvalidate)); } } public static CFRunLoopSource createRunLoopSource(CFMessagePort local, @MachineSizedSInt long order) {
@Override public void putAll(CFDictionary dict) { dict.applyFunction(new FunctionPtr(cbPutAll), getHandle()); } @Override
public CVPixelFormatDescription setFillExtendedPixelsCallback(FillExtendedPixelsCallback callback) { if (refcon == -1) { refcon = CVPixelFormatDescription.refconId.getAndIncrement(); } CVFillExtendedPixelsCallBackData data = new CVFillExtendedPixelsCallBackData(1, new FunctionPtr(cbFillExtendedPixels), refcon); NSData val = new NSData(data); set(Keys.FillExtendedPixelsCallback(), val); synchronized (callbacks) { callbacks.put(refcon, callback); } return this; }
public void addObserver(CFType observer, NotificationCallback callBack, String name, CFType object, CFNotificationSuspensionBehavior suspensionBehavior) { synchronized(callbacks) { long id = getCallbackIdForNotification(observer, name, object); callbacks.put(id, callBack); } addObserver(observer, new FunctionPtr(cbNotification), name, object, suspensionBehavior); }
/** * @throws OSStatusException * @since Available in iOS 7.0 and later. */ @WeaklyLinked public void evaluateAsync(DispatchQueue queue, VoidBlock2<SecTrust, SecTrustResultType> result) throws OSStatusException { OSStatus status = evaluateAsync0(queue, new FunctionPtr(cbEvaluate)); OSStatusException.throwIfNecessary(status); evaluateCallback = result; } /**
public boolean setClientCallback(CFStreamEventType streamEvents, ClientCallback callback) { localRefconId = refconId.getAndIncrement(); CFStreamClientContext context = new CFStreamClientContext(); context.setInfo(localRefconId); boolean result = setClient(streamEvents, new FunctionPtr(cbClient), context); if (result) { synchronized (clientCallbacks) { clientCallbacks.put(localRefconId, callback); } } return result; }
public static CFSocket createConnectedToSocketSignature(CFAllocator allocator, CFSocketSignature signature, CFSocketCallBackType callBackTypes, CFSocketCallback callback, double timeout) { long refconId = CFSocket.refconId.getAndIncrement(); CFSocketContext context = new CFSocketContext(); context.setInfo(refconId); CFSocket result = createConnectedToSocketSignature(allocator, signature, callBackTypes, new FunctionPtr(cbInvoke), context, timeout); if (result != null) { synchronized (callbacks) { callbacks.put(refconId, callback); } } return result; }
public boolean setClientCallback(CFStreamEventType streamEvents, ClientCallback callback) { localRefconId = refconId.getAndIncrement(); CFStreamClientContext context = new CFStreamClientContext(); context.setInfo(localRefconId); boolean result = setClient(streamEvents, new FunctionPtr(cbClient), context); if (result) { synchronized (clientCallbacks) { clientCallbacks.put(localRefconId, callback); } } return result; }
/** * @since Available in iOS 2.0 and later. */ public void setCallback(ClientCallback callback) { CFHostClientContext context = new CFHostClientContext(); context.setInfo(localRefconId); synchronized (callbacks) { callbacks.put(localRefconId, callback); } setCallback(new FunctionPtr(cbInvoke), context); } /**
/** * @since Available in iOS 2.0 and later. */ public void setCallback(ClientCallback callback) { CFNetServiceClientContext context = new CFNetServiceClientContext(); context.setInfo(localRefconId); synchronized (callbacks) { callbacks.put(localRefconId, callback); } setCallback(new FunctionPtr(cbInvoke), context); } /**
/** * @since Available in iOS 2.0 and later. */ public boolean setCallback(ClientCallback callback) { SCNetworkReachabilityContext context = new SCNetworkReachabilityContext(); context.setInfo(localRefconId); synchronized (callbacks) { callbacks.put(localRefconId, callback); } return setCallback(new FunctionPtr(cbInvoke), context); } /*<methods>*/
/** * @since Available in iOS 6.0 and later. */ public static boolean matchFontDescriptors(List<CTFontDescriptor> descriptors, List<CTFontAttribute> mandatoryAttributes, ProgressHandler progressHandler) { CTFontDescriptor.progressHandler = progressHandler; CFSet set = CFMutableSet.create(); for (CTFontAttribute attr : mandatoryAttributes) { set.add(attr.value()); } return matchFontDescriptors(CFArray.create(descriptors), set, new FunctionPtr(cbProgress)); } /**