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: DataBaseLoad.h /main/7 1996/10/30 11:14:37 drk $ */
24 /*****************************************************************************
26 * File: DataBaseLoad.h
30 * Description: This file contains the external defines and function
31 * declarations for DataBaseLoad.c
33 * (c) Copyright 1993, 1994 Hewlett-Packard Company
34 * (c) Copyright 1993, 1994 International Business Machines Corp.
35 * (c) Copyright 1993, 1994 Sun Microsystems, Inc.
36 * (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of Novell, Inc.
38 ****************************************************************************/
41 #include <Xm/ColorObjP.h>
42 #include <Dt/Message.h>
43 #include <Dt/ActionP.h>
45 #ifndef _databaseload_h
46 #define _databaseload_h
49 /************************************************************************
51 * Suffix definition for the front panel file type.
53 ************************************************************************/
55 #define FILE_TYPE_SUFFIX ".fp"
59 /************************************************************************
61 * Defines for the total number of entry types and an array which
62 * holds the string defining the entrys.
64 ************************************************************************/
66 #define TOTAL_ENTRY_COUNT 5
74 extern char * entry_types[];
75 extern char * control_types[];
76 extern char * resolution_types[];
77 extern char * monitor_types[];
82 #define MATCH_DISPLAY 3
84 #define DOUBLE_CLICK 0
85 #define SINGLE_CLICK 1
87 #define CONTROL_BLANK 0
88 #define CONTROL_BUSY 1
89 #define CONTROL_ICON 2
90 #define CONTROL_CLIENT 3
91 #define CONTROL_CLOCK 4
92 #define CONTROL_DATE 5
93 #define CONTROL_FILE 6
95 #define POSITION_FIRST 0
96 #define POSITION_LAST 100
98 #define MONITOR_NONE 0
99 #define MONITOR_MAIL 1
100 #define MONITOR_FILE 2
102 #define FP_HELP_VOLUME "FPanel"
103 #define PANEL_HANDLE "FPOnItemPanelHandle"
104 #define PANEL_MENU "FPOnItemPanelMenu"
105 #define PANEL_ICONIFY "FPOnItemPanelIconify"
106 #define SUBPANEL_ACCESS_AREA "FPOnItemAccessArea"
107 #define MONITOR_INDICATOR "FPOnItemMonitorIndicator"
108 #define SWITCH_BUTTON "FPOnItemSwitchButton"
109 #define INSTALL_ZONE "FPOnItemInstallZone"
112 /************************************************************************
114 * Main structure definitions for the data of each type of front panel
117 ************************************************************************/
121 char * record_keyword;
122 char ** field_keywords;
123 int num_field_keywords;
135 ElementValue * element_values;
161 char * component_name;
170 /************************************************************************
172 * Main structure definitions for each type of Front Panel record.
173 * Each start with the set of element values. This is required inorder
174 * to cast to a generic structure which can then be used to process the
177 ************************************************************************/
179 typedef struct _PanelData PanelData;
180 typedef struct _BoxData BoxData;
181 typedef struct _SubpanelData SubpanelData;
182 typedef struct _SwitchData SwitchData;
183 typedef struct _ControlData ControlData;
184 typedef struct _PopupData PopupData;
185 typedef struct _AnimationData AnimationData;
186 typedef struct _AnimationItem AnimationItem;
189 /* Panel record defines and structure declarations */
191 #define PANEL_KEYWORD_COUNT 13
194 #define PANEL_GEOMETRY 1
195 #define PANEL_DISPLAY_HANDLES 2
196 #define PANEL_DISPLAY_MENU 3
197 #define PANEL_DISPLAY_MINIMIZE 4
198 #define PANEL_RESOLUTION 5
199 #define PANEL_CONTROL_BEHAVIOR 6
200 #define PANEL_DISPLAY_CONTROL_LABELS 7
201 #define PANEL_SUBPANEL_UNPOST 8
202 #define PANEL_LOCKED 9
203 #define PANEL_HELP_STRING 10
204 #define PANEL_HELP_VOLUME 11
205 #define PANEL_HELP_TOPIC 12
209 ElementValue * element_values;
222 unsigned int main_icon_size;
223 unsigned int sub_icon_size;
224 unsigned int switch_icon_size;
225 XmFontList font_list;
226 XmFontList date_font_list;
229 XmPixelSet * pixel_set;
230 XmPixelSet * active_pixel_set;
231 XmPixelSet * inactive_pixel_set;
232 XmPixelSet * primary_pixel_set;
233 XmPixelSet * secondary_pixel_set;
237 ControlData * busy_light_data;
238 XtPointer global_data;
239 XtPointer screen_data;
240 PopupData * popup_data;
242 XtPointer push_recall_list;
243 int push_recall_count;
244 int max_push_recall_count;
246 XtPointer embedded_client_list;
247 int embedded_client_count;
248 int max_embedded_client_count;
250 AnimationData * animation_data;
253 DynamicComponent ** dynamic_data_list;
254 int dynamic_data_count;
255 int max_dynamic_data_count;
257 Boolean use_color_icons;
259 int switch_row_count;
265 /************************************************************************
267 * panel -- This global contains the top of the frontpanel data, widgets,
268 * and any other data defining the layout/content/processing.
270 ************************************************************************/
272 extern PanelData panel;
274 #define O_Shell(o) (panel.shell)
277 /* Box record defines and structure declarations */
279 #define BOX_KEYWORD_COUNT 8
282 #define BOX_CONTAINER_NAME 1
283 #define BOX_POSITION_HINTS 2
286 #define BOX_HELP_STRING 4
287 #define BOX_HELP_VOLUME 6
288 #define BOX_HELP_TOPIC 7
292 ElementValue * element_values;
294 ControlData ** control_data;
295 int control_data_count;
298 Widget left_arrow_form;
299 Widget left_control_form;
300 Widget right_arrow_form;
301 Widget right_control_form;
303 SwitchData * switch_data;
312 /* Subpanel record defines and structure declarations */
314 #define SUBPANEL_KEYWORD_COUNT 9
316 #define SUBPANEL_NAME 0
317 #define SUBPANEL_CONTAINER_NAME 1
318 #define SUBPANEL_CONTROL_INSTALL 2
319 #define SUBPANEL_TITLE 3
320 #define SUBPANEL_LOCKED 4
321 #define SUBPANEL_DELETE 5
322 #define SUBPANEL_HELP_STRING 6
323 #define SUBPANEL_HELP_VOLUME 7
324 #define SUBPANEL_HELP_TOPIC 8
328 ElementValue * element_values;
330 ControlData ** control_data;
331 int control_data_count;
333 ControlData * parent_control_data;
334 ControlData * default_control;
341 Widget main_panel_icon_copy;
348 /* Switch record defines and structure declarations */
350 #define SWITCH_KEYWORD_COUNT 9
352 #define SWITCH_NAME 0
353 #define SWITCH_CONTAINER_NAME 1
354 #define SWITCH_POSITION_HINTS 2
355 #define SWITCH_NUMBER_OF_ROWS 3
356 #define SWITCH_LOCKED 4
357 #define SWITCH_DELETE 5
358 #define SWITCH_HELP_STRING 6
359 #define SWITCH_HELP_VOLUME 7
360 #define SWITCH_HELP_TOPIC 8
364 ElementValue * element_values;
366 ControlData ** control_data;
367 int control_data_count;
375 char ** switch_names;
379 PopupData * popup_data;
385 /* Control record defines and structure declarations */
387 #define CONTROL_KEYWORD_COUNT 23
389 #define CONTROL_NAME 0
390 #define CONTROL_TYPE 1
391 #define CONTROL_CONTAINER_TYPE 2
392 #define CONTROL_CONTAINER_NAME 3
393 #define CONTROL_POSITION_HINTS 4
394 #define CONTROL_NORMAL_ICON 5
395 #define CONTROL_ALTERNATE_ICON 6
396 #define CONTROL_LABEL 7
397 #define CONTROL_PUSH_ACTION 8
398 #define CONTROL_PUSH_ANIMATION 9
399 #define CONTROL_DROP_ACTION 10
400 #define CONTROL_DROP_ANIMATION 11
401 #define CONTROL_PUSH_RECALL 12
402 #define CONTROL_MONITOR_TYPE 13
403 #define CONTROL_CLIENT_NAME 14
404 #define CONTROL_CLIENT_GEOMETRY 15
405 #define CONTROL_FILE_NAME 16
406 #define CONTROL_DATE_FORMAT 17
407 #define CONTROL_LOCKED 18
408 #define CONTROL_DELETE 19
409 #define CONTROL_HELP_STRING 20
410 #define CONTROL_HELP_VOLUME 21
411 #define CONTROL_HELP_TOPIC 22
415 ElementValue * element_values;
417 XtPointer parent_data;
419 SubpanelData * subpanel_data;
423 Widget arrow_separator;
426 PanelActionData ** actions;
434 unsigned char operation;
439 /* Popup structure declarations */
447 Widget deinstall_item;
449 Widget modify_subpanel_item;
452 Widget delete_ws_item;
453 Widget rename_ws_item;
454 Widget * action_item;
456 Boolean subpanel_add_state;
460 /* Animation structure declarations */
462 struct _AnimationData
466 AnimationItem * items;
469 struct _AnimationItem
477 /************************************************************************
479 * External function declarations.
481 ************************************************************************/
484 extern Boolean FrontPanelReadDatabases (void);
485 extern void InitParse(char *, ElementValue **);
486 extern void InitializeControlFields( ElementValue *element_values, char *);
487 extern void _WriteControlElementValues(ElementValue *);
488 extern void WriteControlComponentFile(ControlData *);
489 extern void WriteSubpanelComponentFile(SubpanelData *);
490 extern void RemoveControlComponentFile(ControlData *);
491 extern void RemoveSubpanelComponentFile(SubpanelData *);
492 extern void SessionAddFileData (char *, char *, int, char *, int, Boolean);
493 extern void SessionDeleteFileData (char *);
494 extern void SessionDeleteAll (void);
495 extern char * SessionFileNameLookup (char *, int, char *, int);
496 extern void PanelTopicHelpCB(Widget, XtPointer, XtPointer);
497 extern void BoxTopicHelpCB(Widget, XtPointer, XtPointer);
498 extern void SubpanelTopicHelpCB(Widget, XtPointer, XtPointer);
499 extern void SwitchTopicHelpCB(Widget, XtPointer, XtPointer);
500 extern void ControlTopicHelpCB(Widget, XtPointer, XtPointer);
501 extern void GeneralTopicHelpCB(Widget, XtPointer, XtPointer);
507 * macro to get message catalog strings
510 extern char *_DtGetMessage(char *filename, int set, int n, char *s);
512 #ifndef NO_MESSAGE_CATALOG
514 # define _FP_CLIENT_CAT_NAME "fp.cat"
515 # else /* __ultrix */
516 # define _FP_CLIENT_CAT_NAME "fp"
517 # endif /* __ultrix */
518 # define FPGETMESSAGE(set, number, string)\
519 _DtGetMessage(_FP_CLIENT_CAT_NAME, set, number, string)
521 # define FPGETMESSAGE(set, number, string)\
526 #endif /* _databaseload_h */
527 /* DON"T ADD ANYTHING AFTER THIS #endif */