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