9daf47dff97b456c256aed96e4e71dd50a78c20b
2 * DIBDRV palette objects
4 * Copyright 2009 Massimo Del Fedele
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/port.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(dibdrv
);
28 /***********************************************************************
29 * DIBDRV_RealizePalette
31 UINT
DIBDRV_RealizePalette( DIBDRVPHYSDEV
*physDev
, HPALETTE hpal
, BOOL primary
)
35 TRACE("physDev:%p, hpal:%p, primary:%s\n", physDev
, hpal
, (primary
? "TRUE" : "FALSE"));
37 /* we should in any case call X11 function, as UnrealizePalette() doesn't
38 * take a physDev parameter */
39 res
= _DIBDRV_GetDisplayDriver()->pRealizePalette(physDev
->X11PhysDev
, hpal
, primary
);
43 /* DIB section selected in, additional (if needed) engine code */
44 ONCE(FIXME("STUB\n"));
50 /***********************************************************************
51 * DIBDRV_UnrealizePalette
53 BOOL
DIBDRV_UnrealizePalette( HPALETTE hpal
)
57 TRACE("hpal:%p\n", hpal
);
59 /* we should in any case call X11 function, as UnrealizePalette() doesn't
60 * take a physDev parameter */
61 res
= _DIBDRV_GetDisplayDriver()->pUnrealizePalette(hpal
);
63 /* additional Engine code here, if needed */
64 ONCE(FIXME("STUB\n"));
69 /***********************************************************************
70 * DIBDRV_GetSystemPaletteEntries
72 UINT
DIBDRV_GetSystemPaletteEntries( DIBDRVPHYSDEV
*physDev
, UINT start
, UINT count
,
73 LPPALETTEENTRY entries
)
77 TRACE("physDev:%p, start:%d, count:%d, entries:%p\n", physDev
, start
, count
, entries
);
81 /* DIB section selected in, use DIB Engine */
82 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
83 res
= _DIBDRV_GetDisplayDriver()->pGetSystemPaletteEntries(physDev
->X11PhysDev
, start
, count
, entries
);
87 /* DDB selected in, use X11 driver */
88 res
= _DIBDRV_GetDisplayDriver()->pGetSystemPaletteEntries(physDev
->X11PhysDev
, start
, count
, entries
);
93 /***********************************************************************
94 * DIBDRV_GetNearestColor
96 COLORREF
DIBDRV_GetNearestColor( DIBDRVPHYSDEV
*physDev
, COLORREF color
)
100 TRACE("physDev:%p, color:%x\n", physDev
, color
);
104 /* DIB section selected in, use DIB Engine */
105 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
106 res
= _DIBDRV_GetDisplayDriver()->pGetNearestColor(physDev
->X11PhysDev
, color
);
110 /* DDB selected in, use X11 driver */
111 res
= _DIBDRV_GetDisplayDriver()->pGetNearestColor(physDev
->X11PhysDev
, color
);
116 /***********************************************************************
117 * DIBDRV_RealizeDefaultPalette
119 UINT
DIBDRV_RealizeDefaultPalette( DIBDRVPHYSDEV
*physDev
)
123 TRACE("physDev:%p\n", physDev
);
127 /* DIB section selected in, use DIB Engine */
128 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
129 res
= _DIBDRV_GetDisplayDriver()->pRealizeDefaultPalette(physDev
->X11PhysDev
);
133 /* DDB selected in, use X11 driver */
134 res
= _DIBDRV_GetDisplayDriver()->pRealizeDefaultPalette(physDev
->X11PhysDev
);
139 BOOL
DIBDRV_GetICMProfile(DIBDRVPHYSDEV
*physDev
, LPDWORD lpcbName
, LPWSTR lpszFilename
)
143 TRACE("physDev:%p, lpcpName:%p, lpszFilename:%p\n", physDev
, lpcbName
, lpszFilename
);
147 /* DIB section selected in, use DIB Engine */
148 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
149 res
= _DIBDRV_GetDisplayDriver()->pGetICMProfile(physDev
->X11PhysDev
, lpcbName
, lpszFilename
);
153 /* DDB selected in, use X11 driver */
154 res
= _DIBDRV_GetDisplayDriver()->pGetICMProfile(physDev
->X11PhysDev
, lpcbName
, lpszFilename
);