comparison 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
comparison
equal deleted inserted replaced
10:27e00625790b 11:07194b026fa4
1 /**
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
3 * Authors: Jacob Carlborg
4 * Version: Initial created: Jul 22, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */
7 module dstep.coreservices.osservices.IconStorage;
8
9 //import dstep.AvailabilityMacros;
10 import dstep.coreservices.carboncore.MacTypes;
11 import dstep.objc.bridge.TypeEncoding;
12
13 alias IconFamilyResource* IconFamilyPtr;
14 alias IconFamilyPtr* IconFamilyHandle;
15
16 // This is needed otherwise the enums will fail compiling with gdc
17 version (GNU)
18 {
19 private
20 {
21 const __kIconServices16PixelDataARGB = getOSType!("ic04");
22 const __kIconServices32PixelDataARGB = getOSType!("ic05");
23 const __kIconServices48PixelDataARGB = getOSType!("ic06");
24 const __kIconServices128PixelDataARGB = getOSType!("ic07");
25 const __kIconServices256PixelDataARGB = getOSType!("ic08");
26 const __kIconServices512PixelDataARGB = getOSType!("ic09");
27 const __kThumbnail32BitData = getOSType!("it32");
28 const __kThumbnail8BitMask = getOSType!("t8mk");
29 const __kHuge1BitMask = getOSType!("ich#");
30 const __kHuge4BitData = getOSType!("ich4");
31 const __kHuge8BitData = getOSType!("ich8");
32 const __kHuge32BitData = getOSType!("ih32");
33 const __kHuge8BitMask = getOSType!("h8mk");
34 const __kLarge1BitMask = getOSType!("ICN#");
35 const __kLarge4BitData = getOSType!("icl4");
36 const __kLarge8BitData = getOSType!("icl8");
37 const __kLarge32BitData = getOSType!("il32");
38 const __kLarge8BitMask = getOSType!("l8mk");
39 const __kSmall1BitMask = getOSType!("ics#");
40 const __kSmall4BitData = getOSType!("ics4");
41 const __kSmall8BitData = getOSType!("ics8");
42 const __kSmall32BitData = getOSType!("is32");
43 const __kSmall8BitMask = getOSType!("s8mk");
44 const __kMini1BitMask = getOSType!("icm#");
45 const __kMini4BitData = getOSType!("icm4");
46 const __kMini8BitData = getOSType!("icm8");
47 const __kIconFamilyType = getOSType!("icns");
48 const __kTileIconVariant = getOSType!("tile");
49 const __kRolloverIconVariant = getOSType!("over");
50 const __kDropIconVariant = getOSType!("drop");
51 const __kOpenIconVariant = getOSType!("open");
52 const __kOpenDropIconVariant = getOSType!("odrp");
53 }
54 }
55
56 enum
57 {
58 kIconServices16PixelDataARGB = getOSType!("ic04"),
59 kIconServices32PixelDataARGB = getOSType!("ic05"),
60 kIconServices48PixelDataARGB = getOSType!("ic06"),
61 kIconServices128PixelDataARGB = getOSType!("ic07")
62 }
63
64 enum
65 {
66 kIconServices256PixelDataARGB = getOSType!("ic08"),
67 kIconServices512PixelDataARGB = getOSType!("ic09"),
68 kThumbnail32BitData = getOSType!("it32"),
69 kThumbnail8BitMask = getOSType!("t8mk")
70 }
71
72 enum
73 {
74 kHuge1BitMask = getOSType!("ich#"),
75 kHuge4BitData = getOSType!("ich4"),
76 kHuge8BitData = getOSType!("ich8"),
77 kHuge32BitData = getOSType!("ih32"),
78 kHuge8BitMask = getOSType!("h8mk")
79 }
80
81 enum
82 {
83 kLarge1BitMask = getOSType!("ICN#"),
84 kLarge4BitData = getOSType!("icl4"),
85 kLarge8BitData = getOSType!("icl8"),
86 kLarge32BitData = getOSType!("il32"),
87 kLarge8BitMask = getOSType!("l8mk"),
88 kSmall1BitMask = getOSType!("ics#"),
89 kSmall4BitData = getOSType!("ics4"),
90 kSmall8BitData = getOSType!("ics8"),
91 kSmall32BitData = getOSType!("is32"),
92 kSmall8BitMask = getOSType!("s8mk"),
93 kMini1BitMask = getOSType!("icm#"),
94 kMini4BitData = getOSType!("icm4"),
95 kMini8BitData = getOSType!("icm8")
96 }
97
98 enum
99 {
100 large1BitMask = kLarge1BitMask,
101 large4BitData = kLarge4BitData,
102 large8BitData = kLarge8BitData,
103 small1BitMask = kSmall1BitMask,
104 small4BitData = kSmall4BitData,
105 small8BitData = kSmall8BitData,
106 mini1BitMask = kMini1BitMask,
107 mini4BitData = kMini4BitData,
108 mini8BitData = kMini8BitData
109 }
110
111 enum
112 {
113 kIconFamilyType = getOSType!("icns")
114 }
115
116 enum
117 {
118 kTileIconVariant = getOSType!("tile"),
119 kRolloverIconVariant = getOSType!("over"),
120 kDropIconVariant = getOSType!("drop"),
121 kOpenIconVariant = getOSType!("open"),
122 kOpenDropIconVariant = getOSType!("odrp")
123 }
124
125 struct IconFamilyElement
126 {
127 uint elementType;
128 int elementSize;
129 char* elementData;
130 }
131
132 struct IconFamilyResource
133 {
134 uint resourceType;
135 int resourceSize;
136 IconFamilyElement* elements;
137 }