home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
dive1.zip
/
ENDIVEDR.H
< prev
next >
Wrap
Text File
|
1996-03-06
|
10KB
|
168 lines
/*****************************************************************************/
/* IBM Confidential */
/* */
/* Copyright (c) IBM Corporation 1991 */
/* All Rights Reserved */
/* */
/* SOURCE FILE NAME: EnDIVE.H */
/* */
/* DESCRIPTIVE NAME: Enhanced Direct Interface for Video extensions */
/* */
/* FUNCTION: This file defines any values and external varaibles specific */
/* to the video stream stream handler. */
/* */
/*****************************************************************************/
#define VRAM_ALLOCATE 1
#define VRAM_DEALLOCATE 2
#define VRAM_QUERY 3
#define ENDIVE_REQUEST_UNAVAILABLE 0x0001
#define ENDIVE_REQUEST_RELOCATED 0x0002
#define ENDIVE_ALLOC_SHARED 0x0001 /* in/out */
#define ENDIVE_ALLOC_RECTANGLE 0x0002 /* in/out */
#define ENDIVE_ALLOC_WORKBUFFER 0x0004 /* out flag */
#define ENDIVE_ALLOC_NEWBUFFER 0x0008 /* out flag */
#define ENDIVE_SETUP_CANT_HANDLE 0x0001 /* HW can't handle current*/
/* setup for some reason */
/* Endive DevEscape functions */
#define DEVESC_REGISTER 34000L
#define DEVESC_HWREQUEST 34010L
#define DEVESC_VRAMALLOC 34020L
#define DEVESC_EXTPUT 34030L
#define DEVESC_EXTGET 34040L
#define DEVESC_EXTQUERY 34050L
#define DEVESC_QUERYFB 34060L /* Not endive specific. */
#define DEVESC_SETUPBLITTERNOTIFY 34070L
#define DEVESC_VIDEOHIDDEN 34080L
/*
* Defines for the ulFlags field of the PUTIMAGEBUF data structure.
*/
#define PIF_Y_ORG_BOTTOM 0x0001 /* Set if origin @ bottom */
#define PIF_X_ORG_RIGHT 0x0002 /* Set of origin @ right */
/*
** NOTE: This flag can be used as an optimization for 8 bpp images
** for the following two conditions:
**
** 1.) The HW has support for cached custom palettes and the
** client application is playing frames using the same
** palette. (The driver will return IMG_CAPS_PAL_CACHING
** if it has this support).
**
** 2.) The screen is in 256 color mode and the source image
** bits have already been translated to the current
** hardware palette.
*/
#define IBF_IGNORE_CUST_PAL 0x0002 /* Ignore the custom palette */
#define ENDIVE_REGISTER_HANDLE 0x0001 /* reg & init accelerator */
#define ENDIVE_REGISTER_VRAMONLY 0x1000 /* AllocVram only no acceleration */
/* DEVESC_REGISTER input data struct. */
typedef struct _VRAMREGISTERIN {
ULONG ulLength; /* struct length */
ULONG ulHandle; /* de-registering handle */
ULONG ulFlags; /* reg/dereg & vramonly flags */
} VRAMREGISTERIN, *PVRAMREGISTERIN;
/* DEVESC_REGISTER output data struct. */
typedef struct _VRAMREGISTEROUT {
ULONG ulLength; /* struct length */
ULONG ulFlags; /* return flags for errors/status */
ULONG ulHandle; /* handle returned */
} VRAMREGISTEROUT, *PVRAMREGISTEROUT;
/* DEVESC_HWREQUEST input data structure */
typedef struct _VRAMHWREQUESTIN {
ULONG ulLength; /* length of this structure */
ULONG ulHandle; /* instance handle from register */
ULONG ulID; /* Buffer ID for off screen vram */
PACQUIREFB pAcquireFB; /* old DIVE data structure */
BOOL fRequest; /* True => requests frame buffer */
} VRAMHWREQUESTIN, *PVRAMHWREQUESTIN;
/* DEVESC_HWREQUEST output data structure */
typedef struct _VRAMHWREQUESTOUT {
ULONG ulLength; /* structure length */
ULONG ulFlags; /* VRAM_REQ_RELOCATED,UNAVAIL */
POINTL ptlStart; /* vram location/wborg */
ULONG cWBBytes; /* Work buffer size */
PVOID pSysMem; /* SSAlloc'd memory by driver */
ULONG ulScanLineBytes; /* new scanline size Contig/rect */
} VRAMHWREQUESTOUT, *PVRAMHWREQUESTOUT;
/* DEVESC_VRAMALLOC input data structure */
typedef struct _VRAMALLOCIN {
ULONG ulLength; /* structure length */
ULONG ulFlags; /* returned flags see above */
ULONG ulID; /* used to dealloc the buffer ID */
ULONG ulFunction; /* VRAM_ALLOCATE/_DEALLOC/_QUERY */
ULONG ulHandle; /* VRAMREGISTER instance handle */
ULONG ulSize; /* size in bytes to allocate */
ULONG ulWidth; /* width of the movie in pixels */
ULONG ulHeight; /* movie height in scanlines */
} VRAMALLOCIN, *PVRAMALLOCIN;
/* DEVESC_VRAMALLOC output data structure */
typedef struct _VRAMALLOCOUT {
ULONG ulLength;
ULONG ulFlags; /* returned flags WORKBUFFER... */
ULONG ulID; /* dive alloc'd buffer ID */
POINTL ptlStart; /* X,Y point offset into the vram */
ULONG ulSize; /* byte size generally = requested */
ULONG ulScanLineBytes; /* scanline size in bytes */
} VRAMALLOCOUT, *PVRAMALLOCOUT;
/* DEVESC_VRAMALLOC output data structure */
typedef struct _VRAMALLOCOUT2 {
ULONG ulLength;
ULONG ulFlags; /* returned flags WORKBUFFER... */
ULONG ulID; /* dive alloc'd buffer ID */
POINTL ptlStart; /* X,Y point offset into the vram */
ULONG ulSize; /* byte size generally = requested */
ULONG ulScanLineBytes; /* scanline size in bytes */
PVOID pNewBuffer; /* pointer to new buffer */
} VRAMALLOCOUT2, *PVRAMALLOCOUT2;
/* DEVESC_SETUPBLITTERNOTIFY input data structure */
/* The display driver, if it supports this function, should indicate */
/* whether it can handle the current image blitting parameters. */
/* If the display driver does not */
/* support this function, it is assumed the hardware can handle the blitter */
/* operation being set. */
typedef struct _SETUPBLITTERNOTIFYIN {
ULONG ulLength; /* length of this structure */
ULONG ulHandle; /* instance handle from register */
ULONG ulInversionFlags; /* current image inversion flags */
/* 0x1 = vertical, 0x2 = horizontal*/
FOURCC fccSrc; /* source color format */
ULONG ulSrcWidth; /* source image width in pixels */
ULONG ulSrcHeight; /* source image height in pixels */
ULONG ulSrcPosX; /* src image X offset for blitting */
ULONG ulSrcPosY; /* src image Y offset for blitting */
FOURCC fccDst; /* destination color format */
ULONG ulDstWidth; /* destination image width in pels */
ULONG ulDstHeight; /* destination image height in pels*/
LONG lScreenPosX; /* destination screen X position */
LONG lScreenPosY; /* destination screen Y position */
ULONG ulNumDstRects; /* number of visible rectangles */
PRECTL pVisDstRects; /* ptr to visible rectangle array */
/* (in screen coordinates) */
} SETUPBLITTERNOTIFYIN, *PSETUPBLITTERNOTIFYIN;
/* DEVESC_SETUPBLITTERNOTIFY output data structure */
typedef struct _SETUPBLITTERNOTIFYOUT {
ULONG ulLength; /* structure length */
ULONG ulFlags; /* 0 => HW can handle, SETUP_CANT_HANDLE */
} SETUPBLITTERNOTIFYOUT, *PSETUPBLITTERNOTIFYOUT;