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: DtTt.h /main/5 1996/03/19 10:48:06 barstow $
33 #include "ttChooser_ui.h"
34 #include "stringChooser_ui.h"
51 _DtTtChooserMessageOpen,
52 _DtTtChooserMessageCreateStandard,
53 _DtTtChooserMessageOpSet,
54 _DtTtChooserMessageHandlerSet,
55 _DtTtChooserMessageDestroy,
56 _DtTtChooserPatternOpen,
57 _DtTtChooserPatternOpAdd,
58 _DtTtChooserPatternSenderAdd,
59 _DtTtChooserPatternDestroy,
60 _DtTtChooserDtSessionQuit,
61 _DtTtChooserDtFileDeleted,
62 _DtTtChooserDtFileModified,
63 _DtTtChooserDtFileReverted,
64 _DtTtChooserDtFileMoved,
65 _DtTtChooserDtFileSaved,
66 _DtTtChooserDtFileQuit,
67 _DtTtChooserProcidSetDefault,
68 _DtTtChooserProcidSuspend,
69 _DtTtChooserProcidResume,
70 _DtTtChooserDtProcidClose
75 _DtStringChoosePatternOp,
76 _DtStringChoosePatternOtype,
77 _DtStringChoosePatternObject,
78 _DtStringChoosePatternSenderPtype,
79 _DtStringChooseMessageOtype,
80 _DtStringChooseMessageObject,
81 _DtStringChooseMessageHandlerPtype,
82 _DtStringChooseMessageSenderPtype,
83 _DtStringChooseMessageStatusString,
84 _DtStringChooseMessageArgValSet,
85 _DtStringChoosePtype2Declare,
86 _DtStringChooseMediaPtype2Declare,
87 _DtStringChoosePtype2UnDeclare,
88 _DtStringChoosePtype2SetDefault,
89 _DtStringChoosePtype2Exists,
90 _DtStringChooseSystem,
91 _DtStringChoosePutenv,
92 _DtStringChooseNetfile2File
93 } _DtStringChooserAction;
97 _DtSessionChoosePattern,
98 _DtSessionChooseMessage,
100 _DtSessionChooseDtJoin,
101 _DtSessionChooseQuit,
102 _DtSessionChooseDefault
103 } _DtSessionChooserAction;
107 _DtFileChoosePatternAdd,
108 _DtFileChooseMessageSet,
112 _DtFileChooseDefault,
113 _DtFileChooseGetModified,
116 _DtFileChooseNetfile,
118 _DtFileChooseTypesLoad
119 } _DtFileChooserAction;
121 typedef enum { // invariant: IArgAdd == ArgAdd + 1
123 _DtArgChoosePatternArgAdd,
124 _DtArgChoosePatternIArgAdd,
125 _DtArgChoosePatternContextAdd,
126 _DtArgChoosePatternIContextAdd,
127 _DtArgChooseMessageArgAdd,
128 _DtArgChooseMessageIArgAdd,
129 _DtArgChooseMessageArgSet,
130 _DtArgChooseMessageIArgSet,
131 _DtArgChooseMessageContextSet,
132 _DtArgChooseMessageIContextSet,
133 _DtArgChooseContextJoin,
134 _DtArgChooseIContextJoin,
135 _DtArgChooseContextQuit,
136 _DtArgChooseIContextQuit
137 } _DtArgChooserAction;
139 typedef void (*DtTtMessageUpdateCallback)(
143 Tt_status lastOperation,
148 * Returns elem2Append on success, 0 on failure
150 #define listAppend( list, listCount, type, elem2Append ) \
151 ( listGrow( (void **)&list, listCount, sizeof( type ) ) \
152 ? (list[ listCount - 1 ] = elem2Append) \
157 unsigned int & listCount,
161 XmString DtTtStatusString(
164 Tt_status DtTtCreated(
167 const void * clientData = 0
169 Tt_status DtTtCreated(
178 void * DtTtNthClientDatum(
182 void DtTtNthClientDatumSet(
185 const void * clientData
191 Tt_status DtTtDestroyed(
195 void DtTtMessageWidgetUpdate(
199 Tt_status lastOperation,
202 Widget DtTtMessageWidgetCreate(
205 DtTtMessageUpdateCallback notifyProc
207 Widget DtTtMessageWidget(
210 Widget DtTtPatternWidgetCreate(
213 Tt_message_callback notifyProc
215 Widget DtTtPatternWidget(
218 Tt_status DtTtSetLabel(
222 Tt_status DtTtSetLabel(
224 const char * funcName,
227 Tt_status DtTtSetLabel(
229 const char * funcName,
234 const char * funcName,
238 void _DtTtChooserSet(
239 _DtTtChooserAction choice,
242 XmString * _DtTtChoices(
246 void _DtStringChooserSet(
247 _DtStringChooserAction choice,
250 void _DtStringChooserSet(
251 _DtStringChooserAction choice,
255 void _DtSessionChooserSet(
256 _DtSessionChooserAction choice,
259 void _DtFileChooserSet(
260 _DtFileChooserAction choice,
263 void _DtArgChooserSet(
264 _DtArgChooserAction choice,
268 void _DtArgChooserSet(
269 _DtArgChooserAction choice,
273 Boolean noValue = True,
278 void _DtTtMsgCbChooserSet(
281 void _DtTtMsgCbChooserSet(
284 Tt_message _DtTtMediaLoadPatCb(
289 unsigned char *contents,
294 void _DtTtPatternUpdate(
296 _DtStringChooserAction choice,
299 void _DtTtPatternUpdate(
301 _DtSessionChooserAction choice,
304 void _DtTtPatternUpdate(
306 _DtFileChooserAction choice,
309 void _DtTtPatternUpdate(
311 _DtTtChooserAction choice,
314 void _DtTtPatternUpdate(
316 _DtArgChooserAction choice,
322 void _DtTtPatternUpdate(
324 Tt_message_callback cb
326 void _DtTtMessageUpdate(
328 _DtStringChooserAction choice,
331 void _DtTtMessageUpdate(
333 _DtSessionChooserAction choice,
336 void _DtTtMessageUpdate(
338 _DtFileChooserAction choice,
341 void _DtTtMessageUpdate(
343 _DtTtChooserAction choice,
346 void _DtTtMessageUpdate(
348 _DtArgChooserAction choice,
355 void _DtTtMessageUpdate(
357 Tt_message_callback cb
362 const char * tempnamTemplate
372 const char * tempnamTemplate
387 const char * callBackType,
391 Boolean printPat = False
395 extern int _DtTtPatsNameKey;