ReactOS 0.4.16-dev-338-g34e76ad
text.c File Reference
#include <win32k.h>
#include <debug.h>
Include dependency graph for text.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

VOID FASTCALL IntTMWFixUp (HDC hDC, TMW_INTERNAL *ptm)
 
BOOL FASTCALL GreTextOutW (HDC hdc, int nXStart, int nYStart, LPCWSTR lpString, int cchString)
 
BOOL FASTCALL GreGetTextExtentW (HDC hDC, LPCWSTR lpwsz, INT cwc, LPSIZE psize, UINT flOpts)
 
BOOL FASTCALL GreGetTextExtentExW (HDC hDC, LPCWSTR String, ULONG Count, ULONG MaxExtent, PULONG Fit, PULONG Dx, LPSIZE pSize, FLONG fl)
 
BOOL WINAPI GreGetTextMetricsW (_In_ HDC hdc, _Out_ LPTEXTMETRICW lptm)
 
DWORD APIENTRY NtGdiGetCharSet (HDC hDC)
 
BOOL APIENTRY NtGdiGetRasterizerCaps (OUT LPRASTERIZER_STATUS praststat, IN ULONG cjBytes)
 
INT APIENTRY NtGdiGetTextCharsetInfo (IN HDC hdc, OUT OPTIONAL LPFONTSIGNATURE lpSig, IN DWORD dwFlags)
 
W32KAPI BOOL APIENTRY NtGdiGetTextExtentExW (IN HDC hDC, IN OPTIONAL LPWSTR UnsafeString, IN ULONG Count, IN ULONG MaxExtent, OUT OPTIONAL PULONG UnsafeFit, OUT OPTIONAL PULONG UnsafeDx, OUT LPSIZE UnsafeSize, IN FLONG fl)
 
BOOL APIENTRY NtGdiGetTextExtent (HDC hdc, LPWSTR lpwsz, INT cwc, LPSIZE psize, UINT flOpts)
 
BOOL APIENTRY NtGdiSetTextJustification (HDC hDC, int BreakExtra, int BreakCount)
 
W32KAPI INT APIENTRY NtGdiGetTextFaceW (IN HDC hDC, IN INT Count, OUT OPTIONAL LPWSTR FaceName, IN BOOL bAliasName)
 
W32KAPI BOOL APIENTRY NtGdiGetTextMetricsW (IN HDC hDC, OUT TMW_INTERNAL *pUnsafeTmwi, IN ULONG cj)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Includes

Definition at line 13 of file text.c.

Function Documentation

◆ GreGetTextExtentExW()

BOOL FASTCALL GreGetTextExtentExW ( HDC  hDC,
LPCWSTR  String,
ULONG  Count,
ULONG  MaxExtent,
PULONG  Fit,
PULONG  Dx,
LPSIZE  pSize,
FLONG  fl 
)

Definition at line 135 of file text.c.

144{
145 PDC pdc;
146 PDC_ATTR pdcattr;
147 BOOL Result;
148 PTEXTOBJ TextObj;
149
150 if ( (!String && Count ) || !pSize )
151 {
153 return FALSE;
154 }
155
156 if ( !Count )
157 {
158 if ( Fit ) Fit = 0;
159 return TRUE;
160 }
161
162 pdc = DC_LockDc(hDC);
163 if (NULL == pdc)
164 {
166 return FALSE;
167 }
168 pdcattr = pdc->pdcattr;
169
170 TextObj = RealizeFontInit(pdcattr->hlfntNew);
171 if ( TextObj )
172 {
174 TextObj,
175 String,
176 Count,
177 MaxExtent,
178 (LPINT)Fit,
179 (LPINT)Dx,
180 pSize,
181 fl);
182 TEXTOBJ_UnlockText(TextObj);
183 }
184 else
185 Result = FALSE;
186
187 DC_UnlockDc(pdc);
188 return Result;
189}
static HDC hDC
Definition: 3dtext.c:33
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:238
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:220
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL FASTCALL TextIntGetTextExtentPoint(PDC dc, PTEXTOBJ TextObj, LPCWSTR String, INT Count, ULONG MaxExtent, LPINT Fit, LPINT Dx, LPSIZE Size, FLONG fl)
Definition: freetype.c:4958
int Count
Definition: noreturn.cpp:7
Definition: polytest.cpp:41
HANDLE hlfntNew
Definition: ntgdihdl.h:330
Definition: text.h:60
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
PTEXTOBJ FASTCALL RealizeFontInit(HFONT hFont)
Definition: font.c:422
FORCEINLINE VOID TEXTOBJ_UnlockText(PLFONT plfnt)
Definition: text.h:96
_In_ FLONG fl
Definition: winddi.h:1279
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:22
int * LPINT
Definition: windef.h:178
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409

