ReactOS 0.4.16-dev-1204-gb627a42
undocgdi.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GDI_DRAW_STREAM_TAG
 

Macros

#define DS_TILE   0x2
 
#define DS_TRANSPARENTALPHA   0x4
 
#define DS_TRANSPARENTCLR   0x8
 
#define DS_TRUESIZE   0x20
 

Typedefs

typedef struct GDI_DRAW_STREAM_TAG GDI_DRAW_STREAM
 
typedef struct GDI_DRAW_STREAM_TAGPGDI_DRAW_STREAM
 

Functions

BOOL WINAPI GdiDrawStream (HDC dc, ULONG l, PGDI_DRAW_STREAM pDS)
 
BOOL WINAPI GetTextExtentExPointWPri (_In_ HDC hdc, _In_reads_(cwc) PCWCH lpwsz, _In_ INT cwc, _In_ INT dxMax, _Out_opt_ LPINT pcCh, _Out_writes_to_opt_(cwc, *pcCh) LPINT pdxOut, _In_ LPSIZE psize)
 
BOOL WINAPI GetFontResourceInfoW (_In_z_ LPCWSTR lpFileName, _Inout_ DWORD *pdwBufSize, _Out_writes_to_opt_(*pdwBufSize, 1) PVOID lpBuffer, _In_ DWORD dwType)
 

Macro Definition Documentation

◆ DS_TILE

#define DS_TILE   0x2

Definition at line 9 of file undocgdi.h.

◆ DS_TRANSPARENTALPHA

#define DS_TRANSPARENTALPHA   0x4

Definition at line 10 of file undocgdi.h.

◆ DS_TRANSPARENTCLR

#define DS_TRANSPARENTCLR   0x8

Definition at line 11 of file undocgdi.h.

◆ DS_TRUESIZE

#define DS_TRUESIZE   0x20

Definition at line 12 of file undocgdi.h.

Typedef Documentation

◆ GDI_DRAW_STREAM

◆ PGDI_DRAW_STREAM

Function Documentation

◆ GdiDrawStream()

BOOL WINAPI GdiDrawStream ( HDC  dc,
ULONG  l,
PGDI_DRAW_STREAM  pDS 
)

Definition at line 644 of file misc.c.

645{
646 if (!pDS || l != sizeof(*pDS))
647 {
648 DPRINT1("GdiDrawStream: Invalid params\n");
649 return 0;
650 }
651
652 if (pDS->signature != 0x44727753 ||
653 pDS->reserved != 0 ||
654 pDS->unknown1 != 1 ||
655 pDS->unknown2 != 9)
656 {
657 DPRINT1("GdiDrawStream: Got unknown pDS data\n");
658 return 0;
659 }
660
661 {
663 INT transparent = 0;
664 int sizingtype;
665
667 transparent = ALPHABLEND_FULL;
668 else if (pDS->drawOption & DS_TRANSPARENTCLR)
669 transparent = ALPHABLEND_BINARY;
670 else
671 transparent = ALPHABLEND_NONE;
672
673 if (pDS->drawOption & DS_TILE)
674 sizingtype = ST_TILE;
675 else if (pDS->drawOption & DS_TRUESIZE)
676 sizingtype = ST_TRUESIZE;
677 else
678 sizingtype = ST_STRETCH;
679
680 if (pDS->rcDest.right < pDS->rcDest.left || pDS->rcDest.bottom < pDS->rcDest.top)
681 return 0;
682
683 if (sm.cxLeftWidth + sm.cxRightWidth > pDS->rcDest.right - pDS->rcDest.left)
684 {
685 sm.cxLeftWidth = sm.cxRightWidth = 0;
686 }
687
688 if (sm.cyTopHeight + sm.cyBottomHeight > pDS->rcDest.bottom - pDS->rcDest.top)
689 {
690 sm.cyTopHeight = sm.cyBottomHeight = 0;
691 }
692
694 pDS->hImage,
695 &pDS->rcSrc,
696 transparent,
697 pDS->crTransparent,
698 FALSE,
699 sizingtype,
700 &sm,
701 &pDS->rcDest);
702 }
703 return 0;
704}
#define DPRINT1
Definition: precomp.h:8
r l[0]
Definition: byte_order.h:168
#define FALSE
Definition: types.h:117
DWORD leftSizingMargin
Definition: undocgdi.h:26
DWORD rightSizingMargin
Definition: undocgdi.h:27
DWORD topSizingMargin
Definition: undocgdi.h:28
DWORD bottomSizingMargin
Definition: undocgdi.h:29
Definition: misc.c:279
int cyBottomHeight
Definition: misc.c:283
int cyTopHeight
Definition: misc.c:282
int cxRightWidth
Definition: misc.c:281
int cxLeftWidth
Definition: misc.c:280
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
int32_t INT
Definition: typedefs.h:58
#define DS_TRUESIZE
Definition: undocgdi.h:12
#define DS_TRANSPARENTCLR
Definition: undocgdi.h:11
#define DS_TRANSPARENTALPHA
Definition: undocgdi.h:10
#define DS_TILE
Definition: undocgdi.h:9
#define ALPHABLEND_FULL
Definition: misc.c:277
@ ST_TILE
Definition: misc.c:289
@ ST_TRUESIZE
Definition: misc.c:287
@ ST_STRETCH
Definition: misc.c:288
static HRESULT UXTHEME_DrawImageBackground(HDC hdc, HBITMAP bmpSrc, RECT *prcSrc, INT transparent, COLORREF transparentcolor, BOOL borderonly, int sizingtype, MARGINS *psm, RECT *pRect)
Definition: misc.c:457
#define ALPHABLEND_NONE
Definition: misc.c:275
#define ALPHABLEND_BINARY
Definition: misc.c:276

