2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
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)
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
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
23 /* $XConsortium: Encaps.h /main/4 1995/11/02 14:36:49 rswiston $ */
24 /************************************<+>*************************************
25 ****************************************************************************
29 * COMPONENT_NAME: Desktop File Manager
31 * DESCRIPTION: Public include file for the dialog encapsulation functions.
33 * (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company
34 * (c) Copyright 1993, 1994, 1995 International Business Machines Corp.
35 * (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
36 * (c) Copyright 1993, 1994, 1995 Novell, Inc.
38 ****************************************************************************
39 ************************************<+>*************************************/
41 #ifndef _Encapsulate_h
42 #define _Encapsulate_h
46 extern int initialTimeoutLength;
47 extern int activeTimeoutLength;
48 extern int idleTimeoutLength;
50 /* Dialog positioning offset value */
51 extern int topPositionOffset;
56 * Common dialog instance data.
66 } DialogInstanceData, * DialogInstanceDataPtr;
70 * DialogData contains the dialog type specific data shared between
71 * the dialog and the application.
82 * The following typedefs are the function definitions used by the
83 * Dialog Class structure.
86 typedef void (*DialogCreateProc)(
93 typedef void (*DialogInstallChangeProc)(
95 XtCallbackProc callback,
99 typedef void (*DialogInstallCloseProc)(
101 XtCallbackProc callback,
102 XtPointer client_data
105 typedef void (*DialogDestroyProc)(
109 typedef XtPointer (*DialogGetValuesProc)(
113 typedef XtPointer (*DialogGetDefaultValuesProc)(
118 typedef XtPointer (*DialogGetResourceValuesProc)(
119 XrmDatabase data_base,
123 typedef void (*DialogSetValuesProc)(
127 typedef void (*DialogWriteResourceValuesProc)(
133 typedef void (*DialogFreeValuesProc)(
137 typedef void (*DialogSetFocusProc)(
143 typedef void (*DialogMapWindowProc)(
150 * Resource write proc and structure used for dialog resources.
153 typedef void (*WriteResourceProc)();
154 /* XtPointer resource_val; */
162 XtPointer default_value;
163 WriteResourceProc write_resource;
168 * The Dialog Class structure.
173 DialogResource * resources;
175 DialogCreateProc create;
176 DialogInstallChangeProc install_change_callback;
177 DialogInstallCloseProc install_close_callback;
178 DialogDestroyProc destroy;
179 DialogGetValuesProc get_values;
180 DialogGetDefaultValuesProc get_default_values;
181 DialogGetResourceValuesProc get_resource_values;
182 DialogSetValuesProc set_values;
183 DialogWriteResourceValuesProc write_resource_values;
184 DialogFreeValuesProc free_values;
185 DialogMapWindowProc map;
186 DialogSetFocusProc set_focus;
192 * Procedure types used by the application for functions to be passed
193 * to the encapsulation mechanism.
196 typedef void (*DialogChangedProc)(
197 XtPointer change_data,
198 DialogData * old_data,
199 DialogData * new_data,
203 typedef void (*DialogClosedProc)(
204 XtPointer close_data,
205 DialogData * old_data,
206 DialogData * new_data
211 /******** Public Function Declarations ********/
213 extern void _DtInitializeEncapsulation(
217 extern int _DtInstallDialog(
218 DialogClass *dialog_class,
220 Boolean destroyPopups) ;
221 extern DialogData * _DtGetDialogData(
222 DialogData *dialog_data) ;
223 extern DialogData * _DtGetDefaultDialogData(
225 extern DialogData * _DtGetResourceDialogData(
227 XrmDatabase data_base,
229 extern void _DtShowDialog(
233 DialogData *dialog_data,
234 DialogChangedProc change_proc,
235 XtPointer change_data,
236 DialogClosedProc close_proc,
237 XtPointer close_data,
239 Boolean iconify_state,
242 XClassHint * classHints) ;
243 extern void _DtHideDialog(
244 DialogData *dialog_data,
245 Boolean call_callbacks) ;
246 extern Widget _DtGetDialogShell(
247 DialogData *dialog_data) ;
248 extern XtPointer _DtGetDialogInstance(
249 DialogData *dialog_data) ;
250 extern DialogData * _DtGetInstanceData(
251 XtPointer instance) ;
252 extern Boolean _DtIsDialogShowing(
253 DialogData *dialog_data) ;
254 extern void _DtWriteDialogData(
255 DialogData *dialog_data,
258 extern void _DtFreeDialogData(
259 DialogData *dialog_data) ;
260 extern void _DtDialogGetResources(
261 XrmDatabase database,
265 DialogResource *resources,
266 int resource_count) ;
267 extern void _DtDialogPutResources(
272 DialogResource *resources,
273 int resource_count) ;
274 extern void _DtIntToString(
278 extern void _DtShortToString(
282 extern void _DtPositionToString(
286 extern void _DtDimensionToString(
290 extern void _DtBooleanToString(
294 extern void _DtXmStringToString(
298 extern void _DtXmStringTableToString(
300 XmStringTable *value,
302 extern void _DtStringToString(
306 extern void _DtmapCB(
308 XtPointer client_data,
309 XtPointer call_data) ;
310 extern void _DtEncapSetWorkSpaceHints(
313 extern void _DtBuildDialog(
317 DialogData *dialog_data,
318 DialogChangedProc change_proc,
319 XtPointer change_data,
320 DialogClosedProc close_proc,
321 XtPointer close_data,
323 Boolean iconify_state,
326 XClassHint * classHints ) ;
327 extern void _DtShowBuiltDialog(
330 DialogData *dialog_data,
332 Boolean iconify_state,
333 XClassHint * classHints ) ;
335 extern void _DtChangeTo(
336 XtPointer client_data,
339 extern void _DtFreeDialog(
340 DialogData *dialog_data);
341 /******** End Public Function Declarations ********/
343 #endif /* _Encapsulate_h */
344 /* DON'T ADD ANYTHING AFTER THIS #endif */