dtcm: Resolve CID 87408
[oweals/cde.git] / cde / programs / dtcm / dtcm / misc.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
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
22  */
23 /*******************************************************************************
24 **
25 **  misc.h
26 **
27 **  static char sccsid[] = "@(#)misc.h 1.27 95/02/09 Copyr 1991 Sun Microsystems, Inc.";
28 **
29 **  $XConsortium: misc.h /main/4 1995/11/03 10:29:44 rswiston $
30 **
31 **  RESTRICTED CONFIDENTIAL INFORMATION:
32 **
33 **  The information in this document is subject to special
34 **  restrictions in a confidential disclosure agreement between
35 **  HP, IBM, Sun, USL, SCO and Univel.  Do not distribute this
36 **  document outside HP, IBM, Sun, USL, SCO, or Univel without
37 **  Sun's specific written approval.  This document and all copies
38 **  and derivative works thereof must be returned or destroyed at
39 **  Sun's request.
40 **
41 **  Copyright 1993 Sun Microsystems, Inc.  All rights reserved.
42 **
43 *******************************************************************************/
44
45 /*                                                                      *
46  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
47  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
48  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
49  * (c) Copyright 1993, 1994 Novell, Inc.                                *
50  */
51
52 #ifndef _MISC_H
53 #define _MISC_H
54
55 #include <X11/Intrinsic.h>
56 #include <Xm/Xm.h>
57 #include <csa.h>
58 #include "ansi_c.h"
59 #include "calendar.h"
60 #include "cm_tty.h"
61 #include "datefield.h"
62
63 /*
64 **  Variable "types" to be passed to the dialog_popup function (that
65 **  function accepts a variable argument list with these attribute, value
66 **  pairs).
67 **
68 **  The BUTTON_IDENT attribute can be used to identify 1 or more buttons on
69 **  the dialog.  The int id value will be returned if that button is
70 **  pressed and the char* name value will be the button label.
71 */
72 typedef enum {
73         DIALOG_TITLE = 1,       /*  Followed by char*  */
74         DIALOG_TEXT,            /*  Followed by char* */
75         BUTTON_IDENT,           /*  Followed by int, char*  */
76         DIALOG_IMAGE,           /*  Followed by pixmap from Props_pu */
77         BUTTON_HELP,            /*  Followed by char*  */
78         BUTTON_INSENSITIVE      /*  Followed by int, char*  */
79 } Dialog_create_op;
80
81 /*
82 **  External function declarations
83 */
84 extern char     *cm_mbchar              P((char*));
85 extern int      cm_mbstrlen             P((char*));
86 extern Widget   create_for_menu         P((Widget));
87 extern Widget   create_privacy_menu     P((Widget));
88 extern Widget   create_repeat_menu      P((Widget, XtCallbackProc, XtPointer));
89 extern Widget   create_repeat_scope_menu P((Widget, XmString, XtCallbackProc,
90                                             XtPointer));
91 extern Widget   create_start_stop_time_menu P((Widget, XmString, XtCallbackProc,
92                                                XtPointer, Props*, Boolean, 
93                                                 Boolean, Widget**, int*));
94 extern Widget   create_time_scope_menu  P((Widget, XmString, XtCallbackProc,
95                                            XtPointer));
96 #ifndef _AIX
97 extern int      dialog_popup            P((Widget, ...));
98 #endif /* _AIX */
99 extern void     editor_err_msg          P((Widget, char*, Validate_op, Pixmap));
100 extern void     backend_err_msg         P((Widget, char*, CSA_return_code, Pixmap));
101 extern void     get_range               P((Glance, time_t, time_t*, time_t*));
102 extern boolean_t query_user             P((void*));
103 extern void     set_message             P((Widget, char*));
104 extern void     setup_quit_handler      P((Widget, XtCallbackProc, caddr_t));
105 extern int      ds_is_double_click      P((XEvent*, XEvent*));
106 extern int      cm_select_text          P((Widget, Time));
107 extern void     set_time_submenu        P((Widget, Widget, Props*, 
108                                            XtCallbackProc, XtPointer, 
109                                            Boolean, Boolean, Widget**, int*));
110 extern void     ManageChildren          P((Widget));
111 #endif