ReactOS  0.4.14-dev-854-gb9426a3
ros_lpk.h File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winnls.h>
#include <usp10.h>
#include <strsafe.h>
#include "undocgdi.h"
#include "wine/unicode.h"
#include "wine/debug.h"
Include dependency graph for ros_lpk.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _LPK_LPEDITCONTROL_LIST
 

Macros

#define WIN32_NO_STATUS
 
#define WINE_GCPW_FORCE_LTR   0
 
#define WINE_GCPW_FORCE_RTL   1
 
#define WINE_GCPW_LOOSE_LTR   2
 
#define WINE_GCPW_LOOSE_RTL   3
 
#define WINE_GCPW_DIR_MASK   3
 
#define WINE_GCPW_LOOSE_MASK   2
 

Typedefs

typedef struct _LPK_LPEDITCONTROL_LIST LPK_LPEDITCONTROL_LIST
 
typedef struct _LPK_LPEDITCONTROL_LISTPLPK_LPEDITCONTROL_LIST
 

Functions

VOID WINAPI LpkPresent (VOID)
 
DWORD WINAPI EditCreate (DWORD x1, DWORD x2)
 
DWORD WINAPI EditIchToXY (DWORD x1, DWORD x2, DWORD x3, DWORD x4, DWORD x5)
 
DWORD WINAPI EditMouseToIch (DWORD x1, DWORD x2, DWORD x3, DWORD x4, DWORD x5)
 
DWORD WINAPI EditCchInWidth (DWORD x1, DWORD x2, DWORD x3, DWORD x4, DWORD x5)
 
DWORD WINAPI EditGetLineWidth (DWORD x1, DWORD x2, DWORD x3, DWORD x4)
 
DWORD WINAPI EditDrawText (DWORD x1, DWORD x2, DWORD x3, DWORD x4, DWORD x5, DWORD x6, DWORD x7)
 
DWORD WINAPI EditHScroll (DWORD x1, DWORD x2, DWORD x3)
 
DWORD WINAPI EditMoveSelection (DWORD x1, DWORD x2, DWORD x3, DWORD x4, DWORD x5)
 
DWORD WINAPI EditVerifyText (DWORD x1, DWORD x2, DWORD x3, DWORD x4, DWORD x5, DWORD x6)
 
DWORD WINAPI EditNextWord (DWORD x1, DWORD x2, DWORD x3, DWORD x4, DWORD x5, DWORD x6, DWORD x7)
 
DWORD WINAPI EditSetMenu (DWORD x1, DWORD x2)
 
DWORD WINAPI EditProcessMenu (DWORD x1, DWORD x2)
 
DWORD WINAPI EditCreateCaret (DWORD x1, DWORD x2, DWORD x3, DWORD x4, DWORD x5)
 
DWORD WINAPI EditAdjustCaret (DWORD x1, DWORD x2, DWORD x3, DWORD x5)
 
DWORD WINAPI LpkInitialize (DWORD x1)
 
DWORD WINAPI LpkTabbedTextOut (DWORD x1, DWORD x2, DWORD x3, DWORD x4, DWORD x5, DWORD x6, DWORD x7, DWORD x8, DWORD x9, DWORD x10, DWORD x11, DWORD x12)
 
