1 /* $Id: stubsa.c,v 1.32 2004/07/09 20:28:20 navaraf Exp $
3 * reactos/lib/gdi32/misc/stubs.c
5 * GDI32.DLL Stubs for ANSI functions
7 * When you implement one of these functions,
8 * remove its stub from this file.
15 #undef WIN32_LEAN_AND_MEAN
17 #include <ddk/ntddk.h>
18 #define NTOS_MODE_USER
20 #include <win32k/text.h>
21 #include <win32k/dc.h>
22 #include <rosrtl/devmode.h>
23 #include <rosrtl/logfont.h>
24 #include <internal/heap.h>
26 #define UNIMPLEMENTED DbgPrint("GDI32: %s is unimplemented, please try again later.\n", __FUNCTION__);
33 AddFontResourceExA ( LPCSTR lpszFilename
, DWORD fl
, PVOID pvReserved
)
39 Status
= HEAP_strdupA2W ( &FilenameW
, lpszFilename
);
40 if ( !NT_SUCCESS (Status
) )
41 SetLastError (RtlNtStatusToDosError(Status
));
44 rc
= AddFontResourceExW ( FilenameW
, fl
, pvReserved
);
46 HEAP_free ( &FilenameW
);
56 AddFontResourceA ( LPCSTR lpszFilename
)
58 return AddFontResourceExA ( lpszFilename
, 0, 0 );
71 CONST DEVMODEA
* lpdvmInit
75 LPWSTR lpszDriverW
, lpszDeviceW
, lpszOutputW
;
76 UNICODE_STRING Driver
, Device
, Output
;
80 Status
= HEAP_strdupA2W ( &lpszDriverW
, lpszDriver
);
81 if (!NT_SUCCESS (Status
))
82 SetLastError (RtlNtStatusToDosError(Status
));
85 Status
= HEAP_strdupA2W ( &lpszDeviceW
, lpszDevice
);
86 if (!NT_SUCCESS (Status
))
87 SetLastError (RtlNtStatusToDosError(Status
));
90 Status
= HEAP_strdupA2W ( &lpszOutputW
, lpszOutput
);
91 if (!NT_SUCCESS (Status
))
92 SetLastError (RtlNtStatusToDosError(Status
));
96 RosRtlDevModeA2W ( &dvmInitW
, (const LPDEVMODEA
)lpdvmInit
);
98 RtlInitUnicodeString(&Driver
, lpszDriverW
);
99 RtlInitUnicodeString(&Device
, lpszDeviceW
);
100 RtlInitUnicodeString(&Output
, lpszOutputW
);
101 rc
= NtGdiCreateIC ( &Driver
,
104 lpdvmInit
? &dvmInitW
: NULL
);
106 HEAP_free ( lpszOutputW
);
108 HEAP_free ( lpszDeviceW
);
110 HEAP_free ( lpszDriverW
);
121 CreateScalableFontResourceA(
125 LPCSTR lpszCurrentPath
129 LPWSTR lpszFontResW
, lpszFontFileW
, lpszCurrentPathW
;
132 Status
= HEAP_strdupA2W ( &lpszFontResW
, lpszFontRes
);
133 if (!NT_SUCCESS (Status
))
134 SetLastError (RtlNtStatusToDosError(Status
));
137 Status
= HEAP_strdupA2W ( &lpszFontFileW
, lpszFontFile
);
138 if (!NT_SUCCESS (Status
))
139 SetLastError (RtlNtStatusToDosError(Status
));
142 Status
= HEAP_strdupA2W ( &lpszCurrentPathW
, lpszCurrentPath
);
143 if (!NT_SUCCESS (Status
))
144 SetLastError (RtlNtStatusToDosError(Status
));
147 rc
= NtGdiCreateScalableFontResource ( fdwHidden
,
152 HEAP_free ( lpszCurrentPathW
);
155 HEAP_free ( lpszFontFileW
);
158 HEAP_free ( lpszFontResW
);
169 DeviceCapabilitiesExA(
174 CONST DEVMODEA
*pDevMode
178 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
191 FONTENUMPROCA FontFunc
,
196 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
203 Status
= HEAP_strdupA2W ( &lpFaceNameW
, lpFaceName
);
204 if (!NT_SUCCESS (Status
))
205 SetLastError (RtlNtStatusToDosError(Status
));
208 rc
= NtGdiEnumFonts ( hDC
, lpFaceNameW
, FontFunc
, lParam
);
210 HEAP_free ( lpFaceNameW
);
229 /* FIXME what to do with iFirstChar and iLastChar ??? */
230 return NtGdiGetCharWidthFloat ( hdc
, iFirstChar
, iLastChar
, pxBuffer
);
246 /* FIXME what to do with uFirstChar and uLastChar ??? */
247 return NtGdiGetCharABCWidths ( hdc
, uFirstChar
, uLastChar
, lpabc
);
256 GetCharABCWidthsFloatA(
263 /* FIXME what to do with iFirstChar and iLastChar ??? */
264 return NtGdiGetCharABCWidthsFloat ( hdc
, iFirstChar
, iLastChar
, lpABCF
);
283 return NtGdiGetGlyphOutline ( hdc
, uChar
, uFormat
, lpgm
, cbBuffer
, lpvBuffer
, (CONST LPMAT2
)lpmat2
);
292 GetOutlineTextMetricsA(
295 LPOUTLINETEXTMETRICA lpOTM
299 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
309 GetTextExtentExPointA(
323 Status
= HEAP_strdupA2W ( &lpszStrW
, lpszStr
);
324 if (!NT_SUCCESS (Status
))
325 SetLastError (RtlNtStatusToDosError(Status
));
328 rc
= NtGdiGetTextExtentExPoint (
329 hdc
, lpszStrW
, cchString
, nMaxExtent
, lpnFit
, alpDx
, lpSize
);
331 HEAP_free ( lpszStrW
);
343 GetCharacterPlacementA(
353 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
365 CONST DEVMODEA
*lpInitData
370 RosRtlDevModeA2W ( &InitDataW
, (CONST LPDEVMODEA
)lpInitData
);
372 return NtGdiResetDC ( hdc
, &InitDataW
);
389 Status
= HEAP_strdupA2W ( &lpFileNameW
, lpFileName
);
390 if (!NT_SUCCESS (Status
))
391 SetLastError (RtlNtStatusToDosError(Status
));
394 rc
= NtGdiRemoveFontResource ( lpFileNameW
);
396 HEAP_free ( lpFileNameW
);
414 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
431 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
448 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
465 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
482 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
497 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
509 DWORD a1
, /* MS says LPDWORD! */
514 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
530 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
547 * FIXME - call NtGdiEnumICMProfiles with NULL for lpstrBuffer
548 * to find out how big a buffer we need. Then allocate that buffer
549 * and call NtGdiEnumICMProfiles again to have the buffer filled.
551 * Finally, step through the buffer ( MULTI-SZ recommended for format ),
552 * and convert each string to ANSI, calling the user's callback function
553 * until we run out of strings or the user returns FALSE
557 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
575 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
593 LPGLYPHMETRICSFLOAT a7
597 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
615 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);