Changeset 6682 for trunk/include
- Timestamp:
- Sep 9, 2001, 2:23:31 PM (24 years ago)
- Location:
- trunk/include/win
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/win/gdi.h
r1007 r6682 1 /* $Id: gdi.h,v 1. 2 1999-09-22 09:46:18sandervl Exp $ */1 /* $Id: gdi.h,v 1.3 2001-09-09 12:23:31 sandervl Exp $ */ 2 2 3 3 /* … … 159 159 } DC; 160 160 161 /* Device functions for the Wine driver interface */162 163 typedef INT (*DEVICEFONTENUMPROC)(LPENUMLOGFONT16,LPNEWTEXTMETRIC16,UINT16,LPARAM);164 165 typedef struct tagDC_FUNCS166 {167 BOOL (*pArc)(DC*,INT,INT,INT,INT,INT,INT,INT,INT);168 BOOL (*pBitBlt)(DC*,INT,INT,INT,INT,DC*,INT,INT,DWORD);169 LONG (*pBitmapBits)(HBITMAP,void*,LONG,WORD);170 BOOL (*pChord)(DC*,INT,INT,INT,INT,INT,INT,INT,INT);171 BOOL (*pCreateBitmap)(HBITMAP);172 BOOL (*pCreateDC)(DC*,LPCSTR,LPCSTR,LPCSTR,const DEVMODE16*);173 BOOL (*pDeleteDC)(DC*);174 HBITMAP (*pCreateDIBSection)(DC *,BITMAPINFO *,UINT,LPVOID *,HANDLE,175 DWORD);176 HBITMAP16 (*pCreateDIBSection16)(DC *,BITMAPINFO *,UINT16,SEGPTR *,HANDLE,177 DWORD);178 BOOL (*pDeleteObject)(HGDIOBJ);179 BOOL (*pEllipse)(DC*,INT,INT,INT,INT);180 BOOL (*pEnumDeviceFonts)(DC*,LPLOGFONT16,DEVICEFONTENUMPROC,LPARAM);181 INT (*pEscape)(DC*,INT,INT,SEGPTR,SEGPTR);182 INT (*pExcludeClipRect)(DC*,INT,INT,INT,INT);183 BOOL (*pExtFloodFill)(DC*,INT,INT,COLORREF,UINT);184 BOOL (*pExtTextOut)(DC*,INT,INT,UINT,const RECT*,LPCSTR,UINT,185 const INT*);186 BOOL (*pFillRgn)(DC*,HRGN,HBRUSH);187 BOOL (*pFrameRgn)(DC*,HRGN,HBRUSH,INT,INT);188 BOOL (*pGetCharWidth)(DC*,UINT,UINT,LPINT);189 COLORREF (*pGetPixel)(DC*,INT,INT);190 BOOL (*pGetTextExtentPoint)(DC*,LPCSTR,INT,LPSIZE);191 BOOL (*pGetTextMetrics)(DC*,TEXTMETRICA*);192 INT (*pIntersectClipRect)(DC*,INT,INT,INT,INT);193 BOOL (*pInvertRgn)(DC*,HRGN);194 BOOL (*pLineTo)(DC*,INT,INT);195 HANDLE (*pLoadOEMResource)(WORD,WORD);196 BOOL (*pMoveToEx)(DC*,INT,INT,LPPOINT);197 INT (*pOffsetClipRgn)(DC*,INT,INT);198 BOOL (*pOffsetViewportOrg)(DC*,INT,INT);199 BOOL (*pOffsetWindowOrg)(DC*,INT,INT);200 BOOL (*pPaintRgn)(DC*,HRGN);201 BOOL (*pPatBlt)(DC*,INT,INT,INT,INT,DWORD);202 BOOL (*pPie)(DC*,INT,INT,INT,INT,INT,INT,INT,INT);203 BOOL (*pPolyPolygon)(DC*,const POINT*,const INT*,UINT);204 BOOL (*pPolyPolyline)(DC*,const POINT*,const DWORD*,DWORD);205 BOOL (*pPolygon)(DC*,const POINT*,INT);206 BOOL (*pPolyline)(DC*,const POINT*,INT);207 BOOL (*pPolyBezier)(DC*,POINT, const POINT*,DWORD);208 UINT (*pRealizePalette)(DC*);209 BOOL (*pRectangle)(DC*,INT,INT,INT,INT);210 BOOL (*pRestoreDC)(DC*,INT);211 BOOL (*pRoundRect)(DC*,INT,INT,INT,INT,INT,INT);212 INT (*pSaveDC)(DC*);213 BOOL (*pScaleViewportExt)(DC*,INT,INT,INT,INT);214 BOOL (*pScaleWindowExt)(DC*,INT,INT,INT,INT);215 INT (*pSelectClipRgn)(DC*,HRGN);216 HANDLE (*pSelectObject)(DC*,HANDLE);217 HPALETTE (*pSelectPalette)(DC*,HPALETTE,BOOL);218 COLORREF (*pSetBkColor)(DC*,COLORREF);219 INT (*pSetBkMode)(DC*,INT);220 VOID (*pSetDeviceClipping)(DC*);221 INT (*pSetDIBitsToDevice)(DC*,INT,INT,DWORD,DWORD,INT,INT,UINT,UINT,222 LPCVOID,const BITMAPINFO*,UINT);223 INT (*pSetMapMode)(DC*,INT);224 DWORD (*pSetMapperFlags)(DC*,DWORD);225 COLORREF (*pSetPixel)(DC*,INT,INT,COLORREF);226 INT (*pSetPolyFillMode)(DC*,INT);227 INT (*pSetROP2)(DC*,INT);228 INT (*pSetRelAbs)(DC*,INT);229 INT (*pSetStretchBltMode)(DC*,INT);230 UINT (*pSetTextAlign)(DC*,UINT);231 INT (*pSetTextCharacterExtra)(DC*,INT);232 DWORD (*pSetTextColor)(DC*,DWORD);233 INT (*pSetTextJustification)(DC*,INT,INT);234 BOOL (*pSetViewportExt)(DC*,INT,INT);235 BOOL (*pSetViewportOrg)(DC*,INT,INT);236 BOOL (*pSetWindowExt)(DC*,INT,INT);237 BOOL (*pSetWindowOrg)(DC*,INT,INT);238 BOOL (*pStretchBlt)(DC*,INT,INT,INT,INT,DC*,INT,INT,INT,INT,DWORD);239 INT (*pStretchDIBits)(DC*,INT,INT,INT,INT,INT,INT,INT,INT,240 const void *,const BITMAPINFO *,UINT,DWORD);241 } DC_FUNCTIONS;242 161 243 162 /* LoadOEMResource types */ … … 301 220 } FLOAT_POINT; 302 221 303 /* Rounds a floating point number to integer. The world-to-viewport304 * transformation process is done in floating point internally. This function305 * is then used to round these coordinates to integer values.306 */307 static __inline__ INT WINE_UNUSED GDI_ROUND(FLOAT val)308 {309 return (int)floor(val + 0.5);310 }311 312 /* Performs a viewport-to-world transformation on the specified point (which313 * is in floating point format). Returns TRUE if successful, else FALSE.314 */315 static __inline__ BOOL WINE_UNUSED INTERNAL_DPTOLP_FLOAT(DC *dc, FLOAT_POINT *point)316 {317 FLOAT x, y;318 319 /* Check that the viewport-to-world transformation is valid */320 if (!dc->w.vport2WorldValid)321 return FALSE;322 323 /* Perform the transformation */324 x = point->x;325 y = point->y;326 point->x = x * dc->w.xformVport2World.eM11 +327 y * dc->w.xformVport2World.eM21 +328 dc->w.xformVport2World.eDx;329 point->y = x * dc->w.xformVport2World.eM12 +330 y * dc->w.xformVport2World.eM22 +331 dc->w.xformVport2World.eDy;332 333 return TRUE;334 }335 336 /* Performs a viewport-to-world transformation on the specified point (which337 * is in integer format). Returns TRUE if successful, else FALSE.338 */339 static __inline__ BOOL WINE_UNUSED INTERNAL_DPTOLP(DC *dc, LPPOINT point)340 {341 FLOAT_POINT floatPoint;342 343 /* Perform operation with floating point */344 floatPoint.x=(FLOAT)point->x;345 floatPoint.y=(FLOAT)point->y;346 if (!INTERNAL_DPTOLP_FLOAT(dc, &floatPoint))347 return FALSE;348 349 /* Round to integers */350 point->x = GDI_ROUND(floatPoint.x);351 point->y = GDI_ROUND(floatPoint.y);352 353 return TRUE;354 }355 356 /* Performs a world-to-viewport transformation on the specified point (which357 * is in floating point format).358 */359 static __inline__ void WINE_UNUSED INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point)360 {361 FLOAT x, y;362 363 /* Perform the transformation */364 x = point->x;365 y = point->y;366 point->x = x * dc->w.xformWorld2Vport.eM11 +367 y * dc->w.xformWorld2Vport.eM21 +368 dc->w.xformWorld2Vport.eDx;369 point->y = x * dc->w.xformWorld2Vport.eM12 +370 y * dc->w.xformWorld2Vport.eM22 +371 dc->w.xformWorld2Vport.eDy;372 }373 374 /* Performs a world-to-viewport transformation on the specified point (which375 * is in integer format).376 */377 static __inline__ void WINE_UNUSED INTERNAL_LPTODP(DC *dc, LPPOINT point)378 {379 FLOAT_POINT floatPoint;380 381 /* Perform operation with floating point */382 floatPoint.x=(FLOAT)point->x;383 floatPoint.y=(FLOAT)point->y;384 INTERNAL_LPTODP_FLOAT(dc, &floatPoint);385 386 /* Round to integers */387 point->x = GDI_ROUND(floatPoint.x);388 point->y = GDI_ROUND(floatPoint.y);389 }390 222 391 223 #define XDPTOLP(dc,x) \ … … 436 268 extern GDIOBJHDR * GDI_GetObjPtr( HGDIOBJ16, WORD ); 437 269 438 extern BOOL DRIVER_RegisterDriver( LPCSTR name, const DC_FUNCTIONS *funcs );439 extern const DC_FUNCTIONS *DRIVER_FindDriver( LPCSTR name );440 extern BOOL DRIVER_UnregisterDriver( LPCSTR name );441 270 442 271 #endif /* __WINE_GDI_H */ -
trunk/include/win/metafile.h
r4 r6682 1 /* $Id: metafile.h,v 1. 1 1999-05-24 20:19:14 ktkExp $ */1 /* $Id: metafile.h,v 1.2 2001-09-09 12:23:31 sandervl Exp $ */ 2 2 3 3 /* … … 20 20 } METAFILEOBJ; 21 21 22 #pragma pack(1)23 typedef struct {24 DWORD dw1, dw2, dw3;25 WORD w4;26 CHAR filename[0x100];27 } METAHEADERDISK;28 #pragma pack(4)29 30 #define MFHEADERSIZE (sizeof(METAHEADER))31 #define MFVERSION 0x30032 22 #define META_EOF 0x0000 33 23
Note:
See TracChangeset
for help on using the changeset viewer.