2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
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)
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
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
23 /* $XConsortium: dtcopy.h /main/7 1996/10/29 17:08:48 mustafa $ */
24 /************************************<+>*************************************
25 ****************************************************************************
30 * DESCRIPTION: Header file used in copydialog.c,errordialog.c
31 * main_dtcopy.c,overwrtdialog.c,utils.c
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.
38 ****************************************************************************
39 ************************************<+>*************************************/
44 #define MAX_PATH PATH_MAX
46 #define G_OVERWRITE_EXISTING 0
48 #define G_RENAME_EXISTING 2
49 #define N_OVERWRITE_RADIO_BUTTONS 3
51 /* Help numbers that are used locally in dtcopy
52 * to indentify what help volume should be used
53 * for a particular callback. Look to utils.c
54 * in help_callback for code. MJT
56 #define HELP_HELP_MENU 1
57 #define HELP_INTRODUCTION 2
58 #define HELP_DIR_COPY 3
59 #define HELP_DIR_ERROR 4
60 #define HELP_OVERWRITE 5
62 #define HELP_VERSION 7
63 #define STOPW_HELP_DIALOG 9
65 /* debugging output */
68 #define DPRINTF(p) if (debug) printf p
69 #define DPRINTF2(p) if (debug >= 2) printf p
71 #define DPRINTF(p) /* noop */
72 #define DPRINTF2(p) /* noop */
75 /* _DtMessage Dialog build defines */
76 #define ERROR_DIALOG 1
77 #define WARNING_DIALOG 2
78 #define QUESTION_DIALOG 3
80 /* Global Variables */
81 extern Widget G_toplevel;
82 extern Widget G_overwrite_radio;
83 extern Widget G_summary_text;
84 extern Widget G_status_text;
85 extern Widget G_status_text2;
86 extern Widget G_error_count;
87 extern Widget G_error_msgs;
88 extern Widget G_copy_dialog;
89 extern Widget G_error_dialog;
90 extern Widget G_over_dialog;
91 extern Widget G_over_confirm;
92 extern Widget G_copy_action_area_pbuttons[4];
93 extern Widget G_help_dialog;
94 extern Widget G_rename_text;
95 extern Widget G_toggle_main;
96 extern Widget G_toggle_error;
98 extern char G_rename_oldname[MAX_PATH];
99 extern char G_source_dir[MAX_PATH];
101 extern int G_do_copy;
102 extern int G_pause_copy;
103 extern int G_user_pause_copy;
104 extern int G_wait_on_error;
105 extern int G_error_status;
106 extern int G_ignore_errors;
107 extern int G_overwrite_selection;
108 extern int G_overwrite_confirm;
109 extern int G_wait_on_input;
110 extern int G_dialog_closed;
115 /* External Routines */
117 extern void help_callback(
119 XtPointer client_data,
120 XtPointer call_data);
121 extern void sensitize_copy_action_area(
122 Widget *pushbutton_array);
123 extern void desensitize_copy_action_area(
124 Widget *pushbutton_array);
125 extern Boolean create_copydir_dialog(
126 Widget parent_widget,
129 extern void create_error_dialog(
130 Widget parent_widget,
134 extern void create_overwrite_dialog(
135 Widget parent_widget,
139 extern void _DtChildPosition(
144 extern void cancel_callback(
146 XtPointer client_data,
147 XtPointer call_data);
148 extern void display_cancel_warning(Widget parent);
149 extern void toggle_callback(
151 XtPointer client_data,
152 XtPointer call_data);
153 extern int touch(String path);
156 * macro to get message catalog strings
159 #ifndef NO_MESSAGE_CATALOG
161 # define _CLIENT_CAT_NAME "dtcopy.cat"
162 # else /* __ultrix */
163 # define _CLIENT_CAT_NAME "dtcopy"
164 # endif /* __ultrix */
165 extern char *_DtGetMessage(char *filename, int set, int n, char *s);
166 # define GETMESSAGE(set, number, string)\
167 (_DtGetMessage(_CLIENT_CAT_NAME, set, number, string))
169 # define GETMESSAGE(set, number, string)\