mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
44ed71f52f
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com> * [Make.rules.in] [Makefile.in] [documentation/Makefile.in] [documentation/README.documentation] First cut at Wine API documentation. No longer install reference manual by default. Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net> * [files/file.c] Fixed GetTempFileName16() to use current path of requested drive as needed. * [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec] [if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec] Added misc DLLs needed by various apps. Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no> * [if1632/gdi32.spec] [include/windows.h] [objects/palette.c] Inserted empty stub for CreateHalftonePalette. Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [windows/mdi.c] Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel(). * [graphics/metafiledrv/init.c] DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore fix cleanup of MetaDCs in CloseMetaFile(); they now actually get removed from the GDI heap! * [graphics/x11drv/xfont.c] Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce the number of bold-italic matches. Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk> * [graphics/painting.c] Included an implementation of DrawState * [if1632/thunk.c] Changed many fprintfs into dprintf_thunk * [include/cache.h] [graphics/cache.c] New files to hold cached handles to regulary used GDI object. * [include/windows.h] Added DRAWSTATExx typedefs Added DSS_DEFAULT define for DrawState * [objects/text.c] New implementation of GrayString() * [controls/uitools.c] Implemented DrawFrameControl() functions Changed DrawEdge() behaviour to win95 implementation Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de> * [graphics/path.c] [include/path.h] [graphics/painting.c] [if1632/gdi32.spec] [include/gdi.h] [include/windows.h] [objects/dc.c] Added preliminary support for GDI paths. * [objects/dc.c] Added DC_Init_DC_INFO function for initializing WIN_DC_INFO structure. * [include/windows.h] [include/gdi.h] [objects/gdiobj.c] Added DEFAULT_GUI_FONT. * [include/winerror.h] Added a few error codes. * [memory/heap.c] Changed HeapAlloc to make the correct calls to SetLastError (now conforms to NT's behaviour). * [windows/win.c] Changed WIN_CreateWindowEx to allow child windows with zero width / height. Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [if1632/*] [relay32/*] Moved all 32-bit relay stuff to relay32/ * [fi1632/thunk.c] [win32/kernel32.c] Moved all KERNEL32 ordinal functions to kernel32.c * [memory/selector.c] Initialize selectors in AllocSelectorArray. * [tools/build.c] Generate C instead of assembly for Win32 relays. Fixed stack corruption in CallTo16 functions, found by Bertho Stultiens. Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net> * [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec] Added built-in OLE2THK.DLL. * [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c] [misc/toolhelp.c] Added stubs for StackTraceFirst(), StackTraceCSIPFirst(), StackTraceNext(), UTSelectorOffsetToLinear() and UTLinearToSelectorOffset(). Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu> * [misc/winsock.c] 32-bit API fixes for reported problems (thanks to Marcus and David). * [graphics/x11drv/xfont.c] Little tweak in point size calculation. * [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c] [windows/winproc.c] [windows/win.c] Bug fixes. Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de> * [files/dos_fs.c] OpenFile with empty filename and OF_PARSE returns current dir. * [misc/commdlg.c] Ignore initial dir if bogus. * [files/file.c] Locking an identic region in a file must not be an error. * [misc/lstr.c] Use wide char ctype functions. Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> * [file/drive.c] First attempt for GetDiskFreeSpaceEx. Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [loader/pe_resource.c] Fixed wrongly appearing menus problem (only use default lookups in last resource subtree). * [multimedia/*.c] Added win32 support for time* and joy* lowlevel drivers, (not excessively tested), some misc fixes and cleanups. * [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c] [include/interfaces.h][include/shlobj.h] Added some more undocumented SHELL32 functions, some shell folder interface stubs added, SHGetMalloc, SHGetDesktopFolder, SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added, IMalloc, IUnknown implemented. * [windows/msgbox.c] Implemented MessageBoxIndirect*, some internal changes. * [if1632/thunk.c] KERNEL_431 implemented. * [objects/gdiobj.c] GetCurrentObject implemented. Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu> * [objects/dib.c] Fix a couple small DIB problems. * [controls/edit.c] Fix a typo. * [files/dos_fs.c] Try normal readdir in case fs is specified as vfat but isn't. * [files/profile.c] Implementation of WritePrivateProfileSection32A from Uwe Bonnes. * [misc/printdrv.c] OpenPrinter32A stub, helps Word97 start. * [objects/text.c] Fixup implementation of GetTextCharsetInfo. * [scheduler/process.c] Fix environment variable expansion. * [win32/code_page.c] Make MultiByteToWideChar and WideCharToMultiByte conform in return values and error conditions to those in Windows NT 4.0. * [windows/message.c] Fix broadcasting problems in Win32. The Win32 docs say to use HWND_TOPMOST to broadcast to all Win32 Windows. * [memory/virtual.c] [loader/pe_image.c] Do not map in VirtualAlloc if address is specified and space is not available. This is required by Win32. * [include/pen.h] [include/x11drv.h] [objects/dc.c] [objects/pen.c] [graphics/x11drv/pen.c] Support for ExtCreatePen. Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk> * [*/*.c] [*/*.h] Add lots of prototypes. * [if1632/kernel32.spec][include/windows.h][include/winnt.h] [misc/cpu.c] Define IsProcessorFeaturePresent. * [misc/crtdll.c] (CRTDLL__getcwd): Allocate enough memory for the terminating zero. * [misc/ver.c] Improve check for null component in _find_data[AW]. Plug leaks in VerQueryValue*. * [win32/console.c][if1632/kernel32.spec] Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32. * [windows/message.c][if1632/user32.spec][include/windows.h] Define SendMessageTimeout*. * [graphics/x11drv/xfont.c] Change algorithm of __genericCheckSum to be alignment safe. * [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c] Include winsock.h early to avoid Solaris problem. * [include/windows.h] Undef FSHIFT before we define it. * [rc/winerc.c] Include <fcntl.h> instead of <sys/fcntl.h>. * [files/file.c] Use strerror in FILE_SetDosError if available. * [include/config.h.in] [configure.in] Check for strerror. * [objects/gdiobj.c] Make static font structures aligned. Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net> * [win32/console.c] [if1632/kernel32.spec] [include/windows.h] Added stub for GetNumberOfConsoleMouseButtons. Added stub for PeekConsoleInput(A,W). Fixed parameter list for WriteConsole(A,W). GetNumberOfConsoleInputEvents now returns 0 events instead of 1 (since low-level console functions are not yet supported). GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and ENABLE_MOUSE_INPUT since these are not currently implemented.
327 lines
13 KiB
C
327 lines
13 KiB
C
/*
|
|
* GDI definitions
|
|
*
|
|
* Copyright 1993 Alexandre Julliard
|
|
*/
|
|
|
|
#ifndef __WINE_GDI_H
|
|
#define __WINE_GDI_H
|
|
|
|
#include "windows.h"
|
|
#include "ldt.h"
|
|
#include "local.h"
|
|
#include "x11drv.h"
|
|
#include "path.h"
|
|
|
|
/* GDI objects magic numbers */
|
|
#define PEN_MAGIC 0x4f47
|
|
#define BRUSH_MAGIC 0x4f48
|
|
#define FONT_MAGIC 0x4f49
|
|
#define PALETTE_MAGIC 0x4f4a
|
|
#define BITMAP_MAGIC 0x4f4b
|
|
#define REGION_MAGIC 0x4f4c
|
|
#define DC_MAGIC 0x4f4d
|
|
#define DISABLED_DC_MAGIC 0x4f4e
|
|
#define META_DC_MAGIC 0x4f4f
|
|
#define METAFILE_MAGIC 0x4f50
|
|
#define METAFILE_DC_MAGIC 0x4f51
|
|
#define MAGIC_DONTCARE 0xffff
|
|
|
|
typedef struct tagGDIOBJHDR
|
|
{
|
|
HANDLE16 hNext;
|
|
WORD wMagic;
|
|
DWORD dwCount;
|
|
} GDIOBJHDR;
|
|
|
|
|
|
#define OBJ_PEN 1
|
|
#define OBJ_BRUSH 2
|
|
#define OBJ_DC 3
|
|
#define OBJ_METADC 4
|
|
#define OBJ_PAL 5
|
|
#define OBJ_FONT 6
|
|
#define OBJ_BITMAP 7
|
|
#define OBJ_REGION 8
|
|
#define OBJ_METAFILE 9
|
|
#define OBJ_MEMDC 10
|
|
#define OBJ_EXTPEN 11
|
|
#define OBJ_ENHMETADC 12
|
|
#define OBJ_ENHMETAFILE 13
|
|
|
|
|
|
typedef struct tagDeviceCaps
|
|
{
|
|
WORD version; /* 0: driver version */
|
|
WORD technology; /* 2: device technology */
|
|
WORD horzSize; /* 4: width of display in mm */
|
|
WORD vertSize; /* 6: height of display in mm */
|
|
WORD horzRes; /* 8: width of display in pixels */
|
|
WORD vertRes; /* 10: width of display in pixels */
|
|
WORD bitsPixel; /* 12: bits per pixel */
|
|
WORD planes; /* 14: color planes */
|
|
WORD numBrushes; /* 16: device-specific brushes */
|
|
WORD numPens; /* 18: device-specific pens */
|
|
WORD numMarkers; /* 20: device-specific markers */
|
|
WORD numFonts; /* 22: device-specific fonts */
|
|
WORD numColors; /* 24: size of color table */
|
|
WORD pdeviceSize; /* 26: size of PDEVICE structure */
|
|
WORD curveCaps; /* 28: curve capabilities */
|
|
WORD lineCaps; /* 30: line capabilities */
|
|
WORD polygonalCaps; /* 32: polygon capabilities */
|
|
WORD textCaps; /* 34: text capabilities */
|
|
WORD clipCaps; /* 36: clipping capabilities */
|
|
WORD rasterCaps; /* 38: raster capabilities */
|
|
WORD aspectX; /* 40: relative width of device pixel */
|
|
WORD aspectY; /* 42: relative height of device pixel */
|
|
WORD aspectXY; /* 44: relative diagonal width of device pixel */
|
|
WORD pad1[21]; /* 46-86: reserved */
|
|
WORD logPixelsX; /* 88: pixels / logical X inch */
|
|
WORD logPixelsY; /* 90: pixels / logical Y inch */
|
|
WORD pad2[6]; /* 92-102: reserved */
|
|
WORD sizePalette; /* 104: entries in system palette */
|
|
WORD numReserved; /* 106: reserved entries */
|
|
WORD colorRes; /* 108: color resolution */
|
|
} DeviceCaps;
|
|
|
|
|
|
/* Device independent DC information */
|
|
typedef struct
|
|
{
|
|
int flags;
|
|
const DeviceCaps *devCaps;
|
|
|
|
HRGN16 hClipRgn; /* Clip region (may be 0) */
|
|
HRGN16 hVisRgn; /* Visible region (must never be 0) */
|
|
HRGN16 hGCClipRgn; /* GC clip region (ClipRgn AND VisRgn) */
|
|
HPEN16 hPen;
|
|
HBRUSH16 hBrush;
|
|
HFONT16 hFont;
|
|
HBITMAP16 hBitmap;
|
|
HBITMAP16 hFirstBitmap; /* Bitmap selected at creation of the DC */
|
|
HANDLE16 hDevice;
|
|
HPALETTE16 hPalette;
|
|
|
|
GdiPath path;
|
|
|
|
WORD ROPmode;
|
|
WORD polyFillMode;
|
|
WORD stretchBltMode;
|
|
WORD relAbsMode;
|
|
WORD backgroundMode;
|
|
COLORREF backgroundColor;
|
|
COLORREF textColor;
|
|
int backgroundPixel;
|
|
int textPixel;
|
|
short brushOrgX;
|
|
short brushOrgY;
|
|
|
|
WORD textAlign; /* Text alignment from SetTextAlign() */
|
|
short charExtra; /* Spacing from SetTextCharacterExtra() */
|
|
short breakTotalExtra; /* Total extra space for justification */
|
|
short breakCount; /* Break char. count */
|
|
short breakExtra; /* breakTotalExtra / breakCount */
|
|
short breakRem; /* breakTotalExtra % breakCount */
|
|
|
|
BYTE bitsPerPixel;
|
|
|
|
INT32 MapMode;
|
|
INT32 GraphicsMode; /* Graphics mode */
|
|
INT32 DCOrgX; /* DC origin */
|
|
INT32 DCOrgY;
|
|
INT32 CursPosX; /* Current position */
|
|
INT32 CursPosY;
|
|
} WIN_DC_INFO;
|
|
|
|
typedef X11DRV_PDEVICE X_DC_INFO; /* Temporary */
|
|
|
|
typedef struct tagDC
|
|
{
|
|
GDIOBJHDR header;
|
|
HDC32 hSelf; /* Handle to this DC */
|
|
const struct tagDC_FUNCS *funcs; /* DC function table */
|
|
void *physDev; /* Physical device (driver-specific) */
|
|
INT32 saveLevel;
|
|
DWORD dwHookData;
|
|
FARPROC16 hookProc;
|
|
|
|
INT32 wndOrgX; /* Window origin */
|
|
INT32 wndOrgY;
|
|
INT32 wndExtX; /* Window extent */
|
|
INT32 wndExtY;
|
|
INT32 vportOrgX; /* Viewport origin */
|
|
INT32 vportOrgY;
|
|
INT32 vportExtX; /* Viewport extent */
|
|
INT32 vportExtY;
|
|
|
|
WIN_DC_INFO w;
|
|
union
|
|
{
|
|
X_DC_INFO x;
|
|
/* other devices (e.g. printer) */
|
|
} u;
|
|
} DC;
|
|
|
|
/* Device functions for the Wine driver interface */
|
|
typedef struct tagDC_FUNCS
|
|
{
|
|
BOOL32 (*pArc)(DC*,INT32,INT32,INT32,INT32,INT32,INT32,INT32,INT32);
|
|
BOOL32 (*pBitBlt)(DC*,INT32,INT32,INT32,INT32,DC*,INT32,INT32,DWORD);
|
|
BOOL32 (*pChord)(DC*,INT32,INT32,INT32,INT32,INT32,INT32,INT32,INT32);
|
|
BOOL32 (*pCreateDC)(DC*,LPCSTR,LPCSTR,LPCSTR,const DEVMODE16*);
|
|
BOOL32 (*pDeleteDC)(DC*);
|
|
BOOL32 (*pDeleteObject)(HGDIOBJ16);
|
|
BOOL32 (*pEllipse)(DC*,INT32,INT32,INT32,INT32);
|
|
BOOL32 (*pEnumDeviceFonts)(DC*,LPLOGFONT16,DEVICEFONTENUMPROC,LPARAM);
|
|
INT32 (*pEscape)(DC*,INT32,INT32,SEGPTR,SEGPTR);
|
|
INT32 (*pExcludeClipRect)(DC*,INT32,INT32,INT32,INT32);
|
|
INT32 (*pExcludeVisRect)(DC*,INT32,INT32,INT32,INT32);
|
|
BOOL32 (*pExtFloodFill)(DC*,INT32,INT32,COLORREF,UINT32);
|
|
BOOL32 (*pExtTextOut)(DC*,INT32,INT32,UINT32,const RECT32*,LPCSTR,UINT32,const INT32*);
|
|
BOOL32 (*pGetCharWidth)(DC*,UINT32,UINT32,LPINT32);
|
|
COLORREF (*pGetPixel)(DC*,INT32,INT32);
|
|
BOOL32 (*pGetTextExtentPoint)(DC*,LPCSTR,INT32,LPSIZE32);
|
|
BOOL32 (*pGetTextMetrics)(DC*,TEXTMETRIC32A*);
|
|
INT32 (*pIntersectClipRect)(DC*,INT32,INT32,INT32,INT32);
|
|
INT32 (*pIntersectVisRect)(DC*,INT32,INT32,INT32,INT32);
|
|
BOOL32 (*pLineTo)(DC*,INT32,INT32);
|
|
BOOL32 (*pMoveToEx)(DC*,INT32,INT32,LPPOINT32);
|
|
INT32 (*pOffsetClipRgn)(DC*,INT32,INT32);
|
|
BOOL32 (*pOffsetViewportOrg)(DC*,INT32,INT32);
|
|
BOOL32 (*pOffsetWindowOrg)(DC*,INT32,INT32);
|
|
BOOL32 (*pPaintRgn)(DC*,HRGN32);
|
|
BOOL32 (*pPatBlt)(DC*,INT32,INT32,INT32,INT32,DWORD);
|
|
BOOL32 (*pPie)(DC*,INT32,INT32,INT32,INT32,INT32,INT32,INT32,INT32);
|
|
BOOL32 (*pPolyPolygon)(DC*,LPPOINT32,LPINT32,UINT32);
|
|
BOOL32 (*pPolygon)(DC*,LPPOINT32,INT32);
|
|
BOOL32 (*pPolyline)(DC*,LPPOINT32,INT32);
|
|
UINT32 (*pRealizePalette)(DC*);
|
|
BOOL32 (*pRectangle)(DC*,INT32,INT32,INT32,INT32);
|
|
BOOL32 (*pRestoreDC)(DC*,INT32);
|
|
BOOL32 (*pRoundRect)(DC*,INT32,INT32,INT32,INT32,INT32,INT32);
|
|
INT32 (*pSaveDC)(DC*);
|
|
BOOL32 (*pScaleViewportExt)(DC*,INT32,INT32,INT32,INT32);
|
|
BOOL32 (*pScaleWindowExt)(DC*,INT32,INT32,INT32,INT32);
|
|
INT32 (*pSelectClipRgn)(DC*,HRGN32);
|
|
HANDLE32 (*pSelectObject)(DC*,HANDLE32);
|
|
HPALETTE32 (*pSelectPalette)(DC*,HPALETTE32,BOOL32);
|
|
COLORREF (*pSetBkColor)(DC*,COLORREF);
|
|
WORD (*pSetBkMode)(DC*,WORD);
|
|
VOID (*pSetDeviceClipping)(DC*);
|
|
INT32 (*pSetDIBitsToDevice)(DC*,INT32,INT32,DWORD,DWORD,INT32,INT32,UINT32,UINT32,LPCVOID,const BITMAPINFO*,UINT32);
|
|
INT32 (*pSetMapMode)(DC*,INT32);
|
|
DWORD (*pSetMapperFlags)(DC*,DWORD);
|
|
COLORREF (*pSetPixel)(DC*,INT32,INT32,COLORREF);
|
|
WORD (*pSetPolyFillMode)(DC*,WORD);
|
|
WORD (*pSetROP2)(DC*,WORD);
|
|
WORD (*pSetRelAbs)(DC*,WORD);
|
|
WORD (*pSetStretchBltMode)(DC*,WORD);
|
|
WORD (*pSetTextAlign)(DC*,WORD);
|
|
INT32 (*pSetTextCharacterExtra)(DC*,INT32);
|
|
DWORD (*pSetTextColor)(DC*,DWORD);
|
|
INT32 (*pSetTextJustification)(DC*,INT32,INT32);
|
|
BOOL32 (*pSetViewportExt)(DC*,INT32,INT32);
|
|
BOOL32 (*pSetViewportOrg)(DC*,INT32,INT32);
|
|
BOOL32 (*pSetWindowExt)(DC*,INT32,INT32);
|
|
BOOL32 (*pSetWindowOrg)(DC*,INT32,INT32);
|
|
BOOL32 (*pStretchBlt)(DC*,INT32,INT32,INT32,INT32,DC*,INT32,INT32,INT32,INT32,DWORD);
|
|
INT32 (*pStretchDIBits)(DC*,INT32,INT32,INT32,INT32,INT32,INT32,INT32,INT32,LPSTR,LPBITMAPINFO,WORD,DWORD);
|
|
} DC_FUNCTIONS;
|
|
|
|
/* DC hook codes */
|
|
#define DCHC_INVALIDVISRGN 0x0001
|
|
#define DCHC_DELETEDC 0x0002
|
|
|
|
#define DCHF_INVALIDATEVISRGN 0x0001
|
|
#define DCHF_VALIDATEVISRGN 0x0002
|
|
|
|
/* DC flags */
|
|
#define DC_MEMORY 0x0001 /* It is a memory DC */
|
|
#define DC_SAVED 0x0002 /* It is a saved DC */
|
|
#define DC_DIRTY 0x0004 /* hVisRgn has to be updated */
|
|
#define DC_THUNKHOOK 0x0008 /* DC hook is in the 16-bit code */
|
|
|
|
/* Last 32 bytes are reserved for stock object handles */
|
|
#define GDI_HEAP_SIZE 0xffe0
|
|
|
|
/* First handle possible for stock objects (must be >= GDI_HEAP_SIZE) */
|
|
#define FIRST_STOCK_HANDLE GDI_HEAP_SIZE
|
|
|
|
/* Stock objects handles */
|
|
|
|
#define NB_STOCK_OBJECTS (DEFAULT_GUI_FONT + 1)
|
|
|
|
#define STOCK_WHITE_BRUSH ((HBRUSH16)(FIRST_STOCK_HANDLE+WHITE_BRUSH))
|
|
#define STOCK_LTGRAY_BRUSH ((HBRUSH16)(FIRST_STOCK_HANDLE+LTGRAY_BRUSH))
|
|
#define STOCK_GRAY_BRUSH ((HBRUSH16)(FIRST_STOCK_HANDLE+GRAY_BRUSH))
|
|
#define STOCK_DKGRAY_BRUSH ((HBRUSH16)(FIRST_STOCK_HANDLE+DKGRAY_BRUSH))
|
|
#define STOCK_BLACK_BRUSH ((HBRUSH16)(FIRST_STOCK_HANDLE+BLACK_BRUSH))
|
|
#define STOCK_NULL_BRUSH ((HBRUSH16)(FIRST_STOCK_HANDLE+NULL_BRUSH))
|
|
#define STOCK_HOLLOW_BRUSH ((HBRUSH16)(FIRST_STOCK_HANDLE+HOLLOW_BRUSH))
|
|
#define STOCK_WHITE_PEN ((HPEN16)(FIRST_STOCK_HANDLE+WHITE_PEN))
|
|
#define STOCK_BLACK_PEN ((HPEN16)(FIRST_STOCK_HANDLE+BLACK_PEN))
|
|
#define STOCK_NULL_PEN ((HPEN16)(FIRST_STOCK_HANDLE+NULL_PEN))
|
|
#define STOCK_OEM_FIXED_FONT ((HFONT16)(FIRST_STOCK_HANDLE+OEM_FIXED_FONT))
|
|
#define STOCK_ANSI_FIXED_FONT ((HFONT16)(FIRST_STOCK_HANDLE+ANSI_FIXED_FONT))
|
|
#define STOCK_ANSI_VAR_FONT ((HFONT16)(FIRST_STOCK_HANDLE+ANSI_VAR_FONT))
|
|
#define STOCK_SYSTEM_FONT ((HFONT16)(FIRST_STOCK_HANDLE+SYSTEM_FONT))
|
|
#define STOCK_DEVICE_DEFAULT_FONT ((HFONT16)(FIRST_STOCK_HANDLE+DEVICE_DEFAULT_FONT))
|
|
#define STOCK_DEFAULT_PALETTE ((HPALETTE16)(FIRST_STOCK_HANDLE+DEFAULT_PALETTE))
|
|
#define STOCK_SYSTEM_FIXED_FONT ((HFONT16)(FIRST_STOCK_HANDLE+SYSTEM_FIXED_FONT))
|
|
#define STOCK_DEFAULT_GUI_FONT ((HFONT16)(FIRST_STOCK_HANDLE+DEFAULT_GUI_FONT))
|
|
|
|
#define FIRST_STOCK_FONT STOCK_OEM_FIXED_FONT
|
|
#define LAST_STOCK_FONT STOCK_DEFAULT_GUI_FONT
|
|
|
|
#define LAST_STOCK_HANDLE ((DWORD)STOCK_DEFAULT_GUI_FONT)
|
|
|
|
/* Device <-> logical coords conversion */
|
|
|
|
#define XDPTOLP(dc,x) \
|
|
(((x)-(dc)->vportOrgX) * (dc)->wndExtX / (dc)->vportExtX+(dc)->wndOrgX)
|
|
#define YDPTOLP(dc,y) \
|
|
(((y)-(dc)->vportOrgY) * (dc)->wndExtY / (dc)->vportExtY+(dc)->wndOrgY)
|
|
#define XLPTODP(dc,x) \
|
|
(((x)-(dc)->wndOrgX) * (dc)->vportExtX / (dc)->wndExtX+(dc)->vportOrgX)
|
|
#define YLPTODP(dc,y) \
|
|
(((y)-(dc)->wndOrgY) * (dc)->vportExtY / (dc)->wndExtY+(dc)->vportOrgY)
|
|
|
|
|
|
/* GDI local heap */
|
|
|
|
extern WORD GDI_HeapSel;
|
|
|
|
#define GDI_HEAP_ALLOC(size) \
|
|
LOCAL_Alloc( GDI_HeapSel, LMEM_FIXED, (size) )
|
|
#define GDI_HEAP_ALLOC_MOVEABLE(size) \
|
|
LOCAL_Alloc( GDI_HeapSel, LMEM_MOVEABLE, (size) )
|
|
#define GDI_HEAP_REALLOC(handle,size) \
|
|
LOCAL_ReAlloc( GDI_HeapSel, (handle), (size), LMEM_FIXED )
|
|
#define GDI_HEAP_FREE(handle) \
|
|
LOCAL_Free( GDI_HeapSel, (handle) )
|
|
|
|
#define GDI_HEAP_LOCK(handle) \
|
|
LOCAL_Lock( GDI_HeapSel, (handle) )
|
|
#define GDI_HEAP_LOCK_SEGPTR(handle) \
|
|
LOCAL_LockSegptr( GDI_HeapSel, (handle) )
|
|
#define GDI_HEAP_UNLOCK(handle) \
|
|
((((HGDIOBJ16)(handle) >= FIRST_STOCK_HANDLE) && \
|
|
((HGDIOBJ16)(handle)<=LAST_STOCK_HANDLE)) ? \
|
|
0 : LOCAL_Unlock( GDI_HeapSel, (handle) ))
|
|
|
|
extern BOOL32 GDI_Init(void);
|
|
extern HGDIOBJ16 GDI_AllocObject( WORD, WORD );
|
|
extern BOOL32 GDI_FreeObject( HGDIOBJ16 );
|
|
extern GDIOBJHDR * GDI_GetObjPtr( HGDIOBJ16, WORD );
|
|
|
|
extern BOOL32 DRIVER_RegisterDriver( LPCSTR name, const DC_FUNCTIONS *funcs );
|
|
extern const DC_FUNCTIONS *DRIVER_FindDriver( LPCSTR name );
|
|
extern BOOL32 DRIVER_UnregisterDriver( LPCSTR name );
|
|
|
|
extern Display * display;
|
|
extern Screen * screen;
|
|
extern Window rootWindow;
|
|
extern int screenWidth, screenHeight, screenDepth;
|
|
|
|
#endif /* __WINE_GDI_H */
|