Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
3.0 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1994-1998 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: ddheap.h
  6. * Content: Heap manager header file
  7. * History:
  8. * Date By Reason
  9. * ==== == ======
  10. * 03-Feb-98 DrewB Split from ddrawpr.h for user/kernel portability.
  11. *
  12. ***************************************************************************/
  13. #ifndef __DDHEAP_INCLUDED__
  14. #define __DDHEAP_INCLUDED__
  15. #include "dmemmgr.h"
  16. #ifndef VIDMEMONLY
  17. BOOL linVidMemInit( LPVMEMHEAP pvmh, FLATPTR start, FLATPTR end );
  18. void linVidMemFini( LPVMEMHEAP pvmh );
  19. void linVidMemFree( LPVMEMHEAP pvmh, FLATPTR ptr );
  20. FLATPTR linVidMemAlloc( LPVMEMHEAP pvmh, DWORD xsize, DWORD ysize,
  21. LPDWORD lpdwSize, LPSURFACEALIGNMENT lpAlignment,
  22. LPLONG lpNewPitch );
  23. DWORD linVidMemAmountAllocated( LPVMEMHEAP pvmh );
  24. DWORD linVidMemAmountFree( LPVMEMHEAP pvmh );
  25. DWORD linVidMemLargestFree( LPVMEMHEAP pvmh );
  26. BOOL rectVidMemInit( LPVMEMHEAP pvmh, FLATPTR start, DWORD width, DWORD height,
  27. DWORD stride );
  28. void rectVidMemFini( LPVMEMHEAP pvmh );
  29. FLATPTR rectVidMemAlloc( LPVMEMHEAP pvmh, DWORD cxThis, DWORD cyThis,
  30. LPDWORD lpdwSize, LPSURFACEALIGNMENT lpAlignment );
  31. void rectVidMemFree( LPVMEMHEAP pvmh, FLATPTR ptr );
  32. DWORD rectVidMemAmountAllocated( LPVMEMHEAP pvmh );
  33. DWORD rectVidMemAmountFree( LPVMEMHEAP pvmh );
  34. BOOL IsDifferentPixelFormat( LPDDPIXELFORMAT pdpf1, LPDDPIXELFORMAT pdpf2 );
  35. #define DDHA_SKIPRECTANGULARHEAPS 0x0001
  36. #define DDHA_ALLOWNONLOCALMEMORY 0x0002
  37. #define DDHA_ALLOWNONLOCALTEXTURES 0x0004
  38. #define DDHA_USEALTCAPS 0x0008
  39. FLATPTR DdHeapAlloc( DWORD dwNumHeaps,
  40. LPVIDMEM pvmHeaps,
  41. HANDLE hdev,
  42. LPVIDMEMINFO lpVidMemInfo,
  43. DWORD dwWidth,
  44. DWORD dwHeight,
  45. LPDDRAWI_DDRAWSURFACE_LCL lpSurfaceLcl,
  46. DWORD dwFlags,
  47. LPVIDMEM *ppvmHeap,
  48. LPLONG plNewPitch,
  49. LPDWORD pdwNewCaps,
  50. LPDWORD pdwSize);
  51. LPVMEMHEAP WINAPI HeapVidMemInit( LPVIDMEM lpVidMem, DWORD pitch, HANDLE hdev,
  52. LPHEAPALIGNMENT phad);
  53. void WINAPI HeapVidMemFini( LPVIDMEM lpVidMem, HANDLE hdev );
  54. FLATPTR WINAPI HeapVidMemAlloc( LPVIDMEM lpVidMem, DWORD x, DWORD y,
  55. HANDLE hdev, LPSURFACEALIGNMENT lpAlignment,
  56. LPLONG lpNewPitch, LPDWORD pdwSize );
  57. #endif // VIDMEMONLY
  58. LPVMEMHEAP WINAPI VidMemInit( DWORD flags, FLATPTR start, FLATPTR end_or_width,
  59. DWORD height, DWORD pitch );
  60. void WINAPI VidMemFini( LPVMEMHEAP pvmh );
  61. DWORD WINAPI VidMemAmountFree( LPVMEMHEAP pvmh );
  62. DWORD WINAPI VidMemAmountAllocated( LPVMEMHEAP pvmh );
  63. DWORD WINAPI VidMemLargestFree( LPVMEMHEAP pvmh );
  64. #endif // __DDHEAP_INCLUDED__