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 librararies 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 G_OVERWRITE_EXISTING 0
46 #define G_RENAME_EXISTING 2
47 #define N_OVERWRITE_RADIO_BUTTONS 3
49 /* Help numbers that are used locally in dtcopy
50 * to indentify what help volume should be used
51 * for a particular callback. Look to utils.c
52 * in help_callback for code. MJT
54 #define HELP_HELP_MENU 1
55 #define HELP_INTRODUCTION 2
56 #define HELP_DIR_COPY 3
57 #define HELP_DIR_ERROR 4
58 #define HELP_OVERWRITE 5
60 #define HELP_VERSION 7
61 #define STOPW_HELP_DIALOG 9
63 /* debugging output */
66 #define DPRINTF(p) if (debug) printf p
67 #define DPRINTF2(p) if (debug >= 2) printf p
69 #define DPRINTF(p) /* noop */
70 #define DPRINTF2(p) /* noop */
73 /* _DtMessage Dialog build defines */
74 #define ERROR_DIALOG 1
75 #define WARNING_DIALOG 2
76 #define QUESTION_DIALOG 3
78 /* Global Variables */
79 extern Widget G_toplevel;
80 extern Widget G_overwrite_radio;
81 extern Widget G_summary_text;
82 extern Widget G_status_text;
83 extern Widget G_status_text2;
84 extern Widget G_error_count;
85 extern Widget G_error_msgs;
86 extern Widget G_copy_dialog;
87 extern Widget G_error_dialog;
88 extern Widget G_over_dialog;
89 extern Widget G_over_confirm;
90 extern Widget G_copy_action_area_pbuttons[4];
91 extern Widget G_help_dialog;
92 extern Widget G_rename_text;
93 extern Widget G_toggle_main;
94 extern Widget G_toggle_error;
96 extern char G_rename_oldname[];
97 extern char G_source_dir[];
100 extern int G_pause_copy;
101 extern int G_user_pause_copy;
102 extern int G_wait_on_error;
103 extern int G_error_status;
104 extern int G_ignore_errors;
105 extern int G_overwrite_selection;
106 extern int G_overwrite_confirm;
107 extern int G_wait_on_input;
108 extern int G_dialog_closed;
113 /* External Routines */
115 extern void help_callback(
117 XtPointer client_data,
118 XtPointer call_data);
119 extern void sensitize_copy_action_area(
120 Widget *pushbutton_array);
121 extern void desensitize_copy_action_area(
122 Widget *pushbutton_array);
123 extern Boolean create_copydir_dialog(
124 Widget parent_widget,
127 extern void create_error_dialog(
128 Widget parent_widget,
132 extern void create_overwrite_dialog(
133 Widget parent_widget,
137 extern void _DtChildPosition(
142 extern void cancel_callback(
144 XtPointer client_data,
145 XtPointer call_data);
146 extern void display_cancel_warning(Widget parent);
147 extern void toggle_callback(
149 XtPointer client_data,
150 XtPointer call_data);
151 extern int touch(String path);
154 * macro to get message catalog strings
157 #ifndef NO_MESSAGE_CATALOG
159 # define _CLIENT_CAT_NAME "dtcopy.cat"
160 # else /* __ultrix */
161 # define _CLIENT_CAT_NAME "dtcopy"
162 # endif /* __ultrix */
163 extern char *_DtGetMessage(char *filename, int set, int n, char *s);
164 # define GETMESSAGE(set, number, string)\
165 (_DtGetMessage(_CLIENT_CAT_NAME, set, number, string))
167 # define GETMESSAGE(set, number, string)\