home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Games / SprocketInvaders / Source / MemoryHandler.h < prev    next >
Encoding:
Text File  |  2000-09-28  |  2.1 KB  |  67 lines  |  [TEXT/CWIE]

  1. //•    ------------------------------------------------------------------------------------------    •
  2. //•
  3. //•    Copyright © 1996 Apple Computer, Inc., All Rights Reserved
  4. //•
  5. //•
  6. //•        You may incorporate this sample code into your applications without
  7. //•        restriction, though the sample code has been provided "AS IS" and the
  8. //•        responsibility for its operation is 100% yours.  However, what you are
  9. //•        not permitted to do is to redistribute the source as "DSC Sample Code"
  10. //•        after having made changes. If you're going to re-distribute the source,
  11. //•        we require that you make it clear in the source that the code was
  12. //•        descended from Apple Sample Code, but that you've made changes.
  13. //•
  14. //•        Authors:
  15. //•            Chris De Salvo
  16. //•
  17. //•    ------------------------------------------------------------------------------------------    •
  18.  
  19. #ifndef __MEMHANDLER__
  20. #define __MEMHANDLER__
  21.  
  22. //•    ------------------------------    Includes
  23.  
  24. #include <Controls.h>
  25. #include <Dialogs.h>
  26. #include <Lists.h>
  27. #include <Palettes.h>
  28. #include <QDOffscreen.h>
  29.  
  30. //•    ------------------------------    Public Definitions
  31. //•    ------------------------------    Public Types
  32. //•    ------------------------------    Public Variables
  33. //•    ------------------------------    Public Functions
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38.  
  39. extern Boolean IsResourceHandle(Handle theHandle);
  40. extern Boolean IsLockedHandle(Handle theHandle);
  41.  
  42. extern void DisposeControlZ(ControlHandle *theControl);
  43. extern void DisposeWindowZ(WindowRef *theWindow);
  44. extern void DisposeDialogZ(DialogPtr *theDialog);
  45. extern void DisposeGWorldZ(GWorldPtr *theGWorld);
  46. extern void DisposePaletteZ(PaletteHandle *thePal);
  47.  
  48. extern void KillPictureZ(PicHandle *thePicture);
  49.  
  50. extern void DisposePtrZ(Ptr *thePtr);
  51. extern void DisposeHandleZ(Handle *theHandle);
  52.  
  53. extern void TEDisposeZ(TEHandle *theHandle);
  54. extern void LDisposeZ(ListHandle *theHandle);
  55.  
  56. extern void PurgeAndCompactMem(void);
  57.  
  58. extern Ptr NewTaggedPtr(Size size, OSType tag, UInt32 refCon);
  59. extern Ptr NewTaggedPtrClear(Size size, OSType tag, UInt32 refCon);
  60. extern void DisposeTaggedPtr(Ptr thePtr);
  61. extern void DisposeTaggedPtrZ(Ptr *thePtr);
  62.  
  63. #ifdef __cplusplus
  64. }
  65. #endif
  66.  
  67. #endif