FontAttrI.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these librararies and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: FontAttrI.h /main/7 1995/12/06 18:36:56 cde-hp $ */
  24. /************************************<+>*************************************
  25. ****************************************************************************
  26. ** File: FontAttrI.h
  27. ** Project: Common Desktop Environment
  28. **
  29. ** (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
  30. **
  31. ** (c) Copyright 1993, 1994 Hewlett-Packard Company
  32. ** (c) Copyright 1993, 1994 International Business Machines Corp.
  33. ** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
  34. ** (c) Copyright 1993, 1994 Novell, Inc.
  35. **
  36. ****************************************************************************
  37. ************************************<+>*************************************/
  38. #ifndef _DtHelpFontAttrI_h
  39. #define _DtHelpFontAttrI_h
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43. /******** Public Defines Declarations ********/
  44. /*
  45. * font attributes
  46. */
  47. #define _CEFONT_CHAR_SET 6
  48. #define _CEFONT_LANG_TER 5
  49. #define _CEFONT_TYPE 4
  50. #define _CEFONT_WEIGHT 3
  51. #define _CEFONT_ANGLE 2
  52. #define _CEFONT_SIZE 1
  53. #define _CEFONT_SPACING 0
  54. #define _CEFONT_END 7
  55. #define _CEFontAttrNumber 8
  56. /******** Public Enum Declarations ********/
  57. enum _dtHelpFontValue
  58. {
  59. _DtHelpFontValueBad,
  60. /* styles */
  61. _DtHelpFontStyleSerif ,
  62. _DtHelpFontStyleSanSerif ,
  63. _DtHelpFontStyleSymbol,
  64. /* spacing */
  65. _DtHelpFontSpacingMono ,
  66. _DtHelpFontSpacingProp ,
  67. /* weights */
  68. _DtHelpFontWeightMedium ,
  69. _DtHelpFontWeightBold ,
  70. /* slant */
  71. _DtHelpFontSlantRevItalic ,
  72. _DtHelpFontSlantItalic ,
  73. _DtHelpFontSlantRoman ,
  74. /* special */
  75. _DtHelpFontSpecialUnderLine,
  76. _DtHelpFontSpecialStrikeOut,
  77. _DtHelpFontSpecialNone
  78. };
  79. /******** Public Typedef Declarations ********/
  80. typedef enum _dtHelpFontValue _DtHelpFontValue;
  81. /******** Public Structures Declarations ********/
  82. typedef struct _dtHelpFontHints {
  83. char *language;
  84. char *char_set;
  85. int pointsz; /* height of font in points */
  86. int set_width; /* width of font in points */
  87. char *color; /* 1 of 42 UDT colors or 'RGB:rrrr/gggg/bbbb */
  88. char *xlfd; /* xlfd name for use on X Window System */
  89. char *xlfdb; /* xlfd name for use on X Window System */
  90. char *xlfdi; /* xlfd name for use on X Window System */
  91. char *xlfdib; /* xlfd name for use on X Window System */
  92. char *typenam; /* typeface spec for MS-Windows interface */
  93. char *typenamb; /* typeface spec for MS-Windows interface */
  94. char *typenami; /* typeface spec for MS-Windows interface */
  95. char *typenamib; /* typeface spec for MS-Windows interface */
  96. _DtHelpFontValue style; /* font style */
  97. _DtHelpFontValue spacing; /* font spacing */
  98. _DtHelpFontValue weight; /* font weight */
  99. _DtHelpFontValue slant; /* font slant */
  100. _DtHelpFontValue special; /* special characteristics */
  101. void *expand; /* reserved pointer for later expansion */
  102. } _DtHelpFontHints;
  103. /******** Public Structure Typedef Declarations ********/
  104. /******** Public Prototyped Procedures ********/
  105. /******** Public Macro Declarations ********/
  106. #ifndef _DtHelpFontHintsColor
  107. #define _DtHelpFontHintsColor(x) ((x).color)
  108. #endif
  109. #ifndef _DtHelpFontHintsLang
  110. #define _DtHelpFontHintsLang(x) ((x).language)
  111. #endif
  112. #ifndef _DtHelpFontHintsCharSet
  113. #define _DtHelpFontHintsCharSet(x) ((x).char_set)
  114. #endif
  115. #ifndef _DtHelpFontHintsPtSize
  116. #define _DtHelpFontHintsPtSize(x) ((x).pointsz)
  117. #endif
  118. #ifndef _DtHelpFontHintsWeight
  119. #define _DtHelpFontHintsWeight(x) ((x).weight)
  120. #endif
  121. #ifndef _DtHelpFontHintsXlfd
  122. #define _DtHelpFontHintsXlfd(x) ((x).xlfd)
  123. #endif
  124. #ifndef _DtHelpFontHintsXlfdb
  125. #define _DtHelpFontHintsXlfdb(x) ((x).xlfdb)
  126. #endif
  127. #ifndef _DtHelpFontHintsXlfdi
  128. #define _DtHelpFontHintsXlfdi(x) ((x).xlfdi)
  129. #endif
  130. #ifndef _DtHelpFontHintsXlfdib
  131. #define _DtHelpFontHintsXlfdib(x) ((x).xlfdib)
  132. #endif
  133. #ifndef _DtHelpFontHintsTypeNam
  134. #define _DtHelpFontHintsTypeNam(x) ((x).typenam)
  135. #endif
  136. #ifndef _DtHelpFontHintsTypeNamb
  137. #define _DtHelpFontHintsTypeNamb(x) ((x).typenamb)
  138. #endif
  139. #ifndef _DtHelpFontHintsTypeNami
  140. #define _DtHelpFontHintsTypeNami(x) ((x).typenami)
  141. #endif
  142. #ifndef _DtHelpFontHintsTypeNamib
  143. #define _DtHelpFontHintsTypeNamib(x) ((x).typenamib)
  144. #endif
  145. #ifndef _DtHelpFontPtrPtSize
  146. #define _DtHelpFontPtrPtSize(x) ((x)->pointsz)
  147. #endif
  148. #ifndef _DtHelpFontPtrWeight
  149. #define _DtHelpFontPtrWeight(x) ((x)->weight)
  150. #endif
  151. /******** Semi-Public Function Declarations ********/
  152. /******** Public Function Declarations ********/
  153. extern void _DtHelpCeCopyDefFontAttrList(_DtHelpFontHints *font_attr );
  154. extern int _DtHelpDupFontHints(_DtHelpFontHints *font_attr );
  155. extern void _DtHelpFreeFontHints(_DtHelpFontHints *font_attr );
  156. /******** End Public Function Declarations ********/
  157. #ifdef __cplusplus
  158. } /* Close scope of 'extern "C"' declaration which encloses file. */
  159. #endif
  160. #endif /* _DtHelpFontAttrI_h */