BOOL WINAPI LpkDllInitialize (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
 
DWORD WINAPI LpkDrawTextEx (DWORD x1, DWORD x2, DWORD x3, DWORD x4, DWORD x5, DWORD x6, DWORD x7, DWORD x8, DWORD x9, DWORD x10)
 
DWORD WINAPI LpkUseGDIWidthCache (DWORD x1, DWORD x2, DWORD x3, DWORD x4, DWORD x5)
 
DWORD WINAPI ftsWordBreak (DWORD x1, DWORD x2, DWORD x3, DWORD x4, DWORD x5)
 
BOOL WINAPI LpkExtTextOut (HDC hdc, int x, int y, UINT fuOptions, const RECT *lprc, LPCWSTR lpString, UINT uCount, const INT *lpDx, INT unknown)
 
DWORD WINAPI LpkGetCharacterPlacement (HDC hdc, LPCWSTR lpString, INT uCount, INT nMaxExtent, GCP_RESULTSW *lpResults, DWORD dwFlags, DWORD dwUnused)
 
INT WINAPI LpkPSMTextOut (HDC hdc, int x, int y, LPCWSTR lpString, int cString, DWORD dwFlags)
 
BOOL WINAPI LpkGetTextExtentExPoint (HDC hdc, LPCWSTR lpString, INT cString, INT nMaxExtent, LPINT lpnFit, LPINT lpnDx, LPSIZE lpSize, DWORD dwUnused, int unknown)
 
BOOL BIDI_Reorder (_In_ HDC hDC, _In_ LPCWSTR lpString, _In_ INT uCount, _In_ DWORD dwFlags, _In_ DWORD dwWineGCP_Flags, _Out_ LPWSTR lpOutString, _In_ INT uCountOut, _Out_ UINT *lpOrder, _Out_ WORD **lpGlyphs, _Out_ INT *cGlyphs)
 

Macro Definition Documentation

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 14 of file ros_lpk.h.

◆ WINE_GCPW_DIR_MASK

#define WINE_GCPW_DIR_MASK   3

Definition at line 93 of file ros_lpk.h.

◆ WINE_GCPW_FORCE_LTR

#define WINE_GCPW_FORCE_LTR   0

Definition at line 89 of file ros_lpk.h.

◆ WINE_GCPW_FORCE_RTL

#define WINE_GCPW_FORCE_RTL   1

Definition at line 90 of file ros_lpk.h.

◆ WINE_GCPW_LOOSE_LTR

#define WINE_GCPW_LOOSE_LTR   2

Definition at line 91 of file ros_lpk.h.

◆ WINE_GCPW_LOOSE_MASK

#define WINE_GCPW_LOOSE_MASK   2

Definition at line 94 of file ros_lpk.h.

◆ WINE_GCPW_LOOSE_RTL

#define WINE_GCPW_LOOSE_RTL   3

Definition at line 92 of file ros_lpk.h.

Typedef Documentation

◆ LPK_LPEDITCONTROL_LIST

◆ PLPK_LPEDITCONTROL_LIST

Function Documentation

◆ BIDI_Reorder()

BOOL BIDI_Reorder ( _In_ HDC  hDC,
_In_ LPCWSTR  lpString,
_In_ INT  uCount,
_In_ DWORD  dwFlags,
_In_ DWORD  dwWineGCP_Flags,
_Out_ LPWSTR  lpOutString,
_In_ INT  uCountOut,
_Out_ UINT lpOrder,
_Out_ WORD **  lpGlyphs,
_Out_ INT cGlyphs 
)

◆ EditAdjustCaret()

DWORD WINAPI EditAdjustCaret ( DWORD  x1,
DWORD  x2,
DWORD  x3,
DWORD  x5 
)

Definition at line 140 of file stub.c.

141 {
143  return 0;
144 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ EditCchInWidth()

DWORD WINAPI EditCchInWidth ( DWORD  x1,
DWORD  x2,
DWORD  x3,
DWORD  x4,
DWORD  x5 
)

Definition at line 79 of file stub.c.

80 {
82  return 0;
83 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ EditCreate()

DWORD WINAPI EditCreate ( DWORD  x1,
DWORD  x2 
)

Definition at line 61 of file stub.c.

62 {
64  return 0;
65 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ EditCreateCaret()

DWORD WINAPI EditCreateCaret ( DWORD  x1,
DWORD  x2,
DWORD  x3,
DWORD  x4,
DWORD  x5 
)

Definition at line 134 of file stub.c.

135 {
137  return 0;
138 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ EditDrawText()

DWORD WINAPI EditDrawText ( DWORD  x1,
DWORD  x2,
DWORD  x3,
DWORD  x4,
DWORD  x5,
DWORD  x6,
DWORD  x7 
)

Definition at line 92 of file stub.c.

93 {
95  return 0;
96 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ EditGetLineWidth()

DWORD WINAPI EditGetLineWidth ( DWORD  x1,
DWORD  x2,
DWORD  x3,
DWORD  x4 
)

Definition at line 86 of file stub.c.

87 {
89  return 0;
90 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ EditHScroll()

DWORD WINAPI EditHScroll ( DWORD  x1,
DWORD  x2,
DWORD  x3 
)

Definition at line 98 of file stub.c.

99 {
101  return 0;
102 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ EditIchToXY()

DWORD WINAPI EditIchToXY ( DWORD  x1,
DWORD  x2,
DWORD  x3,
DWORD  x4,
DWORD  x5 
)

Definition at line 67 of file stub.c.

68 {
70  return 0;
71 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ EditMouseToIch()

DWORD WINAPI EditMouseToIch ( DWORD  x1,
DWORD  x2,
DWORD  x3,
DWORD  x4,
DWORD  x5 
)

Definition at line 73 of file stub.c.

74 {
76  return 0;
77 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ EditMoveSelection()

DWORD WINAPI EditMoveSelection ( DWORD  x1,
DWORD  x2,
DWORD  x3,
DWORD  x4,
DWORD  x5 
)

Definition at line 104 of file stub.c.

105 {
107  return 0;
108 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ EditNextWord()

DWORD WINAPI EditNextWord ( DWORD  x1,
DWORD  x2,
DWORD  x3,
DWORD  x4,
DWORD  x5,
DWORD  x6,
DWORD  x7 
)

Definition at line 116 of file stub.c.

117 {
119  return 0;
120 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ EditProcessMenu()

DWORD WINAPI EditProcessMenu ( DWORD  x1,
DWORD  x2 
)

Definition at line 128 of file stub.c.

129 {
131  return 0;
132 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ EditSetMenu()

DWORD WINAPI EditSetMenu ( DWORD  x1,
DWORD  x2 
)

Definition at line 122 of file stub.c.

123 {
125  return 0;
126 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ EditVerifyText()

DWORD WINAPI EditVerifyText ( DWORD  x1,
DWORD  x2,
DWORD  x3,
DWORD  x4,
DWORD  x5,
DWORD  x6 
)

Definition at line 110 of file stub.c.

111 {
113  return 0;
114 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ ftsWordBreak()

DWORD WINAPI ftsWordBreak ( DWORD  x1,
DWORD  x2,
DWORD  x3,
DWORD  x4,
DWORD  x5 
)

Definition at line 55 of file stub.c.

56 {
58  return 0;
59 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ LpkDllInitialize()

BOOL WINAPI LpkDllInitialize ( HANDLE  hDll,
DWORD  dwReason,
LPVOID  lpReserved 
)

Definition at line 175 of file lpk.c.

179 {
180  switch(dwReason)
181  {
182  case DLL_PROCESS_ATTACH:
184  /* Tell usp10 it is activated usp10 */
185  //LpkPresent();
187  break;
188 
189  default:
190  break;
191  }
192 
193  return TRUE;
194 }
#define TRUE
Definition: types.h:120
static void LPK_ApplyMirroring()
Definition: lpk.c:121
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
DWORD dwReason
Definition: misc.cpp:154

Referenced by DllMain().

◆ LpkDrawTextEx()

DWORD WINAPI LpkDrawTextEx ( DWORD  x1,
DWORD  x2,
DWORD  x3,
DWORD  x4,
DWORD  x5,
DWORD  x6,
DWORD  x7,
DWORD  x8,
DWORD  x9,
DWORD  x10 
)

Definition at line 37 of file stub.c.

38 {
40  return 0;
41 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ LpkExtTextOut()

BOOL WINAPI LpkExtTextOut ( HDC  hdc,
int  x,
int  y,
UINT  fuOptions,
const RECT lprc,
LPCWSTR  lpString,
UINT  uCount,
const INT lpDx,
INT  unknown 
)

Definition at line 202 of file lpk.c.

212 {
213  LPWORD glyphs = NULL;
214  LPWSTR reordered_str = NULL;
215  INT cGlyphs;
216  DWORD dwSICFlags = SIC_COMPLEX;
217  BOOL bResult, bReorder;
218 
220 
221  fuOptions |= ETO_IGNORELANGUAGE;
222 
223  /* Check text direction */
225  fuOptions |= ETO_RTLREADING;
226 
227  /* If text direction is RTL change flag to account neutral characters */
228  if (fuOptions & ETO_RTLREADING)
229  dwSICFlags |= SIC_NEUTRAL;
230 
231  /* Check if the string requires complex script processing and not a "glyph indices" array */
232  if (ScriptIsComplex(lpString, uCount, dwSICFlags) == S_OK && !(fuOptions & ETO_GLYPH_INDEX))
233  {
234  /* reordered_str is used as fallback in case the glyphs array fails to generate,
235  BIDI_Reorder() doesn't attempt to write into reordered_str if memory allocation fails */
236  reordered_str = HeapAlloc(GetProcessHeap(), 0, uCount * sizeof(WCHAR));
237 
238  bReorder = BIDI_Reorder(hdc, lpString, uCount, GCP_REORDER,
239  (fuOptions & ETO_RTLREADING) ? WINE_GCPW_FORCE_RTL : WINE_GCPW_FORCE_LTR,
240  reordered_str, uCount, NULL, &glyphs, &cGlyphs);
241 
242  /* Now display the reordered text if any of the arrays is valid and if BIDI_Reorder() succeeded */
243  if ((glyphs || reordered_str) && bReorder)
244  {
245  if (glyphs)
246  {
247  fuOptions |= ETO_GLYPH_INDEX;
248  uCount = cGlyphs;
249  }
250 
251  bResult = ExtTextOutW(hdc, x, y, fuOptions, lprc,
252  glyphs ? (LPWSTR)glyphs : reordered_str, uCount, lpDx);
253  }
254  else
255  {
256  WARN("BIDI_Reorder failed, falling back to original string.\n");
257  bResult = ExtTextOutW(hdc, x, y, fuOptions, lprc, lpString, uCount, lpDx);
258  }
259 
261  HeapFree(GetProcessHeap(), 0, reordered_str);
262 
263  return bResult;
264  }
265 
266  return ExtTextOutW(hdc, x, y, fuOptions, lprc, lpString, uCount, lpDx);
267 }
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
_In_ int _Inout_ LPRECT lprc
Definition: winuser.h:4440
#define LAYOUT_RTL
Definition: wingdi.h:1370
HRESULT WINAPI ScriptIsComplex(const WCHAR *chars, int len, DWORD flag)
Definition: usp10.c:3074
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
_In_ FONTOBJ _In_ ULONG _In_ ULONG cGlyphs
Definition: winddi.h:3799
#define WARN(fmt,...)
Definition: debug.h:111
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define WINE_GCPW_FORCE_RTL
Definition: ros_lpk.h:90
#define WINE_GCPW_FORCE_LTR
Definition: ros_lpk.h:89
static UINT UINT LPWORD glyphs
Definition: font.c:44
int32_t INT
Definition: typedefs.h:56
UINT WINAPI GetTextAlign(_In_ HDC)
Definition: text.c:808
#define SIC_NEUTRAL
Definition: usp10.h:58
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
BOOL BIDI_Reorder(HDC hDC, LPCWSTR lpString, INT uCount, DWORD dwFlags, DWORD dwWineGCP_Flags, LPWSTR lpOutString, INT uCountOut, UINT *lpOrder, WORD **lpGlyphs, INT *cGlyphs)
Definition: bidi.c:320
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define SIC_COMPLEX
Definition: usp10.h:56
unsigned long DWORD
Definition: ntddk_ex.h:95
Definition: id3.c:18
HDC hdc
Definition: main.c:9
uint16_t * LPWORD
Definition: typedefs.h:54
#define S_OK
Definition: intsafe.h:59
DWORD WINAPI GetLayout(_In_ HDC hdc)
Definition: coord.c:741
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define GCP_REORDER
Definition: wingdi.h:842
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define TA_RTLREADING
Definition: wingdi.h:933
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ LpkGetCharacterPlacement()

DWORD WINAPI LpkGetCharacterPlacement ( HDC  hdc,
LPCWSTR  lpString,
INT  uCount,
INT  nMaxExtent,
GCP_RESULTSW lpResults,
DWORD  dwFlags,
DWORD  dwUnused 
)

◆ LpkGetTextExtentExPoint()

BOOL WINAPI LpkGetTextExtentExPoint ( HDC  hdc,
LPCWSTR  lpString,
INT  cString,
INT  nMaxExtent,
LPINT  lpnFit,
LPINT  lpnDx,
LPSIZE  lpSize,
DWORD  dwUnused,
int  unknown 
)

Definition at line 434 of file lpk.c.

444 {
446  HRESULT hr;
447  INT i, extent, *Dx;
448  TEXTMETRICW tm;
449 
450  UNREFERENCED_PARAMETER(dwUnused);
452 
453  if (cString < 0 || !lpSize)
454  return FALSE;
455 
456  if (cString == 0 || !lpString)
457  {
458  lpSize->cx = 0;
459  lpSize->cy = 0;
460  return TRUE;
461  }
462 
463  /* Check if any processing is required */
464  if (ScriptIsComplex(lpString, cString, SIC_COMPLEX) != S_OK)
465  goto fallback;
466 
467  hr = ScriptStringAnalyse(hdc, lpString, cString, 3 * cString / 2 + 16, -1,
468  SSA_GLYPHS, 0, NULL, NULL, NULL, NULL, NULL, &ssa);
469  if (hr != S_OK)
470  goto fallback;
471 
472  /* Use logic from TextIntGetTextExtentPoint() */
473  Dx = HeapAlloc(GetProcessHeap(), 0, cString * sizeof(INT));
474  if (!Dx)
475  {
476  ScriptStringFree(&ssa);
477  goto fallback;
478  }
479 
480  if (lpnFit)
481  *lpnFit = 0;
482 
484 
485  for (i = 0, extent = 0; i < cString; i++)
486  {
487  extent += Dx[i];
488 
489  if (extent <= nMaxExtent && lpnFit)
490  *lpnFit = i + 1;
491 
492  if (lpnDx)
493  lpnDx[i] = extent;
494  }
495 
496  HeapFree(GetProcessHeap(), 0, Dx);
497  ScriptStringFree(&ssa);
498 
499  if (!GetTextMetricsW(hdc, &tm))
500  return GetTextExtentExPointWPri(hdc, lpString, cString, 0, NULL, NULL, lpSize);
501 
502  lpSize->cx = extent;
503  lpSize->cy = tm.tmHeight;
504 
505  return TRUE;
506 
507 fallback:
508  return GetTextExtentExPointWPri(hdc, lpString, cString, nMaxExtent, lpnFit, lpnDx, lpSize);
509 }
#define TRUE
Definition: types.h:120
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
Definition: text.c:221
HRESULT hr
Definition: shlfolder.c:183
HRESULT WINAPI ScriptIsComplex(const WCHAR *chars, int len, DWORD flag)
Definition: usp10.c:3074
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString, int cGlyphs, int iCharset, DWORD dwFlags, int iReqWidth, SCRIPT_CONTROL *psControl, SCRIPT_STATE *psState, const int *piDx, SCRIPT_TABDEF *pTabdef, const BYTE *pbInClass, SCRIPT_STRING_ANALYSIS *pssa)
Definition: usp10.c:1985
int32_t INT
Definition: typedefs.h:56
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
LONG cx
Definition: windef.h:334
BOOL WINAPI GetTextExtentExPointWPri(HDC hdc, LPCWSTR lpwsz, INT cwc, INT dxMax, LPINT pcCh, LPINT pdxOut, LPSIZE psize)
HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa)
Definition: usp10.c:2556
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define SIC_COMPLEX
Definition: usp10.h:56
LONG HRESULT
Definition: typedefs.h:77
Definition: id3.c:18
HRESULT WINAPI ScriptStringGetLogicalWidths(SCRIPT_STRING_ANALYSIS ssa, int *piDx)
Definition: usp10.c:3804
HDC hdc
Definition: main.c:9
Definition: time.h:76
#define S_OK
Definition: intsafe.h:59
#define SSA_GLYPHS
Definition: usp10.h:40
LONG cy
Definition: windef.h:335
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ LpkInitialize()

DWORD WINAPI LpkInitialize ( DWORD  x1)

Definition at line 19 of file stub.c.

20 {
22  return 0;
23 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ LpkPresent()

VOID WINAPI LpkPresent ( VOID  )

◆ LpkPSMTextOut()

INT WINAPI LpkPSMTextOut ( HDC  hdc,
int  x,
int  y,
LPCWSTR  lpString,
int  cString,
DWORD  dwFlags 
)

Definition at line 389 of file lpk.c.

390 {
391  SIZE size;
392  TEXTMETRICW tm;
393  int prefix_offset, len;
394  LPWSTR display_str = NULL;
395 
396  if (!lpString || cString <= 0)
397  return 0;
398 
399  if (dwFlags & DT_NOPREFIX)
400  {
401  LpkExtTextOut(hdc, x, y, 0, NULL, lpString, cString, NULL, 0);
402  GetTextExtentPointW(hdc, lpString, cString, &size);
403  return size.cx;
404  }
405 
406  display_str = HeapAlloc(GetProcessHeap(), 0, (cString + 1) * sizeof(WCHAR));
407 
408  if (!display_str)
409  return 0;
410 
411  PSM_PrepareToDraw(lpString, cString, display_str, &len);
412 
413  if (!(dwFlags & DT_PREFIXONLY))
414  LpkExtTextOut(hdc, x, y, 0, NULL, display_str, len, NULL, 0);
415 
416  if (!(dwFlags & DT_HIDEPREFIX))
417  {
418  prefix_offset = PSM_FindLastPrefix(lpString, cString);
420  LPK_DrawUnderscore(hdc, x, y + tm.tmAscent + 1, display_str, len, prefix_offset);
421  }
422 
423  GetTextExtentPointW(hdc, display_str, len + 1, &size);
424  HeapFree(GetProcessHeap(), 0, display_str);
425 
426  return size.cx;
427 }
#define DT_HIDEPREFIX
Definition: winuser.h:547
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
Definition: text.c:221
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define DT_NOPREFIX
Definition: winuser.h:537
#define DT_PREFIXONLY
Definition: winuser.h:548
smooth NULL
Definition: ftsmooth.c:416
static int PSM_FindLastPrefix(LPCWSTR str, int count)
Definition: lpk.c:22
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL WINAPI LpkExtTextOut(HDC hdc, int x, int y, UINT fuOptions, const RECT *lprc, LPCWSTR lpString, UINT uCount, const INT *lpDx, INT unknown)
Definition: lpk.c:202
HDC hdc
Definition: main.c:9
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
GLenum GLsizei len
Definition: glext.h:6722
Definition: time.h:76
static void LPK_DrawUnderscore(HDC hdc, int x, int y, LPCWSTR str, int count, int offset)
Definition: lpk.c:66
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static void PSM_PrepareToDraw(LPCWSTR str, INT count, LPWSTR new_str, LPINT new_count)
Definition: lpk.c:41
#define HeapFree(x, y, z)
Definition: compat.h:402
BOOL WINAPI GetTextExtentPointW(_In_ HDC hdc, _In_reads_(c) LPCWSTR lpString, _In_ int c, _Out_ LPSIZE lpsz)

◆ LpkTabbedTextOut()

DWORD WINAPI LpkTabbedTextOut ( DWORD  x1,
DWORD  x2,
DWORD  x3,
DWORD  x4,
DWORD  x5,
DWORD  x6,
DWORD  x7,
DWORD  x8,
DWORD  x9,
DWORD  x10,
DWORD  x11,
DWORD  x12 
)

Definition at line 28 of file stub.c.

29 {
31  return 0;
32 }
#define UNIMPLEMENTED
Definition: stub.c:14

◆ LpkUseGDIWidthCache()

DWORD WINAPI LpkUseGDIWidthCache ( DWORD  x1,
DWORD  x2,
DWORD  x3,
DWORD  x4,
DWORD  x5 
)

Definition at line 46 of file stub.c.

47 {
49  return 0;
50 }
#define UNIMPLEMENTED
Definition: stub.c:14