Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
2.4KB

  1. // ----------------------------------------------------------------------
  2. //
  3. // Copyright (C) 2011 Fons Adriaensen <fons@linuxaudio.org>
  4. // Modified by falkTX on Jan-Apr 2015 for inclusion in Carla
  5. //
  6. // This program is free software; you can redistribute it and/or modify
  7. // it under the terms of the GNU General Public License as published by
  8. // the Free Software Foundation; either version 2 of the License, or
  9. // (at your option) any later version.
  10. //
  11. // This program is distributed in the hope that it will be useful,
  12. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. // GNU General Public License for more details.
  15. //
  16. // You should have received a copy of the GNU General Public License
  17. // along with this program; if not, write to the Free Software
  18. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. //
  20. // ----------------------------------------------------------------------
  21. #ifndef __MAINWIN_H
  22. #define __MAINWIN_H
  23. #include <clxclient.h>
  24. #include "guiclass.h"
  25. #include "jclient.h"
  26. #include "global.h"
  27. class ZitaPipeClient;
  28. namespace BLS1 {
  29. class Mainwin : public A_thread, public X_window, public X_callback
  30. {
  31. public:
  32. struct ValueChangedCallback {
  33. virtual ~ValueChangedCallback() {}
  34. virtual void valueChangedCallback(uint, double) = 0;
  35. };
  36. enum { XSIZE = 540, YSIZE = 75 };
  37. Mainwin (X_rootwin *parent, X_resman *xres, int xp, int yp, ValueChangedCallback* valuecb);
  38. ~Mainwin (void);
  39. Mainwin (const Mainwin&);
  40. Mainwin& operator=(const Mainwin&);
  41. void stop (void) { _stop = true; }
  42. int process (void);
  43. private:
  44. enum { INPBAL, HPFILT, SHGAIN, SHFREQ, LFFREQ, LFGAIN, NROTARY };
  45. virtual void thr_main (void) {}
  46. void handle_time (void);
  47. void handle_stop (void);
  48. void handle_event (XEvent *);
  49. void handle_callb (int type, X_window *W, XEvent *E);
  50. void expose (XExposeEvent *E);
  51. void clmesg (XClientMessageEvent *E);
  52. void redraw (void);
  53. void numdisp (int ind);
  54. void fmtfreq (int ind);
  55. Atom _atom;
  56. bool _stop;
  57. X_resman *_xres;
  58. RotaryCtl *_rotary [NROTARY];
  59. X_textip *_numtext;
  60. int _parmind;
  61. int _timeout;
  62. int _touch;
  63. ValueChangedCallback* _valuecb;
  64. friend class ::ZitaPipeClient;
  65. };
  66. }
  67. #endif