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 librararies 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: MainWindow.h /main/4 1996/08/12 18:42:19 cde-hp $ */
28 * (c) Copyright 1996 Digital Equipment Corporation.
29 * (c) Copyright 1996 Hewlett-Packard Company.
30 * (c) Copyright 1996 International Business Machines Corp.
31 * (c) Copyright 1996 Sun Microsystems, Inc.
32 * (c) Copyright 1996 Novell, Inc.
33 * (c) Copyright 1996 FUJITSU LIMITED.
34 * (c) Copyright 1996 Hitachi.
42 * return codes for a PdmBoxVerifyAttrProc
44 typedef enum { PDM_SUCCESS, PDM_FAILURE } PdmStatus;
47 * callback procedure types for setup box children of the PDM main window
49 typedef struct _PdmSetupBox* (*PdmBoxNewProc) (void);
50 typedef void (*PdmBoxDeleteProc)(struct _PdmSetupBox* me);
51 typedef void (*PdmBoxCreateProc)(struct _PdmSetupBox* me, Widget parent);
52 typedef PdmStatus (*PdmBoxVerifyAttrProc)(struct _PdmSetupBox* me,
54 typedef void (*PdmBoxGetAttrProc)(struct _PdmSetupBox* me, PdmXp* pdm_xp);
55 typedef void (*PdmBoxSetAttrProc)(struct _PdmSetupBox* me, PdmXp* pdm_xp);
58 * instance structure for setup box children of the PDM main window
60 typedef struct _PdmSetupBox
63 * define common setup box functions
65 PdmBoxDeleteProc delete_proc;
66 PdmBoxCreateProc create_proc;
67 PdmBoxVerifyAttrProc verify_attr_proc;
68 PdmBoxGetAttrProc get_attr_proc;
69 PdmBoxSetAttrProc set_attr_proc;
71 * the setup box child's widget ID
75 * the setup box provides its own fallback resources and the
76 * notebook tab widget instance name
78 const String* fallback_resources;
79 int fallback_resources_count;
82 * allow child setup box-specific data
89 * node structure for the list of setup box children managed by the PDM
92 typedef struct _PdmBoxNode
96 struct _PdmBoxNode* next;
97 } PdmBoxNode, *PdmBoxList;
100 * PDM main window instance structure
102 typedef struct _PdmMainWin
110 * printer information
112 char* print_display_spec;
114 const char* printer_descriptor;
115 const char* printer_name;
117 * linked list of setup boxes
119 PdmBoxList box_list_head;
120 PdmBoxList box_list_tail;
133 * public PdmMainWin methods
135 PdmMainWin* PdmMainWinNew(void);
136 PdmMainWin* PdmMainWinCreate(
139 String print_display_spec,
140 String print_context_str);
141 void PdmMainWinDelete(PdmMainWin* me);
142 PdmSetupBox* PdmMainWinAddSetupBox(PdmMainWin* me, PdmSetupBox* box);
143 String* PdmMainWinMergeFallbacks(PdmMainWin* me,
144 const String* app_fallbacks,
147 #endif /* _pdmMainWin_h */