Sweden-Number/dlls/commdlg/colordlg.h

92 lines
3.3 KiB
C

/*
* COMMDLG - Color Dialog
*
* Copyright 1994 Martin Ayotte
* Copyright 1996 Albrecht Kleine
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* BUGS : still seems to not refresh correctly
sometimes, especially when 2 instances of the
dialog are loaded at the same time */
#ifndef _WINE_COLORDLG_H
#define _WINE_COLORDLG_H
#include <ctype.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "winuser.h"
#include "commdlg.h"
#include "dlgs.h"
#include "wine/debug.h"
#include "cderr.h"
#include "cdlg.h"
typedef struct CCPRIVATE
{
LPCHOOSECOLORW lpcc; /* points to public known data structure */
LPCHOOSECOLOR16 lpcc16; /* save the 16 bits pointer */
int nextuserdef; /* next free place in user defined color array */
HDC hdcMem; /* color graph used for BitBlt() */
HBITMAP hbmMem; /* color graph bitmap */
RECT fullsize; /* original dialog window size */
UINT msetrgb; /* # of SETRGBSTRING message (today not used) */
RECT old3angle; /* last position of l-marker */
RECT oldcross; /* last position of color/satuation marker */
BOOL updating; /* to prevent recursive WM_COMMAND/EN_UPDATE processing */
int h;
int s;
int l; /* for temporary storing of hue,sat,lum */
int capturedGraph; /* control mouse captured */
RECT focusRect; /* rectangle last focused item */
HWND hwndFocus; /* handle last focused item */
} *LCCPRIV;
/*
* Internal Functions
* Do NOT Export to other programs and dlls
*/
BOOL CC_HookCallChk( LPCHOOSECOLORW lpcc );
int CC_MouseCheckResultWindow( HWND hDlg, LPARAM lParam );
LRESULT CC_WMLButtonDown( HWND hDlg, WPARAM wParam, LPARAM lParam );
LRESULT CC_WMLButtonUp( HWND hDlg, WPARAM wParam, LPARAM lParam );
LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD
notifyCode, HWND hwndCtl );
LRESULT CC_WMMouseMove( HWND hDlg, LPARAM lParam );
LRESULT CC_WMPaint( HWND hDlg, WPARAM wParam, LPARAM lParam );
void CC_SwitchToFullSize( HWND hDlg, COLORREF result, LPRECT lprect );
void CC_PaintSelectedColor( HWND hDlg, COLORREF cr );
int CC_RGBtoHSL(char c, int r, int g, int b);
void CC_PaintCross( HWND hDlg, int x, int y);
void CC_PaintTriangle( HWND hDlg, int y);
int CC_CheckDigitsInEdit( HWND hwnd, int maxval );
void CC_EditSetHSL( HWND hDlg, int h, int s, int l );
int CC_HSLtoRGB(char c, int hue, int sat, int lum);
void CC_EditSetRGB( HWND hDlg, COLORREF cr );
void CC_PaintUserColorArray( HWND hDlg, int rows, int cols, COLORREF* lpcr );
#endif /* _WINE_COLORDLG_H */