Compile error fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster 2001-01-30 06:07:50 +00:00
parent 437a79a631
commit e464c180c4
4 changed files with 30 additions and 23 deletions

View File

@ -989,24 +989,24 @@ HBITMAP wxInvertMask(
,&vBmhdr
);
nWidth = (int)vBmhdr.cx;
nHeight = (int)vBmhdr.cyt;
nHeight = (int)vBmhdr.cy;
}
BITMAPINFOHEADER2 vBmih;
SIZEL vSize = {0, 0};
DEVOPENSTRUC vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
HDC hDCSrc = ::DevOpenDC(ghAb, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
HDC hDCDst = ::DevOpenDC(ghAb, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
HPS hPSSrc = ::GpiCreatePS(ghAb, hDCSrc, &vSize, PU_PELS | GPIA_ASSOC);
HPS hPSDst = ::GpiCreatePS(ghAb, hDCDst, &vSize, PU_PELS | GPIA_ASSOC);
POINTL vPoint[4] = { 0 ,0, rBitmap.GetWidth(), rBitmap.GetHeight(),
0, 0, rBitmap.GetWidth(), rBitmap.GetHeight()
HDC hDCSrc = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
HDC hDCDst = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
HPS hPSSrc = ::GpiCreatePS(vHabmain, hDCSrc, &vSize, PU_PELS | GPIA_ASSOC);
HPS hPSDst = ::GpiCreatePS(vHabmain, hDCDst, &vSize, PU_PELS | GPIA_ASSOC);
POINTL vPoint[4] = { 0 ,0, nWidth, nHeight,
0, 0, nWidth, nHeight
};
memset(&vBmih, NULLC, sizeof(BITMAPINFOHEADER2));
memset(&vBmih, '\0', sizeof(BITMAPINFOHEADER2));
vBmih.cbFix = sizeof(BITMAPINFOHEADER2);
vBmih.cx = lWidth;
vBmih.cy = lHeight;
vBmih.cx = nWidth;
vBmih.cy = nHeight;
vBmih.cPlanes = 1;
vBmih.cBitCount = 1;
@ -1023,7 +1023,7 @@ HBITMAP wxInvertMask(
::GpiBitBlt( hPSDst
,hPSSrc
,4L
,&vPoint
,vPoint
,ROP_SRCCOPY
,BBO_IGNORE
);
@ -1031,7 +1031,7 @@ HBITMAP wxInvertMask(
::GpiDestroyPS(hPSSrc);
::GpiDestroyPS(hPSDst);
::DevCloseDC(hDCSrc);
::DevCloseDC(hDCDtl);
::DevCloseDC(hDCDst);
return hBmpInvMask;
} // end of WxWinGdi_InvertMask

View File

@ -865,7 +865,7 @@ XpmCreateImageFromXpmImage(display, image,
#endif
{
#ifdef __OS2__
HAB hab;
HAB hab = WinQueryAnchorBlock(HWND_DESKTOP);
HPS hps;
SIZEL sizl = {0, 0};
#endif
@ -2578,7 +2578,7 @@ ParseAndPutPixels(
{
unsigned int a, x, y;
#ifdef __OS2__
HAB hab;
HAB hab = WinQueryAnchorBlock(HWND_DESKTOP);
DEVOPENSTRUC dop = {NULL, "DISPLAY", NULL, NULL, NULL, NULL, NULL, NULL, NULL};
SIZEL sizl = {0, 0};
POINTL point;

View File

@ -96,16 +96,25 @@ LFUNC(AGetImagePixels, int, (XImage *image, unsigned int width,
int (*storeFunc) ()));
# endif/* AMIGA */
#else /* ndef FOR_MSW */
#if defined(__OS2__) && defined(__VISAGECPP30__)
LFUNC(MSWGetImagePixels, int, (Display* display, XImage* image, unsigned int width,
unsigned int height, PixelsMap* pmap,
int (*storeFunc) (Pixel, PixelsMap*, unsigned int*)));
#else
LFUNC(MSWGetImagePixels, int, (Display *d, XImage *image, unsigned int width,
unsigned int height, PixelsMap *pmap,
int (*storeFunc) ()));
unsigned int height, PixelsMap *pmap,
int (*storeFunc) ()));
#endif
#endif
LFUNC(ScanTransparentColor, int, (XpmColor *color, unsigned int cpp,
XpmAttributes *attributes));
XpmAttributes *attributes));
LFUNC(ScanOtherColors, int, (Display *display, XpmColor *colors, int ncolors,
Pixel *pixels, unsigned int mask,
unsigned int cpp, XpmAttributes *attributes));
Pixel *pixels, unsigned int mask,
unsigned int cpp, XpmAttributes *attributes));
/*
* This function stores the given pixel in the given arrays which are grown
@ -1020,7 +1029,7 @@ MSWGetImagePixels(display, image, width, height, pmap, storeFunc)
unsigned int x, y;
Pixel pixel;
#ifdef __OS2__
HAB hab;
HAB hab = WinQueryAnchorBlock(HWND_DESKTOP);
HDC shapedc;
DEVOPENSTRUC dop = {NULL, "DISPLAY", NULL, NULL, NULL, NULL, NULL, NULL, NULL};
SIZEL sizl = {0, 0};

View File

@ -274,10 +274,8 @@ XCreateImage(Display *d, Visual *v,
{
XImage *img = (XImage *) XpmMalloc(sizeof(XImage));
#ifdef __OS2__
HPS hps;
BITMAPINFOHEADER2 bmih;
hps = WinGetScreenPS(HWND_DESKTOP);
memset(&bmih, 0, sizeof(BITMAPINFOHEADER2));
bmih.cbFix = sizeof(BITMAPINFOHEADER2);
bmih.cx = width;
@ -295,7 +293,7 @@ XCreateImage(Display *d, Visual *v,
img->bitmap = CreateCompatibleBitmap(*d, width, height);
} else*/ {
#ifdef __OS2__
img->bitmap = GpiCreateBitmap(hps, &bmih, 0L, NULL, NULL);
img->bitmap = GpiCreateBitmap(*d, &bmih, 0L, NULL, NULL);
WinReleasePS(hps);
#else
img->bitmap = CreateBitmap(width, height, 1 /* plane */ ,