/* -*-C-*-
-$Id: dibutils.c,v 1.2 1995/09/25 18:10:46 adams Exp $
+$Id: dibutils.c,v 1.3 1997/05/13 05:31:59 cph Exp $
-Copyright (c) 1994-1995 Massachusetts Institute of Technology
+Copyright (c) 1994-97 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
* RETURNS :A handle to the DIB. *
* *
****************************************************************************/
-HANDLE OpenDIB (LPSTR szFile)
+HANDLE FAR WINAPI
+OpenDIB (LPSTR szFile)
{
HFILE fh;
BITMAPINFOHEADER bi;
* FALSE - otherwise *
* *
****************************************************************************/
-BOOL WriteDIB (
- LPSTR szFile,
- HANDLE hdib)
+BOOL FAR WINAPI
+WriteDIB (LPSTR szFile, HANDLE hdib)
{
BITMAPFILEHEADER hdr;
LPBITMAPINFOHEADER lpbi;
* FALSE - otherwise *
* *
****************************************************************************/
-BOOL DeleteDIB (HANDLE hdib)
+BOOL FAR WINAPI
+DeleteDIB (HANDLE hdib)
{
if (hdib)
return GlobalFree (hdib) == 0;
* RETURNS : Height of DIB in pixels *
* *
****************************************************************************/
-DWORD DibHeight (HANDLE hdib)
+DWORD FAR WINAPI
+DibHeight (HANDLE hdib)
{
LPBITMAPINFOHEADER lpbmi;
LPBITMAPCOREHEADER lpbci;
* RETURNS : Width of DIB in pixels *
* *
****************************************************************************/
-DWORD DibWidth (HANDLE hdib)
+DWORD FAR WINAPI
+DibWidth (HANDLE hdib)
{
LPBITMAPINFOHEADER lpbmi;
LPBITMAPCOREHEADER lpbci;
* FUNCTION : DIBSetPixeslUnaligned (HANDLE hdib, BYTE *bytes) *
* *
****************************************************************************/
-BOOL DIBSetPixelsUnaligned (HANDLE hdib, BYTE *bytes)
+BOOL FAR WINAPI
+DIBSetPixelsUnaligned (HANDLE hdib, BYTE *bytes)
{
LPBITMAPINFOHEADER lpbmi;
LPBITMAPCOREHEADER lpbci;
* RETURNS : A handle to the DIB *
* *
****************************************************************************/
-HANDLE DibFromBitmap (
- HBITMAP hbm,
- DWORD biStyle,
- WORD biBits,
- HPALETTE hpal)
+HANDLE FAR WINAPI
+DibFromBitmap (HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal)
{
BITMAP bm;
BITMAPINFOHEADER bi;
* RETURNS : A handle to the DIB *
* *
****************************************************************************/
-HANDLE CreateDIB (
- int width,
- int height,
- DWORD biStyle,
- WORD biBits,
- HPALETTE hpal)
+HANDLE FAR WINAPI
+CreateDIB (int width, int height, DWORD biStyle, WORD biBits, HPALETTE hpal)
{
BITMAPINFOHEADER bi;
BITMAPINFO FAR *lpbi;
* RETURNS : A handle to the DDB. *
* *
****************************************************************************/
-HBITMAP BitmapFromDib (
- HANDLE hdib,
- HPALETTE hpal)
+HBITMAP FAR WINAPI
+BitmapFromDib (HANDLE hdib, HPALETTE hpal)
{
LPBITMAPINFOHEADER lpbi;
HPALETTE hpalT;
* FALSE - otherwise. *
* *
****************************************************************************/
-BOOL DibBlt (
- HDC hdc,
- INT x0,
- INT y0,
- INT dx,
- INT dy,
- HANDLE hdib,
- INT x1,
- INT y1,
- LONG rop)
+BOOL FAR WINAPI
+DibBlt (HDC hdc,
+ INT x0,
+ INT y0,
+ INT dx,
+ INT dy,
+ HANDLE hdib,
+ INT x1,
+ INT y1,
+ LONG rop)
{
LPBITMAPINFOHEADER lpbi;
// HPALETTE hpal,hpalT;
* RETURNS : A handle to the new bitmap. *
* *
****************************************************************************/
-HBITMAP CopyBitmap (HBITMAP hbm)
+HBITMAP FAR WINAPI
+CopyBitmap (HBITMAP hbm)
{
BITMAP bm;
* RETURNS : A handle to the new bitmap. *
* *
****************************************************************************/
-HBITMAP CropBitmap (
- HBITMAP hbm,
- int left,
- int top,
- int right,
- int bottom)
+HBITMAP FAR WINAPI
+CropBitmap (HBITMAP hbm, int left, int top, int right, int bottom)
{
HDC hMemDCsrc;
HDC hMemDCdst;
/* -*-C-*-
-$Id: dibutils.h,v 1.2 1995/09/25 18:11:12 adams Exp $
+$Id: dibutils.h,v 1.3 1997/05/13 05:31:52 cph Exp $
-Copyright (c) 1994-1995 Massachusetts Institute of Technology
+Copyright (c) 1994-97 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
/* Declarations of functions used in dib.c module */
/***********************************************************/
-HANDLE OpenDIB (LPSTR szFile);
-BOOL WriteDIB (LPSTR szFile,HANDLE hdib);
+HANDLE FAR WINAPI OpenDIB (LPSTR szFile);
+BOOL FAR WINAPI WriteDIB (LPSTR szFile,HANDLE hdib);
WORD PaletteSize (VOID FAR * pv);
WORD DibNumColors (VOID FAR * pv);
HPALETTE CreateDibPalette (HANDLE hdib);
HPALETTE CreateBIPalette (LPBITMAPINFOHEADER lpbi);
-HANDLE DibFromBitmap (HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal);
-HBITMAP BitmapFromDib (HANDLE hdib, HPALETTE hpal);
-BOOL DibBlt (HDC hdc, INT x0, INT y0, INT dx, INT dy, HANDLE hdib, INT x1, INT y1, LONG rop);
+HANDLE FAR WINAPI DibFromBitmap (HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal);
+HBITMAP FAR WINAPI BitmapFromDib (HANDLE hdib, HPALETTE hpal);
+BOOL FAR WINAPI DibBlt (HDC hdc, INT x0, INT y0, INT dx, INT dy, HANDLE hdib, INT x1, INT y1, LONG rop);
BOOL StretchDibBlt (HDC hdc, INT x0, INT y0, INT dx, INT dy, HANDLE hdib, INT x1, INT y1, INT dx1, INT dy1, LONG rop);
BOOL DibInfo (HANDLE hdib,LPBITMAPINFOHEADER lpbi);
HANDLE ReadDibBitmapInfo (INT fh);
VOID DrawSelect (HDC hdc, BOOL fDraw);
VOID PASCAL NormalizeRect (RECT *prc);
VOID TrackMouse (HWND hwnd, MPOINT pt);
-HBITMAP CopyBitmap (HBITMAP hbm);
+HBITMAP FAR WINAPI CopyBitmap (HBITMAP hbm);
HPALETTE CopyPalette (HPALETTE hpal);
-HBITMAP CropBitmap (HBITMAP hbm, int,int,int,int);
+HBITMAP FAR WINAPI CropBitmap (HBITMAP hbm, int,int,int,int);
HANDLE RenderFormat (INT cf);
HANDLE RealizeDibFormat (DWORD biStyle, WORD biBits);