Mercurial > projects > dstep
view dstep/corefoundation/CFNotificationCenter.d @ 11:07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sat, 01 Aug 2009 15:03:28 +0200 |
parents | |
children |
line wrap: on
line source
/** * Copyright: Copyright (c) 2009 Jacob Carlborg. * Authors: Jacob Carlborg * Version: Initial created: Jul 12, 2009 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) */ module dstep.corefoundation.CFNotificationCenter; import dstep.corefoundation.CFBase; import dstep.corefoundation.CFDictionary; import dstep.objc.bridge.Bridge; import dstep.objc.objc : id; struct __CFNotificationCenter; alias __CFNotificationCenter* CFNotificationCenterRef; alias int CFNotificationSuspensionBehavior; extern (C) { alias void function (CFNotificationCenterRef, void*, CFStringRef, void*, CFDictionaryRef) CFNotificationCallback; } enum { CFNotificationSuspensionBehaviorDrop = 1, CFNotificationSuspensionBehaviorCoalesce = 2, CFNotificationSuspensionBehaviorHold = 3, CFNotificationSuspensionBehaviorDeliverImmediately = 4 } enum { kCFNotificationDeliverImmediately = (1 << 0), kCFNotificationPostToAllSessions = (1 << 1) } extern (C) { uint CFNotificationCenterGetTypeID (); CFNotificationCenterRef CFNotificationCenterGetLocalCenter (); CFNotificationCenterRef CFNotificationCenterGetDistributedCenter (); CFNotificationCenterRef CFNotificationCenterGetDarwinNotifyCenter (); void CFNotificationCenterAddObserver (CFNotificationCenterRef center, void* observer, CFNotificationCallback* callBack, CFStringRef name, void* object, int suspensionBehavior); void CFNotificationCenterRemoveObserver (CFNotificationCenterRef center, void* observer, CFStringRef name, void* object); void CFNotificationCenterRemoveEveryObserver (CFNotificationCenterRef center, void* observer); void CFNotificationCenterPostNotification (CFNotificationCenterRef center, CFStringRef name, void* object, CFDictionaryRef userInfo, ubyte deliverImmediately); void CFNotificationCenterPostNotificationWithOptions (CFNotificationCenterRef center, CFStringRef name, void* object, CFDictionaryRef userInfo, uint options); }