ReactOS  0.4.14-dev-55-g2da92ac
metafiledrv.h File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "gdi_private.h"
Include dependency graph for metafiledrv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  METAFILEDRV_PDEVICE
 

Macros

#define HANDLE_LIST_INC   20
 

Functions

BOOL MFDRV_MetaParam0 (PHYSDEV dev, short func) DECLSPEC_HIDDEN
 
BOOL MFDRV_MetaParam1 (PHYSDEV dev, short func, short param1) DECLSPEC_HIDDEN
 
BOOL MFDRV_MetaParam2 (PHYSDEV dev, short func, short param1, short param2) DECLSPEC_HIDDEN
 
BOOL MFDRV_MetaParam4 (PHYSDEV dev, short func, short param1, short param2, short param3, short param4) DECLSPEC_HIDDEN
 
BOOL MFDRV_MetaParam6 (PHYSDEV dev, short func, short param1, short param2, short param3, short param4, short param5, short param6) DECLSPEC_HIDDEN
 
BOOL MFDRV_MetaParam8 (PHYSDEV dev, short func, short param1, short param2, short param3, short param4, short param5, short param6, short param7, short param8) DECLSPEC_HIDDEN
 
BOOL MFDRV_WriteRecord (PHYSDEV dev, METARECORD *mr, DWORD rlen) DECLSPEC_HIDDEN
 
UINT MFDRV_AddHandle (PHYSDEV dev, HGDIOBJ obj) DECLSPEC_HIDDEN
 
BOOL MFDRV_RemoveHandle (PHYSDEV dev, UINT index) DECLSPEC_HIDDEN
 
INT16 MFDRV_CreateBrushIndirect (PHYSDEV dev, HBRUSH hBrush) DECLSPEC_HIDDEN
 
BOOL MFDRV_AbortPath (PHYSDEV dev) DECLSPEC_HIDDEN
 
BOOL MFDRV_Arc (PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend) DECLSPEC_HIDDEN
 
BOOL MFDRV_BeginPath (PHYSDEV dev) DECLSPEC_HIDDEN
 
BOOL MFDRV_Chord (PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend) DECLSPEC_HIDDEN
 
BOOL MFDRV_CloseFigure (PHYSDEV dev) DECLSPEC_HIDDEN
 
BOOL MFDRV_DeleteObject (PHYSDEV dev, HGDIOBJ obj) DECLSPEC_HIDDEN
 
BOOL MFDRV_Ellipse (PHYSDEV dev, INT left, INT top, INT right, INT bottom) DECLSPEC_HIDDEN
 
BOOL MFDRV_EndPath (PHYSDEV dev) DECLSPEC_HIDDEN
 
INT MFDRV_ExcludeClipRect (PHYSDEV dev, INT left, INT top, INT right, INT bottom) DECLSPEC_HIDDEN
 
BOOL MFDRV_ExtFloodFill (PHYSDEV dev, INT x, INT y, COLORREF color, UINT fillType) DECLSPEC_HIDDEN
 
INT MFDRV_ExtSelectClipRgn (PHYSDEV dev, HRGN hrgn, INT mode) DECLSPEC_HIDDEN
 
BOOL MFDRV_ExtTextOut (PHYSDEV dev, INT x, INT y, UINT flags, const RECT *lprect, LPCWSTR str, UINT count, const INT *lpDx) DECLSPEC_HIDDEN
 
BOOL MFDRV_FillPath (PHYSDEV dev) DECLSPEC_HIDDEN
 
BOOL MFDRV_FillRgn (PHYSDEV dev, HRGN hrgn, HBRUSH hbrush) DECLSPEC_HIDDEN
 
BOOL MFDRV_FlattenPath (PHYSDEV dev) DECLSPEC_HIDDEN
 
BOOL MFDRV_FrameRgn (PHYSDEV dev, HRGN hrgn, HBRUSH hbrush, INT x, INT y) DECLSPEC_HIDDEN
 
INT MFDRV_IntersectClipRect (PHYSDEV dev, INT left, INT top, INT right, INT bottom) DECLSPEC_HIDDEN
 
BOOL MFDRV_InvertRgn (PHYSDEV dev, HRGN hrgn) DECLSPEC_HIDDEN
 
BOOL MFDRV_LineTo (PHYSDEV dev, INT x, INT y) DECLSPEC_HIDDEN
 
BOOL MFDRV_MoveTo (PHYSDEV dev, INT x, INT y) DECLSPEC_HIDDEN
 
INT MFDRV_OffsetClipRgn (PHYSDEV dev, INT x, INT y) DECLSPEC_HIDDEN
 
BOOL MFDRV_OffsetViewportOrgEx (PHYSDEV dev, INT x, INT y, POINT *pt) DECLSPEC_HIDDEN
 
BOOL MFDRV_OffsetWindowOrgEx (PHYSDEV dev, INT x, INT y, POINT *pt) DECLSPEC_HIDDEN
 
BOOL MFDRV_PaintRgn (PHYSDEV dev, HRGN hrgn) DECLSPEC_HIDDEN
 
BOOL MFDRV_PatBlt (PHYSDEV dev, struct bitblt_coords *dst, DWORD rop) DECLSPEC_HIDDEN
 
BOOL MFDRV_Pie (PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend) DECLSPEC_HIDDEN
 
BOOL MFDRV_PolyBezier (PHYSDEV dev, const POINT *pt, DWORD count) DECLSPEC_HIDDEN
 
BOOL MFDRV_PolyBezierTo (PHYSDEV dev, const POINT *pt, DWORD count) DECLSPEC_HIDDEN
 
BOOL MFDRV_PolyPolygon (PHYSDEV dev, const POINT *pt, const INT *counts, UINT polygons) DECLSPEC_HIDDEN
 
BOOL MFDRV_Polygon (PHYSDEV dev, const POINT *pt, INT count) DECLSPEC_HIDDEN
 
BOOL MFDRV_Polyline (PHYSDEV dev, const POINT *pt, INT count) DECLSPEC_HIDDEN
 
BOOL MFDRV_Rectangle (PHYSDEV dev, INT left, INT top, INT right, INT bottom) DECLSPEC_HIDDEN
 
BOOL MFDRV_RestoreDC (PHYSDEV dev, INT level) DECLSPEC_HIDDEN
 
BOOL MFDRV_RoundRect (PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT ell_width, INT ell_height) DECLSPEC_HIDDEN
 
INT MFDRV_SaveDC (PHYSDEV dev) DECLSPEC_HIDDEN
 
BOOL MFDRV_ScaleViewportExtEx (PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom, SIZE *size) DECLSPEC_HIDDEN
 
BOOL MFDRV_ScaleWindowExtEx (PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom, SIZE *size) DECLSPEC_HIDDEN
 
HBITMAP MFDRV_SelectBitmap (PHYSDEV dev, HBITMAP handle) DECLSPEC_HIDDEN
 
HBRUSH MFDRV_SelectBrush (PHYSDEV dev, HBRUSH hbrush, const struct brush_pattern *pattern) DECLSPEC_HIDDEN
 
BOOL MFDRV_SelectClipPath (PHYSDEV dev, INT iMode) DECLSPEC_HIDDEN
 
HFONT MFDRV_SelectFont (PHYSDEV dev, HFONT handle, UINT *aa_flags) DECLSPEC_HIDDEN
 
HPEN MFDRV_SelectPen (PHYSDEV dev, HPEN handle, const struct brush_pattern *pattern) DECLSPEC_HIDDEN
 
HPALETTE MFDRV_SelectPalette (PHYSDEV dev, HPALETTE hPalette, BOOL bForceBackground) DECLSPEC_HIDDEN
 
UINT MFDRV_RealizePalette (PHYSDEV dev, HPALETTE hPalette, BOOL primary) DECLSPEC_HIDDEN
 
COLORREF MFDRV_SetBkColor (PHYSDEV dev, COLORREF color) DECLSPEC_HIDDEN
 
INT MFDRV_SetBkMode (PHYSDEV dev, INT mode) DECLSPEC_HIDDEN
 
COLORREF MFDRV_SetDCBrushColor (PHYSDEV dev, COLORREF color) DECLSPEC_HIDDEN
 
COLORREF MFDRV_SetDCPenColor (PHYSDEV dev, COLORREF color) DECLSPEC_HIDDEN
 
INT MFDRV_SetMapMode (PHYSDEV dev, INT mode) DECLSPEC_HIDDEN
 
DWORD MFDRV_SetMapperFlags (PHYSDEV dev, DWORD flags) DECLSPEC_HIDDEN
 
COLORREF MFDRV_SetPixel (PHYSDEV dev, INT x, INT y, COLORREF color) DECLSPEC_HIDDEN
 
INT MFDRV_SetPolyFillMode (PHYSDEV dev, INT mode) DECLSPEC_HIDDEN
 
INT MFDRV_SetROP2 (PHYSDEV dev, INT rop) DECLSPEC_HIDDEN
 
INT MFDRV_SetRelAbs (PHYSDEV dev, INT mode) DECLSPEC_HIDDEN
 
INT MFDRV_SetStretchBltMode (PHYSDEV dev, INT mode) DECLSPEC_HIDDEN
 
UINT MFDRV_SetTextAlign (PHYSDEV dev, UINT align) DECLSPEC_HIDDEN
 
INT MFDRV_SetTextCharacterExtra (PHYSDEV dev, INT extra) DECLSPEC_HIDDEN
 
COLORREF MFDRV_SetTextColor (PHYSDEV dev, COLORREF color) DECLSPEC_HIDDEN
 
BOOL MFDRV_SetTextJustification (PHYSDEV dev, INT extra, INT breaks) DECLSPEC_HIDDEN
 
BOOL MFDRV_SetViewportExtEx (PHYSDEV dev, INT x, INT y, SIZE *size) DECLSPEC_HIDDEN
 
BOOL MFDRV_SetViewportOrgEx (PHYSDEV dev, INT x, INT y, POINT *pt) DECLSPEC_HIDDEN
 
BOOL MFDRV_SetWindowExtEx (PHYSDEV dev, INT x, INT y, SIZE *size) DECLSPEC_HIDDEN
 
BOOL MFDRV_SetWindowOrgEx (PHYSDEV dev, INT x, INT y, POINT *pt) DECLSPEC_HIDDEN
 
BOOL MFDRV_StretchBlt (PHYSDEV devDst, struct bitblt_coords *dst, PHYSDEV devSrc, struct bitblt_coords *src, DWORD rop) DECLSPEC_HIDDEN
 
INT MFDRV_SetDIBitsToDevice (PHYSDEV dev, INT xDest, INT yDest, DWORD cx, DWORD cy, INT xSrc, INT ySrc, UINT startscan, UINT lines, LPCVOID bits, BITMAPINFO *info, UINT coloruse) DECLSPEC_HIDDEN
 
INT MFDRV_StretchDIBits (PHYSDEV dev, INT xDst, INT yDst, INT widthDst, INT heightDst, INT xSrc, INT ySrc, INT widthSrc, INT heightSrc, const void *bits, BITMAPINFO *info, UINT wUsage, DWORD dwRop) DECLSPEC_HIDDEN
 
BOOL MFDRV_StrokeAndFillPath (PHYSDEV dev) DECLSPEC_HIDDEN
 
BOOL MFDRV_StrokePath (PHYSDEV dev) DECLSPEC_HIDDEN
 
BOOL MFDRV_WidenPath (PHYSDEV dev) DECLSPEC_HIDDEN
 

Macro Definition Documentation

◆ HANDLE_LIST_INC

#define HANDLE_LIST_INC   20

Definition at line 42 of file metafiledrv.h.

Function Documentation

◆ MFDRV_AbortPath()

