sharedFuncs.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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: sharedFuncs.h /main/4 1995/11/02 14:48:35 rswiston $ */
  24. /************************************<+>*************************************
  25. ****************************************************************************
  26. *
  27. * FILE: sharedFuncs.h
  28. *
  29. *
  30. * DESCRIPTION: Header file used in copydialog.c,errordialog.c,
  31. * main_dtcopy.c,overwrtdialog.c,sharedFuncs.c,utils.c
  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 SHAREDFUNCS_H
  41. #define SHAREDFUNCS_H
  42. /* Includes */
  43. #include <X11/Intrinsic.h>
  44. /* Macros */
  45. #define TIGHTNESS 20 /* button spacing in Create_Action_Area */
  46. #include <limits.h>
  47. #define MAX_PATH PATH_MAX /* Maximum path length */
  48. /* Types */
  49. typedef struct {
  50. char *label; /* PushButton's default Label */
  51. int msg_set; /* set from which PushButton's Label is taken */
  52. int msg_num; /* message number of PushButton's Label */
  53. void (*callback)(); /* pointer to callback routine */
  54. XtPointer data; /* client data for callback routine */
  55. } ActionAreaItem;
  56. typedef struct {
  57. int numActions;
  58. int defaultAction; /* index in actionList[], >=0, <numActions */
  59. ActionAreaItem *actionList;
  60. } ActionAreaDefn;
  61. /* Global Variables */
  62. /* External Routines */
  63. extern int auto_rename(const String path);
  64. extern void generate_NewPath(String newPath, String oldPath);
  65. extern void split_path(const String path, String folder, String object);
  66. extern String build_path(const String folder, const String object);
  67. extern XImage * CreateDefaultImage(
  68. Display *display,
  69. char *bits,
  70. unsigned int width,
  71. unsigned int height );
  72. extern void ImageInitialize(Display *display);
  73. extern Widget Create_Action_Area(
  74. Widget parent_widget,
  75. ActionAreaDefn actions,
  76. Widget * pushbutton_array);
  77. extern void CheckDeleteAccess(
  78. XtAppContext app_context,
  79. int delay,
  80. Boolean checkPerms,
  81. Boolean move,
  82. char *source_name);
  83. extern void TimeoutHandler(
  84. XtPointer client_data,
  85. XtIntervalId *id);
  86. extern char * get_path(char *path);
  87. #endif /* SHAREDFUNCS_H */