Link with C++ linker
[oweals/cde.git] / cde / programs / dthello / dthello.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: dthello.h /main/6 1996/10/30 18:19:18 mgreess $ */
24 /*                                                                      *
25  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
26  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
27  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
28  * (c) Copyright 1993, 1994 Novell, Inc.                                *
29  */
30
31 #define  DTHELLO_ID     0
32 #define  DTCOLOR_ID     1
33
34 #define  DTCOLOR_PROGNAME       "dtcolor"
35 #define  DTHELLO_PROGNAME       "dthello"
36
37 #define  DTHELLO_RES_NAME       "dthello"
38 #define  DTHELLO_CLASS_NAME     "Dthello"
39 #define  DTHELLO_CLASS          "Dthello"
40
41 struct globalStruct {
42         char resname [80];
43         char classname [80];
44 };
45
46 /*
47  * Defintions and Macros
48  */
49 #if 0
50 #define DEFAULT_FILE            "/etc/copyright"
51 #endif
52
53 #define DEFAULT_FONT_LARGE      "-dt-interface system-medium-r-normal-xl*-*-*-*-*-*-*-*-*"
54 #ifdef __osf__
55 #define DEFAULT_FONT_MEDIUM     "-dt-interface system-medium-r-normal-xl*-*-*-*-*-*-*-*-*"
56 #else
57 #define DEFAULT_FONT_MEDIUM     "-dt-interface system-medium-r-normal-l*-*-*-*-*-*-*-*-*"
58 #endif
59 #define DEFAULT_FONT_SMALL      "-dt-interface system-medium-r-normal-m*-*-*-*-*-*-*-*-*"
60 #define DEFAULT_FONT            "-*-*-*-R-*-*-*-120-*-*-*-*"
61  
62 #define FIXED_FONT      "fixed"
63 #define DEFAULT_BG      "cornflowerblue"
64 #define DEFAULT_LOW_BG  "black"
65 #define DEFAULT_FG      "white"
66 #define DEFAULT_LOW_FG  "white"
67 #define DEFAULT_TIME    "240"
68
69 #define DEFAULT_XOFFSET_SMALL    25
70 #define DEFAULT_XOFFSET_MEDIUM   50
71 #define DEFAULT_XOFFSET_LARGE    125
72
73 #define BOX_LINE_WIDTH_SMALL     4
74 #define BOX_LINE_WIDTH_MEDIUM    (BOX_LINE_WIDTH_SMALL + 2)
75 #define BOX_LINE_WIDTH_LARGE     (BOX_LINE_WIDTH_SMALL * 2)
76
77 #define MAX_FILES       5
78 #define MAX_LINES       100
79 #define MAX_COLUMNS     160
80
81
82 /*
83  * My resources
84  */
85 #define vNfont          "vfont"
86 #define vCFont          "Vfont"
87 #define vNxoffset       "xoffset"
88 #define vCXoffset       "Xoffset"
89 #define vNbackground    "vbackground"
90 #define vCBackground    "Vbackground"
91 #define vNforeground    "vforeground"
92 #define vCForeground    "Vforeground"
93 #define vNfile          "file"
94 #define vCFile          "File"
95 #define vNstring        "string"
96 #define vCString        "String"
97 #define vNtimeout       "timeout"
98 #define vCTimeout       "Timeout"
99
100 #ifndef True
101 #define True 1
102 #endif
103 #ifndef False
104 #define False 0
105 #endif
106
107
108 /* 
109  * Data definitions
110  */
111 typedef struct 
112 {
113     char *name;
114     int  len;
115 } ArgSpec;
116
117 typedef struct
118 {
119     char        *resname;
120     char        *resclass;
121     char        **ppvalue;
122     int         *size;
123
124 } VhResourceEntry;
125
126
127 /********    Public Function Declarations    ********/
128
129 extern int main( 
130                         int argc,
131                         char **argv) ;
132 extern int ArgMatch( 
133                         char *pch,
134                         int arn) ;
135 extern char * GetMessage( int set, int n, char *s);
136 extern unsigned char * SkipWhitespace( 
137                         unsigned char *pch) ;
138 extern void KillNewlines( 
139                         unsigned char *pch) ;
140 extern void ReadInTextLines( 
141                         FILE *fp,
142                         XFontSet fontset,
143                         unsigned int *pMaxWidth) ;
144 extern void SeparateTextLines( 
145                         unsigned char *pchIn) ;
146 extern void CatchAlarm( 
147                         int sig) ;
148 extern Cursor GetHourGlass( 
149                         Display *dpy) ;
150 extern void VhGetResources( 
151                         Display *dpy,
152                         char *name,
153                         char *class,
154                         VhResourceEntry *res,
155                         int num) ;
156
157 extern void PaintText( void ) ;
158
159 extern void DrawBox( void ) ;