Fixing the header comments of a couple of X11-specific files
[freeglut] / src / x11 / freeglut_glutfont_definitions_x11.c
1 /*\r
2  * freeglut_glutfont_definitions_x11.c\r
3  *\r
4  * Bitmap and stroke fonts displaying.\r
5  *\r
6  * Copyright (c) 2003 Stephen J. Baker (whether he wants it or not).\r
7  * All Rights Reserved.\r
8  * Written by John F. Fay <fayjf@sourceforge.net>, who releases the\r
9  * copyright over to the "freeglut" project lead.\r
10  * Creation date: Mon July 21 2003\r
11  *\r
12  * Permission is hereby granted, free of charge, to any person obtaining a\r
13  * copy of this software and associated documentation files (the "Software"),\r
14  * to deal in the Software without restriction, including without limitation\r
15  * the rights to use, copy, modify, merge, publish, distribute, sublicense,\r
16  * and/or sell copies of the Software, and to permit persons to whom the\r
17  * Software is furnished to do so, subject to the following conditions:\r
18  *\r
19  * The above copyright notice and this permission notice shall be included\r
20  * in all copies or substantial portions of the Software.\r
21  *\r
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS\r
23  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
24  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL\r
25  * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
26  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
27  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
28  */\r
29 \r
30 /*\r
31  * This file is necessary for the *nix version of "freeglut" because the\r
32  * original GLUT defined its font variables in rather an unusual way.\r
33  * Publicly, in "glut.h", they were defined as "void *".  Privately,\r
34  * in one of the source code files, they were defined as pointers to a\r
35  * structure.  Most compilers and linkers are satisfied with the "void *"\r
36  * and don't go any farther, but some of them balked.  In particular,\r
37  * when compiling with "freeglut" and then trying to run using the GLUT\r
38  * ".so" library, some of them would give an error.  So we are having to\r
39  * create this file to define the variables as pointers to an unusual\r
40  * structure to match GLUT.\r
41  */\r
42 \r
43 /*\r
44  * freeglut_internal.h uses some GL types, but including the GL header portably\r
45  * is a bit tricky, so we include freeglut_std.h here, which contains the\r
46  * necessary machinery. But this poses another problem, caused by the ugly\r
47  * original defintion of the font constants in "classic" GLUT: They are defined\r
48  * as void* externally, so we move them temporarily out of the way by AN EXTREME\r
49  * CPP HACK.\r
50  */\r
51 \r
52 #define glutStrokeRoman glutStrokeRomanIGNOREME\r
53 #define glutStrokeMonoRoman glutStrokeMonoRomanIGNOREME\r
54 #define glutBitmap9By15 glutBitmap9By15IGNOREME\r
55 #define glutBitmap8By13 glutBitmap8By13IGNOREME\r
56 #define glutBitmapTimesRoman10 glutBitmapTimesRoman10IGNOREME\r
57 #define glutBitmapTimesRoman24 glutBitmapTimesRoman24IGNOREME\r
58 #define glutBitmapHelvetica10 glutBitmapHelvetica10IGNOREME\r
59 #define glutBitmapHelvetica12 glutBitmapHelvetica12IGNOREME\r
60 #define glutBitmapHelvetica18 glutBitmapHelvetica18IGNOREME\r
61 \r
62 #include <GL/freeglut_std.h>\r
63 \r
64 #undef glutStrokeRoman\r
65 #undef glutStrokeMonoRoman\r
66 #undef glutBitmap9By15\r
67 #undef glutBitmap8By13\r
68 #undef glutBitmapTimesRoman10\r
69 #undef glutBitmapTimesRoman24\r
70 #undef glutBitmapHelvetica10\r
71 #undef glutBitmapHelvetica12\r
72 #undef glutBitmapHelvetica18\r
73 \r
74 #include "freeglut_internal.h"\r
75 \r
76 #if TARGET_HOST_POSIX_X11\r
77 \r
78 struct freeglutStrokeFont\r
79 {\r
80   const char *name ;\r
81   int num_chars ;\r
82   void *ch ;\r
83   float top ;\r
84   float bottom ;\r
85 };\r
86 \r
87 struct freeglutBitmapFont\r
88 {\r
89   const char *name ;\r
90   const int num_chars ;\r
91   const int first ;\r
92   const void *ch ;\r
93 };\r
94 \r
95 \r
96 struct freeglutStrokeFont glutStrokeRoman ;\r
97 struct freeglutStrokeFont glutStrokeMonoRoman ;\r
98 \r
99 struct freeglutBitmapFont glutBitmap9By15 ;\r
100 struct freeglutBitmapFont glutBitmap8By13 ;\r
101 struct freeglutBitmapFont glutBitmapTimesRoman10 ;\r
102 struct freeglutBitmapFont glutBitmapTimesRoman24 ;\r
103 struct freeglutBitmapFont glutBitmapHelvetica10 ;\r
104 struct freeglutBitmapFont glutBitmapHelvetica12 ;\r
105 struct freeglutBitmapFont glutBitmapHelvetica18 ;\r
106 \r
107 #endif\r
108 \r