gdi32: Always use biClrUsed for the number of colors of internal BITMAPINFO structures.
[wine/multimedia.git] / dlls / gdi32 / dibdrv / dc.c
blob2f06d627d9fd2f5d7ce761b32e087950ce1e9988
1 /*
2 * DIB driver initialization and DC functions.
4 * Copyright 2011 Huw Davies
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
21 #include <assert.h>
23 #include "gdi_private.h"
24 #include "dibdrv.h"
26 #include "wine/exception.h"
27 #include "wine/debug.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(dib);
31 static const DWORD bit_fields_888[3] = {0xff0000, 0x00ff00, 0x0000ff};
32 static const DWORD bit_fields_555[3] = {0x7c00, 0x03e0, 0x001f};
34 static void calc_shift_and_len(DWORD mask, int *shift, int *len)
36 int s, l;
38 if(!mask)
40 *shift = *len = 0;
41 return;
44 s = 0;
45 while ((mask & 1) == 0)
47 mask >>= 1;
48 s++;
50 l = 0;
51 while ((mask & 1) == 1)
53 mask >>= 1;
54 l++;
56 *shift = s;
57 *len = l;
60 static void init_bit_fields(dib_info *dib, const DWORD *bit_fields)
62 dib->red_mask = bit_fields[0];
63 dib->green_mask = bit_fields[1];
64 dib->blue_mask = bit_fields[2];
65 calc_shift_and_len(dib->red_mask, &dib->red_shift, &dib->red_len);
66 calc_shift_and_len(dib->green_mask, &dib->green_shift, &dib->green_len);
67 calc_shift_and_len(dib->blue_mask, &dib->blue_shift, &dib->blue_len);
70 static BOOL init_dib_info(dib_info *dib, const BITMAPINFOHEADER *bi, const DWORD *bit_fields,
71 RGBQUAD *color_table, void *bits, enum dib_info_flags flags)
73 dib->bit_count = bi->biBitCount;
74 dib->width = bi->biWidth;
75 dib->height = bi->biHeight;
76 dib->compression = bi->biCompression;
77 dib->stride = get_dib_stride( dib->width, dib->bit_count );
78 dib->bits.ptr = bits;
79 dib->bits.is_copy = FALSE;
80 dib->bits.free = NULL;
81 dib->bits.param = NULL;
82 dib->flags = flags;
84 if(dib->height < 0) /* top-down */
86 dib->height = -dib->height;
88 else /* bottom-up */
90 /* bits always points to the top-left corner and the stride is -ve */
91 dib->bits.ptr = (BYTE*)dib->bits.ptr + (dib->height - 1) * dib->stride;
92 dib->stride = -dib->stride;
95 dib->funcs = &funcs_null;
97 switch(dib->bit_count)
99 case 32:
100 if(bi->biCompression == BI_RGB)
101 bit_fields = bit_fields_888;
103 init_bit_fields(dib, bit_fields);
105 if(dib->red_mask == 0xff0000 && dib->green_mask == 0x00ff00 && dib->blue_mask == 0x0000ff)
106 dib->funcs = &funcs_8888;
107 else
108 dib->funcs = &funcs_32;
109 break;
111 case 24:
112 dib->funcs = &funcs_24;
113 break;
115 case 16:
116 if(bi->biCompression == BI_RGB)
117 bit_fields = bit_fields_555;
119 init_bit_fields(dib, bit_fields);
121 if(dib->red_mask == 0x7c00 && dib->green_mask == 0x03e0 && dib->blue_mask == 0x001f)
122 dib->funcs = &funcs_555;
123 else
124 dib->funcs = &funcs_16;
125 break;
127 case 8:
128 dib->funcs = &funcs_8;
129 break;
131 case 4:
132 dib->funcs = &funcs_4;
133 break;
135 case 1:
136 dib->funcs = &funcs_1;
137 break;
139 default:
140 TRACE("bpp %d not supported, will forward to graphics driver.\n", dib->bit_count);
141 return FALSE;
144 if (color_table && bi->biClrUsed)
146 if (flags & private_color_table)
148 dib->color_table = HeapAlloc(GetProcessHeap(), 0, bi->biClrUsed * sizeof(dib->color_table[0]));
149 if(!dib->color_table) return FALSE;
150 memcpy(dib->color_table, color_table, bi->biClrUsed * sizeof(color_table[0]));
152 else
153 dib->color_table = color_table;
154 dib->color_table_size = bi->biClrUsed;
156 else
158 dib->color_table = NULL;
159 dib->color_table_size = 0;
162 return TRUE;
165 BOOL init_dib_info_from_brush(dib_info *dib, const BITMAPINFO *bi, void *bits, UINT usage, HDC hdc)
167 if (bi->bmiHeader.biClrUsed && usage == DIB_PAL_COLORS)
169 char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )];
170 BITMAPINFO *info = (BITMAPINFO *)buffer;
172 copy_bitmapinfo( info, bi );
173 fill_color_table_from_pal_colors( info, hdc );
174 return init_dib_info_from_bitmapinfo( dib, info, bits, private_color_table );
176 return init_dib_info_from_bitmapinfo(dib, bi, bits, private_color_table );
179 BOOL init_dib_info_from_bitmapinfo(dib_info *dib, const BITMAPINFO *info, void *bits, enum dib_info_flags flags)
181 return init_dib_info( dib, &info->bmiHeader, (const DWORD *)info->bmiColors,
182 (RGBQUAD *)info->bmiColors, bits, flags );
185 BOOL init_dib_info_from_bitmapobj(dib_info *dib, BITMAPOBJ *bmp, enum dib_info_flags flags)
187 if (!bmp->dib)
189 char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )];
190 BITMAPINFO *info = (BITMAPINFO *)buffer;
192 get_ddb_bitmapinfo( bmp, info );
193 if (!bmp->bitmap.bmBits)
195 int width_bytes = get_dib_stride( bmp->bitmap.bmWidth, bmp->bitmap.bmBitsPixel );
196 bmp->bitmap.bmBits = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY,
197 bmp->bitmap.bmHeight * width_bytes );
198 if (!bmp->bitmap.bmBits) return FALSE;
200 return init_dib_info_from_bitmapinfo( dib, info, bmp->bitmap.bmBits,
201 flags | private_color_table );
203 return init_dib_info( dib, &bmp->dib->dsBmih, bmp->dib->dsBitfields,
204 bmp->color_table, bmp->dib->dsBm.bmBits, flags );
207 static void clear_dib_info(dib_info *dib)
209 dib->color_table = NULL;
210 dib->bits.ptr = NULL;
211 dib->bits.free = NULL;
212 dib->bits.param = NULL;
215 /**********************************************************************
216 * free_dib_info
218 * Free the resources associated with a dib and optionally the bits
220 void free_dib_info(dib_info *dib)
222 if (dib->flags & private_color_table)
223 HeapFree(GetProcessHeap(), 0, dib->color_table);
225 if (dib->bits.free) dib->bits.free( &dib->bits );
226 clear_dib_info( dib );
229 void copy_dib_color_info(dib_info *dst, const dib_info *src)
231 dst->bit_count = src->bit_count;
232 dst->red_mask = src->red_mask;
233 dst->green_mask = src->green_mask;
234 dst->blue_mask = src->blue_mask;
235 dst->red_len = src->red_len;
236 dst->green_len = src->green_len;
237 dst->blue_len = src->blue_len;
238 dst->red_shift = src->red_shift;
239 dst->green_shift = src->green_shift;
240 dst->blue_shift = src->blue_shift;
241 dst->funcs = src->funcs;
242 dst->color_table_size = src->color_table_size;
243 dst->color_table = NULL;
244 dst->flags = src->flags;
245 if(dst->color_table_size)
247 int size = dst->color_table_size * sizeof(dst->color_table[0]);
248 if (dst->flags & private_color_table)
250 dst->color_table = HeapAlloc(GetProcessHeap(), 0, size);
251 memcpy(dst->color_table, src->color_table, size);
253 else
254 dst->color_table = src->color_table;
258 DWORD convert_bitmapinfo( const BITMAPINFO *src_info, void *src_bits, struct bitblt_coords *src,
259 const BITMAPINFO *dst_info, void *dst_bits, BOOL add_alpha )
261 dib_info src_dib, dst_dib;
262 DWORD ret;
264 if ( !init_dib_info_from_bitmapinfo( &src_dib, src_info, src_bits, 0 ) )
265 return ERROR_BAD_FORMAT;
266 if ( !init_dib_info_from_bitmapinfo( &dst_dib, dst_info, dst_bits, 0 ) )
267 return ERROR_BAD_FORMAT;
269 __TRY
271 dst_dib.funcs->convert_to( &dst_dib, &src_dib, &src->visrect );
272 ret = TRUE;
274 __EXCEPT_PAGE_FAULT
276 WARN( "invalid bits pointer %p\n", src_bits );
277 ret = FALSE;
279 __ENDTRY
281 /* We shared the color tables, so there's no need to free the dib_infos here */
282 if(!ret) return ERROR_BAD_FORMAT;
284 /* update coordinates, the destination rectangle is always stored at 0,0 */
285 src->x -= src->visrect.left;
286 src->y -= src->visrect.top;
287 offset_rect( &src->visrect, -src->visrect.left, -src->visrect.top );
289 if (add_alpha && dst_dib.funcs == &funcs_8888 && src_dib.funcs != &funcs_8888)
291 DWORD *pixel = dst_dib.bits.ptr;
292 int x, y;
294 for (y = src->visrect.top; y < src->visrect.bottom; y++, pixel += dst_dib.stride / 4)
295 for (x = src->visrect.left; x < src->visrect.right; x++)
296 pixel[x] |= 0xff000000;
299 return ERROR_SUCCESS;
302 static void update_fg_colors( dibdrv_physdev *pdev )
304 pdev->pen_color = get_pixel_color( pdev, pdev->pen_colorref, TRUE );
305 pdev->brush_color = get_pixel_color( pdev, pdev->brush_colorref, TRUE );
306 pdev->text_color = get_pixel_color( pdev, GetTextColor( pdev->dev.hdc ), TRUE );
309 static void update_masks( dibdrv_physdev *pdev, INT rop )
311 calc_and_xor_masks( rop, pdev->pen_color, &pdev->pen_and, &pdev->pen_xor );
312 update_brush_rop( pdev, rop );
313 if( GetBkMode( pdev->dev.hdc ) == OPAQUE )
314 calc_and_xor_masks( rop, pdev->bkgnd_color, &pdev->bkgnd_and, &pdev->bkgnd_xor );
317 /***********************************************************************
318 * add_extra_clipping_region
320 * Temporarily add a region to the current clipping region.
321 * The returned region must be restored with restore_clipping_region.
323 HRGN add_extra_clipping_region( dibdrv_physdev *pdev, HRGN rgn )
325 HRGN ret, clip;
327 if (!(clip = CreateRectRgn( 0, 0, 0, 0 ))) return 0;
328 CombineRgn( clip, pdev->clip, rgn, RGN_AND );
329 ret = pdev->clip;
330 pdev->clip = clip;
331 return ret;
334 /***********************************************************************
335 * restore_clipping_region
337 void restore_clipping_region( dibdrv_physdev *pdev, HRGN rgn )
339 if (!rgn) return;
340 DeleteObject( pdev->clip );
341 pdev->clip = rgn;
344 /**********************************************************************
345 * dibdrv_CreateDC
347 static BOOL dibdrv_CreateDC( PHYSDEV *dev, LPCWSTR driver, LPCWSTR device,
348 LPCWSTR output, const DEVMODEW *data )
350 dibdrv_physdev *pdev = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pdev) );
352 if (!pdev) return FALSE;
353 if (!(pdev->clip = CreateRectRgn(0, 0, 0, 0)))
355 HeapFree( GetProcessHeap(), 0, pdev );
356 return FALSE;
358 clear_dib_info(&pdev->dib);
359 clear_dib_info(&pdev->brush_dib);
360 push_dc_driver( dev, &pdev->dev, &dib_driver );
361 return TRUE;
364 /***********************************************************************
365 * dibdrv_DeleteDC
367 static BOOL dibdrv_DeleteDC( PHYSDEV dev )
369 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
370 TRACE("(%p)\n", dev);
371 DeleteObject(pdev->clip);
372 free_pattern_brush(pdev);
373 free_dib_info(&pdev->dib);
374 HeapFree( GetProcessHeap(), 0, pdev );
375 return TRUE;
378 /***********************************************************************
379 * dibdrv_CopyBitmap
381 static BOOL dibdrv_CopyBitmap( HBITMAP src, HBITMAP dst )
383 return nulldrv_CopyBitmap( src, dst );
386 /***********************************************************************
387 * dibdrv_DeleteBitmap
389 static BOOL dibdrv_DeleteBitmap( HBITMAP bitmap )
391 return TRUE;
394 /***********************************************************************
395 * dibdrv_SelectBitmap
397 static HBITMAP dibdrv_SelectBitmap( PHYSDEV dev, HBITMAP bitmap )
399 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSelectBitmap );
400 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
401 BITMAPOBJ *bmp = GDI_GetObjPtr( bitmap, OBJ_BITMAP );
402 TRACE("(%p, %p)\n", dev, bitmap);
404 if (!bmp) return 0;
406 free_dib_info(&pdev->dib);
407 pdev->defer = 0;
408 if(!init_dib_info_from_bitmapobj(&pdev->dib, bmp, 0))
409 pdev->defer |= DEFER_FORMAT;
411 GDI_ReleaseObj( bitmap );
413 return next->funcs->pSelectBitmap( next, bitmap );
416 /***********************************************************************
417 * dibdrv_SetBkColor
419 static COLORREF dibdrv_SetBkColor( PHYSDEV dev, COLORREF color )
421 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetBkColor );
422 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
424 pdev->bkgnd_color = get_pixel_color( pdev, color, FALSE );
426 if( GetBkMode(dev->hdc) == OPAQUE )
427 calc_and_xor_masks( GetROP2(dev->hdc), pdev->bkgnd_color, &pdev->bkgnd_and, &pdev->bkgnd_xor );
428 else
430 pdev->bkgnd_and = ~0u;
431 pdev->bkgnd_xor = 0;
434 update_fg_colors( pdev ); /* Only needed in the 1 bpp case */
436 return next->funcs->pSetBkColor( next, color );
439 /***********************************************************************
440 * dibdrv_SetBkMode
442 static INT dibdrv_SetBkMode( PHYSDEV dev, INT mode )
444 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetBkMode );
445 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
447 if( mode == OPAQUE )
448 calc_and_xor_masks( GetROP2(dev->hdc), pdev->bkgnd_color, &pdev->bkgnd_and, &pdev->bkgnd_xor );
449 else
451 pdev->bkgnd_and = ~0u;
452 pdev->bkgnd_xor = 0;
455 return next->funcs->pSetBkMode( next, mode );
458 /***********************************************************************
459 * dibdrv_SetDeviceClipping
461 static void dibdrv_SetDeviceClipping( PHYSDEV dev, HRGN rgn )
463 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetDeviceClipping );
464 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
465 TRACE("(%p, %p)\n", dev, rgn);
467 SetRectRgn( pdev->clip, 0, 0, pdev->dib.width, pdev->dib.height );
468 if (rgn) CombineRgn( pdev->clip, pdev->clip, rgn, RGN_AND );
469 return next->funcs->pSetDeviceClipping( next, rgn );
472 /***********************************************************************
473 * dibdrv_SetDIBColorTable
475 static UINT dibdrv_SetDIBColorTable( PHYSDEV dev, UINT pos, UINT count, const RGBQUAD *colors )
477 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetDIBColorTable );
478 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
479 TRACE("(%p, %d, %d, %p)\n", dev, pos, count, colors);
481 if (pdev->dib.color_table)
483 pdev->bkgnd_color = get_pixel_color( pdev, GetBkColor( dev->hdc ), FALSE );
484 update_fg_colors( pdev );
486 update_masks( pdev, GetROP2( dev->hdc ) );
488 return next->funcs->pSetDIBColorTable( next, pos, count, colors );
491 /***********************************************************************
492 * dibdrv_SetROP2
494 static INT dibdrv_SetROP2( PHYSDEV dev, INT rop )
496 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetROP2 );
497 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
499 update_masks( pdev, rop );
501 return next->funcs->pSetROP2( next, rop );
504 /***********************************************************************
505 * dibdrv_SetTextColor
507 static COLORREF dibdrv_SetTextColor( PHYSDEV dev, COLORREF color )
509 PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetTextColor );
510 dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
512 pdev->text_color = get_pixel_color( pdev, color, TRUE );
513 update_aa_ranges( pdev );
515 return next->funcs->pSetTextColor( next, color );
518 const struct gdi_dc_funcs dib_driver =
520 NULL, /* pAbortDoc */
521 NULL, /* pAbortPath */
522 dibdrv_AlphaBlend, /* pAlphaBlend */
523 NULL, /* pAngleArc */
524 NULL, /* pArc */
525 NULL, /* pArcTo */
526 NULL, /* pBeginPath */
527 dibdrv_BlendImage, /* pBlendImage */
528 NULL, /* pChoosePixelFormat */
529 NULL, /* pChord */
530 NULL, /* pCloseFigure */
531 dibdrv_CopyBitmap, /* pCopyBitmap */
532 NULL, /* pCreateBitmap */
533 NULL, /* pCreateCompatibleDC */
534 dibdrv_CreateDC, /* pCreateDC */
535 NULL, /* pCreateDIBSection */
536 dibdrv_DeleteBitmap, /* pDeleteBitmap */
537 dibdrv_DeleteDC, /* pDeleteDC */
538 NULL, /* pDeleteObject */
539 NULL, /* pDescribePixelFormat */
540 NULL, /* pDeviceCapabilities */
541 NULL, /* pEllipse */
542 NULL, /* pEndDoc */
543 NULL, /* pEndPage */
544 NULL, /* pEndPath */
545 NULL, /* pEnumFonts */
546 NULL, /* pEnumICMProfiles */
547 NULL, /* pExcludeClipRect */
548 NULL, /* pExtDeviceMode */
549 NULL, /* pExtEscape */
550 NULL, /* pExtFloodFill */
551 NULL, /* pExtSelectClipRgn */
552 dibdrv_ExtTextOut, /* pExtTextOut */
553 NULL, /* pFillPath */
554 NULL, /* pFillRgn */
555 NULL, /* pFlattenPath */
556 NULL, /* pFontIsLinked */
557 NULL, /* pFrameRgn */
558 NULL, /* pGdiComment */
559 NULL, /* pGdiRealizationInfo */
560 NULL, /* pGetCharABCWidths */
561 NULL, /* pGetCharABCWidthsI */
562 NULL, /* pGetCharWidth */
563 NULL, /* pGetDeviceCaps */
564 NULL, /* pGetDeviceGammaRamp */
565 NULL, /* pGetFontData */
566 NULL, /* pGetFontUnicodeRanges */
567 NULL, /* pGetGlyphIndices */
568 NULL, /* pGetGlyphOutline */
569 NULL, /* pGetICMProfile */
570 dibdrv_GetImage, /* pGetImage */
571 NULL, /* pGetKerningPairs */
572 NULL, /* pGetNearestColor */
573 NULL, /* pGetOutlineTextMetrics */
574 dibdrv_GetPixel, /* pGetPixel */
575 NULL, /* pGetPixelFormat */
576 NULL, /* pGetSystemPaletteEntries */
577 NULL, /* pGetTextCharsetInfo */
578 NULL, /* pGetTextExtentExPoint */
579 NULL, /* pGetTextExtentExPointI */
580 NULL, /* pGetTextFace */
581 NULL, /* pGetTextMetrics */
582 dibdrv_GradientFill, /* pGradientFill */
583 NULL, /* pIntersectClipRect */
584 NULL, /* pInvertRgn */
585 dibdrv_LineTo, /* pLineTo */
586 NULL, /* pModifyWorldTransform */
587 NULL, /* pMoveTo */
588 NULL, /* pOffsetClipRgn */
589 NULL, /* pOffsetViewportOrg */
590 NULL, /* pOffsetWindowOrg */
591 dibdrv_PaintRgn, /* pPaintRgn */
592 dibdrv_PatBlt, /* pPatBlt */
593 NULL, /* pPie */
594 NULL, /* pPolyBezier */
595 NULL, /* pPolyBezierTo */
596 NULL, /* pPolyDraw */
597 NULL, /* pPolyPolygon */
598 dibdrv_PolyPolyline, /* pPolyPolyline */
599 NULL, /* pPolygon */
600 dibdrv_Polyline, /* pPolyline */
601 NULL, /* pPolylineTo */
602 dibdrv_PutImage, /* pPutImage */
603 NULL, /* pRealizeDefaultPalette */
604 NULL, /* pRealizePalette */
605 dibdrv_Rectangle, /* pRectangle */
606 NULL, /* pResetDC */
607 NULL, /* pRestoreDC */
608 NULL, /* pRoundRect */
609 NULL, /* pSaveDC */
610 NULL, /* pScaleViewportExt */
611 NULL, /* pScaleWindowExt */
612 dibdrv_SelectBitmap, /* pSelectBitmap */
613 dibdrv_SelectBrush, /* pSelectBrush */
614 NULL, /* pSelectClipPath */
615 NULL, /* pSelectFont */
616 NULL, /* pSelectPalette */
617 dibdrv_SelectPen, /* pSelectPen */
618 NULL, /* pSetArcDirection */
619 dibdrv_SetBkColor, /* pSetBkColor */
620 dibdrv_SetBkMode, /* pSetBkMode */
621 dibdrv_SetDCBrushColor, /* pSetDCBrushColor */
622 dibdrv_SetDCPenColor, /* pSetDCPenColor */
623 dibdrv_SetDIBColorTable, /* pSetDIBColorTable */
624 NULL, /* pSetDIBitsToDevice */
625 dibdrv_SetDeviceClipping, /* pSetDeviceClipping */
626 NULL, /* pSetDeviceGammaRamp */
627 NULL, /* pSetLayout */
628 NULL, /* pSetMapMode */
629 NULL, /* pSetMapperFlags */
630 dibdrv_SetPixel, /* pSetPixel */
631 NULL, /* pSetPixelFormat */
632 NULL, /* pSetPolyFillMode */
633 dibdrv_SetROP2, /* pSetROP2 */
634 NULL, /* pSetRelAbs */
635 NULL, /* pSetStretchBltMode */
636 NULL, /* pSetTextAlign */
637 NULL, /* pSetTextCharacterExtra */
638 dibdrv_SetTextColor, /* pSetTextColor */
639 NULL, /* pSetTextJustification */
640 NULL, /* pSetViewportExt */
641 NULL, /* pSetViewportOrg */
642 NULL, /* pSetWindowExt */
643 NULL, /* pSetWindowOrg */
644 NULL, /* pSetWorldTransform */
645 NULL, /* pStartDoc */
646 NULL, /* pStartPage */
647 dibdrv_StretchBlt, /* pStretchBlt */
648 NULL, /* pStretchDIBits */
649 NULL, /* pStrokeAndFillPath */
650 NULL, /* pStrokePath */
651 NULL, /* pSwapBuffers */
652 NULL, /* pUnrealizePalette */
653 NULL, /* pWidenPath */
654 NULL, /* pwglCopyContext */
655 NULL, /* pwglCreateContext */
656 NULL, /* pwglCreateContextAttribsARB */
657 NULL, /* pwglDeleteContext */
658 NULL, /* pwglGetPbufferDCARB */
659 NULL, /* pwglGetProcAddress */
660 NULL, /* pwglMakeContextCurrentARB */
661 NULL, /* pwglMakeCurrent */
662 NULL, /* pwglSetPixelFormatWINE */
663 NULL, /* pwglShareLists */
664 NULL, /* pwglUseFontBitmapsA */
665 NULL /* pwglUseFontBitmapsW */