dtcalc: change from obsoleted MAXFLOAT to FLT_MAX from std C
[oweals/cde.git] / cde / lib / DtHelp / FontAttrI.h
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
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 /********    Public Defines Declarations    ********/
46 /*
47  * font attributes
48  */
49 #define _CEFONT_CHAR_SET       6
50 #define _CEFONT_LANG_TER       5
51 #define _CEFONT_TYPE           4
52 #define _CEFONT_WEIGHT         3
53 #define _CEFONT_ANGLE          2
54 #define _CEFONT_SIZE           1
55 #define _CEFONT_SPACING        0
56
57 #define _CEFONT_END            7
58
59 #define _CEFontAttrNumber     8
60
61 /********    Public Enum Declarations    ********/
62 enum    _dtHelpFontValue
63     {
64         _DtHelpFontValueBad,
65 /* styles  */
66         _DtHelpFontStyleSerif      ,
67         _DtHelpFontStyleSanSerif   ,
68         _DtHelpFontStyleSymbol,
69 /* spacing */
70         _DtHelpFontSpacingMono     ,
71         _DtHelpFontSpacingProp     ,
72 /* weights */
73         _DtHelpFontWeightMedium    ,
74         _DtHelpFontWeightBold      ,
75 /* slant   */
76         _DtHelpFontSlantRevItalic  ,
77         _DtHelpFontSlantItalic     ,
78         _DtHelpFontSlantRoman      ,
79 /* special */
80         _DtHelpFontSpecialUnderLine,
81         _DtHelpFontSpecialStrikeOut,
82         _DtHelpFontSpecialNone
83     };
84
85 /********    Public Typedef Declarations    ********/
86
87 typedef enum _dtHelpFontValue   _DtHelpFontValue;
88
89 /********    Public Structures Declarations    ********/
90
91 typedef struct  _dtHelpFontHints {
92         char    *language;
93         char    *char_set;
94         int      pointsz;       /* height of font in points */
95         int      set_width;     /* width  of font in points */
96         char    *color;         /* 1 of 42 UDT colors or 'RGB:rrrr/gggg/bbbb */
97         char    *xlfd;          /* xlfd name for use on X Window System */
98         char    *xlfdb;         /* xlfd name for use on X Window System */
99         char    *xlfdi;         /* xlfd name for use on X Window System */
100         char    *xlfdib;        /* xlfd name for use on X Window System */
101         char    *typenam;       /* typeface spec for MS-Windows interface */
102         char    *typenamb;      /* typeface spec for MS-Windows interface */
103         char    *typenami;      /* typeface spec for MS-Windows interface */
104         char    *typenamib;     /* typeface spec for MS-Windows interface */
105         _DtHelpFontValue  style;    /* font style              */
106         _DtHelpFontValue  spacing;  /* font spacing            */
107         _DtHelpFontValue  weight;   /* font weight             */
108         _DtHelpFontValue  slant;    /* font slant              */
109         _DtHelpFontValue  special;  /* special characteristics */
110         void    *expand;        /* reserved pointer for later expansion */
111 } _DtHelpFontHints;
112
113 /********    Public Structure Typedef Declarations    ********/
114
115 /********    Public Prototyped Procedures    ********/
116
117 /********    Public Macro Declarations    ********/
118 #ifndef _DtHelpFontHintsColor
119 #define _DtHelpFontHintsColor(x)        ((x).color)
120 #endif
121
122 #ifndef _DtHelpFontHintsLang
123 #define _DtHelpFontHintsLang(x)         ((x).language)
124 #endif
125
126 #ifndef _DtHelpFontHintsCharSet
127 #define _DtHelpFontHintsCharSet(x)      ((x).char_set)
128 #endif
129
130 #ifndef _DtHelpFontHintsPtSize
131 #define _DtHelpFontHintsPtSize(x)       ((x).pointsz)
132 #endif
133
134 #ifndef _DtHelpFontHintsWeight
135 #define _DtHelpFontHintsWeight(x)       ((x).weight)
136 #endif
137
138 #ifndef _DtHelpFontHintsXlfd
139 #define _DtHelpFontHintsXlfd(x)         ((x).xlfd)
140 #endif
141
142 #ifndef _DtHelpFontHintsXlfdb
143 #define _DtHelpFontHintsXlfdb(x)        ((x).xlfdb)
144 #endif
145
146 #ifndef _DtHelpFontHintsXlfdi
147 #define _DtHelpFontHintsXlfdi(x)        ((x).xlfdi)
148 #endif
149
150 #ifndef _DtHelpFontHintsXlfdib
151 #define _DtHelpFontHintsXlfdib(x)       ((x).xlfdib)
152 #endif
153
154 #ifndef _DtHelpFontHintsTypeNam
155 #define _DtHelpFontHintsTypeNam(x)      ((x).typenam)
156 #endif
157
158 #ifndef _DtHelpFontHintsTypeNamb
159 #define _DtHelpFontHintsTypeNamb(x)     ((x).typenamb)
160 #endif
161
162 #ifndef _DtHelpFontHintsTypeNami
163 #define _DtHelpFontHintsTypeNami(x)     ((x).typenami)
164 #endif
165
166 #ifndef _DtHelpFontHintsTypeNamib
167 #define _DtHelpFontHintsTypeNamib(x)    ((x).typenamib)
168 #endif
169
170 #ifndef _DtHelpFontPtrPtSize
171 #define _DtHelpFontPtrPtSize(x) ((x)->pointsz)
172 #endif
173
174 #ifndef _DtHelpFontPtrWeight
175 #define _DtHelpFontPtrWeight(x) ((x)->weight)
176 #endif
177
178 /********    Semi-Public Function Declarations    ********/
179
180 /********    Public Function Declarations    ********/
181 extern  void    _DtHelpCeCopyDefFontAttrList(_DtHelpFontHints *font_attr );
182 extern  int     _DtHelpDupFontHints(_DtHelpFontHints *font_attr );
183 extern  void    _DtHelpFreeFontHints(_DtHelpFontHints *font_attr );
184
185 /********    End Public Function Declarations    ********/
186
187 #ifdef __cplusplus
188 }  /* Close scope of 'extern "C"' declaration which encloses file. */
189 #endif
190
191 #endif /* _DtHelpFontAttrI_h */