Referenced by UXTHEME_DrawImageBackground(), and UXTHEME_DrawImageGlyph().

◆ GetFontResourceInfoW()

BOOL WINAPI GetFontResourceInfoW ( _In_z_ LPCWSTR  lpFileName,
_Inout_ DWORD pdwBufSize,
_Out_writes_to_opt_ *, 1pdwBufSize PVOID  lpBuffer,
_In_ DWORD  dwType 
)

Definition at line 748 of file text.c.

753{
754 BOOL bRet;
755 UNICODE_STRING NtFileName;
756
757 DPRINT("GetFontResourceInfoW: dwType = %lu\n", dwType);
758
759 if (!lpFileName || !pdwBufSize)
760 {
762 return FALSE;
763 }
764
766 &NtFileName,
767 NULL,
768 NULL))
769 {
771 return FALSE;
772 }
773
775 NtFileName.Buffer,
776 (NtFileName.Length / sizeof(WCHAR)) + 1,
777 1,
778 *pdwBufSize,
779 pdwBufSize,
780 lpBuffer,
781 dwType);
782
783 RtlFreeHeap(RtlGetProcessHeap(), 0, NtFileName.Buffer);
784
785 return bRet;
786}
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:634
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:175
#define NULL
Definition: types.h:112
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
unsigned int BOOL
Definition: ntddk_ex.h:94
NTSYSAPI BOOLEAN NTAPI RtlDosPathNameToNtPathName_U(_In_opt_z_ PCWSTR DosPathName, _Out_ PUNICODE_STRING NtPathName, _Out_opt_ PCWSTR *NtFileNamePart, _Out_opt_ PRTL_RELATIVE_NAME_U DirectoryInfo)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiGetFontResourceInfoInternalW(_In_reads_z_(cwc) PCWCH pwszFiles, _In_ ULONG cwc, _In_ ULONG cFiles, _In_ UINT cjBuf, _Out_ LPDWORD pdwBytes, _Out_writes_bytes_(cjBuf) LPVOID pvBuf, _In_ DWORD iType)
#define DPRINT
Definition: sndvol32.h:73
_In_ LPCSTR lpFileName
Definition: winbase.h:3112
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:106
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ GetTextExtentExPointWPri()

BOOL WINAPI GetTextExtentExPointWPri ( _In_ HDC  hdc,
_In_reads_(cwc) PCWCH  lpwsz,
_In_ INT  cwc,
_In_ INT  dxMax,
_Out_opt_ LPINT  pcCh,
_Out_writes_to_opt_(cwc, *pcCh) LPINT  pdxOut,
_In_ LPSIZE  psize 
)

Definition at line 311 of file text.c.

319{
320 return NtGdiGetTextExtentExW(hdc, lpwsz, cwc, dxMax, (PULONG)pcCh, (PULONG)pdxOut, psize, 0);
321}
HDC hdc
Definition: main.c:9
_Must_inspect_result_ _Out_ LPSIZE psize
Definition: ntgdi.h:1569
__kernel_entry W32KAPI BOOL APIENTRY NtGdiGetTextExtentExW(_In_ HDC hdc, _In_reads_opt_(cwc) PCWCH pwsz, _In_ ULONG cwc, _In_ ULONG dxMax, _Out_opt_ PULONG pcCh, _Out_writes_to_opt_(cwc, *pcCh) PULONG pdxOut, _Out_ PSIZE psize, _In_ FLONG fl)
uint32_t * PULONG
Definition: typedefs.h:59

Referenced by LpkGetTextExtentExPoint().