BOOL MFDRV_AbortPath ( PHYSDEV  dev)

Definition at line 148 of file dc.c.

149 {
150  return FALSE;
151 }

◆ MFDRV_AddHandle()

UINT MFDRV_AddHandle ( PHYSDEV  dev,
HGDIOBJ  obj 
)

Definition at line 39 of file objects.c.

40 {
42  UINT16 index;
43 
44  for(index = 0; index < physDev->handles_size; index++)
45  if(physDev->handles[index] == 0) break;
46  if(index == physDev->handles_size) {
47  physDev->handles_size += HANDLE_LIST_INC;
49  physDev->handles,
50  physDev->handles_size * sizeof(physDev->handles[0]));
51  }
52  physDev->handles[index] = get_full_gdi_handle( obj );
53 
54  physDev->cur_handles++;
55  if(physDev->cur_handles > physDev->mh->mtNoObjects)
56  physDev->mh->mtNoObjects++;
57 
58  return index ; /* index 0 is not reserved for metafiles */
59 }
HGDIOBJ get_full_gdi_handle(HGDIOBJ handle) DECLSPEC_HIDDEN
GLuint index
Definition: glext.h:6031
#define GetProcessHeap()
Definition: compat.h:395
#define index(s, c)
Definition: various.h:29
WORD mtNoObjects
Definition: wingdi.h:2309
#define HeapReAlloc
Definition: compat.h:393
unsigned short UINT16
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define HANDLE_LIST_INC
Definition: gdi32p.h:74
METAHEADER * mh
Definition: metafiledrv.h:36

Referenced by MFDRV_CreateBrushIndirect(), MFDRV_CreateFontIndirect(), MFDRV_CreatePalette(), MFDRV_CreatePenIndirect(), and MFDRV_CreateRegion().

◆ MFDRV_Arc()

BOOL MFDRV_Arc ( PHYSDEV  dev,
INT  left,
INT  top,
INT  right,
INT  bottom,
INT  xstart,
INT  ystart,
INT  xend,
INT  yend 
)

Definition at line 53 of file graphics.c.

55 {
57  xstart, ystart, xend, yend);
58 }
BOOL MFDRV_MetaParam8(PHYSDEV dev, short func, short param1, short param2, short param3, short param4, short param5, short param6, short param7, short param8)
Definition: init.c:608
GLint GLint bottom
Definition: glext.h:7726
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
#define META_ARC
Definition: wingdi.h:232
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859

◆ MFDRV_BeginPath()

BOOL MFDRV_BeginPath ( PHYSDEV  dev)

Definition at line 153 of file dc.c.

154 {
155  return FALSE;
156 }

◆ MFDRV_Chord()

BOOL MFDRV_Chord ( PHYSDEV  dev,
INT  left,
INT  top,
INT  right,
INT  bottom,
INT  xstart,
INT  ystart,
INT  xend,
INT  yend 
)

Definition at line 75 of file graphics.c.

77 {
79  xstart, ystart, xend, yend);
80 }
BOOL MFDRV_MetaParam8(PHYSDEV dev, short func, short param1, short param2, short param3, short param4, short param5, short param6, short param7, short param8)
Definition: init.c:608
GLint GLint bottom
Definition: glext.h:7726
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
#define META_CHORD
Definition: wingdi.h:256

◆ MFDRV_CloseFigure()

BOOL MFDRV_CloseFigure ( PHYSDEV  dev)

Definition at line 158 of file dc.c.

159 {
160  return FALSE;
161 }

◆ MFDRV_CreateBrushIndirect()

INT16 MFDRV_CreateBrushIndirect ( PHYSDEV  dev,
HBRUSH  hBrush 
)

Definition at line 149 of file objects.c.

150 {
151  DWORD size;
152  METARECORD *mr;
153  LOGBRUSH logbrush;
154  BOOL r;
155 
156  if (!GetObjectA( hBrush, sizeof(logbrush), &logbrush )) return -1;
157 
158  switch(logbrush.lbStyle)
159  {
160  case BS_SOLID:
161  case BS_NULL:
162  case BS_HATCHED:
163  {
164  LOGBRUSH16 lb16;
165 
166  lb16.lbStyle = logbrush.lbStyle;
167  lb16.lbColor = logbrush.lbColor;
168  lb16.lbHatch = logbrush.lbHatch;
169  size = sizeof(METARECORD) + sizeof(LOGBRUSH16) - 2;
170  mr = HeapAlloc( GetProcessHeap(), 0, size );
171  mr->rdSize = size / 2;
173  memcpy( mr->rdParm, &lb16, sizeof(LOGBRUSH16));
174  break;
175  }
176  case BS_PATTERN:
177  case BS_DIBPATTERN:
178  {
179 #ifdef __REACTOS__
180  char buffer[sizeof(BITMAPINFO) + 255 * sizeof(RGBQUAD)]; // ros
181 #else
182  char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )];
183 #endif
184  BITMAPINFO *dst_info, *src_info = (BITMAPINFO *)buffer;
185  DWORD info_size;
186  char *dst_ptr;
187  void *bits;
188  UINT usage;
189 
190  if (!get_brush_bitmap_info( hBrush, src_info, &bits, &usage )) goto done;
191 
192  info_size = get_dib_info_size( src_info, usage );
193  size = FIELD_OFFSET( METARECORD, rdParm[2] ) + info_size + src_info->bmiHeader.biSizeImage;
194 
195  if (!(mr = HeapAlloc( GetProcessHeap(), 0, size ))) goto done;
197  mr->rdSize = size / 2;
198  mr->rdParm[0] = logbrush.lbStyle;
199  mr->rdParm[1] = usage;
200  dst_info = (BITMAPINFO *)(mr->rdParm + 2);
201  memcpy( dst_info, src_info, info_size );
202  if (dst_info->bmiHeader.biClrUsed == 1 << dst_info->bmiHeader.biBitCount)
203  dst_info->bmiHeader.biClrUsed = 0;
204  dst_ptr = (char *)dst_info + info_size;
205 
206  /* always return a bottom-up DIB */
207  if (dst_info->bmiHeader.biHeight < 0)
208  {
209  int i, width_bytes = get_dib_stride( dst_info->bmiHeader.biWidth,
210  dst_info->bmiHeader.biBitCount );
211  dst_info->bmiHeader.biHeight = -dst_info->bmiHeader.biHeight;
212  dst_ptr += (dst_info->bmiHeader.biHeight - 1) * width_bytes;
213  for (i = 0; i < dst_info->bmiHeader.biHeight; i++, dst_ptr -= width_bytes)
214  memcpy( dst_ptr, (char *)bits + i * width_bytes, width_bytes );
215  }
216  else memcpy( dst_ptr, bits, src_info->bmiHeader.biSizeImage );
217  break;
218  }
219 
220  default:
221  FIXME("Unknown brush style %x\n", logbrush.lbStyle);
222  return 0;
223  }
224  r = MFDRV_WriteRecord( dev, mr, mr->rdSize * 2);
225  HeapFree(GetProcessHeap(), 0, mr);
226  if( !r )
227  return -1;
228 done:
229  return MFDRV_AddHandle( dev, hBrush );
230 }
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
INT16 lbHatch
Definition: wingdi16.h:34
#define BS_DIBPATTERN
Definition: wingdi.h:1091
#define META_CREATEBRUSHINDIRECT
Definition: wingdi.h:276
UINT16 lbStyle
Definition: wingdi16.h:32
BITMAPINFOHEADER bmiHeader
Definition: wingdi.h:1471
UINT lbStyle
Definition: wingdi.h:1742
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
ULONG_PTR lbHatch
Definition: wingdi.h:1744
WORD rdFunction
Definition: wingdi.h:2341
GLuint buffer
Definition: glext.h:5915
BOOL get_brush_bitmap_info(HBRUSH handle, BITMAPINFO *info, void **bits, UINT *usage) DECLSPEC_HIDDEN
struct tagMETARECORD METARECORD
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
DWORD rdSize
Definition: wingdi.h:2340
#define BS_NULL
Definition: wingdi.h:1086
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
unsigned int BOOL
Definition: ntddk_ex.h:94
static int get_dib_stride(int width, int bpp)
Definition: imagelist.c:198
#define FIXME(fmt,...)
Definition: debug.h:110
UINT MFDRV_AddHandle(PHYSDEV dev, HGDIOBJ obj)
Definition: objects.c:39
#define META_DIBCREATEPATTERNBRUSH
Definition: wingdi.h:268
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
COLORREF lbColor
Definition: wingdi.h:1743
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD biSizeImage
Definition: amvideo.idl:36
static UINT width_bytes(UINT width, UINT bpp)
Definition: tiffformat.c:846
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
WORD rdParm[1]
Definition: wingdi.h:2342
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
unsigned int UINT
Definition: ndis.h:50
#define BS_PATTERN
Definition: wingdi.h:1089
static int get_dib_info_size(const BITMAPINFO *info, UINT coloruse)
Definition: gdi_private.h:180
BOOL MFDRV_WriteRecord(PHYSDEV dev, METARECORD *mr, DWORD rlen)
Definition: init.c:474
COLORREF lbColor
Definition: wingdi16.h:33
#define BS_HATCHED
Definition: wingdi.h:1088
#define BS_SOLID
Definition: wingdi.h:1085
#define HeapFree(x, y, z)
Definition: compat.h:394
struct tagBITMAPINFO BITMAPINFO

Referenced by MFDRV_FillRgn(), MFDRV_FrameRgn(), and MFDRV_SelectBrush().

◆ MFDRV_DeleteObject()

BOOL MFDRV_DeleteObject ( PHYSDEV  dev,
HGDIOBJ  obj 
)

Definition at line 98 of file objects.c.

99 {
100  METARECORD mr;
102  INT16 index;
103  BOOL ret = TRUE;
104 
106  if( index < 0 )
107  return FALSE;
108 
109  mr.rdSize = sizeof mr / 2;
111  mr.rdParm[0] = index;
112 
113  if(!MFDRV_WriteRecord( dev, &mr, mr.rdSize*2 ))
114  ret = FALSE;
115 
116  physDev->handles[index] = 0;
117  physDev->cur_handles--;
118  return ret;
119 }
#define TRUE
Definition: types.h:120
WORD rdFunction
Definition: wingdi.h:2341
DWORD rdSize
Definition: wingdi.h:2340
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint index
Definition: glext.h:6031
int ret
#define index(s, c)
Definition: various.h:29
static INT16 MFDRV_FindObject(PHYSDEV dev, HGDIOBJ obj)
Definition: objects.c:81
WORD rdParm[1]
Definition: wingdi.h:2342
#define META_DELETEOBJECT
Definition: wingdi.h:271
BOOL MFDRV_WriteRecord(PHYSDEV dev, METARECORD *mr, DWORD rlen)
Definition: init.c:474
signed short INT16

Referenced by DeleteObject().

◆ MFDRV_Ellipse()

BOOL MFDRV_Ellipse ( PHYSDEV  dev,
INT  left,
INT  top,
INT  right,
INT  bottom 
)

Definition at line 85 of file graphics.c.

86 {
88 }
GLint GLint bottom
Definition: glext.h:7726
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
#define META_ELLIPSE
Definition: wingdi.h:233
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
BOOL MFDRV_MetaParam4(PHYSDEV dev, short func, short param1, short param2, short param3, short param4)
Definition: init.c:565

◆ MFDRV_EndPath()

BOOL MFDRV_EndPath ( PHYSDEV  dev)

Definition at line 163 of file dc.c.

164 {
165  return FALSE;
166 }

◆ MFDRV_ExcludeClipRect()

