Help.h 6.6 KB

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