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 /*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */
24 /*%% (c) Copyright 1993, 1994 International Business Machines Corp. */
25 /*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */
26 /*%% (c) Copyright 1993, 1994 Novell, Inc. */
27 /*%% $XConsortium: CoEditor.h /main/3 1995/10/20 17:04:44 rswiston $ */
31 #include <X11/Intrinsic.h>
63 unsigned char *contents,
70 static Tt_message loadISOLatin1_(
75 unsigned char *contents,
80 static Tt_message contractCB_(
85 Tt_message _contractCB(
89 static Tt_message subContractCB_(
92 Tt_message subContract
94 Tt_message _subContractCB(
96 Tt_message subContract
112 unsigned char *contents,
117 static void _destroyCB_(
134 static void _wmProtocolCB_(
137 XmAnyCallbackStruct *cbs
139 void _wmProtocolCB();
140 static void _fileButsCB_(
149 static void _editButsCB_(
164 Tt_status _acceptContract(
167 static Tt_message _mediaLoadMsgCB_(
171 unsigned char *contents,
175 Tt_message _mediaLoadMsgCB(
178 unsigned char *contents,
182 static void _textUpdateCB_(
184 XtPointer pTextBuffer,
185 XmTextVerifyCallbackStruct *cbs
187 void _textUpdateCB();
188 static Tt_message _fileCB_(
203 static void _textModifyCB_(
206 XmTextVerifyCallbackStruct *mod
209 XmTextVerifyCallbackStruct *mod
215 Tt_status _read_file(
219 Tt_status _write_file(
225 static CoEditor *editors[];
226 static int numEditors;
234 Boolean _modifiedByMe;
235 int _modifiedByOther; // >1 == user has been asked
236 Tt_message _contract;
237 Tt_message _subContract;
238 Tt_pattern *_contractPats;
239 Tt_pattern *_filePats;
240 char *_file; // free w/ free()
241 int _x; // geometry of parent