Referenced by TEXT_Ellipsify(), TEXT_NextLineW(), TEXT_PathEllipsify(), TEXT_WordBreak(), and UserDrawCaptionText().

◆ GreGetTextExtentW()

BOOL FASTCALL GreGetTextExtentW ( HDC  hDC,
LPCWSTR  lpwsz,
INT  cwc,
LPSIZE  psize,
UINT  flOpts 
)

Definition at line 78 of file text.c.

84{
85 PDC pdc;
86 PDC_ATTR pdcattr;
88 PTEXTOBJ TextObj;
89
90 if (!cwc)
91 {
92 psize->cx = 0;
93 psize->cy = 0;
94 return TRUE;
95 }
96
97 pdc = DC_LockDc(hDC);
98 if (!pdc)
99 {
101 return FALSE;
102 }
103
104 pdcattr = pdc->pdcattr;
105
106 TextObj = RealizeFontInit(pdcattr->hlfntNew);
107 if ( TextObj )
108 {
110 TextObj,
111 lpwsz,
112 cwc,
113 0,
114 NULL,
115 0,
116 psize,
117 flOpts);
118 TEXTOBJ_UnlockText(TextObj);
119 }
120 else
121 Result = FALSE;
122
123 DC_UnlockDc(pdc);
124 return Result;
125}
_Must_inspect_result_ _Out_ LPSIZE psize
Definition: ntgdi.h:1569
LONG cx
Definition: windef.h:334
LONG cy
Definition: windef.h:335

Referenced by DrawTextExWorker(), IntPaintDesktop(), and TEXT_DrawUnderscore().

◆ GreGetTextMetricsW()

BOOL WINAPI GreGetTextMetricsW ( _In_ HDC  hdc,
_Out_ LPTEXTMETRICW  lptm 
)

Definition at line 193 of file text.c.

196{
197 TMW_INTERNAL tmwi;
198 if (!ftGdiGetTextMetricsW(hdc, &tmwi)) return FALSE;
199 IntTMWFixUp(hdc, &tmwi);
200 *lptm = tmwi.TextMetric;
201 return TRUE;
202}
BOOL FASTCALL ftGdiGetTextMetricsW(HDC hDC, PTMW_INTERNAL ptmwi)
Definition: freetype.c:5267
HDC hdc
Definition: main.c:9
static LPTEXTMETRICW lptm
Definition: font.c:42
TEXTMETRICW TextMetric
Definition: ntgdityp.h:370
VOID FASTCALL IntTMWFixUp(HDC hDC, TMW_INTERNAL *ptm)
Definition: text.c:30

Referenced by DrawTextExWorker().

◆ GreTextOutW()

BOOL FASTCALL GreTextOutW ( HDC  hdc,
int  nXStart,
int  nYStart,
LPCWSTR  lpString,
int  cchString 
)

Functions

Definition at line 61 of file text.c.

