Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtcm / dtcm / dssw.h
1 /*******************************************************************************
2 **
3 **  dssw.h
4 **
5 **  static char sccsid[] = "@(#)dssw.h 1.18 94/11/07 Copyr 1991 Sun Microsystems, Inc."; 
6 **
7 **  $XConsortium: dssw.h /main/4 1996/05/23 11:18:54 rswiston $
8 **
9 **  RESTRICTED CONFIDENTIAL INFORMATION:
10 **
11 **  The information in this document is subject to special
12 **  restrictions in a confidential disclosure agreement between
13 **  HP, IBM, Sun, USL, SCO and Univel.  Do not distribute this
14 **  document outside HP, IBM, Sun, USL, SCO, or Univel without
15 **  Sun's specific written approval.  This document and all copies
16 **  and derivative works thereof must be returned or destroyed at
17 **  Sun's request.
18 **
19 **  Copyright 1993 Sun Microsystems, Inc.  All rights reserved.
20 **
21 *******************************************************************************/
22
23 /*                                                                      *
24  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
25  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
26  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
27  * (c) Copyright 1993, 1994 Novell, Inc.                                *
28  */
29
30 #ifndef _DSSW_H
31 #define _DSSW_H
32
33 #include <csa.h>
34 #include "ansi_c.h"
35 #include "calendar.h"
36
37 #define DATE_LEN        100
38 #define START_STOP_LEN  6
39 #define WHAT_LEN        256
40
41 /*******************************************************************************
42 **
43 **  DSSW enumerated types
44 **
45 *******************************************************************************/
46 typedef enum {
47         TIME_AM,
48         TIME_PM
49 } Time_block_op;
50
51 /*******************************************************************************
52 **
53 **  DSSW structures
54 **
55 *******************************************************************************/
56 typedef struct {
57         char            val[START_STOP_LEN];
58         Time_block_op   block;
59 } Time_val;
60
61 typedef struct {
62         Calendar                *cal;
63         Widget                  date_label;
64         Widget                  date_text;
65         char                    date_val[DATE_LEN];
66         Widget                  dssw_form_mgr;
67         Widget                  parent;
68         Widget                  start_am;
69         Widget                  start_ampm_rc_mgr;
70         Widget                  start_label;
71         Widget                  start_menu;
72         Widget                  *start_menu_widget_list;
73         int                     start_menu_widget_count;
74         Widget                  start_pm;
75         Widget                  start_text;
76         Time_val                start_val;
77         Widget                  stop_am;
78         Widget                  stop_ampm_rc_mgr;
79         Widget                  stop_label;
80         Widget                  stop_menu;
81         Widget                  *stop_menu_widget_list;
82         int                     stop_menu_widget_count;
83         Widget                  stop_pm;
84         Widget                  stop_text;
85         Time_val                stop_val;
86         Widget                  what_label;
87         Widget                  what_text;
88         Widget                  what_scrollwindow;
89         char                    what_val[WHAT_LEN];
90         Boolean                 show_notime_selection;
91         Boolean                 show_allday_selection;
92 } DSSW;
93
94 /* form-to-appt flags */
95 #define DSSW_NEXT_DAY 1
96
97 /*******************************************************************************
98 **
99 **  DSSW external function declarations
100 **
101 *******************************************************************************/
102 extern void     build_dssw              P((DSSW*, Calendar*, Widget, Boolean, Boolean));
103 extern Boolean  dssw_appt_to_form       P((DSSW*, CSA_entry_handle));
104 extern Boolean  dssw_attrs_to_form      P((DSSW*, Dtcm_appointment*));
105 extern Boolean  dssw_form_to_appt       P((DSSW*, Dtcm_appointment*, char*,
106                                            Tick));
107 extern Boolean  dssw_form_flags_to_appt P((DSSW*, Dtcm_appointment*, char*,
108                                            Tick, int *));
109 extern Boolean  dssw_form_to_todo       P((DSSW*, Dtcm_appointment*, char*,
110                                            Tick));
111 extern void     load_dssw_times         P((DSSW*, Tick, Tick, Boolean));
112 extern void     get_dssw_times          P((DSSW*));
113 extern void     get_dssw_vals           P((DSSW*, Tick));
114 extern void     set_dssw_defaults       P((DSSW*, Tick, Boolean));
115 extern void     set_dssw_times          P((DSSW*));
116 extern void     set_dssw_vals           P((DSSW*, Tick));
117 extern void     set_dssw_menus          P((DSSW*, Props *));
118
119 #endif