1995-01-09 19:21:16 +01:00
|
|
|
/*
|
|
|
|
* GDI palette definitions
|
|
|
|
*
|
|
|
|
* Copyright 1994 Alexandre Julliard
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* 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
|
1995-01-09 19:21:16 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_PALETTE_H
|
|
|
|
#define __WINE_PALETTE_H
|
|
|
|
|
|
|
|
#include "gdi.h"
|
|
|
|
|
1997-06-16 19:43:53 +02:00
|
|
|
#define NB_RESERVED_COLORS 20 /* number of fixed colors in system palette */
|
|
|
|
|
1995-01-09 19:21:16 +01:00
|
|
|
/* GDI logical palette object */
|
1999-04-01 10:16:08 +02:00
|
|
|
typedef struct tagPALETTEOBJ
|
1995-01-09 19:21:16 +01:00
|
|
|
{
|
1999-04-01 10:16:08 +02:00
|
|
|
GDIOBJHDR header;
|
|
|
|
int *mapping;
|
|
|
|
LOGPALETTE logpalette; /* _MUST_ be the last field */
|
1995-01-09 19:21:16 +01:00
|
|
|
} PALETTEOBJ;
|
|
|
|
|
1999-04-01 10:16:08 +02:00
|
|
|
typedef struct tagPALETTE_DRIVER
|
|
|
|
{
|
|
|
|
int (*pSetMapping)(struct tagPALETTEOBJ *, UINT, UINT, BOOL);
|
|
|
|
int (*pUpdateMapping)(struct tagPALETTEOBJ *);
|
|
|
|
BOOL (*pIsDark)(int pixel);
|
|
|
|
} PALETTE_DRIVER;
|
|
|
|
|
|
|
|
extern PALETTE_DRIVER *PALETTE_Driver;
|
|
|
|
|
1998-11-14 19:59:30 +01:00
|
|
|
extern HPALETTE16 PALETTE_Init(void);
|
1995-01-09 19:21:16 +01:00
|
|
|
extern int PALETTE_GetObject( PALETTEOBJ * palette, int count, LPSTR buffer );
|
1999-02-26 12:11:13 +01:00
|
|
|
extern BOOL PALETTE_DeleteObject( HPALETTE16 hpalette, PALETTEOBJ *palette );
|
|
|
|
extern BOOL PALETTE_UnrealizeObject( HPALETTE16 hpalette, PALETTEOBJ *palette);
|
1995-01-09 19:21:16 +01:00
|
|
|
|
1999-02-09 16:37:16 +01:00
|
|
|
extern HPALETTE16 WINAPI CreateHalftonePalette16(HDC16 hdc);
|
1999-02-26 12:11:13 +01:00
|
|
|
extern HPALETTE WINAPI CreateHalftonePalette(HDC hdc);
|
1999-02-09 16:37:16 +01:00
|
|
|
|
1996-07-12 21:02:39 +02:00
|
|
|
#endif /* __WINE_PALETTE_H */
|