67{
68 return GreExtTextOutW(hdc, nXStart, nYStart, 0, NULL, lpString, cchString, NULL, 0);
69}
BOOL APIENTRY GreExtTextOutW(IN HDC hDC, IN INT XStart, IN INT YStart, IN UINT fuOptions, IN OPTIONAL PRECTL lprc, IN LPCWSTR String, IN INT Count, IN OPTIONAL LPINT Dx, IN DWORD dwCodePage)
Definition: freetype.c:7304

Referenced by MENU_DrawPopupGlyph(), UITOOLS95_DFC_ButtonCheckRadio(), UITOOLS95_DrawFrameCaption(), UITOOLS95_DrawFrameMenu(), and UITOOLS95_DrawFrameScroll().

◆ IntTMWFixUp()

VOID FASTCALL IntTMWFixUp ( HDC  hDC,
TMW_INTERNAL ptm 
)

Definition at line 30 of file text.c.

33{
34 LOGFONTW lf;
35 HFONT hCurrentFont;
36
38 GreGetObject(hCurrentFont, sizeof(LOGFONTW), &lf);
39
40 /* To compensate for the GetTextMetricsW call changing the PitchAndFamily
41 * to a TrueType one when we have a 'Raster' font as our input we filter
42 * out the problematic TrueType and Vector bits.
43 * Our list below checks for Raster Font Facenames. */
44 DPRINT("Font Facename is '%S'.\n", lf.lfFaceName);
45 if ((_wcsicmp(lf.lfFaceName, L"Courier") == 0) ||
46 (_wcsicmp(lf.lfFaceName, L"FixedSys") == 0) ||
47 (_wcsicmp(lf.lfFaceName, L"Helv") == 0) ||
48 (_wcsicmp(lf.lfFaceName, L"MS Sans Serif") == 0) ||
49 (_wcsicmp(lf.lfFaceName, L"MS Serif") == 0) ||
50 (_wcsicmp(lf.lfFaceName, L"System") == 0) ||
51 (_wcsicmp(lf.lfFaceName, L"Terminal") == 0) ||
52 (_wcsicmp(lf.lfFaceName, L"Tms Rmn") == 0))
53 {
55 }
56}
#define GDI_OBJECT_TYPE_FONT
Definition: gdi.h:50
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiGetDCObject(_In_ HDC hdc, _In_ INT itype)
#define L(x)
Definition: ntvdm.h:50
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define DPRINT
Definition: sndvol32.h:73
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
BYTE tmPitchAndFamily
Definition: wingdi.h:2401
INT NTAPI GreGetObject(IN HGDIOBJ hobj, IN INT cbCount, OUT PVOID pvBuffer)
Definition: gdiobj.c:1264
#define TMPF_TRUETYPE
Definition: wingdi.h:1313
#define TMPF_VECTOR
Definition: wingdi.h:1312

Referenced by GreGetTextMetricsW(), and NtGdiGetTextMetricsW().

◆ NtGdiGetCharSet()

DWORD APIENTRY NtGdiGetCharSet ( HDC  hDC)

Definition at line 206 of file text.c.

207{
208 PDC Dc;
209 PDC_ATTR pdcattr;
210 DWORD cscp;
211 // If here, update everything!
212 Dc = DC_LockDc(hDC);
213 if (!Dc)
214 {
216 return 0;
217 }
218 cscp = ftGdiGetTextCharsetInfo(Dc, NULL, 0);
219 pdcattr = Dc->pdcattr;
220 pdcattr->iCS_CP = cscp;
221 pdcattr->ulDirty_ &= ~DIRTY_CHARSET;
222 DC_UnlockDc( Dc );
223 return cscp;
224}
unsigned long DWORD
Definition: ntddk_ex.h:95
INT FASTCALL ftGdiGetTextCharsetInfo(PDC Dc, LPFONTSIGNATURE lpSig, DWORD dwFlags)
Definition: freetype.c:5080
DWORD iCS_CP
Definition: ntgdihdl.h:305
ULONG ulDirty_
Definition: ntgdihdl.h:294

