1 /*
2  * Copyright (c) 1996-2009, 2014-2015 Paul Mattes.
3  * Copyright (c) 1995, Dick Altenbern.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *     * Redistributions of source code must retain the above copyright
10  *       notice, this list of conditions and the following disclaimer.
11  *     * Redistributions in binary form must reproduce the above copyright
12  *       notice, this list of conditions and the following disclaimer in the
13  *       documentation and/or other materials provided with the distribution.
14  *     * Neither the names of Paul Mattes, Dick Altenbern nor their
15  *       contributors may be used to endorse or promote products derived
16  *       from this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY PAUL MATTES AND DICK ALTENBERN "AS IS"
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
20  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PAUL MATTES OR DICK ALTENBERN
22  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
23  * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
24  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
25  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
27  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 /*
32  *	dialogc.h
33  *		Global declarations for dialog.c.
34  */
35 
36 typedef struct sr {
37     struct sr *next;
38     Widget w;
39     bool *bvar1;
40     bool bval1;
41     bool *bvar2;
42     bool bval2;
43     bool *bvar3;
44     bool bval3;
45     bool is_value;
46     bool has_focus;
47 } sr_t;
48 
49 struct toggle_list {                    /* List of toggle widgets */
50     Widget *widgets;
51 };
52 
53 typedef enum { T_NUMERIC, T_HOSTFILE, T_UNIXFILE, T_COMMAND } text_t;
54 extern text_t t_numeric;
55 extern text_t t_hostfile;
56 extern text_t t_unixfile;
57 extern text_t t_command;
58 extern bool s_true, s_false;
59 
60 void dialog_set(sr_t **, Widget);
61 void dialog_apply_bitmap(Widget w, Pixmap p);
62 void dialog_check_sensitivity(bool *bvar);
63 void dialog_register_sensitivity(Widget w, bool *bvar1, bool bval1,
64 	bool *bvar2, bool bval2, bool *bvar3, bool bval3);
65 void dialog_flip_toggles(struct toggle_list *toggle_list, Widget w);
66 void dialog_text_callback(Widget w, XtPointer client_data,
67 	XtPointer call_data _is_unused);
68 void dialog_match_dimension(Widget w1, Widget w2, const char *n);
69 void dialog_mark_toggle(Widget w, Pixmap p);
70 
71 void PA_dialog_focus_xaction(Widget w, XEvent *event, String *parms,
72 	Cardinal *num_parms);
73 void PA_dialog_next_xaction(Widget w, XEvent *event, String *parms,
74 	Cardinal *num_parms);
75