Fix warnings on FreeBSD
[oweals/cde.git] / cde / lib / DtSvc / DtUtil2 / DtP.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  * File:         DtP.h $TOG: DtP.h /main/7 1998/07/30 12:12:49 mgreess $
25  * Language:     C
26  */
27
28 #ifndef _DtP_h
29 #define _DtP_h
30
31 #include <X11/Xmd.h>    /* for protocol typedefs */
32 #include <X11/Intrinsic.h>
33
34 #include <Dt/DtPStrings.h>
35 #include <Dt/DtGetMessageP.h>
36
37 #include <bms/sbport.h>
38 #include <bms/bms.h>
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44 /*********************************
45  *
46  * Miscellaneous Data Types
47  *
48  *********************************/
49
50 #define DtChar          XeChar
51 #define DtString        XeString
52
53 /*********************************
54  *
55  * Initalization
56  *
57  *********************************/
58
59 #define DtToolClass                     XeToolClass
60
61 /*********************************
62  *
63  * Global variables (defined in DtUtil.c)
64  *
65  *********************************/
66 extern Display          * _DtDisplay;
67 extern char             * _DtApplicationName;
68 extern char             * _DtApplicationClass;
69 extern char             * _DtToolClass;
70
71 extern XtAppContext     _DtAppContext;
72 extern XrmDatabase      _DtResourceDatabase;
73 extern Widget           _DtInitTtContextWidget;
74 extern XtAppContext     * _DtInitAppContextp;
75
76 extern void   _DtAddToResource( Display *, const char * );
77 extern void   _DtAddResString( Display *, const char *, unsigned int);
78 extern char * _DtGetResString( Display *dpy, unsigned int);
79
80
81 #define _DT_ATR_RESMGR   (1 << 0)
82 #define _DT_ATR_PREFS    (1 << 1)
83
84 /*
85     DESCRIPTION:
86
87         Add strings to XA_RESOURCE_MANAGER property on the default root
88         window.  Correctly merges resource specifications with the same
89         name and different values.  The new value overwrites the old.
90
91         _DtAddToResource() may be used where you would have used xrdb to 
92         add a resource.
93
94     SYNOPSIS:
95
96         void _DtAddToResource(dpy,data)
97
98         Display *dpy;       The application's display structure.
99
100         char *data;          The string to be added to the
101                              XA_RESOURCE_MANAGER property.
102
103 */
104
105 extern char *_DtCreateDtDirs( Display * );
106 /*
107     DESCRIPTION:
108
109         Creates the directories needed for dt to operate in.  When an
110         application saves its state inside a file, it should call this
111         routine to set up the directories before saving any files.  The
112         routine constructs the path to which all save files should be saved
113         to when responding the the WM_SAVE_YOURSELF message issued by the
114         session manager.  The routine  returns the path to save to.  It also
115         allocates the memory for the path so when you are done with it you
116         should free() it.
117
118         WARNING:  If it can't create the directory it returns NULL
119
120     SYNOPSIS:
121
122         dirName = _DtCreateDtDirs (display);
123
124         char *dirName;          The path to save to.
125
126         Display *display;       The application's display structure.
127 */
128
129 /*
130  * The following string globals are available for use by any DT
131  * component.  They represent the button labels in most dialogs,
132  * and will be automatically localized by DtInitialize().
133  */
134 extern const char * _DtOkString;
135 extern const char * _DtCancelString;
136 extern const char * _DtHelpString;
137 extern const char * _DtApplyString;
138 extern const char * _DtCloseString;
139
140 #ifdef __cplusplus
141 }
142 #endif
143
144 /* Do not add anything after this endif. */
145 #endif /* _DtP_h */