diff dwt/internal/c/carboncore/MacTypes.d @ 0:380af2bdd8e5

Upload of whole dwt tree
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Sat, 09 Aug 2008 17:00:02 +0200
parents
children 2952d5604c0a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/c/carboncore/MacTypes.d	Sat Aug 09 17:00:02 2008 +0200
@@ -0,0 +1,87 @@
+/**
+ * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: 2008
+ * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
+ * 
+ */
+module dwt.internal.c.carboncore.MacTypes;
+
+/********************************************************************************
+
+ Base integer types for all target OS's and CPU's
+
+ UInt8            8-bit unsigned integer 
+ SInt8            8-bit signed integer
+ UInt16          16-bit uinteger 
+ SInt16          16-bit signed integer           
+ UInt32          32-bit uinteger 
+ SInt32          32-bit signed integer   
+ UInt64          64-bit uinteger 
+ SInt64          64-bit integer   
+
+ *********************************************************************************/
+alias ubyte UInt8;
+alias byte SInt8;
+alias ushort UInt16;
+alias short SInt16;
+alias uint UInt32;
+alias int SInt32;
+alias ulong UInt64;
+alias long SInt64;
+
+alias byte uint8_t;
+
+/********************************************************************************
+
+ Higher level basic types
+
+ OSErr                   16-bit result error code
+ OSStatus                32-bit result error code
+ LogicalAddress          Address in the clients virtual address space
+ ConstLogicalAddress     Address in the clients virtual address space that will only be read
+ PhysicalAddress         Real address as used on the hardware bus
+ BytePtr                 Pointer to an array of bytes
+ ByteCount               The size of an array of bytes
+ ByteOffset              An offset into an array of bytes
+ ItemCount               32-bit iteration count
+ OptionBits              Standard 32-bit set of bit flags
+ PBVersion               ?
+ Duration                32-bit millisecond timer for drivers
+ AbsoluteTime            64-bit clock
+ ScriptCode              A particular set of written characters (e.g. Roman vs Cyrillic) and their encoding
+ LangCode                A particular language (e.g. English), as represented using a particular ScriptCode
+ RegionCode              Designates a language as used in a particular region (e.g. British vs American
+ English) together with other region-dependent characteristics (e.g. date format)
+ FourCharCode            A 32-bit value made by packing four 1 byte characters together
+ OSType                  A FourCharCode used in the OS and file system (e.g. creator)
+ ResType                 A FourCharCode used to tag resources (e.g. 'DLOG')
+ 
+ *********************************************************************************/
+alias SInt16 OSErr;
+alias SInt32 OSStatus;
+alias void* LogicalAddress;
+alias /*const*/void* ConstLogicalAddress;
+alias void* PhysicalAddress;
+alias UInt8* BytePtr;
+alias uint ByteCount;
+alias uint ByteOffset;
+alias SInt32 Duration;
+alias UnsignedWide AbsoluteTime;
+alias UInt32 OptionBits;
+alias uint ItemCount;
+alias UInt32 PBVersion;
+alias SInt16 ScriptCode;
+alias SInt16 LangCode;
+alias SInt16 RegionCode;
+alias UInt32 FourCharCode;
+alias FourCharCode OSType;
+alias FourCharCode ResType;
+alias OSType* OSTypePtr;
+alias ResType* ResTypePtr;
+
+struct UnsignedWide
+{
+    UInt32 hi;
+    UInt32 lo;
+}