INT MFDRV_ExcludeClipRect ( PHYSDEV  dev,
INT  left,
INT  top,
INT  right,
INT  bottom 
)

Definition at line 78 of file dc.c.

79 {
81 }
GLint GLint bottom
Definition: glext.h:7726
#define META_EXCLUDECLIPRECT
Definition: wingdi.h:230
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
BOOL MFDRV_MetaParam4(PHYSDEV dev, short func, short param1, short param2, short param3, short param4)
Definition: init.c:565

◆ MFDRV_ExtFloodFill()

BOOL MFDRV_ExtFloodFill ( PHYSDEV  dev,
INT  x,
INT  y,
COLORREF  color,
UINT  fillType 
)

Definition at line 244 of file graphics.c.

245 {
247  LOWORD(color));
248 }
#define META_FLOODFILL
Definition: wingdi.h:234
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint color
Definition: glext.h:6243
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define HIWORD(l)
Definition: typedefs.h:246
BOOL MFDRV_MetaParam4(PHYSDEV dev, short func, short param1, short param2, short param3, short param4)
Definition: init.c:565
#define LOWORD(l)
Definition: pedump.c:82

◆ MFDRV_ExtSelectClipRgn()

INT MFDRV_ExtSelectClipRgn ( PHYSDEV  dev,
HRGN  hrgn,
INT  mode 
)

Definition at line 407 of file graphics.c.

408 {
409  INT16 iRgn;
410  INT ret;
411 
412  if (mode != RGN_COPY) return ERROR;
413  if (!hrgn) return NULLREGION;
414  iRgn = MFDRV_CreateRegion( dev, hrgn );
415  if(iRgn == -1) return ERROR;
418  MFDRV_RemoveHandle( dev, iRgn );
419  return ret;
420 }
static INT16 MFDRV_CreateRegion(PHYSDEV dev, HRGN hrgn)
Definition: graphics.c:257
#define ERROR(name)
Definition: error_private.h:53
#define NULLREGION
Definition: wingdi.h:360
int32_t INT
Definition: typedefs.h:56
BOOL MFDRV_MetaParam1(PHYSDEV dev, short func, short param1)
Definition: init.c:531
BOOL MFDRV_RemoveHandle(PHYSDEV dev, UINT index) DECLSPEC_HIDDEN
Definition: objects.c:64
int ret
static HRGN hrgn
Definition: win.c:55
GLenum mode
Definition: glext.h:6217
#define RGN_COPY
Definition: wingdi.h:356
#define META_DELETEOBJECT
Definition: wingdi.h:271
#define META_SELECTOBJECT
Definition: wingdi.h:254
signed short INT16

◆ MFDRV_ExtTextOut()

BOOL MFDRV_ExtTextOut ( PHYSDEV  dev,
INT  x,
INT  y,
UINT  flags,
const RECT lprect,
LPCWSTR  str,
UINT  count,
const INT lpDx 
)

Definition at line 75 of file text.c.

77 {
78  RECT16 rect16;
79  LPINT16 lpdx16 = NULL;
80  BOOL ret;
81  unsigned int i, j;
82  LPSTR ascii;
83  DWORD len;
84  CHARSETINFO csi;
85  int charset = GetTextCharset( dev->hdc );
86  UINT cp = CP_ACP;
87 
89  cp = csi.ciACP;
90  else {
91  switch(charset) {
92  case OEM_CHARSET:
93  cp = GetOEMCP();
94  break;
95  case DEFAULT_CHARSET:
96  cp = GetACP();
97  break;
98 
99  case VISCII_CHARSET:
100  case TCVN_CHARSET:
101  case KOI8_CHARSET:
102  case ISO3_CHARSET:
103  case ISO4_CHARSET:
104  case ISO10_CHARSET:
105  case CELTIC_CHARSET:
106  /* FIXME: These have no place here, but because x11drv
107  enumerates fonts with these (made up) charsets some apps
108  might use them and then the FIXME below would become
109  annoying. Now we could pick the intended codepage for
110  each of these, but since it's broken anyway we'll just
111  use CP_ACP and hope it'll go away...
112  */
113  cp = CP_ACP;
114  break;
115 
116 
117  default:
118  FIXME("Can't find codepage for charset %d\n", charset);
119  break;
120  }
121  }
122 
123 
124  TRACE("cp == %d\n", cp);
126  ascii = HeapAlloc(GetProcessHeap(), 0, len);
127  WideCharToMultiByte(cp, 0, str, count, ascii, len, NULL, NULL);
128  TRACE("mapped %s -> %s\n", debugstr_wn(str, count), debugstr_an(ascii, len));
129 
130 
131  if (lprect)
132  {
133  rect16.left = lprect->left;
134  rect16.top = lprect->top;
135  rect16.right = lprect->right;
136  rect16.bottom = lprect->bottom;
137  }
138 
139  if(lpDx) {
140  lpdx16 = HeapAlloc( GetProcessHeap(), 0, sizeof(INT16)*len );
141  for(i = j = 0; i < len; )
142  if(IsDBCSLeadByteEx(cp, ascii[i])) {
143  lpdx16[i++] = lpDx[j++];
144  lpdx16[i++] = 0;
145  } else
146  lpdx16[i++] = lpDx[j++];
147  }
148 
149  ret = MFDRV_MetaExtTextOut(dev,x,y,flags,lprect?&rect16:NULL,ascii,len,lpdx16);
150  HeapFree( GetProcessHeap(), 0, ascii );
151  HeapFree( GetProcessHeap(), 0, lpdx16 );
152  return ret;
153 }
#define ISO10_CHARSET
Definition: wingdi.h:411
#define ULongToPtr(ul)
Definition: basetsd.h:92
CFF_Charset charset
Definition: cffcmap.c:138
#define WideCharToMultiByte
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:99
GLuint GLuint GLsizei count
Definition: gl.h:1545
INT16 * LPINT16
Definition: windef16.h:43
LONG top
Definition: windef.h:292
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
INT16 left
Definition: windef16.h:143
LONG left
Definition: windef.h:291
char * LPSTR
Definition: xmlstorage.h:182
#define DEFAULT_CHARSET
Definition: wingdi.h:383
LONG right
Definition: windef.h:293
#define ISO4_CHARSET
Definition: wingdi.h:410
INT16 right
Definition: windef16.h:145
BOOL WINAPI IsDBCSLeadByteEx(UINT CodePage, BYTE TestByte)
Definition: nls.c:2199
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
INT16 bottom
Definition: windef16.h:146
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FIXME(fmt,...)
Definition: debug.h:110
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
UINT WINAPI GetACP(VOID)
Definition: nls.c:2169
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 GLint GLint j
Definition: glfuncs.h:250
BOOL WINAPI TranslateCharsetInfo(_Inout_ PDWORD, _Out_ LPCHARSETINFO, _In_ DWORD)
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define VISCII_CHARSET
Definition: wingdi.h:406
static BOOL MFDRV_MetaExtTextOut(PHYSDEV dev, short x, short y, UINT16 flags, const RECT16 *rect, LPCSTR str, short count, const INT16 *lpDx)
Definition: text.c:36
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
#define ISO3_CHARSET
Definition: wingdi.h:409
int ret
#define OEM_CHARSET
Definition: wingdi.h:399
static __inline const char * debugstr_an(const char *s, int n)
Definition: compat.h:47
GLenum GLsizei len
Definition: glext.h:6722
#define CELTIC_CHARSET
Definition: wingdi.h:412
#define debugstr_wn
Definition: kernel32.h:33
unsigned int UINT
Definition: ndis.h:50
INT16 top
Definition: windef16.h:144
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
INT WINAPI GetTextCharset(_In_ HDC hdc)
Definition: text.c:187
POINT cp
Definition: magnifier.c:59
#define KOI8_CHARSET
Definition: wingdi.h:408
LONG bottom
Definition: windef.h:294
#define HeapFree(x, y, z)
Definition: compat.h:394
#define TCI_SRCCHARSET
Definition: wingdi.h:960
#define TCVN_CHARSET
Definition: wingdi.h:407
UINT WINAPI GetOEMCP(VOID)
Definition: nls.c:2184
signed short INT16

◆ MFDRV_FillPath()

BOOL MFDRV_FillPath ( PHYSDEV  dev)

Definition at line 168 of file dc.c.

169 {
170  return FALSE;
171 }

◆ MFDRV_FillRgn()

BOOL MFDRV_FillRgn ( PHYSDEV  dev,
HRGN  hrgn,
HBRUSH  hbrush 
)

Definition at line 376 of file graphics.c.

377 {
378  INT16 iRgn, iBrush;
379  iRgn = MFDRV_CreateRegion( dev, hrgn );
380  if(iRgn == -1)
381  return FALSE;
382  iBrush = MFDRV_CreateBrushIndirect( dev, hbrush );
383  if(!iBrush)
384  return FALSE;
385  return MFDRV_MetaParam2( dev, META_FILLREGION, iRgn, iBrush );
386 }
static INT16 MFDRV_CreateRegion(PHYSDEV dev, HRGN hrgn)
Definition: graphics.c:257
static HBRUSH hbrush
INT16 MFDRV_CreateBrushIndirect(PHYSDEV dev, HBRUSH hBrush) DECLSPEC_HIDDEN
Definition: objects.c:149
#define META_FILLREGION
Definition: wingdi.h:249
static HRGN hrgn
Definition: win.c:55
BOOL MFDRV_MetaParam2(PHYSDEV dev, short func, short param1, short param2)
Definition: init.c:547
signed short INT16

◆ MFDRV_FlattenPath()

BOOL MFDRV_FlattenPath ( PHYSDEV  dev)

Definition at line 173 of file dc.c.

174 {
175  return FALSE;
176 }

◆ MFDRV_FrameRgn()

BOOL MFDRV_FrameRgn ( PHYSDEV  dev,
HRGN  hrgn,
HBRUSH  hbrush,
INT  x,
INT  y 
)

Definition at line 391 of file graphics.c.

392 {
393  INT16 iRgn, iBrush;
394  iRgn = MFDRV_CreateRegion( dev, hrgn );
395  if(iRgn == -1)
396  return FALSE;
397  iBrush = MFDRV_CreateBrushIndirect( dev, hbrush );
398  if(!iBrush)
399  return FALSE;
400  return MFDRV_MetaParam4( dev, META_FRAMEREGION, iRgn, iBrush, x, y );
401 }
static INT16 MFDRV_CreateRegion(PHYSDEV dev, HRGN hrgn)
Definition: graphics.c:257
static HBRUSH hbrush
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
INT16 MFDRV_CreateBrushIndirect(PHYSDEV dev, HBRUSH hBrush) DECLSPEC_HIDDEN
Definition: objects.c:149
#define META_FRAMEREGION
Definition: wingdi.h:250
static HRGN hrgn
Definition: win.c:55
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
BOOL MFDRV_MetaParam4(PHYSDEV dev, short func, short param1, short param2, short param3, short param4)
Definition: init.c:565
signed short INT16

◆ MFDRV_IntersectClipRect()

INT MFDRV_IntersectClipRect ( PHYSDEV  dev,
INT  left,
INT  top,
INT  right,
INT  bottom 
)

Definition at line 73 of file dc.c.

74 {
76 }
GLint GLint bottom
Definition: glext.h:7726
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
BOOL MFDRV_MetaParam4(PHYSDEV dev, short func, short param1, short param2, short param3, short param4)
Definition: init.c:565
#define META_INTERSECTCLIPRECT
Definition: wingdi.h:231

◆ MFDRV_InvertRgn()

BOOL MFDRV_InvertRgn ( PHYSDEV  dev,
HRGN  hrgn 
)

Definition at line 363 of file graphics.c.

