1 /* 2 * xmmix - Motif(tm) Audio Mixer 3 * 4 * Copyright (C) 1994-1996 Ti Kan 5 * E-mail: ti@amb.org 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 * 21 */ 22 #ifndef __WIDGET_H__ 23 #define __WIDGET_H__ 24 25 #ifndef LINT 26 static char *_widget_h_ident_ = "@(#)widget.h 3.2 96/07/14"; 27 #endif 28 29 30 #define CHSET1 "chset1" 31 #define CHSET2 "chset2" 32 #define CHSET3 "chset3" 33 34 #define NENHANCE 4 /* Number of enhance stereo settings */ 35 36 #define CTL_INPUT 1 /* Control types */ 37 #define CTL_OUTPUT 2 38 #define CTL_MISC 3 39 40 /* Slider info structure */ 41 typedef struct { 42 Widget widget_lbl; /* Slider label widget */ 43 Widget widget_lbl_l; /* Slider left label widget */ 44 Widget widget_lbl_r; /* Slider right label widget */ 45 Widget widget_l; /* Left slider widget */ 46 Widget widget_r; /* Right slider widget */ 47 Widget widget_lock_btn; /* Lock button widget */ 48 Widget widget_rec_btn; /* Rec button widget */ 49 char *label; /* Label string */ 50 char *name; /* Base name */ 51 int type; /* Control type */ 52 int order; /* Display order */ 53 bool_t supp; /* Slider supported */ 54 bool_t recsupp; /* Rec button supported */ 55 } slinfo_t; 56 57 /* Pulldown menu support structures */ 58 typedef struct { 59 Widget widget; /* Pushbutton widget */ 60 char *label; /* Label string */ 61 char *name; /* Button name */ 62 char *acc; /* Accelerator */ 63 char *mne; /* Mnemonic */ 64 } btinfo_t; 65 66 typedef struct { 67 Widget widget; /* Cascade button widget */ 68 char *label; /* Label string */ 69 char *name; /* Button name */ 70 char *acc; /* Accelerator */ 71 char *mne; /* Mnemonic */ 72 btinfo_t *btip; /* Array of btinfo_t structs */ 73 } pdinfo_t; 74 75 /* Holder for all widgets */ 76 typedef struct { 77 /* Top-level */ 78 Widget toplevel; /* Toplevel shell widget */ 79 Widget logolbl; /* Logo label */ 80 81 /* Main window widgets */ 82 Widget form; /* Form container */ 83 Widget menu_bar; /* Menu bar */ 84 Widget file_mnu; /* File pulldown menu */ 85 Widget options_mnu; /* Options pulldown menu */ 86 Widget help_mnu; /* Help pulldown menu */ 87 Widget hsep; /* Horizontal separator */ 88 Widget flat_btn; /* Flat button */ 89 Widget mute_btn; /* Mute button */ 90 Widget loud_btn; /* Loudness button */ 91 Widget enh_opt; /* Enhance option menu */ 92 Widget enh_mnu; /* Enhance option pulldown */ 93 Widget enh_btn[NENHANCE]; /* Enhance option buttons */ 94 bool_t mute_supp; /* Mute supported */ 95 bool_t loud_supp; /* Loudness supported */ 96 bool_t enh_supp; /* Enhance supported */ 97 slinfo_t *sl; /* Slider information */ 98 pdinfo_t *file_pd; /* File menu information */ 99 pdinfo_t *opts_pd; /* Options menu information */ 100 pdinfo_t *help_pd; /* Help menu information */ 101 102 /* File selection box popup widgets */ 103 Widget fsform; /* Form container */ 104 Widget fsbox; /* File selection box */ 105 106 /* Help window widgets */ 107 Widget helpform; /* Form container */ 108 Widget helptxt; /* Help text widget */ 109 Widget helpsep; /* Separator */ 110 Widget helpok_btn; /* Help OK button */ 111 112 /* Popup dialog boxes */ 113 Widget about; /* About dialog box */ 114 Widget warning; /* Warning dialog box */ 115 } widgets_t; 116 117 118 /* Public function prototypes */ 119 extern void widget_init(widgets_t *); 120 extern void create_widgets(widgets_t *); 121 extern void post_realize_config(widgets_t *); 122 extern void register_callbacks(widgets_t *); 123 124 #endif /* __WIDGET_H__ */ 125 126