Fix warnings on FreeBSD
[oweals/cde.git] / cde / programs / ttsnoop / ttChooser_stubs.C.src
1 /*** DTB_USER_CODE_START vvv Add file header below vvv ***/
2 //%%  (c) Copyright 1993, 1994 Hewlett-Packard Company
3 //%%  (c) Copyright 1993, 1994 International Business Machines Corp.
4 //%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
5 //%%  (c) Copyright 1993, 1994 Novell, Inc.
6 //%%  $XConsortium: ttChooser_stubs.C.src /main/3 1995/11/06 17:14:10 rswiston $
7 /*** DTB_USER_CODE_END   ^^^ Add file header above ^^^ ***/
8
9 /*
10  * File: ttChooser_stubs.c
11  * Contains: Module callbacks and connection functions
12  *
13  * This file was generated by dtcodegen, from module ttChooser
14  *
15  * Any text may be added between the DTB_USER_CODE_START and
16  * DTB_USER_CODE_END comments (even non-C code). Descriptive comments
17  * are provided only as an aid.
18  *
19  *  ** EDIT ONLY WITHIN SECTIONS MARKED WITH DTB_USER_CODE COMMENTS.  **
20  *  ** ALL OTHER MODIFICATIONS WILL BE OVERWRITTEN. DO NOT MODIFY OR  **
21  *  ** DELETE THE GENERATED COMMENTS!                                 **
22  */
23
24 #include <stdint.h>
25 #include <stdio.h>
26 #include <Xm/Xm.h>
27 #include "dtb_utils.h"
28 #include "ttChooser_ui.h"
29
30 /*
31  * Header files for cross-module connections
32  */
33 #include "ttsnoop_ui.h"
34
35
36 /**************************************************************************
37  *** DTB_USER_CODE_START
38  ***
39  *** All necessary header files have been included.
40  ***
41  *** Add include files, types, macros, externs, and user functions here.
42  ***/
43
44 #include <stdio.h>
45
46 #if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
47 #include <strstream>
48 #else
49 #include <strstream.h>
50 #endif
51
52 #include <Xm/TextF.h>
53 #include <Xm/List.h>
54 #include "DtTt.h"
55
56 void
57 _DtTtChooserSet(
58         _DtTtChooserAction      choice,
59         void *                  entity
60 )
61 {
62     DtbTtChooserChooserInfo instance = &dtb_tt_chooser_chooser;
63     if (! instance->initialized) {
64             dtb_tt_chooser_chooser_initialize(
65                         instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin );
66     }
67     char *okString;
68     char *title;
69     char *valueLabel;
70     char *valuesLabel;
71     switch (choice) {
72         case _DtTtChooserNone:
73             return;
74         case _DtTtChooserMessageOpen:
75             okString = "Open";
76             title = "Open Tt_message";
77             break;
78         case _DtTtChooserMessageCreateStandard:
79             okString = "Create";
80             title = "Create Standard Tt_message";
81             break;
82         case _DtTtChooserMessageOpSet:
83             okString = "Set";
84             title = "tt_message_op_set";
85             break;
86         case _DtTtChooserMessageHandlerSet:
87             okString = "Set";
88             title = "tt_message_handler_set";
89             break;
90         case _DtTtChooserMessageDestroy:
91             okString = "Destroy";
92             title = "tt_message_destroy";
93             break;
94         case _DtTtChooserPatternOpen:
95             okString = "Open";
96             title = "Open Tt_pattern";
97             break;
98         case _DtTtChooserPatternOpAdd:
99             okString = "Add";
100             title = "tt_pattern_op_add";
101             break;
102         case _DtTtChooserPatternSenderAdd:
103             okString = "Add";
104             title = "tt_pattern_sender_add";
105             break;
106         case _DtTtChooserPatternDestroy:
107             okString = "Destroy";
108             title = "tt_pattern_destroy";
109             break;
110         case _DtTtChooserDtSessionQuit:
111             okString = "Quit";
112             title = "ttdt_session_quit";
113             break;
114         case _DtTtChooserDtFileDeleted:
115             okString = "Send";
116             title = "ttdt_file_event(,TTDT_DELETED)";
117             break;
118         case _DtTtChooserDtFileModified:
119             okString = "Send";
120             title = "ttdt_file_event(,TTDT_MODIFIED)";
121             break;
122         case _DtTtChooserDtFileReverted:
123             okString = "Send";
124             title = "ttdt_file_event(,TTDT_REVERTED)";
125             break;
126         case _DtTtChooserDtFileMoved:
127             okString = "Send";
128             title = "ttdt_file_event(,TTDT_MOVED)";
129             break;
130         case _DtTtChooserDtFileSaved:
131             okString = "Send";
132             title = "ttdt_file_event(,TTDT_SAVED)";
133             break;
134         case _DtTtChooserDtFileQuit:
135             okString = "Quit";
136             title = "ttdt_file_quit";
137             break;
138         case _DtTtChooserProcidSetDefault:
139             okString = "Set";
140             title = "tt_default_procid_set";
141             break;
142         case _DtTtChooserProcidSuspend:
143             okString = "Remove";
144             title = "XtRemoveInput";
145             break;
146         case _DtTtChooserProcidResume:
147             okString = "Add";
148             title = "XtAppAddInput";
149             break;
150         case _DtTtChooserDtProcidClose:
151             okString = "Close";
152             title = "ttdt_close";
153             break;
154     }
155     DtTtType type;
156     switch (choice) {
157         case _DtTtChooserNone:
158             return;
159         case _DtTtChooserMessageOpSet:
160         case _DtTtChooserPatternOpAdd:
161         case _DtTtChooserMessageCreateStandard:
162             valueLabel = "Op:";
163             valuesLabel = "Standard Op";
164             type = DTTT_OP;
165             break;
166         case _DtTtChooserMessageOpen:
167         case _DtTtChooserMessageDestroy:
168             valueLabel = "Tt_message:";
169             valuesLabel = "Tt_message";
170             type = DTTT_MESSAGE;
171             break;
172         case _DtTtChooserPatternOpen:
173         case _DtTtChooserPatternDestroy:
174             valueLabel = "Tt_pattern:";
175             valuesLabel = "Tt_pattern";
176             type = DTTT_PATTERN;
177             break;
178         case _DtTtChooserDtSessionQuit:
179             valueLabel = "Tt_pattern *:";
180             valuesLabel = "Desktop-joined session";
181             type = DTTT_DTSESSION;
182             break;
183         case _DtTtChooserDtFileDeleted:
184         case _DtTtChooserDtFileModified:
185         case _DtTtChooserDtFileReverted:
186         case _DtTtChooserDtFileMoved:
187         case _DtTtChooserDtFileSaved:
188         case _DtTtChooserDtFileQuit:
189             valueLabel = "Tt_pattern *:";
190             valuesLabel = "Desktop-joined file";
191             type = DTTT_DTFILE;
192             break;
193         case _DtTtChooserMessageHandlerSet:
194         case _DtTtChooserPatternSenderAdd:
195         case _DtTtChooserProcidSetDefault:
196         case _DtTtChooserProcidSuspend:
197         case _DtTtChooserProcidResume:
198         case _DtTtChooserDtProcidClose:
199             valueLabel = "Procid:";
200             valuesLabel = "Procid";
201             type = DTTT_PROCID;
202             break;
203     }
204     DtTtSetLabel( instance->chooserOkButton, okString );
205     DtTtSetLabel( instance->chooserText_label, valueLabel );
206
207     int itemCount;
208     XmString *items = _DtTtChoices( type, &itemCount );
209     XtVaSetValues( instance->chooserList,
210                    XmNitemCount, itemCount,
211                    XmNitems, items,
212                    NULL );
213     XmListDeselectAllItems( instance->chooserList );
214     XmTextFieldSetString( instance->chooserText, 0 );
215     XtVaSetValues( instance->chooser, XmNtitle, title, NULL );
216
217     std::ostrstream valuesStream;
218     valuesStream << itemCount << " " << valuesLabel;
219     if (itemCount != 1) valuesStream << "s";
220     valuesStream << ends;
221     DtTtSetLabel( instance->chooserList_label, valuesStream.str() );
222     delete valuesStream.str();
223
224     // Remember dialog mode, entity
225     XtVaSetValues( instance->chooserOkButton, XmNuserData, choice, NULL );
226     XtVaSetValues( instance->chooserCancelButton, XmNuserData, entity, NULL );
227
228     XtManageChild( instance->chooser_shellform );
229 }
230
231 /*** DTB_USER_CODE_END
232  ***
233  *** End of user code section
234  ***
235  **************************************************************************/
236
237
238
239 void 
240 ttChooser_chooserCancelButton_CB1(
241     Widget widget,
242     XtPointer clientData,
243     XtPointer callData
244 )
245 {
246     /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
247     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
248     
249     DtbTtChooserChooserInfo     instance = (DtbTtChooserChooserInfo)clientData;
250     
251     if (!(instance->initialized))
252     {
253         dtb_tt_chooser_chooser_initialize(instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin);
254     }
255     XtUnmanageChild(instance->chooser_shellform);
256     
257     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
258     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
259 }
260
261
262 void 
263 choiceSelected(
264     Widget widget,
265     XtPointer clientData,
266     XtPointer callData
267 )
268 {
269     /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
270     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
271     
272     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
273     DtbTtChooserChooserInfo instance = (DtbTtChooserChooserInfo)clientData;
274     XmListCallbackStruct *info = (XmListCallbackStruct *)callData;
275     int choice;
276     XtVaGetValues( instance->chooserOkButton, XmNuserData, &choice, NULL );
277     DtTtType type;
278     Boolean isString = False;
279     switch ((_DtTtChooserAction)choice) {
280         case _DtTtChooserNone:
281             return;
282         case _DtTtChooserMessageOpSet:
283         case _DtTtChooserPatternOpAdd:
284         case _DtTtChooserMessageCreateStandard:
285             isString = True;
286             type = DTTT_OP;
287             break;
288         case _DtTtChooserMessageOpen:
289         case _DtTtChooserMessageDestroy:
290             type = DTTT_MESSAGE;
291             break;
292         case _DtTtChooserPatternOpen:
293         case _DtTtChooserPatternDestroy:
294             type = DTTT_PATTERN;
295             break;
296         case _DtTtChooserDtSessionQuit:
297             type = DTTT_DTSESSION;
298             break;
299         case _DtTtChooserDtFileDeleted:
300         case _DtTtChooserDtFileModified:
301         case _DtTtChooserDtFileReverted:
302         case _DtTtChooserDtFileMoved:
303         case _DtTtChooserDtFileSaved:
304         case _DtTtChooserDtFileQuit:
305             type = DTTT_DTFILE;
306             break;
307         case _DtTtChooserMessageHandlerSet:
308         case _DtTtChooserPatternSenderAdd:
309         case _DtTtChooserProcidSetDefault:
310         case _DtTtChooserProcidSuspend:
311         case _DtTtChooserProcidResume:
312         case _DtTtChooserDtProcidClose:
313             isString = True;
314             type = DTTT_PROCID;
315             break;
316     }
317     void *entity = DtTtNth( type, info->item_position - 1 );
318     std::ostrstream entityName;
319     if (isString) {
320             entityName << (char *)entity << ends;
321     } else {
322             entityName << entity << ends;
323     }
324     XmTextFieldSetString( instance->chooserText, entityName.str() );
325     delete entityName.str();
326     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
327 }
328
329
330 void 
331 choiceOkayed(
332     Widget widget,
333     XtPointer clientData,
334     XtPointer callData
335 )
336 {
337     /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
338     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
339     
340     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
341     DtbTtChooserChooserInfo instance = (DtbTtChooserChooserInfo)clientData;
342     char *text = XmTextFieldGetString( instance->chooserText );
343     int ival;
344     XtVaGetValues( instance->chooserOkButton, XmNuserData, &ival, NULL );
345     _DtTtChooserAction choice = (_DtTtChooserAction)ival;
346     Widget label = dtb_ttsnoop_ttsnoop_win.ttsnoopWin_label;
347     switch (choice) {
348             int ival, fd;
349             Tt_message msg;
350             Tt_pattern pat;
351             Tt_pattern *pats;
352             Tt_status status;
353             char *func, *procid;
354             XtPointer xtPtr;
355             XtInputId id;
356             Widget newWidget;
357         case _DtTtChooserNone:
358             return;
359         case _DtTtChooserMessageCreateStandard:
360             msg = tttk_message_create( text );
361             status = DtTtSetLabel( label, "tt_message_create()", msg );
362             if (tt_is_err( status )) {
363                     break;
364             }
365             DtTtCreated( DTTT_MESSAGE, msg );
366             newWidget = DtTtMessageWidgetCreate(
367                                 dtb_ttsnoop_ttsnoop_win.ttsnoopWin, msg,
368                                 DtTtMessageWidgetUpdate );
369             status = tt_ptr_error( newWidget );
370             if (tt_is_err( status )) {
371                     return;
372             }
373             XRaiseWindow( XtDisplay( newWidget ), XtWindow( newWidget ));
374             XtUnmanageChild( instance->chooser_shellform );
375             break;
376         case _DtTtChooserMessageOpSet:
377             XtVaGetValues( instance->chooserCancelButton,
378                            XmNuserData, &xtPtr, NULL );
379             _DtTtMessageUpdate( (Tt_message)xtPtr, choice, text );
380             XtUnmanageChild( instance->chooser_shellform );
381             break;
382         case _DtTtChooserPatternOpAdd:
383             XtVaGetValues( instance->chooserCancelButton,
384                            XmNuserData, &xtPtr, NULL );
385             _DtTtPatternUpdate( (Tt_pattern)xtPtr, choice, text );
386             XtUnmanageChild( instance->chooser_shellform );
387             break;
388         case _DtTtChooserMessageHandlerSet:
389             XtVaGetValues( instance->chooserCancelButton,
390                            XmNuserData, &xtPtr, NULL );
391             _DtTtMessageUpdate( (Tt_message)xtPtr, choice, text );
392             XtUnmanageChild( instance->chooser_shellform );
393             break;
394         case _DtTtChooserPatternSenderAdd:
395             XtVaGetValues( instance->chooserCancelButton,
396                            XmNuserData, &xtPtr, NULL );
397             _DtTtPatternUpdate( (Tt_pattern)xtPtr, choice, text );
398             XtUnmanageChild( instance->chooser_shellform );
399             break;
400         case _DtTtChooserMessageOpen:
401         case _DtTtChooserMessageDestroy:
402             if (text == 0) {
403                     return;
404             }
405             ival = 0;
406             sscanf( text, "%i", &ival );
407             msg = (Tt_message) (intptr_t) ival;
408             if (DtTtIndex( DTTT_MESSAGE, msg ) < 0) {
409                     return;
410             }
411             if (choice == _DtTtChooserMessageOpen) {
412                     Widget newWidget = DtTtMessageWidgetCreate(
413                                         dtb_ttsnoop_ttsnoop_win.ttsnoopWin,
414                                         msg, DtTtMessageWidgetUpdate );
415                     Tt_status status = tt_ptr_error( newWidget );
416                     if (tt_is_err( status )) {
417                             return;
418                     }
419                     XRaiseWindow( XtDisplay( newWidget ), XtWindow( newWidget ));
420             } else {
421                     Widget msgWidget = DtTtMessageWidget( msg );
422                     Tt_status status = tttk_message_destroy( msg );
423                     if (status == TT_WRN_STOPPED) {
424                             DtTtSetLabel( label, "tttk_message_destroy()",
425                                           status );
426                             return;
427                     }
428                     DtTtDestroyed( DTTT_MESSAGE, msg );
429                     if (msgWidget != 0) {
430                             XtDestroyWidget( msgWidget );
431                     }
432                     _DtTtChooserSet( _DtTtChooserMessageDestroy );
433             }
434             break;
435         case _DtTtChooserPatternOpen:
436         case _DtTtChooserPatternDestroy:
437             if (text == 0) {
438                     return;
439             }
440             ival = 0;
441             sscanf( text, "%i", &ival );
442             pat = (Tt_pattern) (intptr_t) ival;
443             if (DtTtIndex( DTTT_PATTERN, pat ) < 0) {
444                     return;
445             }
446             if (choice == _DtTtChooserPatternOpen) {
447                     Widget newWidget = DtTtPatternWidgetCreate(
448                                         dtb_ttsnoop_ttsnoop_win.ttsnoopWin,
449                                         pat, 0 );
450                     Tt_status status = tt_ptr_error( newWidget );
451                     if (tt_is_err( status )) {
452                             return;
453                     }
454                     XRaiseWindow( XtDisplay( newWidget ), XtWindow( newWidget ));
455             } else {
456                     Widget patWidget = DtTtPatternWidget( pat );
457                     Tt_status status = tt_pattern_destroy( pat );
458                     if (status == TT_WRN_STOPPED) {
459                             DtTtSetLabel( label, "tt_pattern_destroy()",
460                                           status );
461                             return;
462                     }
463                     DtTtDestroyed( DTTT_PATTERN, pat );
464                     if (patWidget != 0) {
465                             XtDestroyWidget( patWidget );
466                     }
467                     _DtTtChooserSet( _DtTtChooserPatternDestroy );
468             }
469             break;
470         case _DtTtChooserDtSessionQuit:
471             if (text == 0) {
472                     return;
473             }
474             ival = 0;
475             sscanf( text, "%i", &ival );
476             pats = (Tt_pattern *) (intptr_t) ival;
477             if (DtTtIndex( DTTT_DTSESSION, pats ) < 0) {
478                     return;
479             }
480             text = (char *)tt_pattern_user( *pats, _DtTtPatsNameKey );
481             if (tt_is_err( tt_ptr_error( text )) || text == 0) {
482                     return;
483             }
484             status = ttdt_session_quit( text, pats, 1 );
485             DtTtSetLabel( label, "ttdt_session_quit()", status );
486             if (status == TT_OK) {
487                     DtTtDestroyed( DTTT_DTSESSION, pats );
488             }
489             XtUnmanageChild( instance->chooser_shellform );
490             break;
491         case _DtTtChooserDtFileDeleted:
492         case _DtTtChooserDtFileModified:
493         case _DtTtChooserDtFileReverted:
494         case _DtTtChooserDtFileMoved:
495         case _DtTtChooserDtFileSaved:
496         case _DtTtChooserDtFileQuit:
497             if (text == 0) {
498                     return;
499             }
500             ival = 0;
501             sscanf( text, "%i", &ival );
502             pats = (Tt_pattern *) (intptr_t) ival;
503             if (DtTtIndex( DTTT_DTFILE, pats ) < 0) {
504                     return;
505             }
506             switch ((_DtTtChooserAction)choice) {
507                 case _DtTtChooserDtFileModified:
508                     status = ttdt_file_event( 0, TTDT_MODIFIED, pats, 1 );
509                     func = "ttdt_file_event(,TTDT_MODIFIED)";
510                     break;
511                 case _DtTtChooserDtFileReverted:
512                     status = ttdt_file_event( 0, TTDT_REVERTED, pats, 1 );
513                     func = "ttdt_file_event(,TTDT_REVERTED)";
514                     break;
515                 case _DtTtChooserDtFileSaved:
516                     status = ttdt_file_event( 0, TTDT_SAVED, pats, 1 );
517                     func = "ttdt_file_event(,TTDT_SAVED)";
518                     break;
519                 case _DtTtChooserDtFileQuit:
520                     status = ttdt_file_quit( pats, 1 );
521                     func = "ttdt_file_quit()";
522                     if (status == TT_OK) {
523                             DtTtDestroyed( DTTT_DTFILE, pats );
524                     }
525                     break;
526             }
527             DtTtSetLabel( label, func, status );
528             XtUnmanageChild( instance->chooser_shellform );
529         case _DtTtChooserProcidSetDefault:
530             status = tt_default_procid_set( text );
531             DtTtSetLabel( label, "tt_default_procid_set()", status );
532             XtUnmanageChild( instance->chooser_shellform );
533             break;
534         case _DtTtChooserProcidSuspend:
535             ival = DtTtIndex( DTTT_PROCID, text );
536             if (ival < 0) {
537                     return;
538             }
539             id = (XtInputId)DtTtNthClientDatum( DTTT_PROCID, ival );
540             if (id != 0) {
541                     XtRemoveInput( id );
542                     DtTtSetLabel( label, "XtRemoveInput()" );
543             }
544             XtUnmanageChild( instance->chooser_shellform );
545             break;
546         case _DtTtChooserProcidResume:
547             ival = DtTtIndex( DTTT_PROCID, text );
548             if (ival < 0) {
549                     return;
550             }
551             fd = tt_procid_fd( text );
552             if (tt_is_err( tt_int_error( fd ))) {
553                     return;
554             }
555             id = XtAppAddInput( XtWidgetToApplicationContext( label ),
556                                 fd, (XtPointer)XtInputReadMask,
557                                 tttk_Xt_input_handler, text );
558             DtTtSetLabel( label, "XtAppAddInput()", (int)id );
559             if (id != 0) {
560                     DtTtNthClientDatumSet( DTTT_PROCID, ival, (void *)id );
561             }
562             XtUnmanageChild( instance->chooser_shellform );
563             break;
564         case _DtTtChooserDtProcidClose:
565             status = ttdt_close( text, 0, 1 );
566             DtTtSetLabel( label, "ttdt_close()", status );
567             ival = DtTtIndex( DTTT_PROCID, text );
568             if (ival < 0) {
569                     return;
570             }
571             id = (XtInputId)DtTtNthClientDatum( DTTT_PROCID, ival );
572             if (id != 0) {
573                     XtRemoveInput( id );
574             }
575             DtTtDestroyed( DTTT_PROCID, text );
576             XtUnmanageChild( instance->chooser_shellform );
577             break;
578     }
579     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
580 }
581
582
583 void 
584 ttChooserHelp(
585     Widget widget,
586     XtPointer clientData,
587     XtPointer callData
588 )
589 {
590     /*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
591     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
592     
593     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
594     DtbTtChooserChooserInfo instance = (DtbTtChooserChooserInfo)clientData;
595     int ival;
596     XtVaGetValues( instance->chooserOkButton, XmNuserData, &ival, NULL );
597     _DtTtChooserAction choice = (_DtTtChooserAction)ival;
598     Widget label = dtb_ttsnoop_ttsnoop_win.ttsnoopWin_label;
599     switch (choice) {
600             char *op;
601         case _DtTtChooserNone:
602             return;
603         case _DtTtChooserMessageOpSet:
604         case _DtTtChooserMessageCreateStandard:
605         case _DtTtChooserPatternOpAdd:
606             op = XmTextFieldGetString( instance->chooserText );
607             if (op != 0) {
608                     _DtMan( label, op );
609             }
610             if (choice == _DtTtChooserMessageOpSet) {
611                     _DtMan( label, "tt_message_op_set" );
612             } else {
613                     _DtMan( label, "tt_pattern_op_add" );
614             }
615             break;
616         case _DtTtChooserMessageOpen:
617             _DtMan( label, "tt_message_print" );
618             break;
619         case _DtTtChooserMessageHandlerSet:
620             _DtMan( label, "tt_message_handler_set" );
621             break;
622         case _DtTtChooserMessageDestroy:
623             _DtMan( label, "tt_message_destroy" );
624             break;
625         case _DtTtChooserPatternOpen:
626             _DtMan( label, "tt_pattern_print" );
627             break;
628         case _DtTtChooserPatternSenderAdd:
629             _DtMan( label, "tt_pattern_sender_add" );
630             break;
631         case _DtTtChooserPatternDestroy:
632             _DtMan( label, "tt_pattern_destroy" );
633             break;
634         case _DtTtChooserDtSessionQuit:
635             _DtMan( label, "ttdt_session_quit" );
636             break;
637         case _DtTtChooserDtFileDeleted:
638         case _DtTtChooserDtFileModified:
639         case _DtTtChooserDtFileReverted:
640         case _DtTtChooserDtFileMoved:
641         case _DtTtChooserDtFileSaved:
642             _DtMan( label, "ttdt_file_event" );
643             break;
644         case _DtTtChooserDtFileQuit:
645             _DtMan( label, "ttdt_file_quit" );
646             break;
647         case _DtTtChooserProcidSetDefault:
648             _DtMan( label, "tt_default_procid_set" );
649             break;
650         case _DtTtChooserProcidSuspend:
651             _DtMan( label, "XtRemoveInput" );
652             break;
653         case _DtTtChooserProcidResume:
654             _DtMan( label, "XtAppAddInput" );
655             break;
656         case _DtTtChooserDtProcidClose:
657             _DtMan( label, "ttdt_close" );
658             break;
659     }
660     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
661 }
662
663
664
665 /**************************************************************************
666  *** DTB_USER_CODE_START
667  ***
668  *** All automatically-generated data and functions have been defined.
669  ***
670  *** Add new functions here, or at the top of the file.
671  ***/
672
673 /*** DTB_USER_CODE_END
674  ***
675  *** End of user code section
676  ***
677  **************************************************************************/
678
679