Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / lib / DtHelp / Help.h
1 /* $XConsortium: Help.h /main/3 1995/10/26 12:23:24 rswiston $ */
2 /*
3  *  (c) Copyright 1993, 1994 Hewlett-Packard Company
4  *  (c) Copyright 1993, 1994 International Business Machines Corp.
5  *  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
6  *  (c) Copyright 1993, 1994 Novell, Inc.
7  */
8
9 #ifndef _Dt_Help_h
10 #define _Dt_Help_h
11
12 #include <X11/Intrinsic.h>
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18
19 /*
20  * Constants
21  */
22
23 /* Common DtHelp Resources  */
24
25 #ifndef DtNcloseCallback
26 #define DtNcloseCallback           "closeCallback"
27 #endif
28 #ifndef DtNcolumns
29 #define DtNcolumns                 XmNcolumns
30 #endif
31 #ifndef DtNexecutionPolicy
32 #define DtNexecutionPolicy         "executionPolicy"
33 #endif
34 #ifndef DtNhelpFile
35 #define DtNhelpFile                "helpFile"
36 #endif
37 #ifndef DtNhelpOnHelpVolume
38 #define DtNhelpOnHelpVolume             "helpOnHelpVolume"
39 #endif
40 #ifndef DtNhelpPrint
41 #define DtNhelpPrint               "helpPrint"
42 #endif
43 #ifndef DtNhelpType
44 #define DtNhelpType                "helpType"
45 #endif
46 #ifndef DtNhelpVolume
47 #define DtNhelpVolume              "helpVolume"
48 #endif
49 #ifndef DtNhyperLinkCallback
50 #define DtNhyperLinkCallback       "hyperLinkCallback"
51 #endif
52 #ifndef DtNlocationId
53 #define DtNlocationId              "locationId"
54 #endif
55 #ifndef DtNmanPage
56 #define DtNmanPage                 "manPage"
57 #endif
58 #ifndef DtNminimizeButtons
59 #define DtNminimizeButtons         XmNminimizeButtons
60 #endif
61 #ifndef DtNpaperSize
62 #define DtNpaperSize               "paperSize"
63 #endif
64 #ifndef DtNprinter
65 #define DtNprinter                 "printer"
66 #endif
67 #ifndef DtNrows
68 #define DtNrows                    XmNrows
69 #endif
70 #ifndef DtNscrollBarPolicy
71 #define DtNscrollBarPolicy         "scrollBarPolicy"
72 #endif
73 #ifndef DtNstringData
74 #define DtNstringData              "stringData"
75 #endif
76
77 #ifndef DtCCallback
78 #define DtCCallback                XmCCallback
79 #endif
80
81 #ifndef DtCCloseCallback
82 #define DtCCloseCallback           "CloseCallback"
83 #endif
84 #ifndef DtCColumns
85 #define DtCColumns                 XmCColumns
86 #endif
87 #ifndef DtCExecutionPolicy
88 #define DtCExecutionPolicy         "ExecutionPolicy"
89 #endif
90 #ifndef DtCHelpFile
91 #define DtCHelpFile                "HelpFile"
92 #endif
93 #ifndef DtCHelpOnHelpVolume
94 #define DtCHelpOnHelpVolume        "HelpOnHelpVolume"
95 #endif
96 #ifndef DtCHelpPrint
97 #define DtCHelpPrint               "HelpPrint"
98 #endif
99 #ifndef DtCHelpType
100 #define DtCHelpType                "HelpType"
101 #endif
102 #ifndef DtCHelpVolume
103 #define DtCHelpVolume              "HelpVolume"
104 #endif
105 #ifndef DtCHyperLinkCallback
106 #define DtCHyperLinkCallback       "HyperLinkCallback"
107 #endif
108 #ifndef DtCLocationId
109 #define DtCLocationId              "LocationId"
110 #endif
111 #ifndef DtCManPage
112 #define DtCManPage                 "ManPage"
113 #endif
114 #ifndef DtCMinimizeButtons
115 #define DtCMinimizeButtons         XmCMinimizeButtons
116 #endif
117 #ifndef DtCPaperSize
118 #define DtCPaperSize               "PaperSize"
119 #endif
120 #ifndef DtCPrinter
121 #define DtCPrinter                 "Printer"
122 #endif
123 #ifndef DtCRows
124 #define DtCRows                    XmCRows
125 #endif
126 #ifndef DtCScrollBarPolicy
127 #define DtCScrollBarPolicy         "ScrollBarPolicy"
128 #endif
129 #ifndef DtCStringData
130 #define DtCStringData              "StringData"
131 #endif
132
133 /* Representation types */
134
135 #ifndef DtRDtExecutionPolicy
136 #define DtRDtExecutionPolicy         "DtExecutionPolicy"
137 #endif
138 #ifndef DtRDtHelpType
139 #define DtRDtHelpType                "DtHelpType"
140 #endif
141 #ifndef DtRDtPaperSize
142 #define DtRDtPaperSize               "DtPaperSize"
143 #endif
144 #ifndef DtRDtScrollBarPolicy
145 #define DtRDtScrollBarPolicy         "DtScrollBarPolicy"
146 #endif
147
148 /* DtHelpDialogCallbackStruct windowHint field */
149
150 #define DtHELP_POPUP_WINDOW       1
151 #define DtHELP_CURRENT_WINDOW     2
152 #define DtHELP_NEW_WINDOW         3
153
154 /* DtHelpDialogCallbackStruct hyperType field */
155
156 #define DtHELP_LINK_JUMP_NEW          1
157 #define DtHELP_LINK_TOPIC             1
158 #define DtHELP_LINK_MAN_PAGE          4
159 #define DtHELP_LINK_APP_DEFINE        5
160 #define DtHELP_LINK_TEXT_FILE         8
161
162 /* DtHelpDialogCallbackStruct reason field */
163
164 #define DtCR_HELP_LINK_ACTIVATE      1
165 #define DtCR_HELP_CLOSE              2
166 #define DtCR_HELP_HELP               3
167
168 /* Possible values for DtNscrollBarPolicy resource */
169
170 #define  DtHELP_NO_SCROLLBARS        0
171 #define  DtHELP_STATIC_SCROLLBARS    1
172 #define  DtHELP_AS_NEEDED_SCROLLBARS 2
173
174 /* Possible values for DtNexecutionPolicy resource */
175 #define  DtHELP_EXECUTE_NONE                    0
176 #define  DtHELP_EXECUTE_QUERY_ALL               1
177 #define  DtHELP_EXECUTE_QUERY_UNALIASED         2
178 #define  DtHELP_EXECUTE_ALL                     3
179
180 /* Possible values for DtNhelpType resource */
181
182 #define DtHELP_TYPE_TOPIC           0
183 #define DtHELP_TYPE_STRING          1
184 #define DtHELP_TYPE_MAN_PAGE        2
185 #define DtHELP_TYPE_FILE            3
186 #define DtHELP_TYPE_DYNAMIC_STRING  4
187
188 /* Possible values for DtNpaperSize resource */
189
190 #define DtHELP_PAPERSIZE_LETTER     0
191 #define DtHELP_PAPERSIZE_LEGAL      1
192 #define DtHELP_PAPERSIZE_EXECUTIVE  2
193 #define DtHELP_PAPERSIZE_A4         3
194 #define DtHELP_PAPERSIZE_B5         4
195
196 /* DtHelpQuickGetChildGetChild() function */
197
198 #define DtHELP_QUICK_CLOSE_BUTTON    1
199 #define DtHELP_QUICK_PRINT_BUTTON    2
200 #define DtHELP_QUICK_HELP_BUTTON     3
201 #define DtHELP_QUICK_SEPARATOR       4
202 #define DtHELP_QUICK_MORE_BUTTON     5
203 #define DtHELP_QUICK_BACK_BUTTON     6
204
205 /* Return values for DtHelpReturnSelectedWidgetId() */
206
207 #define DtHELP_SELECT_ERROR   -1 
208 #define DtHELP_SELECT_VALID    0
209 #define DtHELP_SELECT_ABORT    1
210 #define DtHELP_SELECT_INVALID  2 
211
212
213 /*
214  * Types
215  */
216
217 typedef struct {
218         int     reason;
219         XEvent  *event;
220         char    *locationId;
221         char    *helpVolume;
222         char    *specification;
223         int     hyperType;
224         int     windowHint;
225 } DtHelpDialogCallbackStruct;
226
227
228 /*
229  * Functions
230  */
231
232 extern void DtHelpSetCatalogName(
233                 char            *catFile);
234
235 extern int DtHelpReturnSelectedWidgetId(
236                 Widget          parent,
237                 Cursor          cursor,
238                 Widget          *widget);
239
240 #ifdef __cplusplus
241 }
242 #endif
243
244 #endif /* _Dt_Help_h */