Mercurial > projects > dstep
diff dstep/coreservices/osservices/IconStorage.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 diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dstep/coreservices/osservices/IconStorage.d Sat Aug 01 15:03:28 2009 +0200 @@ -0,0 +1,137 @@ +/** + * Copyright: Copyright (c) 2009 Jacob Carlborg. + * Authors: Jacob Carlborg + * Version: Initial created: Jul 22, 2009 + * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) + */ +module dstep.coreservices.osservices.IconStorage; + +//import dstep.AvailabilityMacros; +import dstep.coreservices.carboncore.MacTypes; +import dstep.objc.bridge.TypeEncoding; + +alias IconFamilyResource* IconFamilyPtr; +alias IconFamilyPtr* IconFamilyHandle; + +// This is needed otherwise the enums will fail compiling with gdc +version (GNU) +{ + private + { + const __kIconServices16PixelDataARGB = getOSType!("ic04"); + const __kIconServices32PixelDataARGB = getOSType!("ic05"); + const __kIconServices48PixelDataARGB = getOSType!("ic06"); + const __kIconServices128PixelDataARGB = getOSType!("ic07"); + const __kIconServices256PixelDataARGB = getOSType!("ic08"); + const __kIconServices512PixelDataARGB = getOSType!("ic09"); + const __kThumbnail32BitData = getOSType!("it32"); + const __kThumbnail8BitMask = getOSType!("t8mk"); + const __kHuge1BitMask = getOSType!("ich#"); + const __kHuge4BitData = getOSType!("ich4"); + const __kHuge8BitData = getOSType!("ich8"); + const __kHuge32BitData = getOSType!("ih32"); + const __kHuge8BitMask = getOSType!("h8mk"); + const __kLarge1BitMask = getOSType!("ICN#"); + const __kLarge4BitData = getOSType!("icl4"); + const __kLarge8BitData = getOSType!("icl8"); + const __kLarge32BitData = getOSType!("il32"); + const __kLarge8BitMask = getOSType!("l8mk"); + const __kSmall1BitMask = getOSType!("ics#"); + const __kSmall4BitData = getOSType!("ics4"); + const __kSmall8BitData = getOSType!("ics8"); + const __kSmall32BitData = getOSType!("is32"); + const __kSmall8BitMask = getOSType!("s8mk"); + const __kMini1BitMask = getOSType!("icm#"); + const __kMini4BitData = getOSType!("icm4"); + const __kMini8BitData = getOSType!("icm8"); + const __kIconFamilyType = getOSType!("icns"); + const __kTileIconVariant = getOSType!("tile"); + const __kRolloverIconVariant = getOSType!("over"); + const __kDropIconVariant = getOSType!("drop"); + const __kOpenIconVariant = getOSType!("open"); + const __kOpenDropIconVariant = getOSType!("odrp"); + } +} + +enum +{ + kIconServices16PixelDataARGB = getOSType!("ic04"), + kIconServices32PixelDataARGB = getOSType!("ic05"), + kIconServices48PixelDataARGB = getOSType!("ic06"), + kIconServices128PixelDataARGB = getOSType!("ic07") +} + +enum +{ + kIconServices256PixelDataARGB = getOSType!("ic08"), + kIconServices512PixelDataARGB = getOSType!("ic09"), + kThumbnail32BitData = getOSType!("it32"), + kThumbnail8BitMask = getOSType!("t8mk") +} + +enum +{ + kHuge1BitMask = getOSType!("ich#"), + kHuge4BitData = getOSType!("ich4"), + kHuge8BitData = getOSType!("ich8"), + kHuge32BitData = getOSType!("ih32"), + kHuge8BitMask = getOSType!("h8mk") +} + +enum +{ + kLarge1BitMask = getOSType!("ICN#"), + kLarge4BitData = getOSType!("icl4"), + kLarge8BitData = getOSType!("icl8"), + kLarge32BitData = getOSType!("il32"), + kLarge8BitMask = getOSType!("l8mk"), + kSmall1BitMask = getOSType!("ics#"), + kSmall4BitData = getOSType!("ics4"), + kSmall8BitData = getOSType!("ics8"), + kSmall32BitData = getOSType!("is32"), + kSmall8BitMask = getOSType!("s8mk"), + kMini1BitMask = getOSType!("icm#"), + kMini4BitData = getOSType!("icm4"), + kMini8BitData = getOSType!("icm8") +} + +enum +{ + large1BitMask = kLarge1BitMask, + large4BitData = kLarge4BitData, + large8BitData = kLarge8BitData, + small1BitMask = kSmall1BitMask, + small4BitData = kSmall4BitData, + small8BitData = kSmall8BitData, + mini1BitMask = kMini1BitMask, + mini4BitData = kMini4BitData, + mini8BitData = kMini8BitData +} + +enum +{ + kIconFamilyType = getOSType!("icns") +} + +enum +{ + kTileIconVariant = getOSType!("tile"), + kRolloverIconVariant = getOSType!("over"), + kDropIconVariant = getOSType!("drop"), + kOpenIconVariant = getOSType!("open"), + kOpenDropIconVariant = getOSType!("odrp") +} + +struct IconFamilyElement +{ + uint elementType; + int elementSize; + char* elementData; +} + +struct IconFamilyResource +{ + uint resourceType; + int resourceSize; + IconFamilyElement* elements; +} \ No newline at end of file