1 /* 2 3 Boost Software License - Version 1.0 - August 17th, 2003 4 5 Permission is hereby granted, free of charge, to any person or organization 6 obtaining a copy of the software and accompanying documentation covered by 7 this license (the "Software") to use, reproduce, display, distribute, 8 execute, and transmit the Software, and to prepare derivative works of the 9 Software, and to permit third-parties to whom the Software is furnished to 10 do so, all subject to the following: 11 12 The copyright notices in the Software and this entire statement, including 13 the above license grant, this restriction and the following disclaimer, 14 must be included in all copies of the Software, in whole or in part, and 15 all derivative works of the Software, unless such copies or derivative 16 works are solely in the form of machine-executable object code generated by 17 a source language processor. 18 19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 DEALINGS IN THE SOFTWARE. 26 27 */ 28 module derelict.sdl.macinit.MacTypes; 29 30 version(DigitalMars) version(OSX) version = darwin; 31 32 version (darwin): 33 package: 34 35 /******************************************************************************** 36 37 Base integer types for all target OS's and CPU's 38 39 UInt8 8-bit unsigned integer 40 SInt8 8-bit signed integer 41 UInt16 16-bit uinteger 42 SInt16 16-bit signed integer 43 UInt32 32-bit uinteger 44 SInt32 32-bit signed integer 45 UInt64 64-bit uinteger 46 SInt64 64-bit integer 47 48 *********************************************************************************/ 49 alias ubyte UInt8; 50 alias byte SInt8; 51 alias ushort UInt16; 52 alias short SInt16; 53 alias uint UInt32; 54 alias int SInt32; 55 alias ulong UInt64; 56 alias long SInt64; 57 58 alias byte uint8_t; 59 60 /******************************************************************************** 61 62 Higher level basic types 63 64 OSErr 16-bit result error code 65 OSStatus 32-bit result error code 66 LogicalAddress Address in the clients virtual address space 67 ConstLogicalAddress Address in the clients virtual address space that will only be read 68 PhysicalAddress Real address as used on the hardware bus 69 BytePtr Pointer to an array of bytes 70 ByteCount The size of an array of bytes 71 ByteOffset An offset into an array of bytes 72 ItemCount 32-bit iteration count 73 OptionBits Standard 32-bit set of bit flags 74 PBVersion ? 75 Duration 32-bit millisecond timer for drivers 76 AbsoluteTime 64-bit clock 77 ScriptCode A particular set of written characters (e.g. Roman vs Cyrillic) and their encoding 78 LangCode A particular language (e.g. English), as represented using a particular ScriptCode 79 RegionCode Designates a language as used in a particular region (e.g. British vs American 80 English) together with other region-dependent characteristics (e.g. date format) 81 FourCharCode A 32-bit value made by packing four 1 byte characters together 82 OSType A FourCharCode used in the OS and file system (e.g. creator) 83 ResType A FourCharCode used to tag resources (e.g. 'DLOG') 84 85 *********************************************************************************/ 86 alias SInt16 OSErr; 87 alias SInt32 OSStatus; 88 alias void* LogicalAddress; 89 alias /*const*/void* ConstLogicalAddress; 90 alias void* PhysicalAddress; 91 alias UInt8* BytePtr; 92 alias uint ByteCount; 93 alias uint ByteOffset; 94 alias SInt32 Duration; 95 alias UnsignedWide AbsoluteTime; 96 alias UInt32 OptionBits; 97 alias uint ItemCount; 98 alias UInt32 PBVersion; 99 alias SInt16 ScriptCode; 100 alias SInt16 LangCode; 101 alias SInt16 RegionCode; 102 alias UInt32 FourCharCode; 103 alias FourCharCode OSType; 104 alias FourCharCode ResType; 105 alias OSType* OSTypePtr; 106 alias ResType* ResTypePtr; 107 108 struct UnsignedWide 109 { 110 uint hi; 111 uint lo; 112 } 113 114 struct ProcessSerialNumber 115 { 116 uint highLongOfPSN; 117 uint lowLongOfPSN; 118 } 119 120 alias ProcessSerialNumber * ProcessSerialNumberPtr;