◆ NtGdiGetRasterizerCaps()

BOOL APIENTRY NtGdiGetRasterizerCaps ( OUT LPRASTERIZER_STATUS  praststat,
IN ULONG  cjBytes 
)

Definition at line 228 of file text.c.

231{
233 RASTERIZER_STATUS rsSafe;
234
235 if (praststat && cjBytes)
236 {
237 if ( cjBytes >= sizeof(RASTERIZER_STATUS) ) cjBytes = sizeof(RASTERIZER_STATUS);
238 if ( ftGdiGetRasterizerCaps(&rsSafe))
239 {
241 {
242 ProbeForWrite( praststat,
243 sizeof(RASTERIZER_STATUS),
244 1);
245 RtlCopyMemory(praststat, &rsSafe, cjBytes );
246 }
248 {
250 }
251 _SEH2_END;
252
253 if (!NT_SUCCESS(Status))
254 {
256 return FALSE;
257 }
258
259 return TRUE;
260 }
261 }
262 return FALSE;
263}
LONG NTSTATUS
Definition: precomp.h:26
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:143
BOOL FASTCALL ftGdiGetRasterizerCaps(LPRASTERIZER_STATUS lprs)
Definition: freetype.c:3759
Status
Definition: gdiplustypes.h:25
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:165
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:66
#define _SEH2_END
Definition: pseh2_64.h:155
#define _SEH2_TRY
Definition: pseh2_64.h:55
#define STATUS_SUCCESS
Definition: shellext.h:65
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
Definition: error.c:31
struct _RASTERIZER_STATUS RASTERIZER_STATUS

◆ NtGdiGetTextCharsetInfo()

INT APIENTRY NtGdiGetTextCharsetInfo ( IN HDC  hdc,
OUT OPTIONAL LPFONTSIGNATURE  lpSig,
IN DWORD  dwFlags 
)

Definition at line 267 of file text.c.

271{
272 PDC Dc;
273 INT Ret;
274 FONTSIGNATURE fsSafe;
275 PFONTSIGNATURE pfsSafe = &fsSafe;
277
278 Dc = DC_LockDc(hdc);
279 if (!Dc)
280 {
282 return DEFAULT_CHARSET;
283 }
284
285 if (!lpSig) pfsSafe = NULL;
286
287 Ret = HIWORD(ftGdiGetTextCharsetInfo( Dc, pfsSafe, dwFlags));
288
289 if (lpSig)
290 {
291 if (Ret == DEFAULT_CHARSET)
292 RtlZeroMemory(pfsSafe, sizeof(FONTSIGNATURE));
293
295 {
296 ProbeForWrite( lpSig,
297 sizeof(FONTSIGNATURE),
298 1);
299 RtlCopyMemory(lpSig, pfsSafe, sizeof(FONTSIGNATURE));
300 }
302 {
304 }
305 _SEH2_END;
306
307 if (!NT_SUCCESS(Status))
308 {
310 return DEFAULT_CHARSET;
311 }
312 }
313 DC_UnlockDc(Dc);
314 return Ret;
315}
int32_t INT
Definition: typedefs.h:58
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define HIWORD(l)
Definition: typedefs.h:247
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
#define DEFAULT_CHARSET
Definition: wingdi.h:384

◆ NtGdiGetTextExtent()

BOOL APIENTRY NtGdiGetTextExtent ( HDC  hdc,
LPWSTR  lpwsz,
INT  cwc,
LPSIZE  psize,
UINT  flOpts 
)

Definition at line 492 of file text.c.

497{
498 return NtGdiGetTextExtentExW(hdc, lpwsz, cwc, 0, NULL, NULL, psize, flOpts);
499}
__kernel_entry W32KAPI BOOL APIENTRY NtGdiGetTextExtentExW(_In_ HDC hdc, _In_reads_opt_(cwc) LPWSTR pwsz, _In_ ULONG cwc, _In_ ULONG dxMax, _Out_opt_ ULONG *pcCh, _Out_writes_to_opt_(cwc, *pcCh) PULONG pdxOut, _Out_ LPSIZE psize, _In_ FLONG fl)