364 {
365  INT16 index;
367  if(index == -1)
368  return FALSE;
370 }
static INT16 MFDRV_CreateRegion(PHYSDEV dev, HRGN hrgn)
Definition: graphics.c:257
#define META_INVERTREGION
Definition: wingdi.h:251
BOOL MFDRV_MetaParam1(PHYSDEV dev, short func, short param1)
Definition: init.c:531
GLuint index
Definition: glext.h:6031
#define index(s, c)
Definition: various.h:29
static HRGN hrgn
Definition: win.c:55
signed short INT16

◆ MFDRV_LineTo()

BOOL MFDRV_LineTo ( PHYSDEV  dev,
INT  x,
INT  y 
)

Definition at line 44 of file graphics.c.

45 {
46  return MFDRV_MetaParam2(dev, META_LINETO, x, y);
47 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define META_LINETO
Definition: wingdi.h:228
BOOL MFDRV_MetaParam2(PHYSDEV dev, short func, short param1, short param2)
Definition: init.c:547
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ MFDRV_MetaParam0()

BOOL MFDRV_MetaParam0 ( PHYSDEV  dev,
short  func 
)

Definition at line 517 of file init.c.

518 {
519  char buffer[8];
520  METARECORD *mr = (METARECORD *)&buffer;
521 
522  mr->rdSize = 3;
523  mr->rdFunction = func;
524  return MFDRV_WriteRecord( dev, mr, mr->rdSize * 2);
525 }
GLenum func
Definition: glext.h:6028
WORD rdFunction
Definition: wingdi.h:2341
GLuint buffer
Definition: glext.h:5915
DWORD rdSize
Definition: wingdi.h:2340
BOOL MFDRV_WriteRecord(PHYSDEV dev, METARECORD *mr, DWORD rlen)
Definition: init.c:474

Referenced by MFDRV_CloseMetaFile(), and MFDRV_SaveDC().

◆ MFDRV_MetaParam1()

BOOL MFDRV_MetaParam1 ( PHYSDEV  dev,
short  func,
short  param1 
)

Definition at line 531 of file init.c.

532 {
533  char buffer[8];
534  METARECORD *mr = (METARECORD *)&buffer;
535  WORD *params = mr->rdParm;
536 
537  mr->rdSize = 4;
538  mr->rdFunction = func;
539  params[0] = param1;
540  return MFDRV_WriteRecord( dev, mr, mr->rdSize * 2);
541 }
GLenum func
Definition: glext.h:6028
WORD rdFunction
Definition: wingdi.h:2341
GLuint buffer
Definition: glext.h:5915
DWORD rdSize
Definition: wingdi.h:2340
GLenum const GLfloat * params
Definition: glext.h:5645
unsigned short WORD
Definition: ntddk_ex.h:93
WORD rdParm[1]
Definition: wingdi.h:2342
BOOL MFDRV_WriteRecord(PHYSDEV dev, METARECORD *mr, DWORD rlen)
Definition: init.c:474

Referenced by MFDRV_ExtSelectClipRgn(), MFDRV_InvertRgn(), MFDRV_PaintRgn(), MFDRV_RestoreDC(), MFDRV_SetBkMode(), MFDRV_SetMapMode(), MFDRV_SetPolyFillMode(), MFDRV_SetRelAbs(), MFDRV_SetROP2(), MFDRV_SetStretchBltMode(), and MFDRV_SetTextCharacterExtra().

◆ MFDRV_MetaParam2()

BOOL MFDRV_MetaParam2 ( PHYSDEV  dev,
short  func,
short  param1,
short  param2 
)

Definition at line 547 of file init.c.

548 {
549  char buffer[10];
550  METARECORD *mr = (METARECORD *)&buffer;
551  WORD *params = mr->rdParm;
552 
553  mr->rdSize = 5;
554  mr->rdFunction = func;
555  params[0] = param2;
556  params[1] = param1;
557  return MFDRV_WriteRecord( dev, mr, mr->rdSize * 2);
558 }
GLenum func
Definition: glext.h:6028
WORD rdFunction
Definition: wingdi.h:2341
GLuint buffer
Definition: glext.h:5915
DWORD rdSize
Definition: wingdi.h:2340
GLenum const GLfloat * params
Definition: glext.h:5645
unsigned short WORD
Definition: ntddk_ex.h:93
WORD rdParm[1]
Definition: wingdi.h:2342
BOOL MFDRV_WriteRecord(PHYSDEV dev, METARECORD *mr, DWORD rlen)
Definition: init.c:474

Referenced by MFDRV_FillRgn(), MFDRV_LineTo(), MFDRV_MoveTo(), MFDRV_OffsetClipRgn(), MFDRV_OffsetViewportOrgEx(), MFDRV_OffsetWindowOrgEx(), MFDRV_SetBkColor(), MFDRV_SetMapperFlags(), MFDRV_SetTextAlign(), MFDRV_SetTextColor(), MFDRV_SetTextJustification(), MFDRV_SetViewportExtEx(), MFDRV_SetViewportOrgEx(), MFDRV_SetWindowExtEx(), and MFDRV_SetWindowOrgEx().

◆ MFDRV_MetaParam4()

BOOL MFDRV_MetaParam4 ( PHYSDEV  dev,
short  func,
short  param1,
short  param2,
short  param3,
short  param4 
)

Definition at line 565 of file init.c.

567 {
568  char buffer[14];
569  METARECORD *mr = (METARECORD *)&buffer;
570  WORD *params = mr->rdParm;
571 
572  mr->rdSize = 7;
573  mr->rdFunction = func;
574  params[0] = param4;
575  params[1] = param3;
576  params[2] = param2;
577  params[3] = param1;
578  return MFDRV_WriteRecord( dev, mr, mr->rdSize * 2);
579 }
GLenum func
Definition: glext.h:6028
WORD rdFunction
Definition: wingdi.h:2341
GLuint buffer
Definition: glext.h:5915
DWORD rdSize
Definition: wingdi.h:2340
GLenum const GLfloat * params
Definition: glext.h:5645
unsigned short WORD
Definition: ntddk_ex.h:93
WORD rdParm[1]
Definition: wingdi.h:2342
BOOL MFDRV_WriteRecord(PHYSDEV dev, METARECORD *mr, DWORD rlen)
Definition: init.c:474

Referenced by MFDRV_Ellipse(), MFDRV_ExcludeClipRect(), MFDRV_ExtFloodFill(), MFDRV_FrameRgn(), MFDRV_IntersectClipRect(), MFDRV_Rectangle(), MFDRV_ScaleViewportExtEx(), MFDRV_ScaleWindowExtEx(), and MFDRV_SetPixel().

◆ MFDRV_MetaParam6()

BOOL MFDRV_MetaParam6 ( PHYSDEV  dev,
short  func,
short  param1,
short  param2,
short  param3,
short  param4,
short  param5,
short  param6 
)

Definition at line 586 of file init.c.

588 {
589  char buffer[18];
590  METARECORD *mr = (METARECORD *)&buffer;
591  WORD *params = mr->rdParm;
592 
593  mr->rdSize = 9;
594  mr->rdFunction = func;
595  params[0] = param6;
596  params[1] = param5;
597  params[2] = param4;
598  params[3] = param3;
599  params[4] = param2;
600  params[5] = param1;
601  return MFDRV_WriteRecord( dev, mr, mr->rdSize * 2);
602 }
GLenum func
Definition: glext.h:6028
WORD rdFunction
Definition: wingdi.h:2341
GLuint buffer
Definition: glext.h:5915
DWORD rdSize
Definition: wingdi.h:2340
GLenum const GLfloat * params
Definition: glext.h:5645
unsigned short WORD
Definition: ntddk_ex.h:93
WORD rdParm[1]
Definition: wingdi.h:2342
BOOL MFDRV_WriteRecord(PHYSDEV dev, METARECORD *mr, DWORD rlen)
Definition: init.c:474

Referenced by MFDRV_PatBlt(), and MFDRV_RoundRect().

◆ MFDRV_MetaParam8()

BOOL MFDRV_MetaParam8 ( PHYSDEV  dev,
short  func,
short  param1,
short  param2,
short  param3,
short  param4,
short  param5,
short  param6,
short  param7,
short  param8 
)

Definition at line 608 of file init.c.

611 {
612  char buffer[22];
613  METARECORD *mr = (METARECORD *)&buffer;
614  WORD *params = mr->rdParm;
615 
616  mr->rdSize = 11;
617  mr->rdFunction = func;
618  params[0] = param8;
619  params[1] = param7;
620  params[2] = param6;
621  params[3] = param5;
622  params[4] = param4;
623  params[5] = param3;
624  params[6] = param2;
625  params[7] = param1;
626  return MFDRV_WriteRecord( dev, mr, mr->rdSize * 2);
627 }
GLenum func
Definition: glext.h:6028
WORD rdFunction
Definition: wingdi.h:2341
GLuint buffer
Definition: glext.h:5915
DWORD rdSize
Definition: wingdi.h:2340
GLenum const GLfloat * params
Definition: glext.h:5645
unsigned short WORD
Definition: ntddk_ex.h:93
WORD rdParm[1]
Definition: wingdi.h:2342
BOOL MFDRV_WriteRecord(PHYSDEV dev, METARECORD *mr, DWORD rlen)
Definition: init.c:474

Referenced by MFDRV_Arc(), MFDRV_Chord(), and MFDRV_Pie().

◆ MFDRV_MoveTo()

BOOL MFDRV_MoveTo ( PHYSDEV  dev,
INT  x,
INT  y 
)

Definition at line 36 of file graphics.c.

37 {
39 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define META_MOVETO
Definition: wingdi.h:229
BOOL MFDRV_MetaParam2(PHYSDEV dev, short func, short param1, short param2)
Definition: init.c:547
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ MFDRV_OffsetClipRgn()

INT MFDRV_OffsetClipRgn ( PHYSDEV  dev,
INT  x,
INT  y 
)

Definition at line 83 of file dc.c.

84 {
86 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define META_OFFSETCLIPRGN
Definition: wingdi.h:241
BOOL MFDRV_MetaParam2(PHYSDEV dev, short func, short param1, short param2)
Definition: init.c:547
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ MFDRV_OffsetViewportOrgEx()

BOOL MFDRV_OffsetViewportOrgEx ( PHYSDEV  dev,
INT  x,
INT  y,
POINT pt 
)

Definition at line 113 of file dc.c.

114 {
116 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define META_OFFSETVIEWPORTORG
Definition: wingdi.h:226
BOOL MFDRV_MetaParam2(PHYSDEV dev, short func, short param1, short param2)
Definition: init.c:547
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ MFDRV_OffsetWindowOrgEx()

BOOL MFDRV_OffsetWindowOrgEx ( PHYSDEV  dev,
INT  x,
INT  y,
POINT pt 
)

Definition at line 118 of file dc.c.

119 {
121 }
#define META_OFFSETWINDOWORG
Definition: wingdi.h:224
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
BOOL MFDRV_MetaParam2(PHYSDEV dev, short func, short param1, short param2)
Definition: init.c:547
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ MFDRV_PaintRgn()

BOOL MFDRV_PaintRgn ( PHYSDEV  dev,
HRGN  hrgn 
)

Definition at line 350 of file graphics.c.

351 {
352  INT16 index;
354  if(index == -1)
355  return FALSE;
357 }
static INT16 MFDRV_CreateRegion(PHYSDEV dev, HRGN hrgn)
Definition: graphics.c:257
#define META_PAINTREGION
Definition: wingdi.h:252
BOOL MFDRV_MetaParam1(PHYSDEV dev, short func, short param1)
Definition: init.c:531
GLuint index
Definition: glext.h:6031
#define index(s, c)
Definition: various.h:29
static HRGN hrgn
Definition: win.c:55
signed short INT16

◆ MFDRV_PatBlt()

BOOL MFDRV_PatBlt ( PHYSDEV  dev,
struct bitblt_coords dst,
DWORD  rop 
)

Definition at line 31 of file bitblt.c.

32 {
33  MFDRV_MetaParam6( dev, META_PATBLT, dst->log_x, dst->log_y, dst->log_width, dst->log_height,
34  HIWORD(rop), LOWORD(rop) );
35  return TRUE;
36 }
#define TRUE
Definition: types.h:120
#define META_PATBLT
Definition: wingdi.h:238
static int rop(int rop, int src, int dst)
Definition: nanoxwin.c:124
BOOL MFDRV_MetaParam6(PHYSDEV dev, short func, short param1, short param2, short param3, short param4, short param5, short param6)
Definition: init.c:586
GLenum GLenum dst
Definition: glext.h:6340
#define HIWORD(l)
Definition: typedefs.h:246
#define LOWORD(l)
Definition: pedump.c:82

◆ MFDRV_Pie()

BOOL MFDRV_Pie ( PHYSDEV  dev,
INT  left,
INT  top,
INT  right,
INT  bottom,
INT  xstart,
INT  ystart,
INT  xend,
INT  yend 
)

Definition at line 64 of file graphics.c.

66 {
68  xstart, ystart, xend, yend);
69 }
BOOL MFDRV_MetaParam8(PHYSDEV dev, short func, short param1, short param2, short param3, short param4, short param5, short param6, short param7, short param8)
Definition: init.c:608
GLint GLint bottom
Definition: glext.h:7726
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
#define META_PIE
Definition: wingdi.h:235
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859

◆ MFDRV_PolyBezier()

BOOL MFDRV_PolyBezier ( PHYSDEV  dev,
const POINT pt,
DWORD  count 
)

Definition at line 428 of file graphics.c.

429 {
430  return FALSE;
431 }

◆ MFDRV_PolyBezierTo()

BOOL MFDRV_PolyBezierTo ( PHYSDEV  dev,
const POINT pt,
DWORD  count 
)

Definition at line 438 of file graphics.c.

439 {
440  return FALSE;
441 }

◆ MFDRV_Polygon()

BOOL MFDRV_Polygon ( PHYSDEV  dev,
const POINT pt,
INT  count 
)

Definition at line 167 of file graphics.c.

168 {
169  int i;
170  POINTS *pts;
171  BOOL ret;
172 
173  pts = HeapAlloc( GetProcessHeap(), 0, sizeof(POINTS)*count );
174  if(!pts) return FALSE;
175  for (i=count;i--;)
176  {
177  pts[i].x = pt[i].x;
178  pts[i].y = pt[i].y;
179  }
181 
182  HeapFree( GetProcessHeap(), 0, pts );
183  return ret;
184 }
#define pt(x, y)
Definition: drawing.c:79
GLuint GLuint GLsizei count
Definition: gl.h:1545
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
unsigned int BOOL
Definition: ntddk_ex.h:94
SHORT x
Definition: windef.h:327
#define META_POLYGON
Definition: wingdi.h:245
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
int ret
SHORT y
Definition: windef.h:328
static BOOL MFDRV_MetaPoly(PHYSDEV dev, short func, POINTS *pt, short count)
Definition: graphics.c:121
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ MFDRV_Polyline()

BOOL MFDRV_Polyline ( PHYSDEV  dev,
const POINT pt,
INT  count 
)

Definition at line 144 of file graphics.c.

145 {
146  int i;
147  POINTS *pts;
148  BOOL ret;
149 
150  pts = HeapAlloc( GetProcessHeap(), 0, sizeof(POINTS)*count );
151  if(!pts) return FALSE;
152  for (i=count;i--;)
153  {
154  pts[i].x = pt[i].x;
155  pts[i].y = pt[i].y;
156  }
158 
159  HeapFree( GetProcessHeap(), 0, pts );
160  return ret;
161 }
#define pt(x, y)
Definition: drawing.c:79
GLuint GLuint GLsizei count
Definition: gl.h:1545
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
unsigned int BOOL
Definition: ntddk_ex.h:94
SHORT x
Definition: windef.h:327
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define META_POLYLINE
Definition: wingdi.h:246
int ret
SHORT y
Definition: windef.h:328
static BOOL MFDRV_MetaPoly(PHYSDEV dev, short func, POINTS *pt, short count)
Definition: graphics.c:121
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ MFDRV_PolyPolygon()

BOOL MFDRV_PolyPolygon ( PHYSDEV  dev,
const POINT pt,
const INT counts,
UINT  polygons 
)

Definition at line 190 of file graphics.c.

191 {
192  BOOL ret;
193  DWORD len;
194  METARECORD *mr;
195  unsigned int i,j;
196  POINTS *pts;
197  INT16 totalpoint16 = 0;
198  INT16 * pointcounts;
199 
200  for (i=0;i<polygons;i++) {
201  totalpoint16 += counts[i];
202  }
203 
204  /* allocate space for all points */
205  pts=HeapAlloc( GetProcessHeap(), 0, sizeof(POINTS) * totalpoint16 );
206  pointcounts = HeapAlloc( GetProcessHeap(), 0, sizeof(INT16) * totalpoint16 );
207 
208  /* copy point counts */
209  for (i=0;i<polygons;i++) {
210  pointcounts[i] = counts[i];
211  }
212 
213  /* convert all points */
214  for (j = totalpoint16; j--;){
215  pts[j].x = pt[j].x;
216  pts[j].y = pt[j].y;
217  }
218 
219  len = sizeof(METARECORD) + sizeof(WORD) + polygons*sizeof(INT16) + totalpoint16*sizeof(*pts);
220 
221  if (!(mr = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, len ))) {
222  HeapFree( GetProcessHeap(), 0, pts );
223  HeapFree( GetProcessHeap(), 0, pointcounts );
224  return FALSE;
225  }
226 
227  mr->rdSize = len /2;
229  *(mr->rdParm) = polygons;
230  memcpy(mr->rdParm + 1, pointcounts, polygons*sizeof(INT16));
231  memcpy(mr->rdParm + 1+polygons, pts , totalpoint16*sizeof(*pts));
232  ret = MFDRV_WriteRecord( dev, mr, mr->rdSize * 2);
233 
234  HeapFree( GetProcessHeap(), 0, pts );
235  HeapFree( GetProcessHeap(), 0, pointcounts );
236  HeapFree( GetProcessHeap(), 0, mr);
237  return ret;
238 }
#define pt(x, y)
Definition: drawing.c:79
WORD rdFunction
Definition: wingdi.h:2341
struct tagMETARECORD METARECORD
DWORD rdSize
Definition: wingdi.h:2340
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
unsigned int BOOL
Definition: ntddk_ex.h:94
SHORT x
Definition: windef.h:327
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 GLint GLint j
Definition: glfuncs.h:250
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
#define META_POLYPOLYGON
Definition: wingdi.h:264
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
WORD rdParm[1]
Definition: wingdi.h:2342
SHORT y
Definition: windef.h:328
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
BOOL MFDRV_WriteRecord(PHYSDEV dev, METARECORD *mr, DWORD rlen)
Definition: init.c:474
#define HeapFree(x, y, z)
Definition: compat.h:394
signed short INT16

◆ MFDRV_RealizePalette()

UINT MFDRV_RealizePalette ( PHYSDEV  dev,
HPALETTE  hPalette,
BOOL  primary 
)

Definition at line 449 of file objects.c.

450 {
451  char buffer[sizeof(METARECORD) - sizeof(WORD)];
452  METARECORD *mr = (METARECORD *)&buffer;
453 
454  mr->rdSize = (sizeof(METARECORD) - sizeof(WORD)) / sizeof(WORD);
456 
457  if (!(MFDRV_WriteRecord( dev, mr, mr->rdSize * sizeof(WORD)))) return 0;
458 
459  /* The return value is suppose to be the number of entries
460  in the logical palette mapped to the system palette or 0
461  if the function failed. Since it's not trivial here to
462  get that kind of information and since it's of little
463  use in the case of metafiles, we'll always return 1. */
464  return 1;
465 }
WORD rdFunction
Definition: wingdi.h:2341
GLuint buffer
Definition: glext.h:5915
#define META_REALIZEPALETTE
Definition: wingdi.h:261
struct tagMETARECORD METARECORD
DWORD rdSize
Definition: wingdi.h:2340
unsigned short WORD
Definition: ntddk_ex.h:93
BOOL MFDRV_WriteRecord(PHYSDEV dev, METARECORD *mr, DWORD rlen)
Definition: init.c:474

◆ MFDRV_Rectangle()

BOOL MFDRV_Rectangle ( PHYSDEV  dev,
INT  left,
INT  top,
INT  right,
INT  bottom 
)

Definition at line 93 of file graphics.c.

94 {
96 }
#define META_RECTANGLE
Definition: wingdi.h:236
GLint GLint bottom
Definition: glext.h:7726
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
BOOL MFDRV_MetaParam4(PHYSDEV dev, short func, short param1, short param2, short param3, short param4)
Definition: init.c:565

◆ MFDRV_RemoveHandle()

BOOL MFDRV_RemoveHandle ( PHYSDEV  dev,
UINT  index 
)

Definition at line 64 of file objects.c.

65 {
67  BOOL ret = FALSE;
68 
69  if (index < physDev->handles_size && physDev->handles[index])
70  {
71  physDev->handles[index] = 0;
72  physDev->cur_handles--;
73  ret = TRUE;
74  }
75  return ret;
76 }
#define TRUE
Definition: types.h:120
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint index
Definition: glext.h:6031
int ret
#define index(s, c)
Definition: various.h:29

Referenced by MFDRV_ExtSelectClipRgn().

◆ MFDRV_RestoreDC()

BOOL MFDRV_RestoreDC ( PHYSDEV  dev,
INT  level 
)

Definition at line 28 of file dc.c.

29 {
31 }
#define META_RESTOREDC
Definition: wingdi.h:248
GLint level
Definition: gl.h:1546
BOOL MFDRV_MetaParam1(PHYSDEV dev, short func, short param1)
Definition: init.c:531

◆ MFDRV_RoundRect()

BOOL MFDRV_RoundRect ( PHYSDEV  dev,
INT  left,
INT  top,
INT  right,
INT  bottom,
INT  ell_width,
INT  ell_height 
)

Definition at line 101 of file graphics.c.

103 {
105  ell_width, ell_height);
106 }
GLint GLint bottom
Definition: glext.h:7726
BOOL MFDRV_MetaParam6(PHYSDEV dev, short func, short param1, short param2, short param3, short param4, short param5, short param6)
Definition: init.c:586
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
#define META_ROUNDRECT
Definition: wingdi.h:237
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859

◆ MFDRV_SaveDC()

INT MFDRV_SaveDC ( PHYSDEV  dev)

Definition at line 23 of file dc.c.

24 {
25  return MFDRV_MetaParam0( dev, META_SAVEDC );
26 }
#define META_SAVEDC
Definition: wingdi.h:239
BOOL MFDRV_MetaParam0(PHYSDEV dev, short func)
Definition: init.c:517

◆ MFDRV_ScaleViewportExtEx()

BOOL MFDRV_ScaleViewportExtEx ( PHYSDEV  dev,
INT  xNum,
INT  xDenom,
INT  yNum,
INT  yDenom,
SIZE size 
)

Definition at line 123 of file dc.c.

124 {
125  return MFDRV_MetaParam4( dev, META_SCALEVIEWPORTEXT, xNum, xDenom, yNum, yDenom );
126 }
#define META_SCALEVIEWPORTEXT
Definition: wingdi.h:227
BOOL MFDRV_MetaParam4(PHYSDEV dev, short func, short param1, short param2, short param3, short param4)
Definition: init.c:565

◆ MFDRV_ScaleWindowExtEx()

BOOL MFDRV_ScaleWindowExtEx ( PHYSDEV  dev,
INT  xNum,
INT  xDenom,
INT  yNum,
INT  yDenom,
SIZE size 
)

Definition at line 128 of file dc.c.

129 {
130  return MFDRV_MetaParam4( dev, META_SCALEWINDOWEXT, xNum, xDenom, yNum, yDenom );
131 }
#define META_SCALEWINDOWEXT
Definition: wingdi.h:225
BOOL MFDRV_MetaParam4(PHYSDEV dev, short func, short param1, short param2, short param3, short param4)
Definition: init.c:565

◆ MFDRV_SelectBitmap()

HBITMAP MFDRV_SelectBitmap ( PHYSDEV  dev,
HBITMAP  handle 
)

Definition at line 140 of file objects.c.

141 {
142  return 0;
143 }

◆ MFDRV_SelectBrush()

HBRUSH MFDRV_SelectBrush ( PHYSDEV  dev,
HBRUSH  hbrush,
const struct brush_pattern pattern 
)

Definition at line 236 of file objects.c.

237 {
238  INT16 index;
239 
241  if( index < 0 )
242  {
244  if( index < 0 )
245  return 0;
247  }
248  return MFDRV_SelectObject( dev, index ) ? hbrush : 0;
249 }
static HBRUSH hbrush
static BOOL MFDRV_SelectObject(PHYSDEV dev, INT16 index)
Definition: objects.c:125
GLuint index
Definition: glext.h:6031
INT16 MFDRV_CreateBrushIndirect(PHYSDEV dev, HBRUSH hBrush)
Definition: objects.c:149
#define index(s, c)
Definition: various.h:29
static INT16 MFDRV_FindObject(PHYSDEV dev, HGDIOBJ obj)
Definition: objects.c:81
void GDI_hdc_using_object(HGDIOBJ obj, HDC hdc) DECLSPEC_HIDDEN
Definition: rosglue.c:415
signed short INT16

◆ MFDRV_SelectClipPath()

BOOL MFDRV_SelectClipPath ( PHYSDEV  dev,
INT  iMode 
)

Definition at line 178 of file dc.c.

179 {
180  return FALSE;
181 }

◆ MFDRV_SelectFont()

HFONT MFDRV_SelectFont ( PHYSDEV  dev,
HFONT  handle,
UINT aa_flags 
)

Definition at line 292 of file objects.c.

293 {
294  LOGFONTW font;
295  INT16 index;
296 
297  *aa_flags = GGO_BITMAP; /* no point in anti-aliasing on metafiles */
299  if( index < 0 )
300  {
301  if (!GetObjectW( hfont, sizeof(font), &font ))
302  return 0;
304  if( index < 0 )
305  return 0;
307  }
308  return MFDRV_SelectObject( dev, index ) ? hfont : 0;
309 }
Definition: mk_font.cpp:20
#define GGO_BITMAP
Definition: wingdi.h:848
static BOOL MFDRV_SelectObject(PHYSDEV dev, INT16 index)
Definition: objects.c:125
GLuint index
Definition: glext.h:6031
static HFONT hfont
static UINT16 MFDRV_CreateFontIndirect(PHYSDEV dev, HFONT hFont, LOGFONTW *logfont)
Definition: objects.c:255
#define index(s, c)
Definition: various.h:29
static INT16 MFDRV_FindObject(PHYSDEV dev, HGDIOBJ obj)
Definition: objects.c:81
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
void GDI_hdc_using_object(HGDIOBJ obj, HDC hdc) DECLSPEC_HIDDEN
Definition: rosglue.c:415
signed short INT16

◆ MFDRV_SelectPalette()

HPALETTE MFDRV_SelectPalette ( PHYSDEV  dev,
HPALETTE  hPalette,
BOOL  bForceBackground 
)

Definition at line 413 of file objects.c.

414 {
415 #define PALVERSION 0x0300
416 
417  PLOGPALETTE logPalette;
418  WORD wNumEntries = 0;
419  BOOL creationSucceed;
420  int sizeofPalette;
421 
422  GetObjectA(hPalette, sizeof(WORD), &wNumEntries);
423 
424  if (wNumEntries == 0) return 0;
425 
426  sizeofPalette = sizeof(LOGPALETTE) + ((wNumEntries-1) * sizeof(PALETTEENTRY));
427  logPalette = HeapAlloc( GetProcessHeap(), 0, sizeofPalette );
428 
429  if (logPalette == NULL) return 0;
430 
431  logPalette->palVersion = PALVERSION;
432  logPalette->palNumEntries = wNumEntries;
433 
434  GetPaletteEntries(hPalette, 0, wNumEntries, logPalette->palPalEntry);
435 
436  creationSucceed = MFDRV_CreatePalette( dev, hPalette, logPalette, sizeofPalette );
437 
438  HeapFree( GetProcessHeap(), 0, logPalette );
439 
440  if (creationSucceed)
441  return hPalette;
442 
443  return 0;
444 }
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
UINT WINAPI GetPaletteEntries(HPALETTE hpal, UINT iStartIndex, UINT cEntries, LPPALETTEENTRY ppe)
Definition: palette.c:64
WORD palVersion
Definition: wingdi.h:1828
unsigned int BOOL
Definition: ntddk_ex.h:94
#define PALVERSION
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned short WORD
Definition: ntddk_ex.h:93
static BOOL MFDRV_CreatePalette(PHYSDEV dev, HPALETTE hPalette, LOGPALETTE *logPalette, int sizeofPalette)
Definition: objects.c:380
struct tagLOGPALETTE LOGPALETTE
struct tagPALETTEENTRY PALETTEENTRY
WORD palNumEntries
Definition: wingdi.h:1829
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ MFDRV_SelectPen()

HPEN MFDRV_SelectPen ( PHYSDEV  dev,
HPEN  handle,
const struct brush_pattern pattern 
)

Definition at line 331 of file objects.c.

332 {
333  LOGPEN16 logpen;
334  INT16 index;
335 
337  if( index < 0 )
338  {
339  /* must be an extended pen */
340  INT size = GetObjectW( hpen, 0, NULL );
341 
342  if (!size) return 0;
343 
344  if (size == sizeof(LOGPEN))
345  {
346  LOGPEN pen;
347 
348  GetObjectW( hpen, sizeof(pen), &pen );
349  logpen.lopnStyle = pen.lopnStyle;
350  logpen.lopnWidth.x = pen.lopnWidth.x;
351  logpen.lopnWidth.y = pen.lopnWidth.y;
352  logpen.lopnColor = pen.lopnColor;
353  }
354  else /* must be an extended pen */
355  {
356  EXTLOGPEN *elp = HeapAlloc( GetProcessHeap(), 0, size );
357 
358  GetObjectW( hpen, size, elp );
359  /* FIXME: add support for user style pens */
360  logpen.lopnStyle = elp->elpPenStyle;
361  logpen.lopnWidth.x = elp->elpWidth;
362  logpen.lopnWidth.y = 0;
363  logpen.lopnColor = elp->elpColor;
364 
365  HeapFree( GetProcessHeap(), 0, elp );
366  }
367 
368  index = MFDRV_CreatePenIndirect( dev, hpen, &logpen );
369  if( index < 0 )
370  return 0;
372  }
373  return MFDRV_SelectObject( dev, index ) ? hpen : 0;
374 }
COLORREF elpColor
Definition: wingdi.h:1940
long y
Definition: polytest.cpp:48
DWORD elpWidth
Definition: wingdi.h:1938
long x
Definition: polytest.cpp:48
UINT16 lopnStyle
Definition: wingdi16.h:65
POINT lopnWidth
Definition: wingdi.h:1841
INT16 x
Definition: windef16.h:135
static HPEN hpen
int32_t INT
Definition: typedefs.h:56
DWORD elpPenStyle
Definition: wingdi.h:1937
UINT lopnStyle
Definition: wingdi.h:1840
static BOOL MFDRV_SelectObject(PHYSDEV dev, INT16 index)
Definition: objects.c:125
COLORREF lopnColor
Definition: wingdi.h:1842
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
INT16 y
Definition: windef16.h:136
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define index(s, c)
Definition: various.h:29
static INT16 MFDRV_FindObject(PHYSDEV dev, HGDIOBJ obj)
Definition: objects.c:81
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
void GDI_hdc_using_object(HGDIOBJ obj, HDC hdc) DECLSPEC_HIDDEN
Definition: rosglue.c:415
static UINT16 MFDRV_CreatePenIndirect(PHYSDEV dev, HPEN hPen, LOGPEN16 *logpen)
Definition: objects.c:314
COLORREF lopnColor
Definition: wingdi16.h:67
POINT16 lopnWidth
Definition: wingdi16.h:66
#define HeapFree(x, y, z)
Definition: compat.h:394
signed short INT16

◆ MFDRV_SetBkColor()

COLORREF MFDRV_SetBkColor ( PHYSDEV  dev,
COLORREF  color 
)

Definition at line 43 of file dc.c.

44 {
46 }
#define CLR_INVALID
Definition: wingdi.h:882
GLuint color
Definition: glext.h:6243
BOOL MFDRV_MetaParam2(PHYSDEV dev, short func, short param1, short param2)
Definition: init.c:547
#define META_SETBKCOLOR
Definition: wingdi.h:210
#define HIWORD(l)
Definition: typedefs.h:246
#define LOWORD(l)
Definition: pedump.c:82

◆ MFDRV_SetBkMode()

INT MFDRV_SetBkMode ( PHYSDEV  dev,
INT  mode 
)

Definition at line 38 of file dc.c.

39 {
40  return MFDRV_MetaParam1( dev, META_SETBKMODE, (WORD)mode) ? mode : 0;
41 }
#define META_SETBKMODE
Definition: wingdi.h:211
BOOL MFDRV_MetaParam1(PHYSDEV dev, short func, short param1)
Definition: init.c:531
unsigned short WORD
Definition: ntddk_ex.h:93
GLenum mode
Definition: glext.h:6217

◆ MFDRV_SetDCBrushColor()

COLORREF MFDRV_SetDCBrushColor ( PHYSDEV  dev,
COLORREF  color 
)

Definition at line 198 of file dc.c.

199 {
200  return CLR_INVALID;
201 }
#define CLR_INVALID
Definition: wingdi.h:882

◆ MFDRV_SetDCPenColor()

COLORREF MFDRV_SetDCPenColor ( PHYSDEV  dev,
COLORREF  color 
)

Definition at line 203 of file dc.c.

204 {
205  return CLR_INVALID;
206 }
#define CLR_INVALID
Definition: wingdi.h:882

◆ MFDRV_SetDIBitsToDevice()

INT MFDRV_SetDIBitsToDevice ( PHYSDEV  dev,
INT  xDest,
INT  yDest,
DWORD  cx,
DWORD  cy,
INT  xSrc,
INT  ySrc,
UINT  startscan,
UINT  lines,
LPCVOID  bits,
BITMAPINFO info,
UINT  coloruse 
)

Definition at line 166 of file bitblt.c.

170 {
171  DWORD infosize = get_dib_info_size(info, coloruse);
172  DWORD len = sizeof(METARECORD) + 8 * sizeof(WORD) + infosize + info->bmiHeader.biSizeImage;
173  METARECORD *mr = HeapAlloc( GetProcessHeap(), 0, len );
174  if(!mr) return 0;
175 
176  mr->rdSize = len / 2;
178  mr->rdParm[0] = coloruse;
179  mr->rdParm[1] = lines;
180  mr->rdParm[2] = startscan;
181  mr->rdParm[3] = (INT16)ySrc;
182  mr->rdParm[4] = (INT16)xSrc;
183  mr->rdParm[5] = (INT16)cy;
184  mr->rdParm[6] = (INT16)cx;
185  mr->rdParm[7] = (INT16)yDst;
186  mr->rdParm[8] = (INT16)xDst;
187  memcpy(mr->rdParm + 9, info, infosize);
188  memcpy(mr->rdParm + 9 + infosize / 2, bits, info->bmiHeader.biSizeImage);
189  MFDRV_WriteRecord( dev, mr, mr->rdSize * 2 );
190  HeapFree( GetProcessHeap(), 0, mr );
191  return lines;
192 }
WORD rdFunction
Definition: wingdi.h:2341
struct tagMETARECORD METARECORD
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
DWORD rdSize
Definition: wingdi.h:2340
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
eMaj lines
Definition: tritemp.h:206
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
#define META_SETDIBTODEV
Definition: wingdi.h:259
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
WORD rdParm[1]
Definition: wingdi.h:2342
_Out_opt_ int * cx
Definition: commctrl.h:570
static int get_dib_info_size(const BITMAPINFO *info, UINT coloruse)
Definition: gdi_private.h:180
BOOL MFDRV_WriteRecord(PHYSDEV dev, METARECORD *mr, DWORD rlen)
Definition: init.c:474
#define HeapFree(x, y, z)
Definition: compat.h:394
signed short INT16

◆ MFDRV_SetMapMode()

INT MFDRV_SetMapMode ( PHYSDEV  dev,
INT  mode 
)

Definition at line 88 of file dc.c.

89 {
91 }
BOOL MFDRV_MetaParam1(PHYSDEV dev, short func, short param1)
Definition: init.c:531
GLenum mode
Definition: glext.h:6217
#define META_SETMAPMODE
Definition: wingdi.h:212

◆ MFDRV_SetMapperFlags()

DWORD MFDRV_SetMapperFlags ( PHYSDEV  dev,
DWORD  flags 
)

Definition at line 143 of file dc.c.

144 {
146 }
#define META_SETMAPPERFLAGS
Definition: wingdi.h:257
GLbitfield flags
Definition: glext.h:7161
BOOL MFDRV_MetaParam2(PHYSDEV dev, short func, short param1, short param2)
Definition: init.c:547
#define HIWORD(l)
Definition: typedefs.h:246
#define GDI_ERROR
Definition: wingdi.h:1308
#define LOWORD(l)
Definition: pedump.c:82

◆ MFDRV_SetPixel()

COLORREF MFDRV_SetPixel ( PHYSDEV  dev,
INT  x,
INT  y,
COLORREF  color 
)

Definition at line 111 of file graphics.c.

112 {
114  LOWORD(color));
115 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint color
Definition: glext.h:6243
#define META_SETPIXEL
Definition: wingdi.h:240
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define HIWORD(l)
Definition: typedefs.h:246
BOOL MFDRV_MetaParam4(PHYSDEV dev, short func, short param1, short param2, short param3, short param4)
Definition: init.c:565
#define LOWORD(l)
Definition: pedump.c:82

◆ MFDRV_SetPolyFillMode()

INT MFDRV_SetPolyFillMode ( PHYSDEV  dev,
INT  mode 
)

Definition at line 63 of file dc.c.

64 {
66 }
#define META_SETPOLYFILLMODE
Definition: wingdi.h:215
BOOL MFDRV_MetaParam1(PHYSDEV dev, short func, short param1)
Definition: init.c:531
unsigned short WORD
Definition: ntddk_ex.h:93
GLenum mode
Definition: glext.h:6217

◆ MFDRV_SetRelAbs()

INT MFDRV_SetRelAbs ( PHYSDEV  dev,
INT  mode 
)

Definition at line 58 of file dc.c.

59 {
60  return MFDRV_MetaParam1( dev, META_SETRELABS, (WORD)mode) ? mode : 0;
61 }
BOOL MFDRV_MetaParam1(PHYSDEV dev, short func, short param1)
Definition: init.c:531
unsigned short WORD
Definition: ntddk_ex.h:93
#define META_SETRELABS
Definition: wingdi.h:214
GLenum mode
Definition: glext.h:6217

◆ MFDRV_SetROP2()

INT MFDRV_SetROP2 ( PHYSDEV  dev,
INT  rop 
)

Definition at line 53 of file dc.c.

54 {
55  return MFDRV_MetaParam1( dev, META_SETROP2, (WORD)rop) ? rop : 0;
56 }
#define META_SETROP2
Definition: wingdi.h:213
BOOL MFDRV_MetaParam1(PHYSDEV dev, short func, short param1)
Definition: init.c:531
static int rop(int rop, int src, int dst)
Definition: nanoxwin.c:124
unsigned short WORD
Definition: ntddk_ex.h:93

◆ MFDRV_SetStretchBltMode()

INT MFDRV_SetStretchBltMode ( PHYSDEV  dev,
INT  mode 
)

Definition at line 68 of file dc.c.

69 {
71 }
#define META_SETSTRETCHBLTMODE
Definition: wingdi.h:216
BOOL MFDRV_MetaParam1(PHYSDEV dev, short func, short param1)
Definition: init.c:531
unsigned short WORD
Definition: ntddk_ex.h:93
GLenum mode
Definition: glext.h:6217

◆ MFDRV_SetTextAlign()

UINT MFDRV_SetTextAlign ( PHYSDEV  dev,
UINT  align 
)

Definition at line 33 of file dc.c.

34 {
36 }
int align(int length, int align)
Definition: dsound8.c:36
#define META_SETTEXTALIGN
Definition: wingdi.h:255
BOOL MFDRV_MetaParam2(PHYSDEV dev, short func, short param1, short param2)
Definition: init.c:547
#define HIWORD(l)
Definition: typedefs.h:246
#define GDI_ERROR
Definition: wingdi.h:1308
#define LOWORD(l)
Definition: pedump.c:82

◆ MFDRV_SetTextCharacterExtra()

INT MFDRV_SetTextCharacterExtra ( PHYSDEV  dev,
INT  extra 
)

Definition at line 138 of file dc.c.

139 {
140  return MFDRV_MetaParam1( dev, META_SETTEXTCHAREXTRA, extra ) ? extra : 0x80000000;
141 }
#define META_SETTEXTCHAREXTRA
Definition: wingdi.h:217
BOOL MFDRV_MetaParam1(PHYSDEV dev, short func, short param1)
Definition: init.c:531
Definition: id3.c:18

◆ MFDRV_SetTextColor()

COLORREF MFDRV_SetTextColor ( PHYSDEV  dev,
COLORREF  color 
)

Definition at line 48 of file dc.c.

49 {
51 }
#define CLR_INVALID
Definition: wingdi.h:882
GLuint color
Definition: glext.h:6243
#define META_SETTEXTCOLOR
Definition: wingdi.h:218
BOOL MFDRV_MetaParam2(PHYSDEV dev, short func, short param1, short param2)
Definition: init.c:547
#define HIWORD(l)
Definition: typedefs.h:246
#define LOWORD(l)
Definition: pedump.c:82

◆ MFDRV_SetTextJustification()

BOOL MFDRV_SetTextJustification ( PHYSDEV  dev,
INT  extra,
INT  breaks 
)

Definition at line 133 of file dc.c.

134 {
136 }
Definition: id3.c:18
#define META_SETTEXTJUSTIFICATION
Definition: wingdi.h:219
BOOL MFDRV_MetaParam2(PHYSDEV dev, short func, short param1, short param2)
Definition: init.c:547

◆ MFDRV_SetViewportExtEx()

BOOL MFDRV_SetViewportExtEx ( PHYSDEV  dev,
INT  x,
INT  y,
SIZE size 
)

Definition at line 93 of file dc.c.

94 {
96 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define META_SETVIEWPORTEXT
Definition: wingdi.h:223
BOOL MFDRV_MetaParam2(PHYSDEV dev, short func, short param1, short param2)
Definition: init.c:547
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ MFDRV_SetViewportOrgEx()

BOOL MFDRV_SetViewportOrgEx ( PHYSDEV  dev,
INT  x,
INT  y,
POINT pt 
)

Definition at line 98 of file dc.c.

99 {
101 }
#define META_SETVIEWPORTORG
Definition: wingdi.h:222
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
BOOL MFDRV_MetaParam2(PHYSDEV dev, short func, short param1, short param2)
Definition: init.c:547
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ MFDRV_SetWindowExtEx()

BOOL MFDRV_SetWindowExtEx ( PHYSDEV  dev,
INT  x,
INT  y,
SIZE size 
)

Definition at line 103 of file dc.c.

104 {
106 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
BOOL MFDRV_MetaParam2(PHYSDEV dev, short func, short param1, short param2)
Definition: init.c:547
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define META_SETWINDOWEXT
Definition: wingdi.h:221

◆ MFDRV_SetWindowOrgEx()

BOOL MFDRV_SetWindowOrgEx ( PHYSDEV  dev,
INT  x,
INT  y,
POINT pt 
)

Definition at line 108 of file dc.c.

109 {
111 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define META_SETWINDOWORG
Definition: wingdi.h:220
BOOL MFDRV_MetaParam2(PHYSDEV dev, short func, short param1, short param2)
Definition: init.c:547
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ MFDRV_StretchBlt()

BOOL MFDRV_StretchBlt ( PHYSDEV  devDst,
struct bitblt_coords dst,
PHYSDEV  devSrc,
struct bitblt_coords src,
DWORD  rop 
)

Definition at line 47 of file bitblt.c.

49 {
50  BOOL ret;
51  DWORD len;
52  METARECORD *mr;
53  BITMAP BM;
54 #ifdef STRETCH_VIA_DIB
55  LPBITMAPINFOHEADER lpBMI;
56  WORD nBPP;
57 #endif
59 
60  if (devSrc->funcs == devDst->funcs) return FALSE; /* can't use a metafile DC as source */
61 
62  if (GetObjectW(hBitmap, sizeof(BITMAP), &BM) != sizeof(BITMAP))
63  {
64  WARN("bad bitmap object %p passed for hdc %p\n", hBitmap, devSrc->hdc);
65  return FALSE;
66  }
67 #ifdef STRETCH_VIA_DIB
68  nBPP = BM.bmPlanes * BM.bmBitsPixel;
69  if(nBPP > 8) nBPP = 24; /* FIXME Can't get 16bpp to work for some reason */
70  len = sizeof(METARECORD) + 10 * sizeof(INT16)
71  + sizeof(BITMAPINFOHEADER) + (nBPP <= 8 ? 1 << nBPP: 0) * sizeof(RGBQUAD)
72  + get_dib_stride( BM.bmWidth, nBPP ) * BM.bmHeight;
73  if (!(mr = HeapAlloc( GetProcessHeap(), 0, len)))
74  return FALSE;
76  lpBMI=(LPBITMAPINFOHEADER)(mr->rdParm+10);
77  lpBMI->biSize = sizeof(BITMAPINFOHEADER);
78  lpBMI->biWidth = BM.bmWidth;
79  lpBMI->biHeight = BM.bmHeight;
80  lpBMI->biPlanes = 1;
81  lpBMI->biBitCount = nBPP;
82  lpBMI->biSizeImage = get_dib_image_size( (BITMAPINFO *)lpBMI );
83  lpBMI->biClrUsed = nBPP <= 8 ? 1 << nBPP : 0;
84  lpBMI->biCompression = BI_RGB;
85  lpBMI->biXPelsPerMeter = MulDiv(GetDeviceCaps(devSrc->hdc,LOGPIXELSX),3937,100);
86  lpBMI->biYPelsPerMeter = MulDiv(GetDeviceCaps(devSrc->hdc,LOGPIXELSY),3937,100);
87  lpBMI->biClrImportant = 0; /* 1 meter = 39.37 inch */
88 
89  TRACE("MF_StretchBltViaDIB->len = %d rop=%x PixYPM=%d Caps=%d\n",
91 
92  if (GetDIBits(devSrc->hdc, hBitmap, 0, (UINT)lpBMI->biHeight,
93  (LPSTR)lpBMI + get_dib_info_size( (BITMAPINFO *)lpBMI, DIB_RGB_COLORS ),
95 #else
96  len = sizeof(METARECORD) + 15 * sizeof(INT16) + BM.bmWidthBytes * BM.bmHeight;
97  if (!(mr = HeapAlloc( GetProcessHeap(), 0, len )))
98  return FALSE;
100  *(mr->rdParm +10) = BM.bmWidth;
101  *(mr->rdParm +11) = BM.bmHeight;
102  *(mr->rdParm +12) = BM.bmWidthBytes;
103  *(mr->rdParm +13) = BM.bmPlanes;
104  *(mr->rdParm +14) = BM.bmBitsPixel;
105  TRACE("len = %ld rop=%lx\n", len, rop);
106  if (GetBitmapBits( hBitmap, BM.bmWidthBytes * BM.bmHeight, mr->rdParm + 15))
107 #endif
108  {
109  mr->rdSize = len / sizeof(INT16);
110  *(mr->rdParm) = LOWORD(rop);
111  *(mr->rdParm + 1) = HIWORD(rop);
112  *(mr->rdParm + 2) = src->log_height;
113  *(mr->rdParm + 3) = src->log_width;
114  *(mr->rdParm + 4) = src->log_y;
115  *(mr->rdParm + 5) = src->log_x;
116  *(mr->rdParm + 6) = dst->log_height;
117  *(mr->rdParm + 7) = dst->log_width;
118  *(mr->rdParm + 8) = dst->log_y;
119  *(mr->rdParm + 9) = dst->log_x;
120  ret = MFDRV_WriteRecord( devDst, mr, mr->rdSize * 2);
121  }
122  else
123  ret = FALSE;
124  HeapFree( GetProcessHeap(), 0, mr);
125  return ret;
126 }
#define LOGPIXELSX
Definition: wingdi.h:717
DWORD biClrImportant
Definition: amvideo.idl:40
LONG biXPelsPerMeter
Definition: amvideo.idl:37
struct tagBITMAPINFOHEADER BITMAPINFOHEADER
#define WARN(fmt,...)
Definition: debug.h:111
WORD rdFunction
Definition: wingdi.h:2341
char * LPSTR
Definition: xmlstorage.h:182
struct tagMETARECORD METARECORD
LONG biYPelsPerMeter
Definition: amvideo.idl:38
DWORD rdSize
Definition: wingdi.h:2340
static int get_dib_image_size(const BITMAPINFO *info)
Definition: imagelist.c:203
unsigned int BOOL
Definition: ntddk_ex.h:94
static int get_dib_stride(int width, int bpp)
Definition: imagelist.c:198
static int rop(int rop, int src, int dst)
Definition: nanoxwin.c:124
DWORD biCompression
Definition: amvideo.idl:35
#define META_DIBSTRETCHBLT
Definition: wingdi.h:267
struct tagRGBQUAD RGBQUAD
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
struct BITMAPINFOHEADER * LPBITMAPINFOHEADER
LONG WINAPI GetBitmapBits(_In_ HBITMAP hbit, _In_ LONG cb, _Out_writes_bytes_(cb) LPVOID lpvBits)
#define META_STRETCHBLT
Definition: wingdi.h:244
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD biSizeImage
Definition: amvideo.idl:36
int ret
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
GLenum GLsizei len
Definition: glext.h:6722
GLenum src
Definition: glext.h:6340
WORD rdParm[1]
Definition: wingdi.h:2342
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
Definition: bl.h:1331
GLenum GLenum dst
Definition: glext.h:6340
unsigned int UINT
Definition: ndis.h:50
int WINAPI GetDIBits(_In_ HDC hdc, _In_ HBITMAP hbm, _In_ UINT start, _In_ UINT cLines, _Out_opt_ LPVOID lpvBits, _At_((LPBITMAPINFOHEADER) lpbmi, _Inout_) LPBITMAPINFO lpbmi, _In_ UINT usage)
static int get_dib_info_size(const BITMAPINFO *info, UINT coloruse)
Definition: gdi_private.h:180
#define HIWORD(l)
Definition: typedefs.h:246
BOOL MFDRV_WriteRecord(PHYSDEV dev, METARECORD *mr, DWORD rlen)
Definition: init.c:474
#define LOGPIXELSY
Definition: wingdi.h:718
static HBITMAP
Definition: button.c:44
const struct gdi_dc_funcs * funcs
Definition: gdi_driver.h:31
#define DIB_RGB_COLORS
Definition: wingdi.h:366
#define BI_RGB
Definition: precomp.h:34
static HBITMAP hBitmap
Definition: timezone.c:35
#define LOWORD(l)
Definition: pedump.c:82
#define OBJ_BITMAP
Definition: objidl.idl:1415
#define HeapFree(x, y, z)
Definition: compat.h:394
#define MulDiv(x, y, z)
Definition: gdifloat.h:86
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
Definition: dc.c:439
signed short INT16

Referenced by StretchDIBits().

◆ MFDRV_StretchDIBits()

INT MFDRV_StretchDIBits ( PHYSDEV  dev,
INT  xDst,
INT  yDst,
INT  widthDst,
INT  heightDst,
INT  xSrc,
INT  ySrc,
INT  widthSrc,
INT  heightSrc,
const void bits,
BITMAPINFO info,
UINT  wUsage,
DWORD  dwRop 
)

Definition at line 132 of file bitblt.c.

136 {
137  DWORD infosize = get_dib_info_size(info, wUsage);
138  DWORD len = sizeof(METARECORD) + 10 * sizeof(WORD) + infosize + info->bmiHeader.biSizeImage;
139  METARECORD *mr = HeapAlloc( GetProcessHeap(), 0, len );
140  if(!mr) return 0;
141 
142  mr->rdSize = len / 2;
144  mr->rdParm[0] = LOWORD(dwRop);
145  mr->rdParm[1] = HIWORD(dwRop);
146  mr->rdParm[2] = wUsage;
147  mr->rdParm[3] = (INT16)heightSrc;
148  mr->rdParm[4] = (INT16)widthSrc;
149  mr->rdParm[5] = (INT16)ySrc;
150  mr->rdParm[6] = (INT16)xSrc;
151  mr->rdParm[7] = (INT16)heightDst;
152  mr->rdParm[8] = (INT16)widthDst;
153  mr->rdParm[9] = (INT16)yDst;
154  mr->rdParm[10] = (INT16)xDst;
155  memcpy(mr->rdParm + 11, info, infosize);
156  memcpy(mr->rdParm + 11 + infosize / 2, bits, info->bmiHeader.biSizeImage);
157  MFDRV_WriteRecord( dev, mr, mr->rdSize * 2 );
158  HeapFree( GetProcessHeap(), 0, mr );
159  return heightSrc;
160 }
#define META_STRETCHDIB
Definition: wingdi.h:269
WORD rdFunction
Definition: wingdi.h:2341
struct tagMETARECORD METARECORD
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
DWORD rdSize
Definition: wingdi.h:2340
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
WORD rdParm[1]
Definition: wingdi.h:2342
static int get_dib_info_size(const BITMAPINFO *info, UINT coloruse)
Definition: gdi_private.h:180
#define HIWORD(l)
Definition: typedefs.h:246
BOOL MFDRV_WriteRecord(PHYSDEV dev, METARECORD *mr, DWORD rlen)
Definition: init.c:474
#define LOWORD(l)
Definition: pedump.c:82
#define HeapFree(x, y, z)
Definition: compat.h:394
signed short INT16

◆ MFDRV_StrokeAndFillPath()

BOOL MFDRV_StrokeAndFillPath ( PHYSDEV  dev)

Definition at line 183 of file dc.c.

184 {
185  return FALSE;
186 }

◆ MFDRV_StrokePath()

BOOL MFDRV_StrokePath ( PHYSDEV  dev)

Definition at line 188 of file dc.c.

189 {
190  return FALSE;
191 }

◆ MFDRV_WidenPath()

BOOL MFDRV_WidenPath ( PHYSDEV  dev)

Definition at line 193 of file dc.c.

194 {
195  return FALSE;
196 }

◆ MFDRV_WriteRecord()

BOOL MFDRV_WriteRecord ( PHYSDEV  dev,
METARECORD mr,
DWORD  rlen 
)

Definition at line 474 of file init.c.

475 {
476  DWORD len, size;
477  METAHEADER *mh;
479 
480  switch(physDev->mh->mtType)
481  {
482  case METAFILE_MEMORY:
483  len = physDev->mh->mtSize * 2 + rlen;
484  /* reallocate memory if needed */
485  size = HeapSize( GetProcessHeap(), 0, physDev->mh );
486  if (len > size)
487  {
488  /*expand size*/
489  size += size / 2 + rlen;
490  mh = HeapReAlloc( GetProcessHeap(), 0, physDev->mh, size);
491  if (!mh) return FALSE;
492  physDev->mh = mh;
493  TRACE("Reallocated metafile: new size is %d\n",size);
494  }
495  memcpy((WORD *)physDev->mh + physDev->mh->mtSize, mr, rlen);
496  break;
497  case METAFILE_DISK:
498  TRACE("Writing record to disk\n");
499  if (!WriteFile(physDev->hFile, mr, rlen, NULL, NULL))
500  return FALSE;
501  break;
502  default:
503  ERR("Unknown metafile type %d\n", physDev->mh->mtType );
504  return FALSE;
505  }
506 
507  physDev->mh->mtSize += rlen / 2;
508  physDev->mh->mtMaxRecord = max(physDev->mh->mtMaxRecord, rlen / 2);
509  return TRUE;
510 }
#define METAFILE_DISK
Definition: gdi32p.h:77
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
#define max(a, b)
Definition: svc.c:63
#define TRUE
Definition: types.h:120
DWORD mtSize
Definition: wingdi.h:2308
SIZE_T WINAPI HeapSize(HANDLE, DWORD, LPCVOID)
WORD mtType
Definition: wingdi.h:2305
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
DWORD mtMaxRecord
Definition: wingdi.h:2310
#define ERR(fmt,...)
Definition: debug.h:109
#define HeapReAlloc
Definition: compat.h:393
METAHEADER * mh
Definition: metafiledrv.h:36
#define METAFILE_MEMORY
Definition: gdi32p.h:76

Referenced by MFDRV_CreateBrushIndirect(), MFDRV_CreateFontIndirect(), MFDRV_CreatePalette(), MFDRV_CreatePenIndirect(), MFDRV_CreateRegion(), MFDRV_DeleteObject(), MFDRV_ExtEscape(), MFDRV_MetaExtTextOut(), MFDRV_MetaParam0(), MFDRV_MetaParam1(), MFDRV_MetaParam2(), MFDRV_MetaParam4(), MFDRV_MetaParam6(), MFDRV_MetaParam8(), MFDRV_MetaPoly(), MFDRV_PolyPolygon(), MFDRV_RealizePalette(), MFDRV_SelectObject(), MFDRV_SetDIBitsToDevice(), MFDRV_StretchBlt(), and MFDRV_StretchDIBits().