dtcalc: change from obsoleted MAXFLOAT to FLT_MAX from std C
[oweals/cde.git] / cde / lib / DtHelp / HelpDialogI.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: HelpDialogI.h /main/6 1996/08/28 19:07:35 cde-hp $ */
24 /*************************************<+>*************************************
25  *****************************************************************************
26  **
27  **  File:   HelpDialogI.h
28  **
29  **  Project:  Cache Creek (Rivers) Project:
30  **
31  **  Description:  Internal header file for HelpDialog Widget.
32  **  -----------
33  **
34  **  (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
35  **
36  **  (c) Copyright 1993, 1994 Hewlett-Packard Company
37  **  (c) Copyright 1993, 1994 International Business Machines Corp.
38  **  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
39  **  (c) Copyright 1993, 1994 Novell, Inc.
40  **
41  *******************************************************************
42  *************************************<+>*************************************/
43 #ifndef _HelpDialogI_h
44 #define _HelpDialogI_h
45
46 #include <Dt/HelpDialog.h>
47 #include "HelpDialogP.h"
48
49
50 /* Update list defines use in _DtHelpUpdateDisplayArea */
51
52 #define DtHISTORY_AND_JUMP      1
53 #define DtHISTORY_ONLY          2
54 #define DtJUMP_ONLY             3
55
56
57 /* Defines for processing a request to "Top Level..." */
58 #define DtBROWSER_HOME          _DtHelpDefaultLocationId
59 #define DtBROWSER_NAME          "browser.hv"
60
61
62 /* Jump List Max */
63
64 #define DtJUMP_LIST_MAX         999
65
66
67
68 /****************************************************************
69  *
70  *  Current Color Info Structure Definition
71  *
72  ****************************************************************/
73 typedef struct  _colorStruct {
74     Pixel       background;
75     Pixel       foreground;
76     Pixel       topShadow;
77     Pixel       bottomShadow;
78     Pixel       select;
79 } ColorStruct;
80
81
82 /*****************************************************************************
83  * Function:         void _DtHelpUpdateDisplayArea(
84  *                             char                  *locationId,
85  *                             DtHelpDialogWidget   nw,
86  *                             int                   listUpdateType, 
87  *                             int                   topicUpdateType);
88  *
89  *
90  * Parameters:      locationId
91  *
92  *                  nw
93  *
94  * Return Value:    Void.
95  *
96  * Purpose:         Updates the History List for the current help dialog.
97  *
98  *****************************************************************************/
99 extern void _DtHelpUpdateDisplayArea(
100     char *locationId,
101     DtHelpDialogWidget nw,
102     Boolean vol_changed,
103     int listUpdateType,
104     int topicUpdateType);
105
106
107 /*****************************************************************************
108  * Function:         void _DtHelpUpdateJumpList(
109  *                                  char *topicInfo,
110  *                             DtHelpDialogWidget nw);
111  *
112  *
113  * Parameters:      topicInfo
114  *
115  *                  nw
116  *
117  * Return Value:    Void.
118  *
119  * Purpose:         Updates the History List for the current help dialog.
120  *
121  *****************************************************************************/
122 extern void _DtHelpUpdateJumpList(
123     char *topicInfo,
124     int topicType,
125     Widget nw);
126
127
128 /*****************************************************************************
129  * Function:        void _DtHelpDialogHypertextCB(
130  *                              XtPointer pDisplayAreaStruct,
131  *                              XtPointer clientData,
132  *                              DtHelpHyperTextStruct *hyperData)
133  *
134  * Parameters:      pDisplayAreaStruct  Specifies the curretn display are info.
135  *
136  *                  hyperData           Specifies the current hypertext info
137  *                                      structure.
138  *
139  *                  clientData          Specifies the client data passed into
140  *                                      the hypertext callback. 
141  *
142  * Return Value:    Void.
143  *
144  * Purpose:         Process all hypertext requests in a given Help Dialogs
145  *                  display area.
146  *
147  *****************************************************************************/
148 extern void _DtHelpDialogHypertextCB (
149     XtPointer pDisplayAreaStruct,
150     XtPointer clientData,
151     DtHelpHyperTextStruct *hyperData);
152
153 /*****************************************************************************
154  * Function:        void _DtHelpSetupDisplayType(DtHelpDialogWidget nw);  
155  *                                            int updateType);  
156  *
157  *
158  * Parameters:      nw          Specifies the current help dialog widget.
159  *
160  * Return Value:    Void.
161  *
162  * Purpose:         Determins the type of topic the user want's to display
163  *                  in the current help dialog and sets it up for display.
164  *
165  *****************************************************************************/
166 extern void _DtHelpSetupDisplayType(
167      DtHelpDialogWidget nw,
168      Boolean vol_changed,
169      int updateType);
170
171 /*****************************************************************************
172  * Function:        void _DtHelpTopicListFree (DtTopicListStruct *pHead);  
173  *
174  *
175  * Parameters:      pHead   Specifies the head pointer to the topic list.
176  *
177  * Return Value:    Void.
178  *
179  * Purpose:         Frees all elements in a Topic List.
180  *
181  *****************************************************************************/
182 extern void _DtHelpTopicListFree(
183     DtTopicListStruct *pHead);
184
185 /*****************************************************************************
186  * Function:       extern void DisplayHistoryCB(
187  *                            Widget w,   
188  *                            XtPointer client_data,
189  *                            XtPointer call_data);
190  *       
191  * Parameters:   
192  *
193  * Return Value:    
194  *
195  * Purpose:        This routine will cause the history dialog to be 
196  *                 posted.
197  *
198  ****************************************************************************/
199 extern void  _DtHelpDisplayHistoryCB(
200     Widget w,
201     XtPointer client_data,
202     XtPointer call_data );
203
204 /*****************************************************************************
205  * Function:       extern void _DtHelpDisplayBackCB(
206  *                            Widget w,   
207  *                            XtPointer client_data,
208  *                            XtPointer call_data);
209  *       
210  * Parameters:   
211  *
212  * Return Value:    
213  *
214  * Purpose:        This routine will cause the top element in the jump
215  *                 stack to be displayed.
216  *
217  ****************************************************************************/
218 extern void  _DtHelpDisplayBackCB(
219     Widget w,
220     XtPointer client_data,
221     XtPointer call_data);
222
223
224 /*****************************************************************************
225  * Function:       extern void _DtHelpDuplicateWindowCB(
226  *                             Widget w,   
227  *                             XtPointer client_data,
228  *                             XtPointer call_data);
229  *       
230  * Parameters:   
231  *
232  * Return Value:    
233  *
234  * Purpose:        This routine creates a new help widget by forcing the
235  *                 equivelent of a Jump New hyper text call
236  *
237  ****************************************************************************/
238 extern void  _DtHelpDuplicateWindowCB(
239     Widget w,
240     XtPointer client_data,
241     XtPointer call_data);
242
243 /*****************************************************************************
244  * Function:           void _DtHelpDisplayIndexCB(
245  *                            Widget w,   
246  *                            XtPointer client_data,
247  *                            XtPointer call_data);
248  *       
249  * Parameters:   
250  *
251  * Return Value:    
252  *
253  * Purpose:        This routine will cause the index dialog to be 
254  *                 posted.
255  *
256  ****************************************************************************/
257 extern void  _DtHelpDisplayIndexCB(
258     Widget w,
259     XtPointer client_data,
260     XtPointer call_data);
261
262 /*****************************************************************************
263  * Function:           void  _DtHelpDisplayBrowserHomeCB(
264  *                            Widget w,   
265  *                            XtPointer client_data,
266  *                            XtPointer call_data);
267  *       
268  * Parameters:   
269  *
270  * Return Value:    
271  *
272  * Purpose:        This routine will cause the top level of the browser.hv 
273  *                 help volume to be displayed.
274  *
275  ****************************************************************************/
276 extern void  _DtHelpDisplayBrowserHomeCB(
277     Widget w,
278     XtPointer client_data,
279     XtPointer call_data);
280
281 /*****************************************************************************
282  * Function:        _DtHelpFilterExecCmdCB
283  *
284  *  clientData:     The general help dialog widget
285  *  cmdStr:         cmd string to filter
286  *  ret_filteredCmdStr:  string after filtering.  NULL if exec denied
287  *
288  * Return Value:    0: ok, < 0: error
289  *
290  * Purpose:         filter an execution command using executionPolicy rsrc
291  *
292  * Memory:
293  *   The caller must free memory allocated for the ret_filteredCmdStr
294  *****************************************************************************/
295 extern int _DtHelpFilterExecCmdCB(
296     void *   clientData,
297     const char *   cmdStr,
298     char * * ret_filteredCmdStr);
299
300 #endif /* _HelpDialogI_h */
301 /* Do not add anything after this endif. */