SharedProcs.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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: SharedProcs.h /main/4 1995/11/02 14:44:13 rswiston $ */
  24. /************************************<+>*************************************
  25. ****************************************************************************
  26. *
  27. * FILE: SharedProcs.h
  28. *
  29. * COMPONENT_NAME: Desktop File Manager
  30. *
  31. * DESCRIPTION: Public include file for some shared functions.
  32. *
  33. * (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company
  34. * (c) Copyright 1993, 1994, 1995 International Business Machines Corp.
  35. * (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
  36. * (c) Copyright 1993, 1994, 1995 Novell, Inc.
  37. *
  38. ****************************************************************************
  39. ************************************<+>*************************************/
  40. #ifndef _DtFile_SharedProcs_h
  41. #define _DtFile_SharedProcs_h
  42. #include <Dt/Icon.h>
  43. #include <Dt/Action.h>
  44. #include <Dt/Dnd.h>
  45. #include "Common.h"
  46. #include "FileMgr.h"
  47. /******** Public Function Declarations ********/
  48. extern String _DtStripSpaces(
  49. String string) ;
  50. extern char * _DtPName(
  51. char *name) ;
  52. extern char * _DtFollowLink(
  53. char * path) ;
  54. extern Boolean _DtStringsAreEquivalent(
  55. char *in_str,
  56. char *test_str) ;
  57. extern void _DtDuplicateDialogNameList (
  58. char ** nameList,
  59. char ** newNameList,
  60. int newNameListSize,
  61. int * nameCount) ;
  62. extern void _DtLoadSubdialogArray (
  63. char ** nameList,
  64. int nameCount,
  65. DialogData *** dialogArray,
  66. int dialogCount,
  67. int dialogId,
  68. XrmDatabase dataBase,
  69. int firstId );
  70. extern void _DtSaveSubdialogArray (
  71. char ** nameList,
  72. int nameCount,
  73. DialogData ** dialogArray,
  74. int dialogCount,
  75. int fd,
  76. int firstId );
  77. extern void _DtDestroySubdialogArray (
  78. DialogData ** dialogArray,
  79. int dialogCount) ;
  80. extern void _DtDestroySubdialog (
  81. DialogData * dialogData) ;
  82. extern void _DtHideOneSubdialog (
  83. DialogData * dialogData,
  84. DialogData *** dialogArray,
  85. int * dialogCountPtr) ;
  86. extern void _DtAddOneSubdialog (
  87. DialogData * dialogData,
  88. DialogData *** dialogArray,
  89. int * dialogCountPtr) ;
  90. extern void _DtMappedCB(
  91. Widget w,
  92. XtPointer client_data,
  93. XtPointer call_data) ;
  94. extern void _DtGenericMapWindow (
  95. Widget parent,
  96. XtPointer recordPtr) ;
  97. extern void _DtGenericDestroy(
  98. XtPointer recordPtr) ;
  99. extern void _DtGenericUpdateWindowPosition(
  100. DialogData * dataPtr) ;
  101. extern void _DtBuildPath(
  102. char *path,
  103. char *directory,
  104. char *fileName) ;
  105. extern PixmapData * _DtRetrievePixmapData(
  106. char *dataType,
  107. char *fileName,
  108. char *directory,
  109. Widget shell,
  110. int size);
  111. extern void _DtCheckAndFreePixmapData(
  112. char *dataType,
  113. Widget shell,
  114. DtIconGadget iconGadget,
  115. PixmapData *pixmapData) ;
  116. extern Boolean _DtCheckForDataTypeProperty(
  117. char *dataType,
  118. char *property) ;
  119. extern char ** _DtCompileActionVector(
  120. char *dataType) ;
  121. extern char * _DtRetrieveDefaultAction(
  122. char *dataType) ;
  123. extern char * _DtBuildFMTitle(
  124. FileMgrData *file_mgr_data) ;
  125. extern char * _DtGetSelectedFilePath(
  126. FileViewData *selected_file) ;
  127. extern void _DtBuildActionArgsWithSelectedFiles(
  128. FileViewData **selection_list,
  129. int selected_file_count,
  130. DtActionArg **action_args,
  131. int *args_count) ;
  132. extern void _DtBuildActionArgsWithDroppedFiles(
  133. FileViewData *dropped_on_obj,
  134. DtDndDropCallbackStruct *drop_parameters,
  135. DtActionArg **action_args,
  136. int *args_count) ;
  137. extern void _DtBuildActionArgsWithDroppedBuffers(
  138. FileViewData *dropped_on_obj,
  139. DtDndDropCallbackStruct *drop_parameters,
  140. DtActionArg **action_args,
  141. int *args_count) ;
  142. extern void _DtFreeActionArgs(
  143. DtActionArg *action_args,
  144. int args_count) ;
  145. extern void _DtSetDroppedBufferInfo(
  146. char **file_set,
  147. BufferInfo *buffer_set,
  148. char **host_set,
  149. DtDndDropCallbackStruct *drop_parameters);
  150. extern void _DtFreeDroppedBufferInfo (
  151. char **file_set,
  152. BufferInfo *buffer_set,
  153. char **host_set,
  154. int num_of_buffers);
  155. extern Boolean _DtIsBufferExecutable(
  156. void *buffer,
  157. int buffer_size) ;
  158. extern void _DtSetDroppedFileInfo(
  159. DtDndDropCallbackStruct *drop_parameters,
  160. char ***file_set,
  161. char ***host_set) ;
  162. extern void _DtCopyDroppedFileInfo(
  163. int num_files,
  164. char **orig_file_set,
  165. char **orig_host_set,
  166. char ***new_file_set,
  167. char ***new_host_set) ;
  168. extern void _DtFreeDroppedFileInfo(
  169. int num_files,
  170. char **file_set,
  171. char **host_set) ;
  172. extern void _DtPathFromInput(
  173. char *input_string,
  174. char *current_dir,
  175. char **host,
  176. char **rel_path) ;
  177. extern char * _DtChangeTildeToHome(
  178. char *input_string) ;
  179. extern Boolean _DtSpacesInFileNames(
  180. char **fileNames,
  181. int fileCount) ;
  182. extern char * _DtResolveAppManPath(
  183. char *path,
  184. char *restricted_dir) ;
  185. /******** End Public Function Declarations ********/
  186. /* _DtMessage Dialog build defines */
  187. #define ERROR_DIALOG 1
  188. #define WARNING_DIALOG 2
  189. #define QUESTION_DIALOG 3
  190. /* Flag which can be used to prevent error dialogs from being posted */
  191. extern Boolean messageDisplayEnabled;
  192. /* Flag controlling whether dialogs are auto-positioned */
  193. extern Boolean disableDialogAutoPlacement;
  194. #endif /* _DtFile_SharedProcs_h */
  195. /* DON'T ADD ANYTHING AFTER THIS #endif */