Mercurial > projects > dstep
view dstep/coreservices/ae/AEMach.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 21, 2009 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) */ module dstep.coreservices.ae.AEMach; //import dstep.AvailabilityMacros; import dstep.coreservices.ae.AEDataModel; import dstep.coreservices.carboncore.CarbonCore; //import dstep.mach.message; import dstep.objc.bridge.TypeEncoding; // mach/message.h alias uint mach_msg_bits_t; alias int mach_msg_id_t; alias uint mach_msg_size_t; struct ipc_port; alias ipc_port* mach_port_t; struct mach_msg_header_t { mach_msg_bits_t msgh_bits; mach_msg_size_t msgh_size; mach_port_t msgh_remote_port; mach_port_t msgh_local_port; mach_msg_size_t msgh_reserved; mach_msg_id_t msgh_id; } // This is needed otherwise the enums will fail compiling with gdc version (GNU) { private { const __keyReplyPortAttr = getOSType!("repp"); } } enum { keyReplyPortAttr = getOSType!("repp") } enum { typeReplyPortAttr = keyReplyPortAttr } extern (C) { uint AEGetRegisteredMachPort (); int AEDecodeMessage (mach_msg_header_t* header, AppleEvent* event, AppleEvent* reply); int AEProcessMessage (mach_msg_header_t* header); int AESendMessage (AppleEvent* event, AppleEvent* reply, int sendMode, int timeOutInTicks); }