这篇教程C++ CFRunLoopRemoveSource函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CFRunLoopRemoveSource函数的典型用法代码示例。如果您正苦于以下问题:C++ CFRunLoopRemoveSource函数的具体用法?C++ CFRunLoopRemoveSource怎么用?C++ CFRunLoopRemoveSource使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CFRunLoopRemoveSource函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: transferDatavoid transferData(IOUSBInterfaceInterface245 **intf, UInt8 inPipeRef, UInt8 outPipeRef){ IOReturn err; CFRunLoopSourceRef cfSource; int i; err = (*intf)->CreateInterfaceAsyncEventSource(intf, &cfSource); if (err) { printf("transferData: unable to create event source, err = %08x/n", err); return; } CFRunLoopAddSource(CFRunLoopGetCurrent(), cfSource, kCFRunLoopDefaultMode); for (i=0; i < 12; i++) outBuf[i] = 'R'; err = (*intf)->WritePipeAsync(intf, outPipeRef, outBuf, 12, (IOAsyncCallback1)MyCallBackFunction, (void*)(UInt32)inPipeRef); if (err) { printf("transferData: WritePipeAsyncFailed, err = %08x/n", err); CFRunLoopRemoveSource(CFRunLoopGetCurrent(), cfSource, kCFRunLoopDefaultMode); return; } printf("transferData: calling CFRunLoopRun/n"); CFRunLoopRun(); printf("transferData: returned from CFRunLoopRun/n"); CFRunLoopRemoveSource(CFRunLoopGetCurrent(), cfSource, kCFRunLoopDefaultMode);}
开发者ID:a-page,项目名称:IOUSBFamily,代码行数:27,
示例2: CFRunLoopRemoveSourcevoid CCocoaPowerSyscall::DeleteOSPowerCallBacks(void){#if !defined(TARGET_DARWIN_IOS) CCocoaAutoPool autopool; // we no longer want sleep/wake notifications // remove the sleep notification port from the application runloop CFRunLoopRemoveSource( CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource(m_notify_port), kCFRunLoopDefaultMode ); // deregister for system sleep notifications IODeregisterForSystemPower(&m_notifier_object); // IORegisterForSystemPower implicitly opens the Root Power Domain IOService // so we close it here IOServiceClose(m_root_port); // destroy the notification port allocated by IORegisterForSystemPower IONotificationPortDestroy(m_notify_port); // we no longer want power source change notifications if (m_HasBattery) { if (m_power_source) { CFRunLoopRemoveSource( CFRunLoopGetCurrent(), m_power_source, kCFRunLoopDefaultMode ); CFRelease(m_power_source); } }#endif}
开发者ID:Alxandr,项目名称:spotyxbmc2,代码行数:27,
示例3: CFRunLoopRemoveMIDIRunLoopSourcevoid CFRunLoopRemoveMIDIRunLoopSource( CFRunLoopRef rl, struct CFMIDIRunLoopSource * source, CFStringRef mode ) { int i; if( source->cfrlt != NULL ) CFRunLoopRemoveTimer( rl, source->cfrlt, mode ); for( i=0; i<source->length; i++ ) { if( source->cfrls[i] != NULL ) CFRunLoopRemoveSource( rl, source->cfrls[i], mode ); }}
开发者ID:VishalChandla,项目名称:midikit,代码行数:7,
示例4: mac_sleep_stop void mac_sleep_stop() { if (root_port) { // remove the sleep notification port from the application runloop CFRunLoopRemoveSource(CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource(notifyPortRef), kCFRunLoopCommonModes); // deregister for system sleep notifications IODeregisterForSystemPower(¬ifierObject); // IORegisterForSystemPower implicitly opens the Root Power Domain IOService // so we close it here IOServiceClose(root_port); // destroy the notification port allocated by IORegisterForSystemPower IONotificationPortDestroy(notifyPortRef); // reset object members root_port = 0; notifyPortRef = NULL; notifierObject = 0; } }
开发者ID:akoshelnik,项目名称:openvpn3,代码行数:25,
示例5: socket_callback/* * CFRunloop callback that calls DNSServiceProcessResult() when * there's new data on the socket. */static voidsocket_callback(CFSocketRef s, CFSocketCallBackType callbackType, CFDataRef address, const void *data, void *context){ struct cbinfo *info = context; DNSServiceErrorType err; if (callbackType == kCFSocketNoCallBack) { printf("socket_callback: kCFSocketNoCallBack?/n"); return; } if ((err = DNSServiceProcessResult(info->sdref)) != kDNSServiceErr_NoError) { printf("DNSServiceProcessResult() returned an error! %d/n", err); if (err == kDNSServiceErr_BadReference) { printf("bad reference?: %p, %d, %p, %p %p/n", s, (int)callbackType, address, data, context); return; } if ((context == &nfsinfo) || (context == &mountdinfo)) { /* bail if there's a problem with the main browse connection */ exit(1); } /* dump the troublesome service connection */ CFRunLoopRemoveSource(CFRunLoopGetCurrent(), info->rls, kCFRunLoopDefaultMode); CFRelease(info->rls); CFSocketInvalidate(info->sockref); CFRelease(info->sockref); DNSServiceRefDeallocate(info->sdref); free(info); }}
开发者ID:Leon555,项目名称:Mac-src-essentials,代码行数:34,
示例6: lockvoid IOKitEventPublisher::stop() { if (run_loop_ == nullptr) { // If there is no run loop then the publisher thread has not started. return; } // Stop the run loop. WriteLock lock(mutex_); CFRunLoopStop(run_loop_); // Stop the run loop before operating on containers. // Destroy the IOPort. if (port_ != nullptr) { auto source = IONotificationPortGetRunLoopSource(port_); if (CFRunLoopContainsSource(run_loop_, source, kCFRunLoopDefaultMode)) { CFRunLoopRemoveSource(run_loop_, source, kCFRunLoopDefaultMode); } // And destroy the port. IONotificationPortDestroy(port_); port_ = nullptr; } // Clear all devices and their notifications. for (const auto& device : devices_) { IOObjectRelease(device->notification); } devices_.clear();}
开发者ID:PoppySeedPlehzr,项目名称:osquery,代码行数:28,
示例7: xmmsc_mainloop_cf_shutdownvoidxmmsc_mainloop_cf_shutdown (xmmsc_connection_t *c, CFRunLoopSourceRef source){ CFRunLoopRef runLoopRef = CFRunLoopGetCurrent (); CFRunLoopRemoveSource (runLoopRef, source, kCFRunLoopDefaultMode);}
开发者ID:Malvineous,项目名称:xmms2-devel,代码行数:7,
示例8: IOIteratorNextvoid AoEProperties::matched_callback(void* pRefcon, io_iterator_t iterator){ io_registry_entry_t Object = IOIteratorNext(iterator); AoEProperties* pThis = (AoEProperties*) pRefcon; if ( Object ) { //debug("AOEINTERFACE ONLINE!/n"); if ( pThis ) pThis->m_fMatched = TRUE; if ( pThis->m_OurObject ) IOObjectRelease(pThis->m_OurObject); pThis->m_OurObject = Object; // Since we have matched, we remove our source from the run loop CFRunLoopRemoveSource(CFRunLoopGetCurrent(), ms_IOKitNotificationRunLoopSource, kCFRunLoopDefaultMode); } // Empty the remaining devices in the list (don't release the iterator though, or we won't get our callback) while( 0 != (Object=IOIteratorNext(iterator)) ) IOObjectRelease(Object);}
开发者ID:ecashin,项目名称:aoe-osx,代码行数:25,
示例9: PortsCleanup/* Cleanup of the open ports */void PortsCleanup(){ CFRunLoopRemoveSource(CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource(notifyPortRef), kCFRunLoopCommonModes); /* Remove the notification port from the runloop */ IODeregisterForSystemPower(¬ifierObject); /* Deregister from power notifications */ IOServiceClose(root_power_port); /* Close the Root Power Domain IOService port */ IONotificationPortDestroy(notifyPortRef); /* Destroy the notification port */}
开发者ID:toshiya240,项目名称:DeepSleep,代码行数:8,
示例10: DeviceNotificationvoid DeviceNotification(void * refCon, io_service_t service, natural_t messageType, void * messageArgument ){ UPSDataRef upsDataRef = (UPSDataRef) refCon; if ( (upsDataRef != NULL) && (messageType == kIOMessageServiceIsTerminated) ) { upsDataRef->isPresent = FALSE; SCDynamicStoreRemoveValue(upsDataRef->upsStore, upsDataRef->upsStoreKey); if ( upsDataRef->upsEventSource ) { CFRunLoopRemoveSource(CFRunLoopGetCurrent(), upsDataRef->upsEventSource, kCFRunLoopDefaultMode); CFRelease(upsDataRef->upsEventSource); upsDataRef->upsEventSource = NULL; } if ( upsDataRef->upsEventTimer ) { CFRunLoopRemoveTimer(CFRunLoopGetCurrent(), upsDataRef->upsEventTimer, kCFRunLoopDefaultMode); CFRelease(upsDataRef->upsEventTimer); upsDataRef->upsEventTimer = NULL; } if (upsDataRef->upsPlugInInterface != NULL) { (*(upsDataRef->upsPlugInInterface))->Release (upsDataRef->upsPlugInInterface); upsDataRef->upsPlugInInterface = NULL; } if (upsDataRef->notification != MACH_PORT_NULL) { IOObjectRelease(upsDataRef->notification); upsDataRef->notification = MACH_PORT_NULL; } if (upsDataRef->upsStoreKey) { CFRelease(upsDataRef->upsStoreKey); upsDataRef->upsStoreKey = NULL; } if (upsDataRef->upsStoreDict) { CFRelease(upsDataRef->upsStoreDict); upsDataRef->upsStoreDict = NULL; } if (upsDataRef->upsStore) { CFRelease(upsDataRef->upsStore); upsDataRef->upsStore = NULL; } }}
开发者ID:hashier,项目名称:caffeinate_fix,代码行数:59,
示例11: qt_mac_remove_socket_from_runloop/* Removes the loop source for the given socket from the current run loop.*/void qt_mac_remove_socket_from_runloop(const CFSocketRef socket, CFRunLoopSourceRef runloop){ Q_ASSERT(runloop); CFRunLoopRemoveSource(CFRunLoopGetCurrent(), runloop, kCFRunLoopCommonModes); CFSocketDisableCallBacks(socket, kCFSocketReadCallBack); CFSocketDisableCallBacks(socket, kCFSocketWriteCallBack); CFRunLoopSourceInvalidate(runloop);}
开发者ID:FilipBE,项目名称:qtextended,代码行数:11,
示例12: _GSocket_Get_Mac_Socketvoid GSocketGUIFunctionsTableConcrete::Disable_Events(GSocket *socket){ struct MacGSocketData* data = _GSocket_Get_Mac_Socket(socket); if (!data) return; /* CFSocketInvalidate does CFRunLoopRemoveSource anyway */ CFRunLoopRemoveSource(s_mainRunLoop, data->source, kCFRunLoopCommonModes); CFSocketInvalidate(data->socket);}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:9,
示例13: CFMessagePortCreateRunLoopSourcevoid* SC_MachMessagePort::Run(){ CFRunLoopSourceRef source = CFMessagePortCreateRunLoopSource(NULL, mServerPort, 0); CFRunLoopAddSource(CFRunLoopGetCurrent(), source, kCFRunLoopDefaultMode); CFRunLoopRun(); CFRunLoopRemoveSource(CFRunLoopGetCurrent(), source, kCFRunLoopDefaultMode); CFRelease(source); delete this; return NULL;}
开发者ID:GaryHomewood,项目名称:supercollider-android-bootstrap,代码行数:10,
示例14: iSCSIDDeregisterForPowerEvents/*! Deregisters the daemon with the kernel to no longer receive power events. */void iSCSIDDeregisterForPowerEvents(){ CFRunLoopRemoveSource(CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource(powerNotifyPortRef), kCFRunLoopDefaultMode); IODeregisterForSystemPower(&powerNotifier); IOServiceClose(powerPlaneRoot); IONotificationPortDestroy(powerNotifyPortRef);}
开发者ID:bafomet,项目名称:iSCSIInitiator,代码行数:11,
示例15: CFRunLoopRemoveSourcevoid wxApp::CleanUp(){#if wxUSE_TOOLTIPS wxToolTip::RemoveToolTips() ;#endif#ifdef __WXMAC_OSX__ if (m_macEventPosted) { CFRunLoopRemoveSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes); m_macEventPosted = NULL; }#endif // One last chance for pending objects to be cleaned up wxTheApp->DeletePendingObjects(); wxMacDestroyNotifierTable() ;#ifndef __DARWIN__# if __option(profile) ProfilerDump( (StringPtr)"/papp.prof" ) ; ProfilerTerm() ;# endif#endif UMACleanupToolbox() ; if (!sm_isEmbedded) RemoveEventHandler( (EventHandlerRef)(wxTheApp->m_macEventHandler) ); if (!sm_isEmbedded) { AERemoveEventHandler( kCoreEventClass , kAEOpenDocuments , sODocHandler , FALSE ) ; AERemoveEventHandler( kCoreEventClass , kAEOpenApplication , sOAppHandler , FALSE ) ; AERemoveEventHandler( kCoreEventClass , kAEPrintDocuments , sPDocHandler , FALSE ) ; AERemoveEventHandler( kCoreEventClass , kAEReopenApplication , sRAppHandler , FALSE ) ; AERemoveEventHandler( kCoreEventClass , kAEQuitApplication , sQuitHandler , FALSE ) ; DisposeAEEventHandlerUPP( sODocHandler ) ; DisposeAEEventHandlerUPP( sOAppHandler ) ; DisposeAEEventHandlerUPP( sPDocHandler ) ; DisposeAEEventHandlerUPP( sRAppHandler ) ; DisposeAEEventHandlerUPP( sQuitHandler ) ; } wxAppBase::CleanUp();}
开发者ID:hgwells,项目名称:tive,代码行数:53,
示例16: DestroyInterfaceChangedObserver_MacDesktopstatic void DestroyInterfaceChangedObserver_MacDesktop(OsContext* aContext){ if (NULL != aContext->iInterfaceChangedObserver) { CFRunLoopRef runLoop = CFRunLoopGetMain(); CFRunLoopRemoveSource(runLoop, aContext->iInterfaceChangedObserver->iRunLoopSource, kCFRunLoopCommonModes); CFRelease(aContext->iInterfaceChangedObserver->iStore); CFRelease(aContext->iInterfaceChangedObserver->iRunLoopSource); free(aContext->iInterfaceChangedObserver); aContext->iInterfaceChangedObserver = NULL; }}
开发者ID:MatthewMiddleweek,项目名称:ohNet,代码行数:12,
示例17: CFRunLoopGetCurrentvoidCOSXScreen::watchSystemPowerThread(void*){ io_object_t notifier; IONotificationPortRef notificationPortRef; CFRunLoopSourceRef runloopSourceRef = 0; m_pmRunloop = CFRunLoopGetCurrent(); // install system power change callback m_pmRootPort = IORegisterForSystemPower(this, ¬ificationPortRef, powerChangeCallback, ¬ifier); if (m_pmRootPort == 0) { LOG((CLOG_WARN "IORegisterForSystemPower failed")); } else { runloopSourceRef = IONotificationPortGetRunLoopSource(notificationPortRef); CFRunLoopAddSource(m_pmRunloop, runloopSourceRef, kCFRunLoopCommonModes); } // thread is ready { CLock lock(m_pmMutex); *m_pmThreadReady = true; m_pmThreadReady->signal(); } // if we were unable to initialize then exit. we must do this after // setting m_pmThreadReady to true otherwise the parent thread will // block waiting for it. if (m_pmRootPort == 0) { return; } // start the run loop LOG((CLOG_DEBUG "started watchSystemPowerThread")); CFRunLoopRun(); // cleanup if (notificationPortRef) { CFRunLoopRemoveSource(m_pmRunloop, runloopSourceRef, kCFRunLoopDefaultMode); CFRunLoopSourceInvalidate(runloopSourceRef); CFRelease(runloopSourceRef); } CLock lock(m_pmMutex); IODeregisterForSystemPower(¬ifier); m_pmRootPort = 0; LOG((CLOG_DEBUG "stopped watchSystemPowerThread"));}
开发者ID:rakete,项目名称:synergy-foss,代码行数:52,
示例18: unsetup_runloopstatic void unsetup_runloop(mailstream_low * s){ struct mailstream_cfstream_data * cfstream_data; cfstream_data = (struct mailstream_cfstream_data *) s->data; pthread_mutex_lock(&cfstream_data->runloop_lock); if (cfstream_data->idleInterruptedSource != NULL) { CFRunLoopRemoveSource(cfstream_data->runloop, cfstream_data->idleInterruptedSource, kCFRunLoopDefaultMode); } if (cfstream_data->cancelSource != NULL) { CFRunLoopRemoveSource(cfstream_data->runloop, cfstream_data->cancelSource, kCFRunLoopDefaultMode); } if (cfstream_data->runloop != NULL) { CFRelease(cfstream_data->runloop); cfstream_data->runloop = NULL; } pthread_mutex_unlock(&cfstream_data->runloop_lock);}
开发者ID:AlexandrPonomarev,项目名称:Gmail,代码行数:22,
示例19: fxPerformJobvoid fxPerformJob(void* it) { txJob* job = it; txMachine* the = job->the; fxBeginHost(the); { fxRunPromiseJobs(the); } fxEndHost(the);#if mxMacOSX CFRunLoopRemoveSource(CFRunLoopGetCurrent(), job->source, gxRunLoopMode);#endif c_free(job);}
开发者ID:kouis3940,项目名称:kinomajs,代码行数:14,
示例20: IOMIGMachPortUnscheduleFromRunLoop//------------------------------------------------------------------------------// IOMIGMachPortUnscheduleFromRunLoop//------------------------------------------------------------------------------void IOMIGMachPortUnscheduleFromRunLoop(IOMIGMachPortRef migPort, CFRunLoopRef runLoop, CFStringRef runLoopMode){ if ( !runLoop || !runLoopMode || !migPort->runLoop || !migPort->runLoopMode) return; if ( !CFEqual(runLoop, migPort->runLoop) || !CFEqual(runLoopMode, migPort->runLoopMode) ) return; migPort->runLoop = NULL; migPort->runLoopMode = NULL; if ( migPort->source ) CFRunLoopRemoveSource(runLoop, migPort->source, runLoopMode);}
开发者ID:StrongZhu,项目名称:IOKitUser,代码行数:17,
示例21: asyncTransferDataIOReturn asyncTransferData(IOUSBInterfaceInterface300 ***intf, char *outBuf, int len){ IOReturn err; CFRunLoopSourceRef cfSource; err = (**intf)->CreateInterfaceAsyncEventSource(*intf, &cfSource); IO_ERR(3, "transferData: Create Interface Async Event Source", err); CFRunLoopAddSource(CFRunLoopGetCurrent(), cfSource, kCFRunLoopDefaultMode); err = (**intf)->WritePipeAsync(*intf, 2, outBuf, 8, (IOAsyncCallback1)asyncWriteCB, (void*)(UInt32)1); IO_ERR(3, "transferData: Write Async Pipe", err); if (err) { CFRunLoopRemoveSource(CFRunLoopGetCurrent(), cfSource, kCFRunLoopDefaultMode); return err; } CFRunLoopRun(); displayError(3, "returned from CFRunLoopRun", "transferData"); CFRunLoopRemoveSource(CFRunLoopGetCurrent(), cfSource, kCFRunLoopDefaultMode); return err;}
开发者ID:poppe34,项目名称:MAC-Zigbee-GUI,代码行数:23,
示例22: CFRunLoopRemoveSourcevoid SystemEventsManager::stopLoop(bool forceStop) { if (systemEventLoopRunning && (forceStop || allEventsDisabled())) { CFRunLoopRemoveSource(CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource(notifyPortRef), kCFRunLoopCommonModes); IODeregisterForSystemPower(¬ifierObject); IOServiceClose(rootPort); IONotificationPortDestroy(notifyPortRef); CFRunLoopStop(CFRunLoopGetCurrent()); systemEventLoopRunning = false; }}
开发者ID:JUX84,项目名称:4d-plugin-system-events,代码行数:14,
示例23: cleanupKickerstatic voidcleanupKicker(kickeeRef target){ CFStringRef name = CFDictionaryGetValue(target->dict, CFSTR("name")); SCLog(TRUE, LOG_NOTICE, CFSTR(" target=%@: disabled"), name); CFRunLoopRemoveSource(target->rl, target->rls, kCFRunLoopDefaultMode); CFRelease(target->rls); CFRelease(target->store); if (target->dict) CFRelease(target->dict); if (target->changedKeys) CFRelease(target->changedKeys); CFAllocatorDeallocate(NULL, target);}
开发者ID:aosm,项目名称:configd_plugins,代码行数:15,
示例24: key_cleanupintkey_cleanup(void){ if (eventTap == NULL) { warnx("key cleanup called with nothing to cleanup"); return -1; } CFRunLoopRemoveSource(CFRunLoopGetCurrent(), runLoopSource, kCFRunLoopCommonModes); CFRelease(eventTap); CFRelease(runLoopSource); eventTap = NULL; return 0;}
开发者ID:jpouellet,项目名称:cwjack,代码行数:16,
示例25: CFRunLoopStopHostPowerServiceDarwin::~HostPowerServiceDarwin(){ /* Jump out of the run loop. */ CFRunLoopStop(mRunLoop); /* Remove the sleep notification port from the application runloop. */ CFRunLoopRemoveSource(CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource(mNotifyPort), kCFRunLoopCommonModes); /* Deregister for system sleep notifications. */ IODeregisterForSystemPower(&mNotifierObject); /* IORegisterForSystemPower implicitly opens the Root Power Domain * IOService so we close it here. */ IOServiceClose(mRootPort); /* Destroy the notification port allocated by IORegisterForSystemPower */ IONotificationPortDestroy(mNotifyPort);}
开发者ID:svn2github,项目名称:virtualbox,代码行数:16,
示例26: DestroyApplicationNotificationsvoid DestroyApplicationNotifications(){ if(!KWMFocus.Observer) return; AXObserverRemoveNotification(KWMFocus.Observer, KWMFocus.Application, kAXWindowMiniaturizedNotification); AXObserverRemoveNotification(KWMFocus.Observer, KWMFocus.Application, kAXWindowMovedNotification); AXObserverRemoveNotification(KWMFocus.Observer, KWMFocus.Application, kAXWindowResizedNotification); AXObserverRemoveNotification(KWMFocus.Observer, KWMFocus.Application, kAXTitleChangedNotification); CFRunLoopRemoveSource(CFRunLoopGetCurrent(), AXObserverGetRunLoopSource(KWMFocus.Observer), kCFRunLoopDefaultMode); CFRelease(KWMFocus.Observer); KWMFocus.Observer = NULL; CFRelease(KWMFocus.Application); KWMFocus.Application = NULL;}
开发者ID:chrishoage,项目名称:kwm,代码行数:16,
示例27: darwinHIDKeyboardCacheDestroyEntry/** * Destroys a keyboard cache entry. * * @param pKeyboardEntry The entry. */static void darwinHIDKeyboardCacheDestroyEntry(struct KeyboardCacheData *pKeyboardEntry){ unsigned long cRefs; /* * Destroy the queue */ if (pKeyboardEntry->ppHidQueueInterface) { IOHIDQueueInterface **ppHidQueueInterface = pKeyboardEntry->ppHidQueueInterface; pKeyboardEntry->ppHidQueueInterface = NULL; /* stop it just in case we haven't done so. doesn't really matter I think. */ (*ppHidQueueInterface)->stop(ppHidQueueInterface); /* deal with the run loop source. */ CFRunLoopSourceRef RunLoopSrcRef = (*ppHidQueueInterface)->getAsyncEventSource(ppHidQueueInterface); if (RunLoopSrcRef) { CFRunLoopRef RunLoopRef = (CFRunLoopRef)GetCFRunLoopFromEventLoop(GetMainEventLoop()); CFRunLoopRemoveSource(RunLoopRef, RunLoopSrcRef, kCFRunLoopDefaultMode); CFRelease(RunLoopSrcRef); } /* dispose of and release the queue. */ (*ppHidQueueInterface)->dispose(ppHidQueueInterface); cRefs = (*ppHidQueueInterface)->Release(ppHidQueueInterface); MY_CHECK_CREFS(cRefs); } /* * Release the removal hook? */ /** @todo */ /* * Close and release the device interface. */ if (pKeyboardEntry->ppHidDeviceInterface) { IOHIDDeviceInterface **ppHidDeviceInterface = pKeyboardEntry->ppHidDeviceInterface; pKeyboardEntry->ppHidDeviceInterface = NULL; (*ppHidDeviceInterface)->close(ppHidDeviceInterface); cRefs = (*ppHidDeviceInterface)->Release(ppHidDeviceInterface); MY_CHECK_CREFS(cRefs); }}
开发者ID:VirtualMonitor,项目名称:VirtualMonitor,代码行数:52,
注:本文中的CFRunLoopRemoveSource函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CFRunLoopRun函数代码示例 C++ CFRunLoopGetCurrent函数代码示例 |