Leaked source code of windows server 2003
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.

98 lines
2.2 KiB

  1. /******************************Module*Header**********************************\
  2. *
  3. * *******************
  4. * * GDI SAMPLE CODE *
  5. * *******************
  6. *
  7. * Module Name: heap.h
  8. *
  9. * This module contains all the definitions for heap related stuff
  10. *
  11. * Copyright (c) 1994-1998 3Dlabs Inc. Ltd. All rights reserved.
  12. * Copyright (c) 1995-1999 Microsoft Corporation. All rights reserved.
  13. \*****************************************************************************/
  14. #ifndef __HEAP__H__
  15. #define __HEAP__H__
  16. //
  17. // This function is called whenever we switch in or out of full-screen mode
  18. //
  19. BOOL bAssertModeOffscreenHeap(PDev*, BOOL);
  20. //
  21. // Off-screen heap initialization
  22. //
  23. BOOL bEnableOffscreenHeap(PDev*);
  24. //
  25. // Move the oldest memory block out of video memory
  26. //
  27. BOOL bMoveOldestBMPOut(PDev* ppdev);
  28. //
  29. // Create a DSURF* in video memory
  30. //
  31. Surf* pCreateSurf(PDev* ppdev, LONG lWidth, LONG lHeight);
  32. //
  33. // Video memory allocation
  34. //
  35. ULONG ulVidMemAllocate(PDev* ppdev, LONG lWidth, LONG lHeight, LONG lPelSize, LONG* plDelta,
  36. VIDEOMEMORY** ppvmHeap, ULONG* pulPackedPP, BOOL bDiscardable);
  37. //
  38. // Blank the screen
  39. //
  40. VOID vBlankScreen(PDev* ppdev);
  41. //
  42. // Adds the surface to the surface list
  43. //
  44. VOID vAddSurfToList(PPDev ppdev, Surf* psurf);
  45. //
  46. // Frees any resources allocated by the off-screen heap
  47. //
  48. VOID vDisableOffscreenHeap(PDev*);
  49. //
  50. // Removes the surface from the surface list
  51. //
  52. VOID vRemoveSurfFromList(PPDev ppdev, Surf* psurf);
  53. //
  54. // Shifts the surface from its current position in the surface list to the
  55. // end of surface list
  56. //
  57. VOID vShiftSurfToListEnd(PPDev ppdev, Surf* psurf);
  58. //
  59. // Informs the heap manager that the surface has been accessed
  60. //
  61. VOID vSurfUsed(PPDev ppdev, Surf* psurf);
  62. //
  63. // Free a DSURF structure
  64. //
  65. void vDeleteSurf(Surf* psurf);
  66. //
  67. // Moves the surface from VM to SM
  68. //
  69. BOOL bDemote(Surf* psurf);
  70. //
  71. // Attempts to move the surface from SM to VM
  72. //
  73. void vPromote(Surf* psurf);
  74. //
  75. // Move all surfaces to SM
  76. //
  77. BOOL bDemoteAll(PPDev ppdev);
  78. #endif // __HEAP__H__