dtcm: Resolve CID 87408
[oweals/cde.git] / cde / programs / dtcm / dtcm / dssw.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 **  dssw.h
26 **
27 **  static char sccsid[] = "@(#)dssw.h 1.18 94/11/07 Copyr 1991 Sun Microsystems, Inc."; 
28 **
29 **  $XConsortium: dssw.h /main/4 1996/05/23 11:18:54 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 _DSSW_H
53 #define _DSSW_H
54
55 #include <csa.h>
56 #include "ansi_c.h"
57 #include "calendar.h"
58
59 #define DATE_LEN        100
60 #define START_STOP_LEN  6
61 #define WHAT_LEN        256
62
63 /*******************************************************************************
64 **
65 **  DSSW enumerated types
66 **
67 *******************************************************************************/
68 typedef enum {
69         TIME_AM,
70         TIME_PM
71 } Time_block_op;
72
73 /*******************************************************************************
74 **
75 **  DSSW structures
76 **
77 *******************************************************************************/
78 typedef struct {
79         char            val[START_STOP_LEN];
80         Time_block_op   block;
81 } Time_val;
82
83 typedef struct {
84         Calendar                *cal;
85         Widget                  date_label;
86         Widget                  date_text;
87         char                    date_val[DATE_LEN];
88         Widget                  dssw_form_mgr;
89         Widget                  parent;
90         Widget                  start_am;
91         Widget                  start_ampm_rc_mgr;
92         Widget                  start_label;
93         Widget                  start_menu;
94         Widget                  *start_menu_widget_list;
95         int                     start_menu_widget_count;
96         Widget                  start_pm;
97         Widget                  start_text;
98         Time_val                start_val;
99         Widget                  stop_am;
100         Widget                  stop_ampm_rc_mgr;
101         Widget                  stop_label;
102         Widget                  stop_menu;
103         Widget                  *stop_menu_widget_list;
104         int                     stop_menu_widget_count;
105         Widget                  stop_pm;
106         Widget                  stop_text;
107         Time_val                stop_val;
108         Widget                  what_label;
109         Widget                  what_text;
110         Widget                  what_scrollwindow;
111         char                    what_val[WHAT_LEN];
112         Boolean                 show_notime_selection;
113         Boolean                 show_allday_selection;
114 } DSSW;
115
116 /* form-to-appt flags */
117 #define DSSW_NEXT_DAY 1
118
119 /*******************************************************************************
120 **
121 **  DSSW external function declarations
122 **
123 *******************************************************************************/
124 extern void     build_dssw              P((DSSW*, Calendar*, Widget, Boolean, Boolean));
125 extern Boolean  dssw_appt_to_form       P((DSSW*, CSA_entry_handle));
126 extern Boolean  dssw_attrs_to_form      P((DSSW*, Dtcm_appointment*));
127 extern Boolean  dssw_form_to_appt       P((DSSW*, Dtcm_appointment*, char*,
128                                            Tick));
129 extern Boolean  dssw_form_flags_to_appt P((DSSW*, Dtcm_appointment*, char*,
130                                            Tick, int *));
131 extern Boolean  dssw_form_to_todo       P((DSSW*, Dtcm_appointment*, char*,
132                                            Tick));
133 extern void     load_dssw_times         P((DSSW*, Tick, Tick, Boolean));
134 extern void     get_dssw_times          P((DSSW*));
135 extern void     get_dssw_vals           P((DSSW*, Tick));
136 extern void     set_dssw_defaults       P((DSSW*, Tick, Boolean));
137 extern void     set_dssw_times          P((DSSW*));
138 extern void     set_dssw_vals           P((DSSW*, Tick));
139 extern void     set_dssw_menus          P((DSSW*, Props *));
140
141 #endif