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.

90 lines
2.2 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1994-1996 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dmemmgr.h
  6. * Content: Direct Memory Manager include file
  7. *@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 10-jun-95 craige initial implementation
  12. * 18-jun-95 craige pitch in VidMemInit
  13. * 17-jul-95 craige added VidMemLargestFree
  14. * 29-nov-95 colinmc added VidMemAmountAllocated
  15. *@@END_MSINTERNAL
  16. ***************************************************************************/
  17. #ifndef __DMEMMGR_INCLUDED__
  18. #define __DMEMMGR_INCLUDED__
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. /*
  23. * pointer to video meory
  24. */
  25. typedef unsigned long FLATPTR;
  26. /*
  27. * video memory manager structures
  28. */
  29. typedef struct _VMEML
  30. {
  31. struct _VMEML FAR *next;
  32. FLATPTR ptr;
  33. DWORD size;
  34. } VMEML, FAR *LPVMEML, FAR * FAR *LPLPVMEML;
  35. typedef struct _VMEMR
  36. {
  37. struct _VMEMR FAR *next;
  38. struct _VMEMR FAR *prev;
  39. struct _VMEMR FAR *pUp;
  40. struct _VMEMR FAR *pDown;
  41. struct _VMEMR FAR *pLeft;
  42. struct _VMEMR FAR *pRight;
  43. FLATPTR ptr;
  44. DWORD size;
  45. DWORD x;
  46. DWORD y;
  47. DWORD cx;
  48. DWORD cy;
  49. DWORD flags;
  50. } VMEMR, FAR *LPVMEMR, FAR * FAR *LPLPVMEMR;
  51. #ifdef NT_KERNEL_HEAPS
  52. typedef void VMEMHEAP;
  53. #else
  54. typedef struct _VMEMHEAP
  55. {
  56. DWORD dwFlags;
  57. DWORD stride;
  58. LPVOID freeList;
  59. LPVOID allocList;
  60. } VMEMHEAP;
  61. #endif
  62. typedef VMEMHEAP FAR *LPVMEMHEAP;
  63. #define VMEMHEAP_LINEAR 0x00000001l
  64. #define VMEMHEAP_RECTANGULAR 0x00000002l
  65. extern FLATPTR WINAPI VidMemAlloc( LPVMEMHEAP pvmh, DWORD width, DWORD height );
  66. extern void WINAPI VidMemFree( LPVMEMHEAP pvmh, FLATPTR ptr );
  67. //@@BEGIN_MSINTERNAL
  68. extern LPVMEMHEAP WINAPI VidMemInit( DWORD flags, FLATPTR start, FLATPTR end_or_width, DWORD height, DWORD pitch );
  69. extern void WINAPI VidMemFini( LPVMEMHEAP pvmh );
  70. extern DWORD WINAPI VidMemAmountFree( LPVMEMHEAP pvmh );
  71. extern DWORD WINAPI VidMemAmountAllocated( LPVMEMHEAP pvmh );
  72. extern DWORD WINAPI VidMemLargestFree( LPVMEMHEAP pvmh );
  73. extern void WINAPI VidMemGetRectStride( LPVMEMHEAP pvmh, LPLONG newstride );
  74. //@@END_MSINTERNAL
  75. #ifdef __cplusplus
  76. };
  77. #endif
  78. #endif