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.

127 lines
2.7 KiB

  1. /*
  2. File: CGFont.h
  3. Contains: CoreGraphics font
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 2000-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 CGFONT_H_
  11. #define CGFONT_H_
  12. #ifndef __CGBASE__
  13. #include <CGBase.h>
  14. #endif
  15. #if PRAGMA_ONCE
  16. #pragma once
  17. #endif
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #if PRAGMA_IMPORT
  22. #pragma import on
  23. #endif
  24. #if PRAGMA_ENUM_ALWAYSINT
  25. #if defined(__fourbyteints__) && !__fourbyteints__
  26. #define __CGFONT__RESTORE_TWOBYTEINTS
  27. #pragma fourbyteints on
  28. #endif
  29. #pragma enumsalwaysint on
  30. #elif PRAGMA_ENUM_OPTIONS
  31. #pragma option enum=int
  32. #elif PRAGMA_ENUM_PACK
  33. #if __option(pack_enums)
  34. #define __CGFONT__RESTORE_PACKED_ENUMS
  35. #pragma options(!pack_enums)
  36. #endif
  37. #endif
  38. typedef struct CGFont* CGFontRef;
  39. typedef unsigned short CGGlyph;
  40. /*** Font creation. ***/
  41. /* Create a CGFont using `platformFontReference', a pointer to a
  42. * platform-specific font reference. For MacOS X, `platformFontReference'
  43. * should be a pointer to an ATSFontRef. */
  44. /*
  45. * CGFontCreateWithPlatformFont()
  46. *
  47. * Availability:
  48. * Non-Carbon CFM: not available
  49. * CarbonLib: not available
  50. * Mac OS X: in version 10.0 and later
  51. */
  52. EXTERN_API_C( CGFontRef )
  53. CGFontCreateWithPlatformFont(void * platformFontReference);
  54. /*** Retain & release. ***/
  55. /* Increment the retain count of `font' and return it. All fonts are
  56. * created with an initial retain count of 1. */
  57. /*
  58. * CGFontRetain()
  59. *
  60. * Availability:
  61. * Non-Carbon CFM: not available
  62. * CarbonLib: not available
  63. * Mac OS X: in version 10.0 and later
  64. */
  65. EXTERN_API_C( CGFontRef )
  66. CGFontRetain(CGFontRef font);
  67. /* Decrement the retain count of `font'. If the retain count reaches 0,
  68. * then release it and any associated resources. */
  69. /*
  70. * CGFontRelease()
  71. *
  72. * Availability:
  73. * Non-Carbon CFM: not available
  74. * CarbonLib: not available
  75. * Mac OS X: in version 10.0 and later
  76. */
  77. EXTERN_API_C( void )
  78. CGFontRelease(CGFontRef font);
  79. #if PRAGMA_ENUM_ALWAYSINT
  80. #pragma enumsalwaysint reset
  81. #ifdef __CGFONT__RESTORE_TWOBYTEINTS
  82. #pragma fourbyteints off
  83. #endif
  84. #elif PRAGMA_ENUM_OPTIONS
  85. #pragma option enum=reset
  86. #elif defined(__CGFONT__RESTORE_PACKED_ENUMS)
  87. #pragma options(pack_enums)
  88. #endif
  89. #ifdef PRAGMA_IMPORT_OFF
  90. #pragma import off
  91. #elif PRAGMA_IMPORT
  92. #pragma import reset
  93. #endif
  94. #ifdef __cplusplus
  95. }
  96. #endif
  97. #endif /* CGFONT_H_ */