1 // ----------------------------------------------------------------------------- 2 // 3 // Copyright (C) 2006-2018 Fons Adriaensen <fons@linuxaudio.org> 4 // 5 // This program is free software; you can redistribute it and/or modify 6 // it under the terms of the GNU General Public License as published by 7 // the Free Software Foundation; either version 2 of the License, or 8 // (at your option) any later version. 9 // 10 // This program is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License 16 // along with this program. If not, see <http://www.gnu.org/licenses/>. 17 // 18 // ----------------------------------------------------------------------------- 19 20 21 #ifndef __MAINWIN_H 22 #define __MAINWIN_H 23 24 25 #include <clxclient.h> 26 #include "confwin.h" 27 #include "kmeter.h" 28 #include "global.h" 29 #include "jclient.h" 30 #include "abconfig.h" 31 32 33 34 class Mainwin : public A_thread, public X_window, public X_callback 35 { 36 public: 37 38 Mainwin (X_rootwin *parent, X_resman *xres, int xp, int yp, Jclient *jclient); 39 ~Mainwin (void); 40 Mainwin (const Mainwin&); 41 Mainwin& operator=(const Mainwin&); 42 stop(void)43 void stop (void) { _stop = true; } 44 void loadconf (void); 45 void makegui (void); 46 int process (void); 47 48 private: 49 50 enum { F_HPFIL, F_AZIM, F_ELEV, F_ANGLE, F_DIREC, F_VOLUM }; 51 enum { B_HPFIL, B_MUTE1, B_MUTE2, B_MUTE3, B_MUTE4, B_INVX, B_INVY, B_INVZ, 52 B_ENDF, B_INPUT, B_MONIT, B_MREC, B_MEXT, B_XTALK, B_MONO, B_CONF }; 53 thr_main(void)54 virtual void thr_main (void) {} 55 56 void handle_time (void); 57 void handle_stop (void); 58 void handle_event (XEvent *); 59 void handle_callb (int type, X_window *W, XEvent *E); 60 void expose (XExposeEvent *E); 61 void clmesg (XClientMessageEvent *E); 62 void syncaudio (int e); 63 void applconf (void); 64 void setformat (void); 65 void addtext (X_window *W, X_textln_style *T, int xp, int yp, int xs, int ys, const char *text, int align); 66 void redraw (void); 67 68 X_resman *_xres; 69 Atom _atom; 70 bool _stop; 71 Jclient *_jclient; 72 Confwin *_confwin; 73 ABconfig _config; 74 int _bfnorm; 75 int _kmute; 76 int _kinvb; 77 X_tbutton *_b_hpfil; 78 X_slider *_f_hpfil; 79 X_tbutton *_b_mute1; 80 X_tbutton *_b_mute2; 81 X_tbutton *_b_mute3; 82 X_tbutton *_b_mute4; 83 X_tbutton *_b_invx; 84 X_tbutton *_b_invy; 85 X_tbutton *_b_invz; 86 X_tbutton *_b_endf; 87 X_tbutton *_b_conf; 88 X_subwin *_w_level; 89 Kmeter *_meters [4]; 90 X_textln *_t_laba [4]; 91 X_textln *_t_labb [4]; 92 X_textip *_t_mcid; 93 X_textip *_t_form; 94 X_tbutton *_b_input; 95 X_tbutton *_b_monit; 96 X_tbutton *_b_mrec; 97 X_tbutton *_b_mext; 98 X_slider *_f_azim; 99 X_slider *_f_elev; 100 X_slider *_f_angle; 101 X_slider *_f_direc; 102 X_tbutton *_b_xtalk; 103 X_tbutton *_b_mono; 104 X_slider *_f_volum; 105 }; 106 107 108 #endif 109