OS/2 Image processing updates along with some statusbar updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -86,6 +86,7 @@ void wxBitmapRefData::Free()
|
|||||||
// this function should be called from all wxBitmap ctors
|
// this function should be called from all wxBitmap ctors
|
||||||
void wxBitmap::Init()
|
void wxBitmap::Init()
|
||||||
{
|
{
|
||||||
|
m_bIsMono = FALSE;
|
||||||
} // end of wxBitmap::Init
|
} // end of wxBitmap::Init
|
||||||
|
|
||||||
bool wxBitmap::CopyFromIconOrCursor(
|
bool wxBitmap::CopyFromIconOrCursor(
|
||||||
@@ -113,9 +114,11 @@ bool wxBitmap::CopyFromIconOrCursor(
|
|||||||
|
|
||||||
pRefData->m_hBitmap = (WXHBITMAP)SIconInfo.hbmColor;
|
pRefData->m_hBitmap = (WXHBITMAP)SIconInfo.hbmColor;
|
||||||
|
|
||||||
//
|
wxMask* pMask = new wxMask(SIconInfo.hbmPointer);
|
||||||
// No mask in the Info struct in OS/2
|
|
||||||
//
|
pMask->SetMaskBitmap(GetHBITMAP());
|
||||||
|
SetMask(pMask);
|
||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
} // end of wxBitmap::CopyFromIconOrCursor
|
} // end of wxBitmap::CopyFromIconOrCursor
|
||||||
|
|
||||||
@@ -315,6 +318,12 @@ bool wxBitmap::Create(
|
|||||||
GetBitmapData()->m_nHeight = nH;
|
GetBitmapData()->m_nHeight = nH;
|
||||||
GetBitmapData()->m_nDepth = nD;
|
GetBitmapData()->m_nDepth = nD;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Xpms and bitmaps from other images can also be mono's, but only
|
||||||
|
// mono's need help changing their colors with MemDC changes
|
||||||
|
//
|
||||||
|
if (nD == 1)
|
||||||
|
m_bIsMono = TRUE;
|
||||||
if (nD > 0)
|
if (nD > 0)
|
||||||
{
|
{
|
||||||
DEVOPENSTRUC vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
|
DEVOPENSTRUC vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
|
||||||
@@ -327,7 +336,7 @@ bool wxBitmap::Create(
|
|||||||
vHeader.cx = nW;
|
vHeader.cx = nW;
|
||||||
vHeader.cy = nH;
|
vHeader.cy = nH;
|
||||||
vHeader.cPlanes = 1;
|
vHeader.cPlanes = 1;
|
||||||
vHeader.cBitCount = nD;
|
vHeader.cBitCount = 24; //nD;
|
||||||
|
|
||||||
hBmp = ::GpiCreateBitmap( hPS
|
hBmp = ::GpiCreateBitmap( hPS
|
||||||
,&vHeader
|
,&vHeader
|
||||||
@@ -618,7 +627,6 @@ bool wxBitmap::CreateFromImage (
|
|||||||
,NULL
|
,NULL
|
||||||
,NULL
|
,NULL
|
||||||
);
|
);
|
||||||
hBmpOld = ::GpiSetBitmap(hPS, hBmp);
|
|
||||||
#if wxUSE_PALETTE
|
#if wxUSE_PALETTE
|
||||||
HPAL hOldPalette = NULLHANDLE;
|
HPAL hOldPalette = NULLHANDLE;
|
||||||
if (rImage.GetPalette().Ok())
|
if (rImage.GetPalette().Ok())
|
||||||
@@ -638,6 +646,14 @@ bool wxBitmap::CreateFromImage (
|
|||||||
unsigned char* ptdata = pData;
|
unsigned char* ptdata = pData;
|
||||||
unsigned char* ptbits;
|
unsigned char* ptbits;
|
||||||
|
|
||||||
|
if ((hBmpOld = ::GpiSetBitmap(hPS, hBmp)) == HBM_ERROR)
|
||||||
|
{
|
||||||
|
ERRORID vError;
|
||||||
|
wxString sError;
|
||||||
|
|
||||||
|
vError = ::WinGetLastError(vHabmain);
|
||||||
|
sError = wxPMErrorToStr(vError);
|
||||||
|
}
|
||||||
for (n = 0; n < nNumDIB; n++)
|
for (n = 0; n < nNumDIB; n++)
|
||||||
{
|
{
|
||||||
if (nNumDIB > 1 && n == nNumDIB - 1 && nHRemain > 0)
|
if (nNumDIB > 1 && n == nNumDIB - 1 && nHRemain > 0)
|
||||||
@@ -760,7 +776,11 @@ bool wxBitmap::CreateFromImage (
|
|||||||
{
|
{
|
||||||
for (i = 0; i < nWidth; i++)
|
for (i = 0; i < nWidth; i++)
|
||||||
{
|
{
|
||||||
if ((*(ptdata++) != cRed) || (*(ptdata++) != cGreen) || (*(ptdata++) != cBlue))
|
unsigned char cRedImage = (*(ptdata++)) ;
|
||||||
|
unsigned char cGreenImage = (*(ptdata++)) ;
|
||||||
|
unsigned char cBlueImage = (*(ptdata++)) ;
|
||||||
|
|
||||||
|
if ((cRedImage != cRed) || (cGreenImage != cGreen) || (cBlueImage != cBlue))
|
||||||
{
|
{
|
||||||
*(ptbits++) = cOne;
|
*(ptbits++) = cOne;
|
||||||
*(ptbits++) = cOne;
|
*(ptbits++) = cOne;
|
||||||
|
160
src/os2/dc.cpp
160
src/os2/dc.cpp
@@ -1189,15 +1189,21 @@ void wxDC::DoDrawIcon(
|
|||||||
, wxCoord vY
|
, wxCoord vY
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
vY = OS2Y(vY,rIcon.GetHeight());
|
//
|
||||||
wxCHECK_RET( rIcon.Ok(), wxT("invalid icon in DrawIcon") );
|
// Need to copy back into a bitmap. ::WinDrawPointer uses device coords
|
||||||
|
// and I don't feel like figuring those out for scrollable windows so
|
||||||
|
// just convert to a bitmap then let the DoDrawBitmap routing display it
|
||||||
|
//
|
||||||
|
if (rIcon.IsXpm())
|
||||||
|
{
|
||||||
|
DoDrawBitmap(rIcon.GetXpmSrc(), vX, vY, TRUE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wxBitmap vBitmap(rIcon);
|
||||||
|
|
||||||
::WinDrawPointer( GetHPS()
|
DoDrawBitmap(vBitmap, vX, vY, FALSE);
|
||||||
,vX
|
}
|
||||||
,vY
|
|
||||||
,(HPOINTER)GetHiconOf(rIcon)
|
|
||||||
,DP_NORMAL
|
|
||||||
);
|
|
||||||
CalcBoundingBox(vX, vY);
|
CalcBoundingBox(vX, vY);
|
||||||
CalcBoundingBox(vX + rIcon.GetWidth(), vY + rIcon.GetHeight());
|
CalcBoundingBox(vX + rIcon.GetWidth(), vY + rIcon.GetHeight());
|
||||||
} // end of wxDC::DoDrawIcon
|
} // end of wxDC::DoDrawIcon
|
||||||
@@ -1366,28 +1372,28 @@ void wxDC::DoDrawBitmap(
|
|||||||
for (j = 0; j < rBmp.GetWidth(); j++)
|
for (j = 0; j < rBmp.GetWidth(); j++)
|
||||||
{
|
{
|
||||||
// Byte 1
|
// Byte 1
|
||||||
if (*pucDataMask == 0x00) // leave bitmap byte alone
|
if (*pucDataMask == 0xFF) // leave bitmap byte alone
|
||||||
pucData++;
|
pucData++;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*pucData = (unsigned char)lColor;
|
*pucData = ((unsigned char)(lColor >> 16));
|
||||||
pucData++;
|
pucData++;
|
||||||
}
|
}
|
||||||
// Byte 2
|
// Byte 2
|
||||||
if (*(pucDataMask + 1) == 0x00) // leave bitmap byte alone
|
if (*(pucDataMask + 1) == 0xFF) // leave bitmap byte alone
|
||||||
pucData++;
|
pucData++;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*pucData = (unsigned char)lColor >> 8;
|
*pucData = ((unsigned char)(lColor >> 8));
|
||||||
pucData++;
|
pucData++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Byte 3
|
// Byte 3
|
||||||
if (*(pucDataMask + 2) == 0x00) // leave bitmap byte alone
|
if (*(pucDataMask + 2) == 0xFF) // leave bitmap byte alone
|
||||||
pucData++;
|
pucData++;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*pucData = (unsigned char)lColor >> 16;
|
*pucData = ((unsigned char)lColor);
|
||||||
pucData++;
|
pucData++;
|
||||||
}
|
}
|
||||||
pucDataMask += 3;
|
pucDataMask += 3;
|
||||||
@@ -1398,7 +1404,6 @@ void wxDC::DoDrawBitmap(
|
|||||||
pucDataMask++;
|
pucDataMask++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create a new bitmap
|
// Create a new bitmap
|
||||||
//
|
//
|
||||||
@@ -1440,8 +1445,8 @@ void wxDC::DoDrawBitmap(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LONG lOldTextground = ::GpiQueryColor((HPS)GetHPS());
|
LONG lOldForeGround = ::GpiQueryColor((HPS)GetHPS());
|
||||||
LONG lOldBackground = ::GpiQueryBackColor((HPS)GetHPS());
|
LONG lOldBackGround = ::GpiQueryBackColor((HPS)GetHPS());
|
||||||
|
|
||||||
if (m_textForegroundColour.Ok())
|
if (m_textForegroundColour.Ok())
|
||||||
{
|
{
|
||||||
@@ -1455,6 +1460,123 @@ void wxDC::DoDrawBitmap(
|
|||||||
,m_textBackgroundColour.GetPixel()
|
,m_textBackgroundColour.GetPixel()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
// Need to alter bits in a mono bitmap to match the new
|
||||||
|
// background-foreground if it is different.
|
||||||
|
//
|
||||||
|
if (rBmp.IsMono() &&
|
||||||
|
((m_textForegroundColour.GetPixel() != lOldForeGround) ||
|
||||||
|
(m_textBackgroundColour.GetPixel() != lOldBackGround)))
|
||||||
|
{
|
||||||
|
DEVOPENSTRUC vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
|
||||||
|
SIZEL vSize = {0, 0};
|
||||||
|
HDC hDC = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
|
||||||
|
HPS hPS = ::GpiCreatePS(vHabmain, hDC, &vSize, PU_PELS | GPIA_ASSOC);
|
||||||
|
|
||||||
|
int nBytesPerLine = rBmp.GetWidth() * 3;
|
||||||
|
int i, j;
|
||||||
|
LONG lForeGround = m_textForegroundColour.GetPixel();
|
||||||
|
LONG lBackGround = m_textBackgroundColour.GetPixel();
|
||||||
|
LONG lScans;
|
||||||
|
HBITMAP hOldBitmap = NULLHANDLE;
|
||||||
|
BITMAPINFO2 vInfo;
|
||||||
|
ERRORID vError;
|
||||||
|
wxString sError;
|
||||||
|
|
||||||
|
|
||||||
|
memset(&vInfo, '\0', 16);
|
||||||
|
vInfo.cbFix = 16;
|
||||||
|
vInfo.cx = (ULONG)rBmp.GetWidth();
|
||||||
|
vInfo.cy = (ULONG)rBmp.GetHeight();
|
||||||
|
vInfo.cPlanes = 1;
|
||||||
|
vInfo.cBitCount = 24;
|
||||||
|
|
||||||
|
unsigned char* pucBits; // buffer that will contain the bitmap data
|
||||||
|
unsigned char* pucData; // pointer to use to traverse bitmap data
|
||||||
|
|
||||||
|
pucBits = new unsigned char[nBytesPerLine * rBmp.GetHeight()];
|
||||||
|
memset(pucBits, '\0', (nBytesPerLine * rBmp.GetHeight()));
|
||||||
|
|
||||||
|
if ((hOldBitmap = ::GpiSetBitmap(hPS, hBitmap)) == HBM_ERROR)
|
||||||
|
{
|
||||||
|
vError = ::WinGetLastError(vHabmain);
|
||||||
|
sError = wxPMErrorToStr(vError);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ((lScans = ::GpiQueryBitmapBits( hPS
|
||||||
|
,0L
|
||||||
|
,(LONG)rBmp.GetHeight()
|
||||||
|
,(PBYTE)pucBits
|
||||||
|
,&vInfo
|
||||||
|
)) == GPI_ALTERROR)
|
||||||
|
{
|
||||||
|
vError = ::WinGetLastError(vHabmain);
|
||||||
|
sError = wxPMErrorToStr(vError);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
unsigned char cOldRedFore = (unsigned char)(lOldForeGround >> 16);
|
||||||
|
unsigned char cOldGreenFore = (unsigned char)(lOldForeGround >> 8);
|
||||||
|
unsigned char cOldBlueFore = (unsigned char)lOldForeGround;
|
||||||
|
|
||||||
|
unsigned char cOldRedBack = (unsigned char)(lOldBackGround >> 16);
|
||||||
|
unsigned char cOldGreenBack = (unsigned char)(lOldBackGround >> 8);
|
||||||
|
unsigned char cOldBlueBack = (unsigned char)lOldBackGround;
|
||||||
|
|
||||||
|
unsigned char cRedFore = (unsigned char)(lForeGround >> 16);
|
||||||
|
unsigned char cGreenFore = (unsigned char)(lForeGround >> 8);
|
||||||
|
unsigned char cBlueFore = (unsigned char)lForeGround;
|
||||||
|
|
||||||
|
unsigned char cRedBack = (unsigned char)(lBackGround >> 16);
|
||||||
|
unsigned char cGreenBack = (unsigned char)(lBackGround >> 8);
|
||||||
|
unsigned char cBlueBack = (unsigned char)lBackGround;
|
||||||
|
|
||||||
|
pucData = pucBits;
|
||||||
|
for (i = 0; i < rBmp.GetHeight(); i++)
|
||||||
|
{
|
||||||
|
for (j = 0; j < rBmp.GetWidth(); j++)
|
||||||
|
{
|
||||||
|
unsigned char cBmpRed = *pucData;
|
||||||
|
unsigned char cBmpGreen = *(pucData + 1);
|
||||||
|
unsigned char cBmpBlue = *(pucData + 2);
|
||||||
|
|
||||||
|
if ((cBmpRed == cOldRedFore) &&
|
||||||
|
(cBmpGreen == cOldGreenFore) &&
|
||||||
|
(cBmpBlue == cOldBlueFore))
|
||||||
|
{
|
||||||
|
*pucData = cRedFore;
|
||||||
|
pucData++;
|
||||||
|
*pucData = cGreenFore;
|
||||||
|
pucData++;
|
||||||
|
*pucData = cBlueFore;
|
||||||
|
pucData++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*pucData = cRedBack;
|
||||||
|
pucData++;
|
||||||
|
*pucData = cGreenBack;
|
||||||
|
pucData++;
|
||||||
|
*pucData = cBlueBack;
|
||||||
|
pucData++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((lScans = ::GpiSetBitmapBits( hPS
|
||||||
|
,0L
|
||||||
|
,(LONG)rBmp.GetHeight()
|
||||||
|
,(PBYTE)pucBits
|
||||||
|
,&vInfo
|
||||||
|
)) == GPI_ALTERROR)
|
||||||
|
{
|
||||||
|
vError = ::WinGetLastError(vHabmain);
|
||||||
|
sError = wxPMErrorToStr(vError);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
delete [] pucBits;
|
||||||
|
::GpiSetBitmap(hPS, NULLHANDLE);
|
||||||
|
::GpiDestroyPS(hPS);
|
||||||
|
::DevCloseDC(hDC);
|
||||||
|
}
|
||||||
::GpiWCBitBlt( (HPS)GetHPS()
|
::GpiWCBitBlt( (HPS)GetHPS()
|
||||||
,hBitmap
|
,hBitmap
|
||||||
,4
|
,4
|
||||||
@@ -1463,8 +1585,8 @@ void wxDC::DoDrawBitmap(
|
|||||||
,BBO_IGNORE
|
,BBO_IGNORE
|
||||||
);
|
);
|
||||||
::GpiSetBitmap((HPS)GetHPS(), hBitmapOld);
|
::GpiSetBitmap((HPS)GetHPS(), hBitmapOld);
|
||||||
::GpiSetColor((HPS)GetHPS(), lOldTextground);
|
::GpiSetColor((HPS)GetHPS(), lOldForeGround);
|
||||||
::GpiSetBackColor((HPS)GetHPS(), lOldBackground);
|
::GpiSetBackColor((HPS)GetHPS(), lOldBackGround);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // end of wxDC::DoDrawBitmap
|
} // end of wxDC::DoDrawBitmap
|
||||||
|
@@ -1146,6 +1146,11 @@ bool wxFrame::HandleMenuSelect(
|
|||||||
vEvent.SetEventObject(this);
|
vEvent.SetEventObject(this);
|
||||||
GetEventHandler()->ProcessEvent(vEvent); // return value would be ignored by PM
|
GetEventHandler()->ProcessEvent(vEvent); // return value would be ignored by PM
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DoGiveHelp(wxEmptyString, FALSE);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} // end of wxFrame::HandleMenuSelect
|
} // end of wxFrame::HandleMenuSelect
|
||||||
|
@@ -101,6 +101,8 @@ void wxIcon::CopyFromBitmap(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
wxMask* pMask = rBmp.GetMask();
|
wxMask* pMask = rBmp.GetMask();
|
||||||
|
HBITMAP hBmp = NULLHANDLE;
|
||||||
|
HBITMAP hBmpMask = NULLHANDLE;
|
||||||
HBITMAP hOldBitmap = NULLHANDLE;
|
HBITMAP hOldBitmap = NULLHANDLE;
|
||||||
ERRORID vError;
|
ERRORID vError;
|
||||||
wxString sError;
|
wxString sError;
|
||||||
@@ -117,13 +119,7 @@ void wxIcon::CopyFromBitmap(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
POINTERINFO vIconInfo;
|
BITMAPINFOHEADER2 vHeader;
|
||||||
|
|
||||||
memset(&vIconInfo, '\0', sizeof(POINTERINFO));
|
|
||||||
vIconInfo.fPointer = FALSE; // we want an icon, not a pointer
|
|
||||||
vIconInfo.hbmPointer = (HBITMAP) pMask->GetMaskBitmap();
|
|
||||||
vIconInfo.hbmColor = GetHbitmapOf(rBmp);
|
|
||||||
|
|
||||||
SIZEL vSize = {0, 0};
|
SIZEL vSize = {0, 0};
|
||||||
DEVOPENSTRUC vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
|
DEVOPENSTRUC vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
|
||||||
HDC hDCSrc = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
|
HDC hDCSrc = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
|
||||||
@@ -133,22 +129,85 @@ void wxIcon::CopyFromBitmap(
|
|||||||
POINTL vPoint[4] = { 0, 0, rBmp.GetWidth(), rBmp.GetHeight(),
|
POINTL vPoint[4] = { 0, 0, rBmp.GetWidth(), rBmp.GetHeight(),
|
||||||
0, 0, rBmp.GetWidth(), rBmp.GetHeight()
|
0, 0, rBmp.GetWidth(), rBmp.GetHeight()
|
||||||
};
|
};
|
||||||
if ((hOldBitmap = ::GpiSetBitmap(hPSSrc, (HBITMAP) pMask->GetMaskBitmap())) == HBM_ERROR)
|
POINTL vPointMask[4] = { 0, 0, rBmp.GetWidth(), rBmp.GetHeight(),
|
||||||
|
0, 0, rBmp.GetWidth(), rBmp.GetHeight()
|
||||||
|
};
|
||||||
|
|
||||||
|
POINTERINFO vIconInfo;
|
||||||
|
|
||||||
|
memset(&vIconInfo, '\0', sizeof(POINTERINFO));
|
||||||
|
vIconInfo.fPointer = FALSE; // we want an icon, not a pointer
|
||||||
|
|
||||||
|
memset(&vHeader, '\0', 16);
|
||||||
|
vHeader.cbFix = 16;
|
||||||
|
vHeader.cx = (ULONG)rBmp.GetWidth();
|
||||||
|
vHeader.cy = (ULONG)rBmp.GetHeight();
|
||||||
|
vHeader.cPlanes = 1L;
|
||||||
|
vHeader.cBitCount = 24;
|
||||||
|
|
||||||
|
hBmp = ::GpiCreateBitmap( hPSDst
|
||||||
|
,&vHeader
|
||||||
|
,0L
|
||||||
|
,NULL
|
||||||
|
,NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
if ((hOldBitmap = ::GpiSetBitmap(hPSDst, hBmp)) == HBM_ERROR)
|
||||||
{
|
{
|
||||||
vError = ::WinGetLastError(vHabmain);
|
vError = ::WinGetLastError(vHabmain);
|
||||||
sError = wxPMErrorToStr(vError);
|
sError = wxPMErrorToStr(vError);
|
||||||
}
|
}
|
||||||
if ((hOldBitmap = ::GpiSetBitmap(hPSDst, (HBITMAP) vIconInfo.hbmColor)) == HBM_ERROR)
|
if ((hOldBitmap = ::GpiSetBitmap(hPSSrc, (HBITMAP)rBmp.GetHBITMAP())) == HBM_ERROR)
|
||||||
{
|
{
|
||||||
vError = ::WinGetLastError(vHabmain);
|
vError = ::WinGetLastError(vHabmain);
|
||||||
sError = wxPMErrorToStr(vError);
|
sError = wxPMErrorToStr(vError);
|
||||||
}
|
}
|
||||||
::GpiSetBitmapId(hPSDst, (HBITMAP) vIconInfo.hbmColor, 1L);
|
|
||||||
if ((lHits = ::GpiBitBlt( hPSDst
|
if ((lHits = ::GpiBitBlt( hPSDst
|
||||||
,hPSSrc
|
,hPSSrc
|
||||||
,4L
|
,4L
|
||||||
,vPoint
|
,vPoint
|
||||||
,ROP_SRCAND
|
,ROP_SRCCOPY
|
||||||
|
,BBO_IGNORE
|
||||||
|
)) == GPI_ERROR)
|
||||||
|
{
|
||||||
|
vError = ::WinGetLastError(vHabmain);
|
||||||
|
sError = wxPMErrorToStr(vError);
|
||||||
|
}
|
||||||
|
if ((hOldBitmap = ::GpiSetBitmap(hPSDst, NULLHANDLE)) == HBM_ERROR)
|
||||||
|
{
|
||||||
|
vError = ::WinGetLastError(vHabmain);
|
||||||
|
sError = wxPMErrorToStr(vError);
|
||||||
|
}
|
||||||
|
if ((hOldBitmap = ::GpiSetBitmap(hPSSrc, NULLHANDLE)) == HBM_ERROR)
|
||||||
|
{
|
||||||
|
vError = ::WinGetLastError(vHabmain);
|
||||||
|
sError = wxPMErrorToStr(vError);
|
||||||
|
}
|
||||||
|
vIconInfo.hbmColor = hBmp;
|
||||||
|
|
||||||
|
vHeader.cy = (ULONG)rBmp.GetHeight();
|
||||||
|
hBmpMask = ::GpiCreateBitmap( hPSDst
|
||||||
|
,&vHeader
|
||||||
|
,0L
|
||||||
|
,NULL
|
||||||
|
,NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
if ((hOldBitmap = ::GpiSetBitmap(hPSDst, hBmpMask)) == HBM_ERROR)
|
||||||
|
{
|
||||||
|
vError = ::WinGetLastError(vHabmain);
|
||||||
|
sError = wxPMErrorToStr(vError);
|
||||||
|
}
|
||||||
|
if ((hOldBitmap = ::GpiSetBitmap(hPSSrc, (HBITMAP)pMask->GetMaskBitmap())) == HBM_ERROR)
|
||||||
|
{
|
||||||
|
vError = ::WinGetLastError(vHabmain);
|
||||||
|
sError = wxPMErrorToStr(vError);
|
||||||
|
}
|
||||||
|
if ((lHits = ::GpiBitBlt( hPSDst
|
||||||
|
,hPSSrc
|
||||||
|
,4L
|
||||||
|
,vPointMask
|
||||||
|
,ROP_SRCCOPY
|
||||||
,BBO_IGNORE
|
,BBO_IGNORE
|
||||||
)) == GPI_ERROR)
|
)) == GPI_ERROR)
|
||||||
{
|
{
|
||||||
@@ -166,12 +225,7 @@ void wxIcon::CopyFromBitmap(
|
|||||||
sError = wxPMErrorToStr(vError);
|
sError = wxPMErrorToStr(vError);
|
||||||
}
|
}
|
||||||
|
|
||||||
::GpiSetBitmap(hPSSrc, NULL);
|
vIconInfo.hbmPointer = hBmpMask;
|
||||||
::GpiSetBitmap(hPSDst, NULL);
|
|
||||||
::GpiDestroyPS(hPSSrc);
|
|
||||||
::GpiDestroyPS(hPSDst);
|
|
||||||
::DevCloseDC(hDCSrc);
|
|
||||||
::DevCloseDC(hDCDst);
|
|
||||||
|
|
||||||
HICON hIcon = ::WinCreatePointerIndirect( HWND_DESKTOP
|
HICON hIcon = ::WinCreatePointerIndirect( HWND_DESKTOP
|
||||||
,&vIconInfo
|
,&vIconInfo
|
||||||
@@ -198,6 +252,12 @@ void wxIcon::CopyFromBitmap(
|
|||||||
//
|
//
|
||||||
delete pMask;
|
delete pMask;
|
||||||
}
|
}
|
||||||
|
::GpiSetBitmap(hPSSrc, NULL);
|
||||||
|
::GpiSetBitmap(hPSDst, NULL);
|
||||||
|
::GpiDestroyPS(hPSSrc);
|
||||||
|
::GpiDestroyPS(hPSDst);
|
||||||
|
::DevCloseDC(hDCSrc);
|
||||||
|
::DevCloseDC(hDCDst);
|
||||||
} // end of wxIcon::CopyFromBitmap
|
} // end of wxIcon::CopyFromBitmap
|
||||||
|
|
||||||
bool wxIcon::LoadFile(
|
bool wxIcon::LoadFile(
|
||||||
|
@@ -25,6 +25,7 @@ LIBTARGET=$(WXLIB)
|
|||||||
COMTEMPTGT1=$(WXDIR)\lib\wxcom1.lib
|
COMTEMPTGT1=$(WXDIR)\lib\wxcom1.lib
|
||||||
COMTEMPTGT2=$(WXDIR)\lib\wxcom2.lib
|
COMTEMPTGT2=$(WXDIR)\lib\wxcom2.lib
|
||||||
COMTEMPTGT3=$(WXDIR)\lib\wxcom3.lib
|
COMTEMPTGT3=$(WXDIR)\lib\wxcom3.lib
|
||||||
|
COMTEMPTGT4=$(WXDIR)\lib\wxcom4.lib
|
||||||
GENTEMPTGT=$(WXDIR)\lib\wxgen.lib
|
GENTEMPTGT=$(WXDIR)\lib\wxgen.lib
|
||||||
NONESTEMPTGT=$(WXDIR)\lib\wxnones.lib
|
NONESTEMPTGT=$(WXDIR)\lib\wxnones.lib
|
||||||
OS2TEMPTGT1=$(WXDIR)\lib\wxos21.lib
|
OS2TEMPTGT1=$(WXDIR)\lib\wxos21.lib
|
||||||
@@ -295,6 +296,7 @@ COMMONOBJS = \
|
|||||||
..\common\$D\sckfile.obj \
|
..\common\$D\sckfile.obj \
|
||||||
..\common\$D\sckipc.obj \
|
..\common\$D\sckipc.obj \
|
||||||
..\common\$D\sckstrm.obj \
|
..\common\$D\sckstrm.obj \
|
||||||
|
..\common\$D\settcmn.obj \
|
||||||
..\common\$D\sizer.obj \
|
..\common\$D\sizer.obj \
|
||||||
..\common\$D\socket.obj \
|
..\common\$D\socket.obj \
|
||||||
..\common\$D\statbar.obj \
|
..\common\$D\statbar.obj \
|
||||||
@@ -430,6 +432,7 @@ COMLIBOBJS3 = \
|
|||||||
sckfile.obj \
|
sckfile.obj \
|
||||||
sckipc.obj \
|
sckipc.obj \
|
||||||
sckstrm.obj \
|
sckstrm.obj \
|
||||||
|
settcmn.obj \
|
||||||
sizer.obj \
|
sizer.obj \
|
||||||
socket.obj \
|
socket.obj \
|
||||||
statbar.obj \
|
statbar.obj \
|
||||||
@@ -458,7 +461,9 @@ COMLIBOBJS3 = \
|
|||||||
wxchar.obj \
|
wxchar.obj \
|
||||||
wxexpr.obj \
|
wxexpr.obj \
|
||||||
xpmdecod.obj \
|
xpmdecod.obj \
|
||||||
y_tab.obj \
|
y_tab.obj
|
||||||
|
|
||||||
|
COMLIBOBJS4 = \
|
||||||
zipstrm.obj \
|
zipstrm.obj \
|
||||||
zstream.obj
|
zstream.obj
|
||||||
|
|
||||||
@@ -800,6 +805,7 @@ $(COMLIBOBJS3):
|
|||||||
copy ..\common\$D\sckfile.obj
|
copy ..\common\$D\sckfile.obj
|
||||||
copy ..\common\$D\sckipc.obj
|
copy ..\common\$D\sckipc.obj
|
||||||
copy ..\common\$D\sckstrm.obj
|
copy ..\common\$D\sckstrm.obj
|
||||||
|
copy ..\common\$D\settcmn.obj
|
||||||
copy ..\common\$D\sizer.obj
|
copy ..\common\$D\sizer.obj
|
||||||
copy ..\common\$D\socket.obj
|
copy ..\common\$D\socket.obj
|
||||||
copy ..\common\$D\statbar.obj
|
copy ..\common\$D\statbar.obj
|
||||||
@@ -829,6 +835,8 @@ $(COMLIBOBJS3):
|
|||||||
copy ..\common\$D\wxexpr.obj
|
copy ..\common\$D\wxexpr.obj
|
||||||
copy ..\common\$D\xpmdecod.obj
|
copy ..\common\$D\xpmdecod.obj
|
||||||
copy ..\common\$D\y_tab.obj
|
copy ..\common\$D\y_tab.obj
|
||||||
|
|
||||||
|
$(COMLIBOBJS4):
|
||||||
copy ..\common\$D\zipstrm.obj
|
copy ..\common\$D\zipstrm.obj
|
||||||
copy ..\common\$D\zstream.obj
|
copy ..\common\$D\zstream.obj
|
||||||
|
|
||||||
@@ -1038,6 +1046,13 @@ $(WXDIR)\lib\wxcom3.lib: $(COMLIBOBJS3)
|
|||||||
$**;
|
$**;
|
||||||
<<
|
<<
|
||||||
|
|
||||||
|
$(WXDIR)\lib\wxcom4.lib: $(COMLIBOBJS4)
|
||||||
|
-touch $(WXDIR)\lib\wxcom4.lib
|
||||||
|
-del $(WXDIR)\lib\wxcom4.lib
|
||||||
|
ilib $(LIBFLAGS) $@ @<<
|
||||||
|
$**;
|
||||||
|
<<
|
||||||
|
|
||||||
$(WXDIR)\lib\wxgen.lib: $(GENLIBOBJS)
|
$(WXDIR)\lib\wxgen.lib: $(GENLIBOBJS)
|
||||||
-touch $(WXDIR)\lib\wxgen.lib
|
-touch $(WXDIR)\lib\wxgen.lib
|
||||||
-del $(WXDIR)\lib\wxgen.lib
|
-del $(WXDIR)\lib\wxgen.lib
|
||||||
@@ -1079,6 +1094,7 @@ $(WXDIR)\lib\wx.lib: \
|
|||||||
$(COMTEMPTGT1) \
|
$(COMTEMPTGT1) \
|
||||||
$(COMTEMPTGT2) \
|
$(COMTEMPTGT2) \
|
||||||
$(COMTEMPTGT3) \
|
$(COMTEMPTGT3) \
|
||||||
|
$(COMTEMPTGT4) \
|
||||||
$(GENTEMPTGT) \
|
$(GENTEMPTGT) \
|
||||||
$(HTMLTEMPTGT) \
|
$(HTMLTEMPTGT) \
|
||||||
$(NONESTEMPTGT) \
|
$(NONESTEMPTGT) \
|
||||||
@@ -1093,6 +1109,7 @@ $(WXDIR)\lib\wx.lib: \
|
|||||||
del $(COMTEMPTGT1)
|
del $(COMTEMPTGT1)
|
||||||
del $(COMTEMPTGT2)
|
del $(COMTEMPTGT2)
|
||||||
del $(COMTEMPTGT3)
|
del $(COMTEMPTGT3)
|
||||||
|
del $(COMTEMPTGT4)
|
||||||
del $(GENTEMPTGT)
|
del $(GENTEMPTGT)
|
||||||
del $(HTMLTEMPTGT)
|
del $(HTMLTEMPTGT)
|
||||||
del $(NONESTEMPTGT)
|
del $(NONESTEMPTGT)
|
||||||
|
@@ -2452,6 +2452,8 @@ EXPORTS
|
|||||||
;PUBDEFs (Symbols available from object file):
|
;PUBDEFs (Symbols available from object file):
|
||||||
;wxFrameBase::OnIdle(wxIdleEvent&)
|
;wxFrameBase::OnIdle(wxIdleEvent&)
|
||||||
OnIdle__11wxFrameBaseFR11wxIdleEvent
|
OnIdle__11wxFrameBaseFR11wxIdleEvent
|
||||||
|
;wxFrameBase::PushStatusText(const wxString&,int)
|
||||||
|
PushStatusText__11wxFrameBaseFRC8wxStringi
|
||||||
;wxFrameBase::DeleteAllBars()
|
;wxFrameBase::DeleteAllBars()
|
||||||
DeleteAllBars__11wxFrameBaseFv
|
DeleteAllBars__11wxFrameBaseFv
|
||||||
;wxFrameBase::SetMenuBar(wxMenuBar*)
|
;wxFrameBase::SetMenuBar(wxMenuBar*)
|
||||||
@@ -2478,6 +2480,8 @@ EXPORTS
|
|||||||
ProcessCommand__11wxFrameBaseFi
|
ProcessCommand__11wxFrameBaseFi
|
||||||
;wxFrameBase::SetStatusWidths(int,const int*)
|
;wxFrameBase::SetStatusWidths(int,const int*)
|
||||||
SetStatusWidths__11wxFrameBaseFiPCi
|
SetStatusWidths__11wxFrameBaseFiPCi
|
||||||
|
;wxFrameBase::PopStatusText(int)
|
||||||
|
PopStatusText__11wxFrameBaseFi
|
||||||
;wxFrameBase::wxFrameBase()
|
;wxFrameBase::wxFrameBase()
|
||||||
__ct__11wxFrameBaseFv
|
__ct__11wxFrameBaseFv
|
||||||
;wxFrameBase::CreateToolBar(long,int,const wxString&)
|
;wxFrameBase::CreateToolBar(long,int,const wxString&)
|
||||||
@@ -2492,6 +2496,8 @@ EXPORTS
|
|||||||
__dt__11wxFrameBaseFv
|
__dt__11wxFrameBaseFv
|
||||||
;wxFrameBase::AttachMenuBar(wxMenuBar*)
|
;wxFrameBase::AttachMenuBar(wxMenuBar*)
|
||||||
AttachMenuBar__11wxFrameBaseFP9wxMenuBar
|
AttachMenuBar__11wxFrameBaseFP9wxMenuBar
|
||||||
|
;wxFrameBase::DoGiveHelp(const wxString&,unsigned long)
|
||||||
|
DoGiveHelp__11wxFrameBaseFRC8wxStringUl
|
||||||
__vft11wxFrameBase8wxObject
|
__vft11wxFrameBase8wxObject
|
||||||
;wxFrameBase::SetStatusText(const wxString&,int)
|
;wxFrameBase::SetStatusText(const wxString&,int)
|
||||||
SetStatusText__11wxFrameBaseFRC8wxStringi
|
SetStatusText__11wxFrameBaseFRC8wxStringi
|
||||||
@@ -4962,6 +4968,14 @@ EXPORTS
|
|||||||
__vft14wxSocketStream13wxInputStream12wxStreamBase
|
__vft14wxSocketStream13wxInputStream12wxStreamBase
|
||||||
;wxSocketOutputStream::~wxSocketOutputStream()
|
;wxSocketOutputStream::~wxSocketOutputStream()
|
||||||
__dt__20wxSocketOutputStreamFv
|
__dt__20wxSocketOutputStreamFv
|
||||||
|
;From object file: ..\common\settcmn.cpp
|
||||||
|
;PUBDEFs (Symbols available from object file):
|
||||||
|
;wxSystemSettings::ms_screen
|
||||||
|
ms_screen__16wxSystemSettings
|
||||||
|
;wxSystemSettings::SetScreen(wxSystemScreen)
|
||||||
|
SetScreen__16wxSystemSettingsF14wxSystemScreen
|
||||||
|
;wxSystemSettings::GetScreen()
|
||||||
|
GetScreen__16wxSystemSettingsFv
|
||||||
;From object file: ..\common\sizer.cpp
|
;From object file: ..\common\sizer.cpp
|
||||||
;PUBDEFs (Symbols available from object file):
|
;PUBDEFs (Symbols available from object file):
|
||||||
;wxSizerItem::wxSizerItem(int,int,int,int,int,wxObject*)
|
;wxSizerItem::wxSizerItem(int,int,int,int,int,wxObject*)
|
||||||
@@ -5244,25 +5258,40 @@ EXPORTS
|
|||||||
GetLocal__12wxSocketBaseCFR13wxSockAddress
|
GetLocal__12wxSocketBaseCFR13wxSockAddress
|
||||||
;From object file: ..\common\statbar.cpp
|
;From object file: ..\common\statbar.cpp
|
||||||
;PUBDEFs (Symbols available from object file):
|
;PUBDEFs (Symbols available from object file):
|
||||||
|
;wxStatusBarBase::PopStatusText(int)
|
||||||
|
PopStatusText__15wxStatusBarBaseFi
|
||||||
;wxStatusBarBase::FreeWidths()
|
;wxStatusBarBase::FreeWidths()
|
||||||
FreeWidths__15wxStatusBarBaseFv
|
FreeWidths__15wxStatusBarBaseFv
|
||||||
__vft15wxStatusBarBase8wxObject
|
__vft15wxStatusBarBase8wxObject
|
||||||
|
;wxStatusBarBase::GetStatusStack(int) const
|
||||||
|
GetStatusStack__15wxStatusBarBaseCFi
|
||||||
;wxStatusBarBase::InitWidths()
|
;wxStatusBarBase::InitWidths()
|
||||||
InitWidths__15wxStatusBarBaseFv
|
InitWidths__15wxStatusBarBaseFv
|
||||||
;wxStatusBar::sm_classwxStatusBar
|
;wxStatusBar::sm_classwxStatusBar
|
||||||
sm_classwxStatusBar__11wxStatusBar
|
sm_classwxStatusBar__11wxStatusBar
|
||||||
;wxStatusBarBase::~wxStatusBarBase()
|
;wxStatusBarBase::~wxStatusBarBase()
|
||||||
__dt__15wxStatusBarBaseFv
|
__dt__15wxStatusBarBaseFv
|
||||||
|
;wxStatusBarBase::InitStacks()
|
||||||
|
InitStacks__15wxStatusBarBaseFv
|
||||||
|
;wxwxListStringNode::DeleteData()
|
||||||
|
DeleteData__18wxwxListStringNodeFv
|
||||||
;wxStatusBarBase::SetStatusWidths(int,const int*)
|
;wxStatusBarBase::SetStatusWidths(int,const int*)
|
||||||
SetStatusWidths__15wxStatusBarBaseFiPCi
|
SetStatusWidths__15wxStatusBarBaseFiPCi
|
||||||
|
;wxStatusBarBase::GetOrCreateStatusStack(int)
|
||||||
|
GetOrCreateStatusStack__15wxStatusBarBaseFi
|
||||||
;wxStatusBarBase::CalculateAbsWidths(int) const
|
;wxStatusBarBase::CalculateAbsWidths(int) const
|
||||||
CalculateAbsWidths__15wxStatusBarBaseCFi
|
CalculateAbsWidths__15wxStatusBarBaseCFi
|
||||||
;wxStatusBarBase::wxStatusBarBase()
|
;wxStatusBarBase::wxStatusBarBase()
|
||||||
__ct__15wxStatusBarBaseFv
|
__ct__15wxStatusBarBaseFv
|
||||||
;wxStatusBarBase::SetFieldsCount(int,const int*)
|
;wxStatusBarBase::SetFieldsCount(int,const int*)
|
||||||
SetFieldsCount__15wxStatusBarBaseFiPCi
|
SetFieldsCount__15wxStatusBarBaseFiPCi
|
||||||
|
;wxStatusBarBase::PushStatusText(const wxString&,int)
|
||||||
|
PushStatusText__15wxStatusBarBaseFRC8wxStringi
|
||||||
|
;wxStatusBarBase::FreeStacks()
|
||||||
|
FreeStacks__15wxStatusBarBaseFv
|
||||||
;wxConstructorForwxStatusBar()
|
;wxConstructorForwxStatusBar()
|
||||||
wxConstructorForwxStatusBar__Fv
|
wxConstructorForwxStatusBar__Fv
|
||||||
|
__vft18wxwxListStringNode10wxNodeBase
|
||||||
;From object file: ..\common\strconv.cpp
|
;From object file: ..\common\strconv.cpp
|
||||||
;PUBDEFs (Symbols available from object file):
|
;PUBDEFs (Symbols available from object file):
|
||||||
;wxStrConvModule::sm_classwxStrConvModule
|
;wxStrConvModule::sm_classwxStrConvModule
|
||||||
@@ -7180,6 +7209,24 @@ EXPORTS
|
|||||||
__vft16wxZipInputStream12wxStreamBase
|
__vft16wxZipInputStream12wxStreamBase
|
||||||
;wxZipInputStream::Eof() const
|
;wxZipInputStream::Eof() const
|
||||||
Eof__16wxZipInputStreamCFv
|
Eof__16wxZipInputStreamCFv
|
||||||
|
;From object file: ..\common\zstream.cpp
|
||||||
|
;PUBDEFs (Symbols available from object file):
|
||||||
|
;wxZlibInputStream::wxZlibInputStream(wxInputStream&)
|
||||||
|
__ct__17wxZlibInputStreamFR13wxInputStream
|
||||||
|
;wxZlibOutputStream::wxZlibOutputStream(wxOutputStream&,int)
|
||||||
|
__ct__18wxZlibOutputStreamFR14wxOutputStreami
|
||||||
|
;wxZlibInputStream::OnSysRead(void*,unsigned int)
|
||||||
|
OnSysRead__17wxZlibInputStreamFPvUi
|
||||||
|
;wxZlibOutputStream::Sync()
|
||||||
|
Sync__18wxZlibOutputStreamFv
|
||||||
|
;wxZlibOutputStream::OnSysWrite(const void*,unsigned int)
|
||||||
|
OnSysWrite__18wxZlibOutputStreamFPCvUi
|
||||||
|
__vft18wxZlibOutputStream12wxStreamBase
|
||||||
|
;wxZlibInputStream::~wxZlibInputStream()
|
||||||
|
__dt__17wxZlibInputStreamFv
|
||||||
|
;wxZlibOutputStream::~wxZlibOutputStream()
|
||||||
|
__dt__18wxZlibOutputStreamFv
|
||||||
|
__vft17wxZlibInputStream12wxStreamBase
|
||||||
;From object file: ..\generic\busyinfo.cpp
|
;From object file: ..\generic\busyinfo.cpp
|
||||||
;PUBDEFs (Symbols available from object file):
|
;PUBDEFs (Symbols available from object file):
|
||||||
;wxBusyInfo::~wxBusyInfo()
|
;wxBusyInfo::~wxBusyInfo()
|
||||||
@@ -14712,6 +14759,8 @@ EXPORTS
|
|||||||
wxGetMousePosition__FPiT1
|
wxGetMousePosition__FPiT1
|
||||||
;wxDrawBorder(unsigned long,_RECTL&,unsigned long)
|
;wxDrawBorder(unsigned long,_RECTL&,unsigned long)
|
||||||
wxDrawBorder__FUlR6_RECTLT1
|
wxDrawBorder__FUlR6_RECTLT1
|
||||||
|
;wxShutdown(wxShutdownFlags)
|
||||||
|
wxShutdown__F15wxShutdownFlags
|
||||||
;wxPathExists(const wxString&)
|
;wxPathExists(const wxString&)
|
||||||
wxPathExists__FRC8wxString
|
wxPathExists__FRC8wxString
|
||||||
;wxGetWindowText(unsigned long)
|
;wxGetWindowText(unsigned long)
|
||||||
|
Reference in New Issue
Block a user