HelpDialogI.h 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  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. #include <Dt/HelpDialog.h>
  46. #include "HelpDialogP.h"
  47. /* Update list defines use in _DtHelpUpdateDisplayArea */
  48. #define DtHISTORY_AND_JUMP 1
  49. #define DtHISTORY_ONLY 2
  50. #define DtJUMP_ONLY 3
  51. /* Defines for processing a request to "Top Level..." */
  52. #define DtBROWSER_HOME _DtHelpDefaultLocationId
  53. #define DtBROWSER_NAME "browser.hv"
  54. /* Jump List Max */
  55. #define DtJUMP_LIST_MAX 999
  56. /****************************************************************
  57. *
  58. * Current Color Info Structure Definition
  59. *
  60. ****************************************************************/
  61. typedef struct _colorStruct {
  62. Pixel background;
  63. Pixel foreground;
  64. Pixel topShadow;
  65. Pixel bottomShadow;
  66. Pixel select;
  67. } ColorStruct;
  68. /*****************************************************************************
  69. * Function: void _DtHelpUpdateDisplayArea(
  70. * char *locationId,
  71. * DtHelpDialogWidget nw,
  72. * int listUpdateType,
  73. * int topicUpdateType);
  74. *
  75. *
  76. * Parameters: locationId
  77. *
  78. * nw
  79. *
  80. * Return Value: Void.
  81. *
  82. * Purpose: Updates the History List for the current help dialog.
  83. *
  84. *****************************************************************************/
  85. extern void _DtHelpUpdateDisplayArea(
  86. char *locationId,
  87. DtHelpDialogWidget nw,
  88. Boolean vol_changed,
  89. int listUpdateType,
  90. int topicUpdateType);
  91. /*****************************************************************************
  92. * Function: void _DtHelpUpdateJumpList(
  93. * char *topicInfo,
  94. * DtHelpDialogWidget nw);
  95. *
  96. *
  97. * Parameters: topicInfo
  98. *
  99. * nw
  100. *
  101. * Return Value: Void.
  102. *
  103. * Purpose: Updates the History List for the current help dialog.
  104. *
  105. *****************************************************************************/
  106. extern void _DtHelpUpdateJumpList(
  107. char *topicInfo,
  108. int topicType,
  109. Widget nw);
  110. /*****************************************************************************
  111. * Function: void _DtHelpDialogHypertextCB(
  112. * XtPointer pDisplayAreaStruct,
  113. * XtPointer clientData,
  114. * DtHelpHyperTextStruct *hyperData)
  115. *
  116. * Parameters: pDisplayAreaStruct Specifies the curretn display are info.
  117. *
  118. * hyperData Specifies the current hypertext info
  119. * structure.
  120. *
  121. * clientData Specifies the client data passed into
  122. * the hypertext callback.
  123. *
  124. * Return Value: Void.
  125. *
  126. * Purpose: Process all hypertext requests in a given Help Dialogs
  127. * display area.
  128. *
  129. *****************************************************************************/
  130. extern void _DtHelpDialogHypertextCB (
  131. XtPointer pDisplayAreaStruct,
  132. XtPointer clientData,
  133. DtHelpHyperTextStruct *hyperData);
  134. /*****************************************************************************
  135. * Function: void _DtHelpSetupDisplayType(DtHelpDialogWidget nw);
  136. * int updateType);
  137. *
  138. *
  139. * Parameters: nw Specifies the current help dialog widget.
  140. *
  141. * Return Value: Void.
  142. *
  143. * Purpose: Determins the type of topic the user want's to display
  144. * in the current help dialog and sets it up for display.
  145. *
  146. *****************************************************************************/
  147. extern void _DtHelpSetupDisplayType(
  148. DtHelpDialogWidget nw,
  149. Boolean vol_changed,
  150. int updateType);
  151. /*****************************************************************************
  152. * Function: void _DtHelpTopicListFree (DtTopicListStruct *pHead);
  153. *
  154. *
  155. * Parameters: pHead Specifies the head pointer to the topic list.
  156. *
  157. * Return Value: Void.
  158. *
  159. * Purpose: Frees all elements in a Topic List.
  160. *
  161. *****************************************************************************/
  162. extern void _DtHelpTopicListFree(
  163. DtTopicListStruct *pHead);
  164. /*****************************************************************************
  165. * Function: extern void DisplayHistoryCB(
  166. * Widget w,
  167. * XtPointer client_data,
  168. * XtPointer call_data);
  169. *
  170. * Parameters:
  171. *
  172. * Return Value:
  173. *
  174. * Purpose: This routine will cause the history dialog to be
  175. * posted.
  176. *
  177. ****************************************************************************/
  178. extern void _DtHelpDisplayHistoryCB(
  179. Widget w,
  180. XtPointer client_data,
  181. XtPointer call_data );
  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. * Function: extern void _DtHelpDuplicateWindowCB(
  202. * Widget w,
  203. * XtPointer client_data,
  204. * XtPointer call_data);
  205. *
  206. * Parameters:
  207. *
  208. * Return Value:
  209. *
  210. * Purpose: This routine creates a new help widget by forcing the
  211. * equivelent of a Jump New hyper text call
  212. *
  213. ****************************************************************************/
  214. extern void _DtHelpDuplicateWindowCB(
  215. Widget w,
  216. XtPointer client_data,
  217. XtPointer call_data);
  218. /*****************************************************************************
  219. * Function: void _DtHelpDisplayIndexCB(
  220. * Widget w,
  221. * XtPointer client_data,
  222. * XtPointer call_data);
  223. *
  224. * Parameters:
  225. *
  226. * Return Value:
  227. *
  228. * Purpose: This routine will cause the index dialog to be
  229. * posted.
  230. *
  231. ****************************************************************************/
  232. extern void _DtHelpDisplayIndexCB(
  233. Widget w,
  234. XtPointer client_data,
  235. XtPointer call_data);
  236. /*****************************************************************************
  237. * Function: void _DtHelpDisplayBrowserHomeCB(
  238. * Widget w,
  239. * XtPointer client_data,
  240. * XtPointer call_data);
  241. *
  242. * Parameters:
  243. *
  244. * Return Value:
  245. *
  246. * Purpose: This routine will cause the top level of the browser.hv
  247. * help volume to be displayed.
  248. *
  249. ****************************************************************************/
  250. extern void _DtHelpDisplayBrowserHomeCB(
  251. Widget w,
  252. XtPointer client_data,
  253. XtPointer call_data);
  254. /*****************************************************************************
  255. * Function: _DtHelpFilterExecCmdCB
  256. *
  257. * clientData: The general help dialog widget
  258. * cmdStr: cmd string to filter
  259. * ret_filteredCmdStr: string after filtering. NULL if exec denied
  260. *
  261. * Return Value: 0: ok, < 0: error
  262. *
  263. * Purpose: filter an execution command using executionPolicy rsrc
  264. *
  265. * Memory:
  266. * The caller must free memory allocated for the ret_filteredCmdStr
  267. *****************************************************************************/
  268. extern int _DtHelpFilterExecCmdCB(
  269. void * clientData,
  270. const char * cmdStr,
  271. char * * ret_filteredCmdStr);
  272. #endif /* _HelpDialogI_h */
  273. /* Do not add anything after this endif. */