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: DtApp.h /main/3 1995/11/06 09:34:32 rswiston $ */
25 * (c) Copyright 1993, 1994 Hewlett-Packard Company *
26 * (c) Copyright 1993, 1994 International Business Machines Corp. *
27 * (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
28 * (c) Copyright 1993, 1994 Novell, Inc. *
34 #include "Application.h"
35 #include "DtPrinterIcon.h"
36 #include "DtSetPref.h"
42 extern const char *PROPERTY;
43 extern const char *HELP;
44 extern const char *FIND;
45 extern const char *EXIT;
46 extern const char *HIDE;
47 extern const char *RENAME;
48 extern const char *OPEN;
49 extern const char *CLOSE;
50 extern const char *PRINTERS_DIR;
52 class DtApp : public Application
55 friend void InitQueueDetails(BaseUI *obj, void *data);
56 friend void RemoteStatusCB(BaseUI *obj, char *output, int rc);
57 friend void TurnOffHourGlass(BaseUI *obj, void *data);
58 friend void OpenClose(void *data, BaseUI *obj);
59 friend void ActionCB(void *data, BaseUI *obj, char *actionReferenceName);
60 friend void UpdatePrintJobs(BaseUI *obj, void *data);
61 friend void PreferenceCB(void *data, PreferenceRequest req, char *value);
62 friend void FilterCB(void *data);
63 friend void ModifyCB(void *data);
64 friend boolean SelectPrintJobs(BaseUI *obj);
65 friend void FindCB(void *data);
66 friend void AddQueues(BaseUI *obj, void *data);
67 friend void RestoreAppCB(BaseUI *obj, void *data);
71 static void InitQueueDetails(BaseUI *obj, void *data);
72 static void RemoteStatusCB(BaseUI *obj, char *output, int rc);
73 static void TurnOffHourGlass(BaseUI *obj, void *data);
74 static void OpenClose(void *data, BaseUI *obj);
75 static void ActionCB(void *data, BaseUI *obj, char *actionReferenceName);
76 static void UpdatePrintJobs(BaseUI *obj, void *data);
77 static void PreferenceCB(void *data, PreferenceRequest req, char *value);
78 static void FilterCB(void *data);
79 static void ModifyCB(void *data);
80 static boolean SelectPrintJobs(BaseUI *obj);
81 static void FindCB(void *data);
82 static void AddQueues(BaseUI *obj, void *data);
83 static void RestoreAppCB(BaseUI *obj, void *data);
85 void OpenClose(BaseUI *obj);
86 void PreferenceCB(PreferenceRequest req, char *value);
87 void FilterCB(BaseUI *container);
88 void UpdateStatusLine();
91 void AddActions(BaseObj *dummy);
92 void ShowStatusDialog(DtPrinterIcon *);
93 void HandleShowDetailsLabelPreferenceRequest(IconStyle style);
94 void HandleDetailsPreferenceRequest(boolean details_on);
95 boolean ShowUserJob(DtPrtJobIcon *_job, char *user_name);
96 void ShowUserJobs(BaseUI *queue, char *user_name, boolean flag);
97 void HandleShowOnlyMinePreferenceRequest(boolean flag);
99 int connect_timeout; // connect timeout to contact server
101 char *old_dbsearchpath;
107 PrinterApplicationMode app_mode;
108 DtPrinterIcon *single_printer;
114 DtApp(char *progname, int *argc, char **argv);
118 char *SessionPath() { return printer_dir; }
119 char *GetBottomString(BaseObj *job, boolean need_details);
120 void ActionCB(BaseUI *obj, char *actionReferenceName);