◆ NtGdiGetTextExtentExW()

W32KAPI BOOL APIENTRY NtGdiGetTextExtentExW ( IN HDC  hDC,
IN OPTIONAL LPWSTR  UnsafeString,
IN ULONG  Count,
IN ULONG  MaxExtent,
OUT OPTIONAL PULONG  UnsafeFit,
OUT OPTIONAL PULONG  UnsafeDx,
OUT LPSIZE  UnsafeSize,
IN FLONG  fl 
)

Definition at line 326 of file text.c.

336{
337 PDC dc;
338 PDC_ATTR pdcattr;
340 SIZE Size;
343 INT Fit;
344 LPINT Dx;
345 PTEXTOBJ TextObj;
346
347 if ((LONG)Count < 0)
348 {
350 return FALSE;
351 }
352
353 /* FIXME: Handle fl */
354
355 if (0 == Count)
356 {
357 Size.cx = 0;
358 Size.cy = 0;
359 Status = MmCopyToCaller(UnsafeSize, &Size, sizeof(SIZE));
360 if (! NT_SUCCESS(Status))
361 {
363 return FALSE;
364 }
365 return TRUE;
366 }
367
369 if (NULL == String)
370 {
372 return FALSE;
373 }
374
375 if (NULL != UnsafeDx)
376 {
378 if (NULL == Dx)
379 {
382 return FALSE;
383 }
384 }
385 else
386 {
387 Dx = NULL;
388 }
389
390 Status = MmCopyFromCaller(String, UnsafeString, Count * sizeof(WCHAR));
391 if (! NT_SUCCESS(Status))
392 {
393 if (NULL != Dx)
394 {
396 }
399 return FALSE;
400 }
401
402 dc = DC_LockDc(hDC);
403 if (NULL == dc)
404 {
405 if (NULL != Dx)
406 {
408 }
411 return FALSE;
412 }
413 pdcattr = dc->pdcattr;
414 TextObj = RealizeFontInit(pdcattr->hlfntNew);
415 if ( TextObj )
416 {
418 TextObj,
419 String,
420 Count,
421 MaxExtent,
422 NULL == UnsafeFit ? NULL : &Fit,
423 Dx,
424 &Size,
425 fl);
426 TEXTOBJ_UnlockText(TextObj);
427 }
428 else
429 Result = FALSE;
431
433 if (! Result)
434 {
435 if (NULL != Dx)
436 {
438 }
439 return FALSE;
440 }
441
442 if (NULL != UnsafeFit)
443 {
444 Status = MmCopyToCaller(UnsafeFit, &Fit, sizeof(INT));
445 if (! NT_SUCCESS(Status))
446 {
447 if (NULL != Dx)
448 {
450 }
452 return FALSE;
453 }
454 }
455
456 if (NULL != UnsafeDx)
457 {
458 Status = MmCopyToCaller(UnsafeDx, Dx, Count * sizeof(INT));
459 if (! NT_SUCCESS(Status))
460 {
461 if (NULL != Dx)
462 {
464 }
466 return FALSE;
467 }
468 }
469 if (NULL != Dx)
470 {
472 }
473
474 Status = MmCopyToCaller(UnsafeSize, &Size, sizeof(SIZE));
475 if (! NT_SUCCESS(Status))
476 {
478 return FALSE;
479 }
480
481 return TRUE;
482}
unsigned char BOOLEAN
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PagedPool
Definition: env_spec_w32.h:308
static const WCHAR dc[]
#define MmCopyToCaller(x, y, z)
Definition: mmcopy.h:19
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
long LONG
Definition: pedump.c:60
#define MmCopyFromCaller
Definition: polytest.cpp:29
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
#define GDITAG_TEXT
Definition: tags.h:172
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ NtGdiGetTextFaceW()

