Mac OS 9
CGDirectPalette.h
Go to the documentation of this file.
1 
19 #ifndef __CGDIRECTPALETTE__
20 #define __CGDIRECTPALETTE__
21 
22 #ifndef __CGDIRECTDISPLAY__
23 #include <CGDirectDisplay.h>
24 #endif
25 
26 #if PRAGMA_ONCE
27 #pragma once
28 #endif
29 
30 #ifdef __cplusplus
31 extern "C"
32 {
33 #endif
34 
35 #if PRAGMA_IMPORT
36 #pragma import on
37 #endif
38 
39 #if PRAGMA_STRUCT_ALIGN
40 #pragma options align = mac68k
41 #elif PRAGMA_STRUCT_PACKPUSH
42 #pragma pack(push, 2)
43 #elif PRAGMA_STRUCT_PACK
44 #pragma pack(2)
45 #endif
46 
47  typedef float CGPaletteBlendFraction;
55  {
56  float red;
57  float green;
58  float blue;
59  };
60  typedef struct CGDeviceColor CGDeviceColor;
62  {
63  CGByteValue red;
64  CGByteValue green;
65  CGByteValue blue;
66  };
67  typedef struct CGDeviceByteColor CGDeviceByteColor;
80  CGDirectPaletteRef
82 
96  CGDirectPaletteRef
97  CGPaletteCreateWithDisplay(CGDirectDisplayID display);
98 
112  CGDirectPaletteRef
113  CGPaletteCreateWithCapacity(CGTableCount capacity);
114 
127  CGDirectPaletteRef
129  CGTableCount sampleCount);
130 
144  CGDirectPaletteRef
146  CGTableCount sampleCount);
147 
159  void
160  CGPaletteRelease(CGDirectPaletteRef palette);
161 
174  CGPaletteGetColorAtIndex(CGDirectPaletteRef palette, CGTableCount index);
175 
189  CGTableCount
190  CGPaletteGetIndexForColor(CGDirectPaletteRef palette, CGDeviceColor color);
191 
203  CGTableCount
204  CGPaletteGetNumberOfSamples(CGDirectPaletteRef palette);
205 
217  void
218  CGPaletteSetColorAtIndex(CGDirectPaletteRef palette, CGDeviceColor color,
219  CGTableCount index);
220 
232  CGDirectPaletteRef
233  CGPaletteCreateCopy(CGDirectPaletteRef palette);
234 
246  Boolean
247  CGPaletteIsEqualToPalette(CGDirectPaletteRef palette1,
248  CGDirectPaletteRef palette2);
249 
262  CGDirectPaletteRef
263  CGPaletteCreateFromPaletteBlendedWithColor(CGDirectPaletteRef palette,
264  CGPaletteBlendFraction fraction,
265  CGDeviceColor color);
266 
267 #if PRAGMA_STRUCT_ALIGN
268 #pragma options align = reset
269 #elif PRAGMA_STRUCT_PACKPUSH
270 #pragma pack(pop)
271 #elif PRAGMA_STRUCT_PACK
272 #pragma pack()
273 #endif
274 
275 #ifdef PRAGMA_IMPORT_OFF
276 #pragma import off
277 #elif PRAGMA_IMPORT
278 #pragma import reset
279 #endif
280 
281 #ifdef __cplusplus
282 }
283 #endif
284 
285 #endif /* __CGDIRECTPALETTE__ */
CoreGraphics direct display.
CGTableCount CGPaletteGetNumberOfSamples(CGDirectPaletteRef palette)
CGDirectPaletteRef CGPaletteCreateDefaultColorPalette(void)
CGDirectPaletteRef CGPaletteCreateWithSamples(CGDeviceColor *sampleTable, CGTableCount sampleCount)
CGDirectPaletteRef CGPaletteCreateFromPaletteBlendedWithColor(CGDirectPaletteRef palette, CGPaletteBlendFraction fraction, CGDeviceColor color)
CGDirectPaletteRef CGPaletteCreateWithByteSamples(CGDeviceByteColor *sampleTable, CGTableCount sampleCount)
CGTableCount CGPaletteGetIndexForColor(CGDirectPaletteRef palette, CGDeviceColor color)
CGDirectPaletteRef CGPaletteCreateWithCapacity(CGTableCount capacity)
Boolean CGPaletteIsEqualToPalette(CGDirectPaletteRef palette1, CGDirectPaletteRef palette2)
CGDeviceColor CGPaletteGetColorAtIndex(CGDirectPaletteRef palette, CGTableCount index)
void CGPaletteRelease(CGDirectPaletteRef palette)
void CGPaletteSetColorAtIndex(CGDirectPaletteRef palette, CGDeviceColor color, CGTableCount index)
CGDirectPaletteRef CGPaletteCreateWithDisplay(CGDirectDisplayID display)
CGDirectPaletteRef CGPaletteCreateCopy(CGDirectPaletteRef palette)
unsigned char Boolean
Definition: MacTypes.h:318
Definition: CGDirectPalette.h:62
Definition: CGDirectPalette.h:55