Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 1 | /* |
Alexandre Julliard | a0d7731 | 1998-09-13 16:32:00 +0000 | [diff] [blame] | 2 | * WinG support |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 3 | * |
| 4 | * Started by Robert Pouliot <krynos@clic.net> |
| 5 | */ |
| 6 | |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 7 | #include "ts_xlib.h" |
| 8 | #include "ts_xshm.h" |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 9 | #include <sys/types.h> |
| 10 | #include <sys/ipc.h> |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 11 | #ifndef __EMX__ |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 12 | #include <sys/shm.h> |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 13 | #endif |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 14 | |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 15 | #include "windows.h" |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 16 | #include "bitmap.h" |
| 17 | #include "dc.h" |
| 18 | #include "gdi.h" |
| 19 | #include "xmalloc.h" |
Huw D M Davies | 9c68faa | 1998-11-25 12:36:03 +0000 | [diff] [blame^] | 20 | #include "x11drv.h" |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 21 | #include "debug.h" |
| 22 | |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 23 | typedef enum WING_DITHER_TYPE |
| 24 | { |
| 25 | WING_DISPERSED_4x4, WING_DISPERSED_8x8, WING_CLUSTERED_4x4 |
| 26 | } WING_DITHER_TYPE; |
| 27 | |
| 28 | static int __WinGOK = -1; |
| 29 | |
| 30 | /* |
| 31 | * WinG DIB bitmaps can be selected into DC and then scribbled upon |
| 32 | * by GDI functions. They can also be changed directly. This gives us |
| 33 | * three choices |
| 34 | * - use original WinG 16-bit DLL |
| 35 | * requires working 16-bit driver interface |
| 36 | * - implement DIB graphics driver from scratch |
| 37 | * see wing.zip size |
| 38 | * - use shared pixmaps |
| 39 | * won't work with some videocards and/or videomodes |
| 40 | * 961208 - AK |
| 41 | */ |
| 42 | |
| 43 | static BITMAPINFOHEADER __bmpiWinG = { 0, 1, -1, 1, 8, BI_RGB, 1, 0, 0, 0, 0 }; |
| 44 | |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 45 | static void __initWinG(void) |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 46 | { |
| 47 | if( __WinGOK < 0 ) |
| 48 | { |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 49 | Status s = TSXShmQueryExtension(display); |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 50 | if( s ) |
| 51 | { |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 52 | int i = TSXShmPixmapFormat(display); |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 53 | if( i == ZPixmap && screenDepth == 8 ) |
| 54 | { |
| 55 | __WinGOK = True; |
| 56 | return; |
| 57 | } |
| 58 | } |
Alexandre Julliard | a0d7731 | 1998-09-13 16:32:00 +0000 | [diff] [blame] | 59 | FIXME(wing,"WinG: incorrect depth or unsupported card.\n"); |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 60 | __WinGOK = False; |
| 61 | } |
| 62 | } |
| 63 | |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 64 | /*********************************************************************** |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 65 | * WinGCreateDC16 (WING.1001) |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 66 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 67 | HDC16 WINAPI WinGCreateDC16(void) |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 68 | { |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 69 | __initWinG(); |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 70 | |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 71 | if( __WinGOK > 0 ) |
Alexandre Julliard | dadf78f | 1998-05-17 17:13:43 +0000 | [diff] [blame] | 72 | return CreateCompatibleDC16(0); |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 73 | return (HDC16)NULL; |
| 74 | } |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 75 | |
| 76 | /*********************************************************************** |
| 77 | * WinGRecommendDIBFormat16 (WING.1002) |
| 78 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 79 | BOOL16 WINAPI WinGRecommendDIBFormat16(BITMAPINFO *fmt) |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 80 | { |
Alexandre Julliard | 54c2711 | 1998-03-29 19:44:57 +0000 | [diff] [blame] | 81 | FIXME(wing,"(%p): stub\n", fmt); |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 82 | |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 83 | if( __WinGOK > 0 && fmt ) |
| 84 | { |
| 85 | memcpy(&fmt->bmiHeader, &__bmpiWinG, sizeof(BITMAPINFOHEADER)); |
| 86 | return TRUE; |
| 87 | } |
| 88 | return FALSE; |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 89 | } |
| 90 | |
| 91 | /*********************************************************************** |
| 92 | * WinGCreateBitmap16 (WING.1003) |
| 93 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 94 | HBITMAP16 WINAPI WinGCreateBitmap16(HDC16 winDC, BITMAPINFO *header, |
| 95 | void **bits) |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 96 | { |
Alexandre Julliard | 54c2711 | 1998-03-29 19:44:57 +0000 | [diff] [blame] | 97 | FIXME(wing,"(%x,%p,%p): empty stub! (expect failure)\n", |
| 98 | winDC, header, bits); |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 99 | if( __WinGOK > 0 && header ) |
| 100 | { |
| 101 | BITMAPINFOHEADER* bmpi = &header->bmiHeader; |
| 102 | |
Alexandre Julliard | 54c2711 | 1998-03-29 19:44:57 +0000 | [diff] [blame] | 103 | FIXME(wing,"bytes=%i,planes=%i,bpp=%i,x=%i,y=%i,rle=0x%08x,size=%i\n", |
| 104 | (int)bmpi->biSize, bmpi->biPlanes, bmpi->biBitCount, |
| 105 | (int)bmpi->biWidth, (int)bmpi->biHeight, |
| 106 | (unsigned)bmpi->biCompression, (int)bmpi->biSizeImage); |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 107 | |
| 108 | #ifdef PRELIMINARY_WING16_SUPPORT |
| 109 | if( bmpi->biPlanes == __bmpiWinG.biPlanes && bmpi->biBitCount == __bmpiWinG.biBitCount && |
| 110 | bmpi->biCompression == __bmpiWinG.biCompression && (int)bmpi->biHeight < 0 && |
| 111 | bmpi->biWidth ) |
| 112 | { |
| 113 | unsigned bytes = (bmpi->biWidth + bmpi->biWidth % 2)*(-bmpi->biHeight) * bmpi->biBitCount/8; |
| 114 | int key = shmget(IPC_PRIVATE, bytes, IPC_CREAT | 0x01FF); |
| 115 | |
| 116 | if( key ) |
| 117 | { |
| 118 | /* Create the BITMAPOBJ |
| 119 | * |
| 120 | * FIXME: A facility to manage shared memory structures |
| 121 | * which would clean up when Wine crashes. Perhaps a part of |
| 122 | * IPC code can be adapted. Otherwise this code leaves a lot |
| 123 | * of junk in shared memory. |
| 124 | */ |
| 125 | |
| 126 | HBITMAP16 hbitmap = GDI_AllocObject( sizeof(BITMAPOBJ), BITMAP_MAGIC ); |
| 127 | if (hbitmap) |
| 128 | { |
| 129 | __ShmBitmapCtl* p = (__ShmBitmapCtl*)xmalloc(sizeof(__ShmBitmapCtl)); |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 130 | BITMAPOBJ* bmpObjPtr = (BITMAPOBJ *) GDI_HEAP_LOCK( hbitmap ); |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 131 | |
| 132 | bmpObjPtr->size.cx = 0; |
| 133 | bmpObjPtr->size.cy = 0; |
| 134 | bmpObjPtr->bitmap.bmType = 0; |
| 135 | bmpObjPtr->bitmap.bmWidth = (INT16)abs(bmpi->biWidth); |
| 136 | bmpObjPtr->bitmap.bmHeight = -(INT16)bmpi->biHeight; |
| 137 | bmpObjPtr->bitmap.bmPlanes = (BYTE)bmpi->biPlanes; |
| 138 | bmpObjPtr->bitmap.bmBitsPixel = (BYTE)bmpi->biBitCount; |
| 139 | bmpObjPtr->bitmap.bmWidthBytes = |
| 140 | (INT16)BITMAP_WIDTH_BYTES( bmpObjPtr->bitmap.bmWidth, bmpi->biBitCount ); |
| 141 | bmpObjPtr->bitmap.bmBits = (SEGPTR)p; |
| 142 | |
| 143 | p->si.shmid = key; |
| 144 | p->si.shmaddr = shmat(key, NULL, 0); |
| 145 | p->si.readOnly = False; |
| 146 | |
| 147 | if( p->si.shmaddr ) |
| 148 | { |
| 149 | WORD sel = 0; |
| 150 | |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 151 | TSXShmAttach(display, &p->si); |
Marcus Meissner | 1cd7056 | 1998-11-22 12:33:29 +0000 | [diff] [blame] | 152 | bmpObjPtr->pixmap = TSXShmCreatePixmap(display, rootWindow, |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 153 | p->si.shmaddr, &p->si, bmpObjPtr->bitmap.bmWidth, |
| 154 | bmpObjPtr->bitmap.bmHeight, bmpi->biBitCount ); |
| 155 | if( bmpObjPtr->pixmap ) |
| 156 | { |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 157 | sel = SELECTOR_AllocBlock( p->si.shmaddr, bytes, |
| 158 | SEGMENT_DATA, FALSE, FALSE); |
| 159 | if (sel) p->bits = PTR_SEG_OFF_TO_SEGPTR(sel,0); |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 160 | else TSXFreePixmap( display, bmpObjPtr->pixmap ); |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 161 | } |
| 162 | if( !sel ) |
| 163 | { |
| 164 | shmdt( p->si.shmaddr ); |
| 165 | p->si.shmaddr = NULL; |
| 166 | } |
| 167 | } |
| 168 | if( !p->si.shmaddr ) |
| 169 | { |
| 170 | GDI_FreeObject( hbitmap ); |
| 171 | hbitmap = 0; |
| 172 | } |
| 173 | } |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 174 | GDI_HEAP_UNLOCK( hbitmap ); |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 175 | return hbitmap; |
| 176 | } |
| 177 | } |
| 178 | #endif |
| 179 | } |
| 180 | return 0; |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 181 | } |
| 182 | |
| 183 | /*********************************************************************** |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 184 | * WinGGetDIBPointer (WING.1004) |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 185 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 186 | SEGPTR WINAPI WinGGetDIBPointer16(HBITMAP16 hWinGBitmap, BITMAPINFO* bmpi) |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 187 | { |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 188 | #ifdef PRELIMINARY_WING16_SUPPORT |
| 189 | BITMAPOBJ* bmp = (BITMAPOBJ *) GDI_GetObjPtr( hWinGBitmap, BITMAP_MAGIC ); |
| 190 | |
| 191 | if( bmp ) |
| 192 | { |
| 193 | __ShmBitmapCtl* p = (__ShmBitmapCtl*)bmp->bitmap.bmBits; |
| 194 | if( p ) |
| 195 | { |
| 196 | if( bmpi ) memcpy( bmpi, &__bmpiWinG, sizeof(BITMAPINFOHEADER)); |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 197 | GDI_HEAP_UNLOCK( hWinGBitmap ); |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 198 | return p->bits; |
| 199 | } |
| 200 | } |
| 201 | #endif |
| 202 | return (SEGPTR)NULL; |
| 203 | } |
| 204 | |
| 205 | /*********************************************************************** |
| 206 | * WinGSetDIBColorTable (WING.1004) |
| 207 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 208 | UINT16 WINAPI WinGSetDIBColorTable16(HDC16 hWinGDC, UINT16 start, UINT16 num, |
| 209 | RGBQUAD* pColor) |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 210 | { |
Alexandre Julliard | 54c2711 | 1998-03-29 19:44:57 +0000 | [diff] [blame] | 211 | FIXME(wing,"(%x,%d,%d,%p): empty stub!\n",hWinGDC,start,num,pColor); |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 212 | return num; |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 213 | } |
| 214 | |
| 215 | /*********************************************************************** |
| 216 | * WinGGetDIBColorTable16 (WING.1005) |
| 217 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 218 | UINT16 WINAPI WinGGetDIBColorTable16(HDC16 winDC, UINT16 start, |
Alexandre Julliard | 54c2711 | 1998-03-29 19:44:57 +0000 | [diff] [blame] | 219 | UINT16 num, RGBQUAD* colors) |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 220 | { |
Alexandre Julliard | 54c2711 | 1998-03-29 19:44:57 +0000 | [diff] [blame] | 221 | FIXME(wing,"(%x,%d,%d,%p): empty stub!\n",winDC,start,num,colors); |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 222 | return 0; |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 223 | } |
| 224 | |
| 225 | /*********************************************************************** |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 226 | * WinGCreateHalfTonePalette16 (WING.1007) |
| 227 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 228 | HPALETTE16 WINAPI WinGCreateHalfTonePalette16(void) |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 229 | { |
Alexandre Julliard | 54c2711 | 1998-03-29 19:44:57 +0000 | [diff] [blame] | 230 | FIXME(wing,"(void): empty stub!\n"); |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 231 | return 0; |
| 232 | } |
| 233 | |
| 234 | /*********************************************************************** |
| 235 | * WinGCreateHalfToneBrush16 (WING.1008) |
| 236 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 237 | HPALETTE16 WINAPI WinGCreateHalfToneBrush16(HDC16 winDC, COLORREF col, |
| 238 | WING_DITHER_TYPE type) |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 239 | { |
Alexandre Julliard | 54c2711 | 1998-03-29 19:44:57 +0000 | [diff] [blame] | 240 | FIXME(wing,"(...): empty stub!\n"); |
Alexandre Julliard | da0cfb3 | 1996-12-01 17:17:47 +0000 | [diff] [blame] | 241 | return 0; |
| 242 | } |
| 243 | |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 244 | /*********************************************************************** |
| 245 | * WinGStretchBlt16 (WING.1009) |
| 246 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 247 | BOOL16 WINAPI WinGStretchBlt16(HDC16 destDC, INT16 xDest, INT16 yDest, |
| 248 | INT16 widDest, INT16 heiDest, |
| 249 | HDC16 srcDC, INT16 xSrc, INT16 ySrc, |
| 250 | INT16 widSrc, INT16 heiSrc) |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 251 | { |
| 252 | |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 253 | return StretchBlt16(destDC, xDest, yDest, widDest, heiDest, srcDC, xSrc, ySrc, widSrc, heiSrc, SRCCOPY); |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 254 | } |
| 255 | |
| 256 | /*********************************************************************** |
| 257 | * WinGBitBlt16 (WING.1010) |
| 258 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 259 | BOOL16 WINAPI WinGBitBlt16(HDC16 destDC, INT16 xDest, INT16 yDest, |
| 260 | INT16 widDest, INT16 heiDest, HDC16 srcDC, |
| 261 | INT16 xSrc, INT16 ySrc) |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 262 | { |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 263 | /* destDC is a display DC, srcDC is a memory DC */ |
| 264 | |
| 265 | DC *dcDst, *dcSrc; |
Huw D M Davies | 9c68faa | 1998-11-25 12:36:03 +0000 | [diff] [blame^] | 266 | X11DRV_PDEVICE *physDevDst, *physDevSrc; |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 267 | |
| 268 | if (!(dcDst = (DC *)GDI_GetObjPtr( destDC, DC_MAGIC ))) return FALSE; |
| 269 | if (!(dcSrc = (DC *) GDI_GetObjPtr( srcDC, DC_MAGIC ))) return FALSE; |
Huw D M Davies | 9c68faa | 1998-11-25 12:36:03 +0000 | [diff] [blame^] | 270 | physDevDst = (X11DRV_PDEVICE *)dcDst->physDev; |
| 271 | physDevSrc = (X11DRV_PDEVICE *)dcSrc->physDev; |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 272 | |
| 273 | if (dcDst->w.flags & DC_DIRTY) CLIPPING_UpdateGCRegion( dcDst ); |
| 274 | |
| 275 | xSrc = dcSrc->w.DCOrgX + XLPTODP( dcSrc, xSrc ); |
| 276 | ySrc = dcSrc->w.DCOrgY + YLPTODP( dcSrc, ySrc ); |
| 277 | xDest = dcDst->w.DCOrgX + XLPTODP( dcDst, xDest ); |
| 278 | yDest = dcDst->w.DCOrgY + YLPTODP( dcDst, yDest ); |
Alexandre Julliard | 7ebe1a4 | 1996-12-22 18:27:48 +0000 | [diff] [blame] | 279 | widDest = widDest * dcDst->vportExtX / dcDst->wndExtX; |
| 280 | heiDest = heiDest * dcDst->vportExtY / dcDst->wndExtY; |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 281 | |
Huw D M Davies | 9c68faa | 1998-11-25 12:36:03 +0000 | [diff] [blame^] | 282 | TSXSetFunction( display, physDevDst->gc, GXcopy ); |
| 283 | TSXCopyArea( display, physDevSrc->drawable, |
| 284 | physDevDst->drawable, physDevDst->gc, |
| 285 | xSrc, ySrc, widDest, heiDest, xDest, yDest ); |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 286 | return TRUE; |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 287 | } |
| 288 | |