W32KAPI INT APIENTRY NtGdiGetTextFaceW ( IN HDC  hDC,
IN INT  Count,
OUT OPTIONAL LPWSTR  FaceName,
IN BOOL  bAliasName 
)

Definition at line 530 of file text.c.

536{
537 PDC Dc;
538 PDC_ATTR pdcattr;
539 HFONT hFont;
540 PTEXTOBJ TextObj;
542 SIZE_T fLen;
543 INT ret;
544
545 /* FIXME: Handle bAliasName */
546
547 Dc = DC_LockDc(hDC);
548 if (Dc == NULL)
549 {
551 return FALSE;
552 }
553 pdcattr = Dc->pdcattr;
554 hFont = pdcattr->hlfntNew;
555 DC_UnlockDc(Dc);
556
557 TextObj = RealizeFontInit(hFont);
558 ASSERT(TextObj != NULL);
559 fLen = wcslen(TextObj->TextFace) + 1;
560
561 if (FaceName != NULL)
562 {
563 Count = min(Count, fLen);
564 Status = MmCopyToCaller(FaceName, TextObj->TextFace, Count * sizeof(WCHAR));
565 if (!NT_SUCCESS(Status))
566 {
567 TEXTOBJ_UnlockText(TextObj);
569 return 0;
570 }
571 /* Terminate if we copied only part of the font name */
572 if (Count > 0 && Count < fLen)
573 {
574 FaceName[Count - 1] = '\0';
575 }
576 ret = Count;
577 }
578 else
579 {
580 ret = fLen;
581 }
582
583 TEXTOBJ_UnlockText(TextObj);
584 return ret;
585}
HFONT hFont
Definition: main.c:53
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define ASSERT(a)
Definition: mode.c:44
#define min(a, b)
Definition: monoChain.cc:55
WCHAR TextFace[LF_FACESIZE]
Definition: text.h:67
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int ret

◆ NtGdiGetTextMetricsW()

W32KAPI BOOL APIENTRY NtGdiGetTextMetricsW ( IN HDC  hDC,
OUT TMW_INTERNAL pUnsafeTmwi,
IN ULONG  cj 
)

Definition at line 590 of file text.c.

594{
595 TMW_INTERNAL Tmwi;
596
597 if ( cj <= sizeof(TMW_INTERNAL) )
598 {
599 if (ftGdiGetTextMetricsW(hDC, &Tmwi))
600 {
601 IntTMWFixUp(hDC, &Tmwi);
603 {
604 ProbeForWrite(pUnsafeTmwi, cj, 1);
605 RtlCopyMemory(pUnsafeTmwi, &Tmwi, cj);
606 }
608 {
610 _SEH2_YIELD(return FALSE);
611 }
613
614 return TRUE;
615 }
616 }
617 return FALSE;
618}
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:168
_In_ ULONG cj
Definition: winddi.h:3540

Referenced by GetTextMetricsA(), and GetTextMetricsW().

◆ NtGdiSetTextJustification()

BOOL APIENTRY NtGdiSetTextJustification ( HDC  hDC,
int  BreakExtra,
int  BreakCount 
)

Definition at line 503 of file text.c.

506{
507 PDC pDc;
508 PDC_ATTR pdcattr;
509
510 pDc = DC_LockDc(hDC);
511 if (!pDc)
512 {
514 return FALSE;
515 }
516
517 pdcattr = pDc->pdcattr;
518
519 pdcattr->lBreakExtra = BreakExtra;
520 pdcattr->cBreak = BreakCount;
521
522 DC_UnlockDc(pDc);
523 return TRUE;
524}
LONG lBreakExtra
Definition: ntgdihdl.h:328
LONG cBreak
Definition: ntgdihdl.h:329