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.

88 lines
2.3KB

  1. // ----------------------------------------------------------------------
  2. //
  3. // Copyright (C) 2010 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 REV1 {
  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 = 620, YSIZE = 75 };
  37. Mainwin (X_rootwin *parent, X_resman *xres, int xp, int yp, bool ambisonic, 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 { R_DELAY, R_XOVER, R_RTLOW, R_RTMID, R_FDAMP,
  45. R_EQ1FR, R_EQ1GN, R_EQ2FR, R_EQ2GN,
  46. R_OPMIX, R_RGXYZ, NROTARY };
  47. virtual void thr_main (void) {}
  48. void handle_time (void);
  49. void handle_stop (void);
  50. void handle_event (XEvent *);
  51. void handle_callb (int type, X_window *W, XEvent *E);
  52. void expose (XExposeEvent *E);
  53. void clmesg (XClientMessageEvent *E);
  54. void redraw (void);
  55. Atom _atom;
  56. bool _stop;
  57. bool _ambis;
  58. X_resman *_xres;
  59. RotaryCtl *_rotary [NROTARY];
  60. ValueChangedCallback* _valuecb;
  61. friend class ::ZitaPipeClient;
  62. };
  63. }
  64. #endif