Mercurial > projects > dstep
view dstep/corefoundation/CFNotificationCenter.d @ 27:57371c29ef73 default tip
ObjcWrap is now automatically mixed in. Added support for building as a dylib with DMD.
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Fri, 09 Apr 2010 23:00:22 +0200 |
parents | 07194b026fa4 |
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); }