1 /* $Id: stubsa.c,v 1.29 2004/03/23 07:59:47 gvg 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 #include <win32k/text.h>
19 #include <win32k/dc.h>
20 #include <rosrtl/devmode.h>
21 #include <rosrtl/logfont.h>
22 #include <internal/heap.h>
29 AddFontResourceExA ( LPCSTR lpszFilename
, DWORD fl
, PVOID pvReserved
)
35 Status
= HEAP_strdupA2W ( &FilenameW
, lpszFilename
);
36 if ( !NT_SUCCESS (Status
) )
37 SetLastError (RtlNtStatusToDosError(Status
));
40 rc
= AddFontResourceExW ( FilenameW
, fl
, pvReserved
);
42 HEAP_free ( &FilenameW
);
52 AddFontResourceA ( LPCSTR lpszFilename
)
54 return AddFontResourceExA ( lpszFilename
, 0, 0 );
67 CONST DEVMODEA
* lpdvmInit
71 LPWSTR lpszDriverW
, lpszDeviceW
, lpszOutputW
;
72 UNICODE_STRING Driver
, Device
, Output
;
76 Status
= HEAP_strdupA2W ( &lpszDriverW
, lpszDriver
);
77 if (!NT_SUCCESS (Status
))
78 SetLastError (RtlNtStatusToDosError(Status
));
81 Status
= HEAP_strdupA2W ( &lpszDeviceW
, lpszDevice
);
82 if (!NT_SUCCESS (Status
))
83 SetLastError (RtlNtStatusToDosError(Status
));
86 Status
= HEAP_strdupA2W ( &lpszOutputW
, lpszOutput
);
87 if (!NT_SUCCESS (Status
))
88 SetLastError (RtlNtStatusToDosError(Status
));
92 RosRtlDevModeA2W ( &dvmInitW
, (const LPDEVMODEA
)lpdvmInit
);
94 RtlInitUnicodeString(&Driver
, lpszDriverW
);
95 RtlInitUnicodeString(&Device
, lpszDeviceW
);
96 RtlInitUnicodeString(&Output
, lpszOutputW
);
97 rc
= NtGdiCreateIC ( &Driver
,
100 lpdvmInit
? &dvmInitW
: NULL
);
102 HEAP_free ( lpszOutputW
);
104 HEAP_free ( lpszDeviceW
);
106 HEAP_free ( lpszDriverW
);
117 CreateScalableFontResourceA(
121 LPCSTR lpszCurrentPath
125 LPWSTR lpszFontResW
, lpszFontFileW
, lpszCurrentPathW
;
128 Status
= HEAP_strdupA2W ( &lpszFontResW
, lpszFontRes
);
129 if (!NT_SUCCESS (Status
))
130 SetLastError (RtlNtStatusToDosError(Status
));
133 Status
= HEAP_strdupA2W ( &lpszFontFileW
, lpszFontFile
);
134 if (!NT_SUCCESS (Status
))
135 SetLastError (RtlNtStatusToDosError(Status
));
138 Status
= HEAP_strdupA2W ( &lpszCurrentPathW
, lpszCurrentPath
);
139 if (!NT_SUCCESS (Status
))
140 SetLastError (RtlNtStatusToDosError(Status
));
143 rc
= NtGdiCreateScalableFontResource ( fdwHidden
,
148 HEAP_free ( lpszCurrentPathW
);
151 HEAP_free ( lpszFontFileW
);
154 HEAP_free ( lpszFontResW
);
165 DeviceCapabilitiesExA(
170 CONST DEVMODEA
*pDevMode
173 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
186 FONTENUMPROCA FontFunc
,
190 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
197 Status
= HEAP_strdupA2W ( &lpFaceNameW
, lpFaceName
);
198 if (!NT_SUCCESS (Status
))
199 SetLastError (RtlNtStatusToDosError(Status
));
202 rc
= NtGdiEnumFonts ( hDC
, lpFaceNameW
, FontFunc
, lParam
);
204 HEAP_free ( lpFaceNameW
);
223 /* FIXME what to do with iFirstChar and iLastChar ??? */
224 return NtGdiGetCharWidthFloat ( hdc
, iFirstChar
, iLastChar
, pxBuffer
);
240 /* FIXME what to do with uFirstChar and uLastChar ??? */
241 return NtGdiGetCharABCWidths ( hdc
, uFirstChar
, uLastChar
, lpabc
);
250 GetCharABCWidthsFloatA(
257 /* FIXME what to do with iFirstChar and iLastChar ??? */
258 return NtGdiGetCharABCWidthsFloat ( hdc
, iFirstChar
, iLastChar
, lpABCF
);
277 return NtGdiGetGlyphOutline ( hdc
, uChar
, uFormat
, lpgm
, cbBuffer
, lpvBuffer
, (CONST LPMAT2
)lpmat2
);
286 GetOutlineTextMetricsA(
289 LPOUTLINETEXTMETRICA lpOTM
292 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
302 GetTextExtentExPointA(
316 Status
= HEAP_strdupA2W ( &lpszStrW
, lpszStr
);
317 if (!NT_SUCCESS (Status
))
318 SetLastError (RtlNtStatusToDosError(Status
));
321 rc
= NtGdiGetTextExtentExPoint (
322 hdc
, lpszStrW
, cchString
, nMaxExtent
, lpnFit
, alpDx
, lpSize
);
324 HEAP_free ( lpszStrW
);
336 GetCharacterPlacementA(
345 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
357 CONST DEVMODEA
*lpInitData
362 RosRtlDevModeA2W ( &InitDataW
, (CONST LPDEVMODEA
)lpInitData
);
364 return NtGdiResetDC ( hdc
, &InitDataW
);
381 Status
= HEAP_strdupA2W ( &lpFileNameW
, lpFileName
);
382 if (!NT_SUCCESS (Status
))
383 SetLastError (RtlNtStatusToDosError(Status
));
386 rc
= NtGdiRemoveFontResource ( lpFileNameW
);
388 HEAP_free ( lpFileNameW
);
405 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
421 return NtGdiGetObject ( a0
, a1
, a2
);
436 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
452 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
468 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
484 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
498 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
510 DWORD a1
, /* MS says LPDWORD! */
514 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
529 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
546 * FIXME - call NtGdiEnumICMProfiles with NULL for lpstrBuffer
547 * to find out how big a buffer we need. Then allocate that buffer
548 * and call NtGdiEnumICMProfiles again to have the buffer filled.
550 * Finally, step through the buffer ( MULTI-SZ recommended for format ),
551 * and convert each string to ANSI, calling the user's callback function
552 * until we run out of strings or the user returns FALSE
555 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
572 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
590 LPGLYPHMETRICSFLOAT a7
593 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
610 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);