44#define CONV_LPARAMTOPOINT(lp,p) do { (p)->x = (short)LOWORD(lp); (p)->y = (short)HIWORD(lp); } while(0)
48 { 0x008080FFL, 0x0080FFFFL, 0x0080FF80L, 0x0080FF00L,
49 0x00FFFF80L, 0x00FF8000L, 0x00C080FFL, 0x00FF80FFL },
50 { 0x000000FFL, 0x0000FFFFL, 0x0000FF80L, 0x0040FF00L,
51 0x00FFFF00L, 0x00C08000L, 0x00C08080L, 0x00FF00FFL },
53 { 0x00404080L, 0x004080FFL, 0x0000FF00L, 0x00808000L,
54 0x00804000L, 0x00FF8080L, 0x00400080L, 0x008000FFL },
55 { 0x00000080L, 0x000080FFL, 0x00008000L, 0x00408000L,
56 0x00FF0000L, 0x00A00000L, 0x00800080L, 0x00FF0080L },
58 { 0x00000040L, 0x00004080L, 0x00004000L, 0x00404000L,
59 0x00800000L, 0x00400000L, 0x00400040L, 0x00800040L },
60 { 0x00000000L, 0x00008080L, 0x00408080L, 0x00808080L,
61 0x00808040L, 0x00C0C0C0L, 0x00400040L, 0x00FFFFFFL },
65 'c',
'o',
'l',
'o',
'u',
'r',
'd',
'i',
'a',
'l',
'o',
'g',
'p',
'r',
'o',
'p',0 };
98 maxrgb = (256 *
min(120,lum)) / 120;
104 res = (hue - 80) * maxrgb;
112 res= (240 - hue) * maxrgb;
118 res = maxrgb / 2 + (sat *
res) / 240;
121 if (lum > 120 &&
res < 256)
122 res += ((lum - 120) * (256 -
res)) / 120;
135 h = hue > 80 ? hue-80 : hue+160;
138 h = hue > 160 ? hue-160 : hue+80;
152 int iresult = 0,
r,
g,
b;
169 case 'L': mmsum *= 120;
173 case 'S':
if (!mmsum)
176 if (!mini || maxi == 255)
181 result /= (mmsum > 255 ? 510 - mmsum : mmsum);
185 case 'H':
if (!mmdif)
191 iresult = 40 * (
g -
b);
192 iresult /= (
int) mmdif;
199 iresult = 40 * (
b -
r);
200 iresult /= (
int) mmdif;
206 iresult = 40 * (
r -
g);
207 iresult /= (
int) mmdif;
413 for (
i = 0 ;
i <
m ;
i++)
416 for (
k =
i + 1;
k <=
m;
k++)
602 int sdif, hdif, xdif, ydif, hue, sat;
619 for (
rect.left = hue = 0; hue < 239 + hdif; hue += hdif)
623 for(sat = 0; sat < 240 + sdif; sat += sdif)
656 WARN(
"choose color: hdcMem is not defined\n");
680 for (lum = 0; lum < 240 + ldif; lum += ldif)
782 for (
j = 0;
j < rows;
j++ )
784 for (
i = 0;
i < cols;
i++ )
830 for (
j = 0;
j < rows;
j++)
832 for (
i = 0;
i < cols;
i++)
890 lpp = heap_alloc_zero(
sizeof(*lpp));
904 for (
i = 0;
i < 6;
i++)
905 for (
j = 0;
j < 8;
j++)
1155 int *ptrh =
NULL, *ptrs = &infoPtr->
l;
1326 const void *
template;
1328 TRACE(
"(%p)\n", lpChCol);
1330 if (!lpChCol)
return FALSE;
1361 static const WCHAR wszCHOOSE_COLOR[] = {
'C',
'H',
'O',
'O',
'S',
'E',
'_',
'C',
'O',
'L',
'O',
'R',0};
ACPI_SIZE strlen(const char *String)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define CDERR_LOADRESFAILURE
#define CDERR_FINDRESFAILURE
DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance
void COMDLG32_SetCommDlgExtendedError(DWORD err) DECLSPEC_HIDDEN
static void CC_DrawFocusRect(CCPRIV *lpp, HWND hwnd, int x, int y, int rows, int cols)
static void CC_PaintSelectedColor(const CCPRIV *infoPtr)
static BOOL CC_MouseCheckPredefColorArray(CCPRIV *lpp, int rows, int cols, LPARAM lParam)
static void CC_PaintTriangle(CCPRIV *infoPtr)
static COLORREF CC_HSLtoRGB(int hue, int sat, int lum)
static int hsl_to_x(int hue, int sat, int lum)
static void CC_PaintCross(CCPRIV *infoPtr)
static void CC_PrepareColorGraph(CCPRIV *infoPtr)
static BOOL CC_MouseCheckResultWindow(HWND hDlg, LPARAM lParam)
static void CC_EditSetRGB(CCPRIV *infoPtr)
static void CC_PaintColorGraph(CCPRIV *infoPtr)
static LRESULT CC_WMLButtonDown(CCPRIV *infoPtr, LPARAM lParam)
static int CC_CheckDigitsInEdit(HWND hwnd, int maxval)
static BOOL CC_HookCallChk(const CHOOSECOLORW *lpcc)
static void CC_SwitchToFullSize(CCPRIV *infoPtr, const RECT *lprect)
static const COLORREF predefcolors[6][8]
static void CC_PaintUserColorArray(const CCPRIV *infoPtr, int rows, int cols)
static int CC_RGBtoHSL(char c, COLORREF rgb)
static void CC_EditSetHSL(CCPRIV *infoPtr)
static LRESULT CC_WMMouseMove(CCPRIV *infoPtr, LPARAM lParam)
#define CONV_LPARAMTOPOINT(lp, p)
static void CC_PaintLumBar(const CCPRIV *infoPtr)
BOOL WINAPI ChooseColorW(CHOOSECOLORW *lpChCol)
static BOOL CC_MouseCheckUserColorArray(CCPRIV *lpp, int rows, int cols, LPARAM lParam)
static LRESULT CC_WMLButtonUp(CCPRIV *infoPtr)
static LRESULT CC_WMCommand(CCPRIV *lpp, WPARAM wParam, LPARAM lParam, WORD notifyCode, HWND hwndCtl)
BOOL WINAPI ChooseColorA(LPCHOOSECOLORA lpChCol)
static LRESULT CC_WMPaint(CCPRIV *lpp)
static void CC_PaintPredefColorArray(const CCPRIV *infoPtr, int rows, int cols)
static INT_PTR CALLBACK ColorDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
static void CC_DrawCurrentFocusRect(const CCPRIV *lpp)
static const WCHAR szColourDialogProp[]
static LRESULT CC_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam)
static BOOL CC_MouseCheckColorGraph(HWND hDlg, int dlgitem, int *hori, int *vert, LPARAM lParam)
#define CC_ENABLETEMPLATE
#define CC_PREVENTFULLOPEN
#define CC_ENABLETEMPLATEHANDLE
#define MultiByteToWideChar
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
GLubyte GLubyte GLubyte GLubyte w
GLsizei const GLfloat * points
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
#define sprintf(buf, format,...)
BOOL Polygon(CONST PPOINT UnsafePoints, int Count, int polyFillMode)
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
_In_ ULONG _In_ ULONG rgb
HGDIOBJ WINAPI GetStockObject(_In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
COLORREF WINAPI GetNearestColor(_In_ HDC, _In_ COLORREF)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HRGN WINAPI CreateRectRgnIndirect(_In_ LPCRECT)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
HWND WINAPI SetCapture(_In_ HWND hWnd)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
UINT WINAPI RegisterWindowMessageA(_In_ LPCSTR)
BOOL WINAPI SetWindowTextA(_In_ HWND, _In_opt_ LPCSTR)
INT_PTR WINAPI DialogBoxIndirectParamW(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
HANDLE WINAPI RemovePropW(_In_ HWND, _In_ LPCWSTR)
BOOL WINAPI ReleaseCapture(void)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
BOOL WINAPI ClipCursor(_In_opt_ LPCRECT)
#define IS_INTRESOURCE(i)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
BOOL WINAPI UpdateWindow(_In_ HWND)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HDC WINAPI GetDC(_In_opt_ HWND)
LONG WINAPI GetDialogBaseUnits(void)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
BOOL WINAPI DrawFocusRect(_In_ HDC, _In_ LPCRECT)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GCLP_HBRBACKGROUND
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)