⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 windraw2.h

📁 linux下的一款播放器
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * Get display/primary surface format. * Use: *  HRESULT WinDraw2_GetDisplayFormat (LPWINDRAW lpwd, LPBMI lpbiDisplayFormat); * Input: *  lpwd - pointer to a WINDRAW structure to initialize *  lpbiDisplayFormat - a structure to contain display format * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDraw2_GetDisplayFormat (LPWINDRAW lpwd, LPBMI lpbiDisplayFormat);/* * Creates a new surface to be used for image data. * Use: *   HRESULT WinDraw2_CreateSurface (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, *      LPBMI lpImageFormat, DWORD fSurfaceType, int nBackBuffers, DWORD dwCKey); * Input: *  lpwd - pointer to a base WINDRAW structure *  lpwds - pointer to a WINDRAWSURFACE structure to initialize *  lpImageFormat - pointer to BITMAPINFO structure describing image format *  fSurfaceType - combination of desired properties for a surface *  nBackBuffers - number of flippable backbuffers to allocate for this surface *  dwCKey - a color key to use (if transparent surface) * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDraw2_CreateSurface (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds,    LPBMI lpImageFormat, DWORD fSurfaceType, int nBackBuffers, DWORD dwCKey);HRESULT WinDraw2_SetColorKey (LPWINDRAW lpwd, DWORD dwLowColor, DWORD dwHighColor);HRESULT WinDraw2_SetOverlayPosition(LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, UINT32 x, UINT32 y);HRESULT WinDraw2_UpdateOverlay(LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, RECT* pDestRect, RECT* pSrcRect, DWORD flags);HRESULT Windraw_GetCaps(LPWINDRAW lpwd, UINT32* pfSurfaceCaps, UINT32* xMin, UINT32* yMin);HRESULT WinDraw2_GetOverlayPosition(LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, POINT* pLocation);BOOL	WinDraw2_IsSurfaceVisible(LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds);BOOL	WinDraw2_IsDDAvailable(LPWINDRAW lpwd);int     Windraw_ColorMatch(LPWINDRAW lpwd, COLORREF color);int     Windraw_GetLowestColor(LPWINDRAW lpwd);HRESULT	WinDraw2_GetColorspacePriorities(int cidIn, int *pCPList, int &nSize);HRESULT WinDraw2_GetScanLine(LPWINDRAW lpwd, DWORD* pdwScanLine);/* * Blits one secondary surface to another. * Use: *  HRESULT Windraw_AttachSurface(LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds,  *  BITMAPINFOHEADER* lpImageFormat, void* pImageData); * * Input: *  lpwd	    - pointer to a base WINDRAW structure *  lpwds	    - pointer to a WINDRAWSURFACE structure to initialize *  lpImageFormat   - pointer to BITMAPINFOHEADER structure describing image format *  pImageData	    - pointer to the image data * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT Windraw_AttachSurface(LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds,    BITMAPINFOHEADER* lpImageFormat, void* pImageData);    /* * Adds alpha data to a specified surface. * Use: *   HRESULT WinDraw2_AttachAlphaSurface (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, *    UCHAR* pAlphaData); * Input: *  lpwd	- pointer to a base WINDRAW structure *  lpwds	- pointer to a WINDRAWSURFACE structure to initialize * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDraw2_CreateAlphaSurface(LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds);  /* * Gets the alpha data for the specified surface. * Use: *   HRESULT WinDraw2_AttachAlphaSurface (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, *    UCHAR* pAlphaData); * Input: *  lpwd	- pointer to a base WINDRAW structure *  lpwds	- pointer to a WINDRAWSURFACE structure to initialize *  pSurface	- pointer to receive the data. * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDraw2_GetAlphaSurface(LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, UCHAR** pSurface);  /* * Releases a surface. * Use: *  HRESULT WinDraw2_ReleaseSurface (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds); * Input: *  lpwd - pointer to a base WINDRAW structure *  lpwds - pointer to a WINDRAWSURFACE structure to release * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDraw2_ReleaseSurface (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds);/* * Obtains refresh rate, ms per vblank, and max scan line of the monitor * Use: *  HRESULT WinDraw2_GetMonitorProperties (LPWINDRAW lpwd); * Input: *  lpwd - pointer to a base WINDRAW structure * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDraw2_GetMonitorProperties (LPWINDRAW lpwd);/* * Get WinDrawSurface capabilities. * Use: *  HRESULT WinDrawSurface_GetCaps (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, *      DWORD *lpdwCaps); * Input: *  lpwd - pointer to a WINDRAW structure to query *  lpwds - pointer to a WINDRAWSURFACE structure to query *  lpdwCaps - a variable to contain WinDrawSurface capabilities * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDrawSurface_GetCaps (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds,    DWORD *lpdwCaps);/* * Get WinDrawSurface format. * Use: *  HRESULT WinDrawSurface_GetFormat (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, *      LPBMI lpbiSurfaceFormat); * Input: *  lpwd - pointer to a WINDRAW structure to query *  lpwds - pointer to a WINDRAWSURFACE structure to query *  lpbiFormat - a structure to contain surface resolution and color format * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDrawSurface_GetFormat (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds,    LPBMI lpbiSurfaceFormat);/* * Locks pointer to a buffer. * Use: *  HRESULT WinDrawSurface_Lock (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, *      int nBufferNo, LPVOID *lpSurfPtr, LONG  *lplSurfPitch); * Input: *  lpwd - pointer to a base WINDRAW structure *  lpwds - pointer to a WINDRAWSURFACE structure to lock *  nBufferNo - # of the surface buffer to lock *  lpSurfPtr - a variable to contain a base pointer to the surface's data *  lplSurfPitch - a variable to contain the pitch of the surface * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. * Notes: * This functions shall be called before copying data into the surface. * Unlock it as soon as you are done with moving data in!!! */HRESULT WinDrawSurface_Lock (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds,    int nBufferNo, LPVOID *lpSurfPtr, LONG  *lplSurfPitch);/* * Unlocks the buffer. * Use: *  HRESULT WinDrawSurface_Lock (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, *      int nBufferNo, LPVOID *lpSurfPtr, LONG  *lplSurfPitch); * Input: *  lpwd - pointer to a base WINDRAW structure *  lpwds - pointer to a WINDRAWSURFACE structure to unlock *  nBufferNo - # of the surface buffer to unlock * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDrawSurface_Unlock (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds,    int nBufferNo);/* * Gives a DC to the surface. * Use: *  HRESULT WinDrawSurface_GetDC(LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, *      HDC* pDC); * Input: *  lpwd    - pointer to a base WINDRAW structure *  lpwds   - pointer to a WINDRAWSURFACE structure to unlock *  HDC*    - pointer to a DC which will be created. * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDrawSurface_GetDC(LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds,    HDC* pDC);/* * Releases a DC obtained by WinDrawSurface_GetDC * Use: *  HRESULT WinDrawSurface_ReleaseDC(LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, *      HDC pDC); * Input: *  lpwd    - pointer to a base WINDRAW structure *  lpwds   - pointer to a WINDRAWSURFACE structure to unlock *  HDC     - pointer to a DC which is to be released. * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDrawSurface_ReleaseDC(LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds,    HDC pDC);    /* * Blits the surface data to the screen (primary surface). * Use: *  HRESULT WinDrawSurface_Blt (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, *      LPRECT lpDestRect, LPRECT lpSrcRect); * Input: *  lpwd - pointer to a base WINDRAW structure *  lpwds - pointer to a WINDRAWSURFACE structure containing data to blit *  lpDestRect - rectangle on the primary surface to be blitted to *  lpSrcRect - rectangle on the source surface to be blitted from *  nGdiBuffer - the index of the gdi buffer to blt * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDrawSurface_Blt (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds,    LPRECT lpDestRect, LPRECT lpSrcRect, int nGdiBufferNo=FRONTBUFFER);/* * Blits one secondary surface to another. * Use: *  HRESULT WinDrawSurface_BltIndirect (LPWINDRAW lpwd, *      LPWINDRAWSURFACE lpwdsDestSurf, LPWINDRAWSURFACE lpwdsSrcSurf, *      LPRECT lpDestRect, LPRECT lpSrcRect); * Input: *  lpwd - pointer to a base WINDRAW structure *  lpwdsDestSurf - pointer to a destination WINDRAW structure *  lpwdsSrcSurf - pointer to a source WINDRAW structure *  lpDestRect - rectangle on the primary surface to be blitted to *  lpSrcRect - rectangle on the source surface to be blitted from *  nGdiBuffer - the index of the gdi buffer to blt * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDrawSurface_BltIndirect (LPWINDRAW lpwd,    LPWINDRAWSURFACE lpwdsDestSurf, LPWINDRAWSURFACE lpwdsSrcSurf,    LPRECT lpDestRect, LPRECT lpSrcRect, int nGdiBufferNo=FRONTBUFFER);/* * Flips buffers in a complex surface. * Use: *  HRESULT WinDrawSurface_Flip (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds); * Input: *  lpwd - pointer to a base WINDRAW structure *  lpwds - pointer to a surface to be flipped * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDrawSurface_Flip (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds);/* * Updates a surface's state/position. * Use: *  HRESULT WinDrawSurface_Update (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, *     LPRECT lpDestRect, LPRECT lpSrcRect, BOOL bShow); * Input: *  lpwd - pointer to a base WINDRAW structure *  lpwds - pointer to a WINDRAWSURFACE to update *  lpDestRect - rectangle on the primary surface *     where secondary surface (overlay) is mapped *  lpSrcRect - rectangle on the source surface to be mapped *  bShow - 1, to make secondary surface visible; 0, to hide it * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDrawSurface_Update (LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds,    LPRECT lpDestRect, LPRECT lpSrcRect, BOOL bShow);/* * Updates the window that the clipper should use * Use: *  HRESULT WinDrawSurface_Clipper(LPWINDRAW lpwd, HWND hwnd); * Input: *  lpwd - pointer to a base WINDRAW structure *  hwnd - the window that the clipper should be set to * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDrawSurface_SetClipper(LPWINDRAW lpwd, HWND hwnd);/* * Returns the window to which the clipper is currently set. * Use: *  HRESULT WinDrawSurface_GetClipperWindow(LPWINDRAW lpwd, HWND* pHwnd); * Input: *  lpwd - pointer to a base WINDRAW structure *  phwnd - is fulled with the current window to which the clipper is set. * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDrawSurface_GetClipperWindow(LPWINDRAW lpwd, HWND* pHwnd);/* * Sets the color controls for a given surface * Use: *  HRESULT WinDrawSurface_GetColorControls(LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds,  *   float &fBright, float &fContrast, float &fSaturation,  *   float &fHue, float &fSharpness); * Input: *  lpwds - pointer to a WINDRAWSURFACE to update *  fBright - brightness value from -1 to 1 (0 disables) *  fContrast - contrast value from -1 to 1 (0 disables) *  fSaturation - contrast value from -1 to 1 (0 disables) *  fHue - contrast value from -1 to 1 (0 disables) *  fSharpness - contrast value from -1 to 1 (0 disables) * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDrawSurface_GetColorControls(LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, float &fBright, float &fContrast, float &fSaturation, float &fHue, float &fSharpness); /* * Sets the color controls for a given surface * Use: *  HRESULT WinDrawSurface_SetColorControls(LPWINDRAWSURFACE lpwds, float fBright, *   float fContrast, float Saturation, float fHue, float fSharpness); * Input: *  lpwds - pointer to a WINDRAWSURFACE to update *  fBright - brightness value from -1 to 1 (0 disables) *  fContrast - contrast value from -1 to 1 (0 disables) *  fSaturation - contrast value from -1 to 1 (0 disables) *  fHue - contrast value from -1 to 1 (0 disables) *  fSharpness - contrast value from -1 to 1 (0 disables) * Returns: *  NOERROR if OK, or the last relevant DirectDraw error code, or E_FAIL. */HRESULT WinDrawSurface_SetColorControls(LPWINDRAW lpwd, LPWINDRAWSURFACE lpwds, float fBright, float fContrast, float fSaturation, float fHue, float fSharpness);HRESULT WinDraw_CanLockSurface (LPWINDRAW lpwd, WINDRAWSURFACE *lpwds, UCHAR* &pBuffer, int& nIndex, BOOL bBlock=TRUE);HRESULT WinDraw_GetLockedSurface (LPWINDRAW lpwd, WINDRAWSURFACE *lpwds, UCHAR* &pBuffer, int nIndex=-1, BOOL bBlock=TRUE);HRESULT WinDraw_ReleaseLockedSurface (LPWINDRAW lpwd, WINDRAWSURFACE *lpwds, BYTE *pHwBuf, BOOL bDiscard=FALSE);HRESULT WinDraw_AdvanceSurface (LPWINDRAW lpwd, WINDRAWSURFACE *lpwds, int &nIndex);HRESULT WinDraw_DisplaySurface (LPWINDRAW lpwd, WINDRAWSURFACE *lpwds, DWORD dwFlags, int nIndex=-1, BOOL bAbort=FALSE);HRESULT WinDraw_CacelPendingDisplay (LPWINDRAW lpwd, WINDRAWSURFACE *lpwds);HRESULT WinDraw_ResetSurfaceIndexes (LPWINDRAW lpwd, WINDRAWSURFACE *lpwds);char*   CollectDDInfo(LPWINDRAW lpwd, LPDIRECTDRAWSURFACE lpSurface, char *pFunction, char* pSeparator);#endif /* __WINDRAW2_H__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -