dpwsockx: Implementation of SPInit
[wine/gsoc_dplay.git] / dlls / gdiplus / imageattributes.c
blob8f49c67bd44e35310d790aa594a5503affc311a2
1 /*
2 * Copyright (C) 2007 Google (Evan Stade)
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "windef.h"
20 #include "wingdi.h"
22 #include "objbase.h"
24 #include "gdiplus.h"
25 #include "gdiplus_private.h"
26 #include "wine/debug.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(gdiplus);
30 GpStatus WINGDIPAPI GdipCloneImageAttributes(GDIPCONST GpImageAttributes *imageattr,
31 GpImageAttributes **cloneImageattr)
33 TRACE("(%p, %p)\n", imageattr, cloneImageattr);
35 if(!imageattr || !cloneImageattr)
36 return InvalidParameter;
38 **cloneImageattr = *imageattr;
40 return Ok;
43 GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes **imageattr)
45 TRACE("(%p)\n", imageattr);
47 if(!imageattr)
48 return InvalidParameter;
50 *imageattr = GdipAlloc(sizeof(GpImageAttributes));
51 if(!*imageattr) return OutOfMemory;
53 return Ok;
56 GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes *imageattr)
58 TRACE("(%p)\n", imageattr);
60 if(!imageattr)
61 return InvalidParameter;
63 GdipFree(imageattr);
65 return Ok;
68 GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys(GpImageAttributes *imageattr,
69 ColorAdjustType type, BOOL enableFlag, ARGB colorLow, ARGB colorHigh)
71 TRACE("(%p,%u,%i,%08x,%08x)\n", imageattr, type, enableFlag, colorLow, colorHigh);
73 if(!imageattr || type >= ColorAdjustTypeCount)
74 return InvalidParameter;
76 imageattr->colorkeys[type].enabled = enableFlag;
77 imageattr->colorkeys[type].low = colorLow;
78 imageattr->colorkeys[type].high = colorHigh;
80 return Ok;
83 GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes *imageattr,
84 ColorAdjustType type, BOOL enableFlag, GDIPCONST ColorMatrix* colorMatrix,
85 GDIPCONST ColorMatrix* grayMatrix, ColorMatrixFlags flags)
87 static int calls;
89 if(!imageattr || !colorMatrix || !grayMatrix)
90 return InvalidParameter;
92 if(!(calls++))
93 FIXME("not implemented\n");
95 return NotImplemented;
98 GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes *imageAttr,
99 WrapMode wrap, ARGB argb, BOOL clamp)
101 static int calls;
103 if(!imageAttr)
104 return InvalidParameter;
106 if(!(calls++))
107 FIXME("not implemented\n");
109 return NotImplemented;
112 GpStatus WINGDIPAPI GdipSetImageAttributesCachedBackground(GpImageAttributes *imageAttr,
113 BOOL enableFlag)
115 static int calls;
117 if(!(calls++))
118 FIXME("not implemented\n");
120 return NotImplemented;
123 GpStatus WINGDIPAPI GdipSetImageAttributesGamma(GpImageAttributes *imageAttr,
124 ColorAdjustType type, BOOL enableFlag, REAL gamma)
126 static int calls;
128 if(!(calls++))
129 FIXME("not implemented\n");
131 return NotImplemented;
134 GpStatus WINGDIPAPI GdipSetImageAttributesNoOp(GpImageAttributes *imageAttr,
135 ColorAdjustType type, BOOL enableFlag)
137 static int calls;
139 if(!(calls++))
140 FIXME("not implemented\n");
142 return NotImplemented;
145 GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannel(GpImageAttributes *imageAttr,
146 ColorAdjustType type, BOOL enableFlag, ColorChannelFlags channelFlags)
148 static int calls;
150 if(!(calls++))
151 FIXME("not implemented\n");
153 return NotImplemented;
156 GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannelColorProfile(GpImageAttributes *imageAttr,
157 ColorAdjustType type, BOOL enableFlag,
158 GDIPCONST WCHAR *colorProfileFilename)
160 static int calls;
162 if(!(calls++))
163 FIXME("not implemented\n");
165 return NotImplemented;
168 GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable(GpImageAttributes *imageAttr,
169 ColorAdjustType type, BOOL enableFlag, UINT mapSize,
170 GDIPCONST ColorMap *map)
172 static int calls;
174 if(!(calls++))
175 FIXME("not implemented\n");
177 return NotImplemented;
180 GpStatus WINGDIPAPI GdipSetImageAttributesThreshold(GpImageAttributes *imageAttr,
181 ColorAdjustType type, BOOL enableFlag, REAL threshold)
183 static int calls;
185 if(!(calls++))
186 FIXME("not implemented\n");
188 return NotImplemented;
191 GpStatus WINGDIPAPI GdipSetImageAttributesToIdentity(GpImageAttributes *imageAttr,
192 ColorAdjustType type)
194 static int calls;
196 if(!(calls++))
197 FIXME("not implemented\n");
199 return NotImplemented;