e6713ea208506aa89e69387bf10eb32f85580683
[wine/hacks.git] / dlls / gdi32 / driver.c
blobe6713ea208506aa89e69387bf10eb32f85580683
1 /*
2 * Graphics driver management functions
4 * Copyright 1994 Bob Amstadt
5 * Copyright 1996, 2001 Alexandre Julliard
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "config.h"
23 #include "wine/port.h"
25 #include <stdarg.h>
26 #include <string.h>
27 #include <stdio.h>
28 #include "windef.h"
29 #include "winbase.h"
30 #include "winreg.h"
31 #include "ddrawgdi.h"
32 #include "wine/winbase16.h"
34 #include "gdi_private.h"
35 #include "wine/unicode.h"
36 #include "wine/list.h"
37 #include "wine/debug.h"
39 WINE_DEFAULT_DEBUG_CHANNEL(driver);
41 struct graphics_driver
43 struct list entry;
44 HMODULE module; /* module handle */
45 DC_FUNCTIONS funcs;
48 static struct list drivers = LIST_INIT( drivers );
49 static struct graphics_driver *display_driver;
51 static CRITICAL_SECTION driver_section;
52 static CRITICAL_SECTION_DEBUG critsect_debug =
54 0, 0, &driver_section,
55 { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
56 0, 0, { (DWORD_PTR)(__FILE__ ": driver_section") }
58 static CRITICAL_SECTION driver_section = { &critsect_debug, -1, 0, 0, 0, 0 };
60 /**********************************************************************
61 * create_driver
63 * Allocate and fill the driver structure for a given module.
65 static struct graphics_driver *create_driver( HMODULE module )
67 struct graphics_driver *driver;
69 if (!(driver = HeapAlloc( GetProcessHeap(), 0, sizeof(*driver)))) return NULL;
70 driver->module = module;
72 /* fill the function table */
73 if (module)
75 #define GET_FUNC(name) driver->funcs.p##name = (void*)GetProcAddress( module, #name )
76 GET_FUNC(AbortDoc);
77 GET_FUNC(AbortPath);
78 GET_FUNC(AlphaBlend);
79 GET_FUNC(AngleArc);
80 GET_FUNC(Arc);
81 GET_FUNC(ArcTo);
82 GET_FUNC(BeginPath);
83 GET_FUNC(BitBlt);
84 GET_FUNC(ChoosePixelFormat);
85 GET_FUNC(Chord);
86 GET_FUNC(CloseFigure);
87 GET_FUNC(CreateBitmap);
88 GET_FUNC(CreateDC);
89 GET_FUNC(CreateDIBSection);
90 GET_FUNC(DeleteBitmap);
91 GET_FUNC(DeleteDC);
92 GET_FUNC(DescribePixelFormat);
93 GET_FUNC(DeviceCapabilities);
94 GET_FUNC(Ellipse);
95 GET_FUNC(EndDoc);
96 GET_FUNC(EndPage);
97 GET_FUNC(EndPath);
98 GET_FUNC(EnumDeviceFonts);
99 GET_FUNC(ExcludeClipRect);
100 GET_FUNC(ExtDeviceMode);
101 GET_FUNC(ExtEscape);
102 GET_FUNC(ExtFloodFill);
103 GET_FUNC(ExtSelectClipRgn);
104 GET_FUNC(ExtTextOut);
105 GET_FUNC(FillPath);
106 GET_FUNC(FillRgn);
107 GET_FUNC(FlattenPath);
108 GET_FUNC(FrameRgn);
109 GET_FUNC(GdiComment);
110 GET_FUNC(GetBitmapBits);
111 GET_FUNC(GetCharWidth);
112 GET_FUNC(GetDCOrgEx);
113 GET_FUNC(GetDIBColorTable);
114 GET_FUNC(GetDIBits);
115 GET_FUNC(GetDeviceCaps);
116 GET_FUNC(GetDeviceGammaRamp);
117 GET_FUNC(GetICMProfile);
118 GET_FUNC(GetNearestColor);
119 GET_FUNC(GetPixel);
120 GET_FUNC(GetPixelFormat);
121 GET_FUNC(GetSystemPaletteEntries);
122 GET_FUNC(GetTextExtentExPoint);
123 GET_FUNC(GetTextMetrics);
124 GET_FUNC(IntersectClipRect);
125 GET_FUNC(InvertRgn);
126 GET_FUNC(LineTo);
127 GET_FUNC(MoveTo);
128 GET_FUNC(ModifyWorldTransform);
129 GET_FUNC(OffsetClipRgn);
130 GET_FUNC(OffsetViewportOrg);
131 GET_FUNC(OffsetWindowOrg);
132 GET_FUNC(PaintRgn);
133 GET_FUNC(PatBlt);
134 GET_FUNC(Pie);
135 GET_FUNC(PolyBezier);
136 GET_FUNC(PolyBezierTo);
137 GET_FUNC(PolyDraw);
138 GET_FUNC(PolyPolygon);
139 GET_FUNC(PolyPolyline);
140 GET_FUNC(Polygon);
141 GET_FUNC(Polyline);
142 GET_FUNC(PolylineTo);
143 GET_FUNC(RealizeDefaultPalette);
144 GET_FUNC(RealizePalette);
145 GET_FUNC(Rectangle);
146 GET_FUNC(ResetDC);
147 GET_FUNC(RestoreDC);
148 GET_FUNC(RoundRect);
149 GET_FUNC(SaveDC);
150 GET_FUNC(ScaleViewportExt);
151 GET_FUNC(ScaleWindowExt);
152 GET_FUNC(SelectBitmap);
153 GET_FUNC(SelectBrush);
154 GET_FUNC(SelectClipPath);
155 GET_FUNC(SelectFont);
156 GET_FUNC(SelectPalette);
157 GET_FUNC(SelectPen);
158 GET_FUNC(SetArcDirection);
159 GET_FUNC(SetBitmapBits);
160 GET_FUNC(SetBkColor);
161 GET_FUNC(SetBkMode);
162 GET_FUNC(SetDCBrushColor);
163 GET_FUNC(SetDCPenColor);
164 GET_FUNC(SetDIBColorTable);
165 GET_FUNC(SetDIBits);
166 GET_FUNC(SetDIBitsToDevice);
167 GET_FUNC(SetDeviceClipping);
168 GET_FUNC(SetDeviceGammaRamp);
169 GET_FUNC(SetMapMode);
170 GET_FUNC(SetMapperFlags);
171 GET_FUNC(SetPixel);
172 GET_FUNC(SetPixelFormat);
173 GET_FUNC(SetPolyFillMode);
174 GET_FUNC(SetROP2);
175 GET_FUNC(SetRelAbs);
176 GET_FUNC(SetStretchBltMode);
177 GET_FUNC(SetTextAlign);
178 GET_FUNC(SetTextCharacterExtra);
179 GET_FUNC(SetTextColor);
180 GET_FUNC(SetTextJustification);
181 GET_FUNC(SetViewportExt);
182 GET_FUNC(SetViewportOrg);
183 GET_FUNC(SetWindowExt);
184 GET_FUNC(SetWindowOrg);
185 GET_FUNC(SetWorldTransform);
186 GET_FUNC(StartDoc);
187 GET_FUNC(StartPage);
188 GET_FUNC(StretchBlt);
189 GET_FUNC(StretchDIBits);
190 GET_FUNC(StrokeAndFillPath);
191 GET_FUNC(StrokePath);
192 GET_FUNC(SwapBuffers);
193 GET_FUNC(UnrealizePalette);
194 GET_FUNC(WidenPath);
196 /* OpenGL32 */
197 GET_FUNC(wglCreateContext);
198 GET_FUNC(wglCreateContextAttribsARB);
199 GET_FUNC(wglDeleteContext);
200 GET_FUNC(wglGetProcAddress);
201 GET_FUNC(wglGetPbufferDCARB);
202 GET_FUNC(wglMakeContextCurrentARB);
203 GET_FUNC(wglMakeCurrent);
204 GET_FUNC(wglSetPixelFormatWINE);
205 GET_FUNC(wglShareLists);
206 GET_FUNC(wglUseFontBitmapsA);
207 GET_FUNC(wglUseFontBitmapsW);
208 #undef GET_FUNC
210 else memset( &driver->funcs, 0, sizeof(driver->funcs) );
212 return driver;
216 /**********************************************************************
217 * DRIVER_get_display_driver
219 * Special case for loading the display driver: get the name from the config file
221 const DC_FUNCTIONS *DRIVER_get_display_driver(void)
223 struct graphics_driver *driver;
224 char buffer[MAX_PATH], libname[32], *name, *next;
225 HMODULE module = 0;
226 HKEY hkey;
228 if (display_driver) return &display_driver->funcs; /* already loaded */
230 strcpy( buffer, "x11" ); /* default value */
231 /* @@ Wine registry key: HKCU\Software\Wine\Drivers */
232 if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Drivers", &hkey ))
234 DWORD type, count = sizeof(buffer);
235 RegQueryValueExA( hkey, "Graphics", 0, &type, (LPBYTE) buffer, &count );
236 RegCloseKey( hkey );
239 name = buffer;
240 while (name)
242 next = strchr( name, ',' );
243 if (next) *next++ = 0;
245 snprintf( libname, sizeof(libname), "wine%s.drv", name );
246 if ((module = LoadLibraryA( libname )) != 0) break;
247 name = next;
250 if (!(driver = create_driver( module )))
252 MESSAGE( "Could not create graphics driver '%s'\n", buffer );
253 FreeLibrary( module );
254 ExitProcess(1);
256 if (InterlockedCompareExchangePointer( (void **)&display_driver, driver, NULL ))
258 /* somebody beat us to it */
259 FreeLibrary( driver->module );
260 HeapFree( GetProcessHeap(), 0, driver );
262 return &display_driver->funcs;
266 /**********************************************************************
267 * DRIVER_load_driver
269 const DC_FUNCTIONS *DRIVER_load_driver( LPCWSTR name )
271 HMODULE module;
272 struct graphics_driver *driver, *new_driver;
273 static const WCHAR displayW[] = { 'd','i','s','p','l','a','y',0 };
274 static const WCHAR display1W[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y','1',0};
276 /* display driver is a special case */
277 if (!strcmpiW( name, displayW ) || !strcmpiW( name, display1W )) return DRIVER_get_display_driver();
279 if ((module = GetModuleHandleW( name )))
281 if (display_driver && display_driver->module == module) return &display_driver->funcs;
282 EnterCriticalSection( &driver_section );
283 LIST_FOR_EACH_ENTRY( driver, &drivers, struct graphics_driver, entry )
285 if (driver->module == module) goto done;
287 LeaveCriticalSection( &driver_section );
290 if (!(module = LoadLibraryW( name ))) return NULL;
292 if (!(new_driver = create_driver( module )))
294 FreeLibrary( module );
295 return NULL;
298 /* check if someone else added it in the meantime */
299 EnterCriticalSection( &driver_section );
300 LIST_FOR_EACH_ENTRY( driver, &drivers, struct graphics_driver, entry )
302 if (driver->module != module) continue;
303 FreeLibrary( module );
304 HeapFree( GetProcessHeap(), 0, new_driver );
305 goto done;
307 driver = new_driver;
308 list_add_head( &drivers, &driver->entry );
309 TRACE( "loaded driver %p for %s\n", driver, debugstr_w(name) );
310 done:
311 LeaveCriticalSection( &driver_section );
312 return &driver->funcs;
316 /*****************************************************************************
317 * DRIVER_GetDriverName
320 BOOL DRIVER_GetDriverName( LPCWSTR device, LPWSTR driver, DWORD size )
322 static const WCHAR displayW[] = { 'd','i','s','p','l','a','y',0 };
323 static const WCHAR devicesW[] = { 'd','e','v','i','c','e','s',0 };
324 static const WCHAR display1W[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y','1',0};
325 static const WCHAR empty_strW[] = { 0 };
326 WCHAR *p;
328 /* display is a special case */
329 if (!strcmpiW( device, displayW ) ||
330 !strcmpiW( device, display1W ))
332 lstrcpynW( driver, displayW, size );
333 return TRUE;
336 size = GetProfileStringW(devicesW, device, empty_strW, driver, size);
337 if(!size) {
338 WARN("Unable to find %s in [devices] section of win.ini\n", debugstr_w(device));
339 return FALSE;
341 p = strchrW(driver, ',');
342 if(!p)
344 WARN("%s entry in [devices] section of win.ini is malformed.\n", debugstr_w(device));
345 return FALSE;
347 *p = 0;
348 TRACE("Found %s for %s\n", debugstr_w(driver), debugstr_w(device));
349 return TRUE;
353 /***********************************************************************
354 * GdiConvertToDevmodeW (GDI32.@)
356 DEVMODEW * WINAPI GdiConvertToDevmodeW(const DEVMODEA *dmA)
358 DEVMODEW *dmW;
359 WORD dmW_size, dmA_size;
361 dmA_size = dmA->dmSize;
363 /* this is the minimal dmSize that XP accepts */
364 if (dmA_size < FIELD_OFFSET(DEVMODEA, dmFields))
365 return NULL;
367 if (dmA_size > sizeof(DEVMODEA))
368 dmA_size = sizeof(DEVMODEA);
370 dmW_size = dmA_size + CCHDEVICENAME;
371 if (dmA_size >= FIELD_OFFSET(DEVMODEA, dmFormName) + CCHFORMNAME)
372 dmW_size += CCHFORMNAME;
374 dmW = HeapAlloc(GetProcessHeap(), 0, dmW_size + dmA->dmDriverExtra);
375 if (!dmW) return NULL;
377 MultiByteToWideChar(CP_ACP, 0, (const char*) dmA->dmDeviceName, -1,
378 dmW->dmDeviceName, CCHDEVICENAME);
379 /* copy slightly more, to avoid long computations */
380 memcpy(&dmW->dmSpecVersion, &dmA->dmSpecVersion, dmA_size - CCHDEVICENAME);
382 if (dmA_size >= FIELD_OFFSET(DEVMODEA, dmFormName) + CCHFORMNAME)
384 if (dmA->dmFields & DM_FORMNAME)
385 MultiByteToWideChar(CP_ACP, 0, (const char*) dmA->dmFormName, -1,
386 dmW->dmFormName, CCHFORMNAME);
387 else
388 dmW->dmFormName[0] = 0;
390 if (dmA_size > FIELD_OFFSET(DEVMODEA, dmLogPixels))
391 memcpy(&dmW->dmLogPixels, &dmA->dmLogPixels, dmA_size - FIELD_OFFSET(DEVMODEA, dmLogPixels));
394 if (dmA->dmDriverExtra)
395 memcpy((char *)dmW + dmW_size, (const char *)dmA + dmA_size, dmA->dmDriverExtra);
397 dmW->dmSize = dmW_size;
399 return dmW;
403 /*****************************************************************************
404 * @ [GDI32.100]
406 * This should thunk to 16-bit and simply call the proc with the given args.
408 INT WINAPI GDI_CallDevInstall16( FARPROC16 lpfnDevInstallProc, HWND hWnd,
409 LPSTR lpModelName, LPSTR OldPort, LPSTR NewPort )
411 FIXME("(%p, %p, %s, %s, %s)\n", lpfnDevInstallProc, hWnd, lpModelName, OldPort, NewPort );
412 return -1;
415 /*****************************************************************************
416 * @ [GDI32.101]
418 * This should load the correct driver for lpszDevice and calls this driver's
419 * ExtDeviceModePropSheet proc.
421 * Note: The driver calls a callback routine for each property sheet page; these
422 * pages are supposed to be filled into the structure pointed to by lpPropSheet.
423 * The layout of this structure is:
425 * struct
427 * DWORD nPages;
428 * DWORD unknown;
429 * HPROPSHEETPAGE pages[10];
430 * };
432 INT WINAPI GDI_CallExtDeviceModePropSheet16( HWND hWnd, LPCSTR lpszDevice,
433 LPCSTR lpszPort, LPVOID lpPropSheet )
435 FIXME("(%p, %s, %s, %p)\n", hWnd, lpszDevice, lpszPort, lpPropSheet );
436 return -1;
439 /*****************************************************************************
440 * @ [GDI32.102]
442 * This should load the correct driver for lpszDevice and call this driver's
443 * ExtDeviceMode proc.
445 * FIXME: convert ExtDeviceMode to unicode in the driver interface
447 INT WINAPI GDI_CallExtDeviceMode16( HWND hwnd,
448 LPDEVMODEA lpdmOutput, LPSTR lpszDevice,
449 LPSTR lpszPort, LPDEVMODEA lpdmInput,
450 LPSTR lpszProfile, DWORD fwMode )
452 WCHAR deviceW[300];
453 WCHAR bufW[300];
454 char buf[300];
455 HDC hdc;
456 DC *dc;
457 INT ret = -1;
459 TRACE("(%p, %p, %s, %s, %p, %s, %d)\n",
460 hwnd, lpdmOutput, lpszDevice, lpszPort, lpdmInput, lpszProfile, fwMode );
462 if (!lpszDevice) return -1;
463 if (!MultiByteToWideChar(CP_ACP, 0, lpszDevice, -1, deviceW, 300)) return -1;
465 if(!DRIVER_GetDriverName( deviceW, bufW, 300 )) return -1;
467 if (!WideCharToMultiByte(CP_ACP, 0, bufW, -1, buf, 300, NULL, NULL)) return -1;
469 if (!(hdc = CreateICA( buf, lpszDevice, lpszPort, NULL ))) return -1;
471 if ((dc = get_dc_ptr( hdc )))
473 if (dc->funcs->pExtDeviceMode)
474 ret = dc->funcs->pExtDeviceMode( buf, hwnd, lpdmOutput, lpszDevice, lpszPort,
475 lpdmInput, lpszProfile, fwMode );
476 release_dc_ptr( dc );
478 DeleteDC( hdc );
479 return ret;
482 /****************************************************************************
483 * @ [GDI32.103]
485 * This should load the correct driver for lpszDevice and calls this driver's
486 * AdvancedSetupDialog proc.
488 INT WINAPI GDI_CallAdvancedSetupDialog16( HWND hwnd, LPSTR lpszDevice,
489 LPDEVMODEA devin, LPDEVMODEA devout )
491 TRACE("(%p, %s, %p, %p)\n", hwnd, lpszDevice, devin, devout );
492 return -1;
495 /*****************************************************************************
496 * @ [GDI32.104]
498 * This should load the correct driver for lpszDevice and calls this driver's
499 * DeviceCapabilities proc.
501 * FIXME: convert DeviceCapabilities to unicode in the driver interface
503 DWORD WINAPI GDI_CallDeviceCapabilities16( LPCSTR lpszDevice, LPCSTR lpszPort,
504 WORD fwCapability, LPSTR lpszOutput,
505 LPDEVMODEA lpdm )
507 WCHAR deviceW[300];
508 WCHAR bufW[300];
509 char buf[300];
510 HDC hdc;
511 DC *dc;
512 INT ret = -1;
514 TRACE("(%s, %s, %d, %p, %p)\n", lpszDevice, lpszPort, fwCapability, lpszOutput, lpdm );
516 if (!lpszDevice) return -1;
517 if (!MultiByteToWideChar(CP_ACP, 0, lpszDevice, -1, deviceW, 300)) return -1;
519 if(!DRIVER_GetDriverName( deviceW, bufW, 300 )) return -1;
521 if (!WideCharToMultiByte(CP_ACP, 0, bufW, -1, buf, 300, NULL, NULL)) return -1;
523 if (!(hdc = CreateICA( buf, lpszDevice, lpszPort, NULL ))) return -1;
525 if ((dc = get_dc_ptr( hdc )))
527 if (dc->funcs->pDeviceCapabilities)
528 ret = dc->funcs->pDeviceCapabilities( buf, lpszDevice, lpszPort,
529 fwCapability, lpszOutput, lpdm );
530 release_dc_ptr( dc );
532 DeleteDC( hdc );
533 return ret;
537 /************************************************************************
538 * Escape [GDI32.@]
540 INT WINAPI Escape( HDC hdc, INT escape, INT in_count, LPCSTR in_data, LPVOID out_data )
542 INT ret;
543 POINT *pt;
545 switch (escape)
547 case ABORTDOC:
548 return AbortDoc( hdc );
550 case ENDDOC:
551 return EndDoc( hdc );
553 case GETPHYSPAGESIZE:
554 pt = out_data;
555 pt->x = GetDeviceCaps( hdc, PHYSICALWIDTH );
556 pt->y = GetDeviceCaps( hdc, PHYSICALHEIGHT );
557 return 1;
559 case GETPRINTINGOFFSET:
560 pt = out_data;
561 pt->x = GetDeviceCaps( hdc, PHYSICALOFFSETX );
562 pt->y = GetDeviceCaps( hdc, PHYSICALOFFSETY );
563 return 1;
565 case GETSCALINGFACTOR:
566 pt = out_data;
567 pt->x = GetDeviceCaps( hdc, SCALINGFACTORX );
568 pt->y = GetDeviceCaps( hdc, SCALINGFACTORY );
569 return 1;
571 case NEWFRAME:
572 return EndPage( hdc );
574 case SETABORTPROC:
575 return SetAbortProc( hdc, (ABORTPROC)in_data );
577 case STARTDOC:
579 DOCINFOA doc;
580 char *name = NULL;
582 /* in_data may not be 0 terminated so we must copy it */
583 if (in_data)
585 name = HeapAlloc( GetProcessHeap(), 0, in_count+1 );
586 memcpy( name, in_data, in_count );
587 name[in_count] = 0;
589 /* out_data is actually a pointer to the DocInfo structure and used as
590 * a second input parameter */
591 if (out_data) doc = *(DOCINFOA *)out_data;
592 else
594 doc.cbSize = sizeof(doc);
595 doc.lpszOutput = NULL;
596 doc.lpszDatatype = NULL;
597 doc.fwType = 0;
599 doc.lpszDocName = name;
600 ret = StartDocA( hdc, &doc );
601 HeapFree( GetProcessHeap(), 0, name );
602 if (ret > 0) ret = StartPage( hdc );
603 return ret;
606 case QUERYESCSUPPORT:
608 const INT *ptr = (const INT *)in_data;
609 if (in_count < sizeof(INT)) return 0;
610 switch(*ptr)
612 case ABORTDOC:
613 case ENDDOC:
614 case GETPHYSPAGESIZE:
615 case GETPRINTINGOFFSET:
616 case GETSCALINGFACTOR:
617 case NEWFRAME:
618 case QUERYESCSUPPORT:
619 case SETABORTPROC:
620 case STARTDOC:
621 return TRUE;
623 break;
627 /* if not handled internally, pass it to the driver */
628 return ExtEscape( hdc, escape, in_count, in_data, 0, out_data );
632 /******************************************************************************
633 * ExtEscape [GDI32.@]
635 * Access capabilities of a particular device that are not available through GDI.
637 * PARAMS
638 * hdc [I] Handle to device context
639 * nEscape [I] Escape function
640 * cbInput [I] Number of bytes in input structure
641 * lpszInData [I] Pointer to input structure
642 * cbOutput [I] Number of bytes in output structure
643 * lpszOutData [O] Pointer to output structure
645 * RETURNS
646 * Success: >0
647 * Not implemented: 0
648 * Failure: <0
650 INT WINAPI ExtEscape( HDC hdc, INT nEscape, INT cbInput, LPCSTR lpszInData,
651 INT cbOutput, LPSTR lpszOutData )
653 INT ret = 0;
654 DC * dc = get_dc_ptr( hdc );
655 if (dc)
657 if (dc->funcs->pExtEscape)
658 ret = dc->funcs->pExtEscape( dc->physDev, nEscape, cbInput, lpszInData, cbOutput, lpszOutData );
659 release_dc_ptr( dc );
661 return ret;
665 /*******************************************************************
666 * DrawEscape [GDI32.@]
670 INT WINAPI DrawEscape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpszInData)
672 FIXME("DrawEscape, stub\n");
673 return 0;
676 /*******************************************************************
677 * NamedEscape [GDI32.@]
679 INT WINAPI NamedEscape( HDC hdc, LPCWSTR pDriver, INT nEscape, INT cbInput, LPCSTR lpszInData,
680 INT cbOutput, LPSTR lpszOutData )
682 FIXME("(%p, %s, %d, %d, %p, %d, %p)\n",
683 hdc, wine_dbgstr_w(pDriver), nEscape, cbInput, lpszInData, cbOutput,
684 lpszOutData);
685 return 0;
688 /*******************************************************************
689 * DdQueryDisplaySettingsUniqueness [GDI32.@]
690 * GdiEntry13 [GDI32.@]
692 ULONG WINAPI DdQueryDisplaySettingsUniqueness(VOID)
694 static int warn_once;
696 if (!warn_once++)
697 FIXME("stub\n");
698 return 0;