Team Fortress 2 Source Code as on 22/4/2020
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.

94 lines
3.2 KiB

  1. /*
  2. File: PMPluginHeader.h
  3. Contains: Mac OS X Printing Manager Raster Definitions.
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1999-2001 by Apple Computer, Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef __MACTYPES__
  11. #include <MacTypes.h>
  12. #endif
  13. /* API Version is used for plugin object API compatibility check. */
  14. #if PRAGMA_ONCE
  15. #pragma once
  16. #endif
  17. #if PRAGMA_IMPORT
  18. #pragma import on
  19. #endif
  20. #if PRAGMA_STRUCT_ALIGN
  21. #pragma options align=mac68k
  22. #elif PRAGMA_STRUCT_PACKPUSH
  23. #pragma pack(push, 2)
  24. #elif PRAGMA_STRUCT_PACK
  25. #pragma pack(2)
  26. #endif
  27. struct PMPlugInAPIVersion {
  28. /* API build version. */
  29. /* This is the API version this object was compiled with. */
  30. UInt32 buildVersionMajor;
  31. UInt32 buildVersionMinor;
  32. /* Base API version this object is upward compatible with. */
  33. /* The object guarantees to be a super-set of said API. */
  34. UInt32 baseVersionMajor;
  35. UInt32 baseVersionMinor;
  36. };
  37. typedef struct PMPlugInAPIVersion PMPlugInAPIVersion;
  38. /* The plugin header interface, and its vtable. */
  39. /* Plugin interface is an address of an object which contains a vtable pointer */
  40. /* as its first member. Every plugin interface (except 'iunknown') must begin */
  41. /* with PMPlugInHeader which must not change. */
  42. typedef struct PMPlugInHeader PMPlugInHeader;
  43. struct PMPlugInHeaderInterface {
  44. const PMPlugInHeader * vtable;
  45. };
  46. typedef struct PMPlugInHeaderInterface PMPlugInHeaderInterface;
  47. typedef CALLBACK_API_C( OSStatus , PMPluginRetain )(PMPlugInHeaderInterface * obj);
  48. typedef CALLBACK_API_C( OSStatus , PMPluginRelease )(PMPlugInHeaderInterface ** objPtr);
  49. typedef CALLBACK_API_C( OSStatus , PMPluginGetAPIVersion )(PMPlugInHeaderInterface *obj, PMPlugInAPIVersion *versionPtr);
  50. struct PMPlugInHeader {
  51. /* ---- API 'IMMUTABLE' Begin: ---- */
  52. /* Retain an object.*/
  53. PMPluginRetain Retain;
  54. /* Release an object. When reference count goes down to zero object*/
  55. /* is deleted. The call clears caller's reference to the object.*/
  56. PMPluginRelease Release;
  57. /* GetAPIVersion method is required with all plugin modules*/
  58. /* to be able to get object's API build and compatibility version.*/
  59. /* This version is used for plugin API compatibility check.*/
  60. PMPluginGetAPIVersion GetAPIVersion;
  61. };
  62. #if PRAGMA_STRUCT_ALIGN
  63. #pragma options align=reset
  64. #elif PRAGMA_STRUCT_PACKPUSH
  65. #pragma pack(pop)
  66. #elif PRAGMA_STRUCT_PACK
  67. #pragma pack()
  68. #endif
  69. #ifdef PRAGMA_IMPORT_OFF
  70. #pragma import off
  71. #elif PRAGMA_IMPORT
  72. #pragma import reset
  73. #endif