Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtcm / libDtCmP / props.h
1 /*******************************************************************************
2 **
3 **  props.h
4 **
5 **  static char sccsid[] = "@(#)props.h 1.6 94/11/07 Copyr 1991 Sun Microsystems, Inc.";
6 **
7 **  $XConsortium: props.h /main/5 1996/03/29 17:28:13 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 _PROPS_H
31 #define _PROPS_H
32
33 #include <sys/types.h>
34 #include "ansi_c.h"
35 #include "resource.h"
36
37 /*******************************************************************************
38 **
39 **  Typedefs and supporting structures
40 **
41 *******************************************************************************/
42 typedef enum {
43         HOUR12,
44         HOUR24
45 } DisplayType;
46
47 typedef enum {
48         YEAR_VIEW,
49         MONTH_VIEW,
50         WEEK_VIEW,
51         DAY_VIEW
52 } ViewType;
53
54 typedef struct props_entry {
55         char                    *property_name;
56         char                    *property_value;
57         boolean_t               update;
58         struct props_entry      *next;
59 } Props_entry;
60
61 /*
62 **  Enumerated type to access properties array.  If you add a member to this
63 **  enumeration, be sure to add it's value to the character array in props.c
64 */
65 typedef enum {
66         CP_BEGOP,               /* Don't put anything before this */
67         CP_BEEPON,
68         CP_BEEPADV,
69         CP_BEEPUNIT,
70         CP_FLASHON,
71         CP_FLASHADV,
72         CP_FLASHUNIT,
73         CP_OPENON,
74         CP_OPENADV,
75         CP_OPENUNIT,
76         CP_MAILON,
77         CP_MAILADV,
78         CP_MAILUNIT,
79         CP_MAILTO,
80         CP_UNIXON,
81         CP_UNIXADV,
82         CP_UNIXCOMMAND,
83         CP_DAYBEGIN,
84         CP_DAYEND,
85         CP_DAYCALLIST,
86         CP_DEFAULTVIEW,
87         CP_DEFAULTDISP,
88         CP_PRINTDEST,
89         CP_PRINTPRIVACY,
90         CP_PRINTERNAME,
91         CP_PRINTOPTIONS,
92         CP_PRINTDIRNAME,
93         CP_PRINTFILENAME,
94         CP_PRINTRMARGIN,
95         CP_PRINTBMARGIN,
96         CP_PRINTLMARGIN,
97         CP_PRINTTMARGIN,
98         CP_PRINTLHEADER,
99         CP_PRINTRHEADER,
100         CP_PRINTLFOOTER,
101         CP_PRINTRFOOTER,
102         CP_PRINTMONTHS,
103         CP_PRINTCOPIES,
104         CP_DEFAULTCAL,
105         CP_CALLOC,
106         CP_DATEORDERING,
107         CP_DATESEPARATOR,
108         CP_PRIVACY,
109         CP_USEFNS,
110         CP_APPTBEGIN,
111         CP_APPTDURATION,
112         CP_ENDOP                /* Don't put anything after this */
113 } Props_op;
114
115 /*******************************************************************************
116 **
117 **  The not-so-mighty props structure is simply an X resource database and the
118 **  array of Props_entry's which contain the property information.
119 **
120 *******************************************************************************/
121 typedef struct {
122         Props_entry     *p_list;
123         Resource        *rdb;
124 } Props;
125
126 /*******************************************************************************
127 **
128 **  External function declarations
129 **
130 *******************************************************************************/
131 extern boolean_t        cal_convert_cmrc        P((Props*));
132 extern char             *get_char_prop          P((Props*, Props_op));
133 extern char             *get_char_prop_default  P((Props_op));
134 extern int              get_int_prop            P((Props*, Props_op));
135 extern void             props_clean_up          P((Props*));
136 extern boolean_t        read_props              P((Props*));
137 extern boolean_t        save_props              P((Props*));
138 extern boolean_t        set_char_prop           P((Props*, Props_op, char*));
139 extern boolean_t        set_int_prop            P((Props*, Props_op, int));
140
141 #endif