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