Assists music production by grouping standalone programs into sessions. Community version of "Non Session Manager".
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.

115 lines
3.1KB

  1. /*******************************************************************************/
  2. /* Copyright (C) 2008 Jonathan Moore Liles */
  3. /* */
  4. /* This program is free software; you can redistribute it and/or modify it */
  5. /* under the terms of the GNU General Public License as published by the */
  6. /* Free Software Foundation; either version 2 of the License, or (at your */
  7. /* option) any later version. */
  8. /* */
  9. /* This program is distributed in the hope that it will be useful, but WITHOUT */
  10. /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
  11. /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for */
  12. /* more details. */
  13. /* */
  14. /* You should have received a copy of the GNU General Public License along */
  15. /* with This program; see the file COPYING. If not,write to the Free Software */
  16. /* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  17. /*******************************************************************************/
  18. #include <FL/Fl.H>
  19. #include <FL/Fl_Single_Window.H>
  20. #include <FL/Fl_Single_Window.H>
  21. #include <FL/Fl_Scroll.H>
  22. #include <FL/Fl_Pack.H>
  23. #include "Mixer_Strip.H"
  24. #include <stdlib.h>
  25. #include <unistd.h>
  26. #include "DPM.H"
  27. #include "Mixer.H"
  28. #include "Engine/Engine.H"
  29. #include "util/Thread.H"
  30. #include "util/debug.h"
  31. Engine *engine;
  32. Mixer *mixer;
  33. Fl_Single_Window *main_window;
  34. #include <FL/Boxtypes.H>
  35. #include "Loggable.H"
  36. #include <FL/Fl_Tooltip.H>
  37. int
  38. main ( int argc, char **argv )
  39. {
  40. Thread::init();
  41. Thread thread( "UI" );
  42. thread.set();
  43. Fl_Tooltip::color( FL_BLACK );
  44. Fl_Tooltip::textcolor( FL_YELLOW );
  45. Fl_Tooltip::size( 14 );
  46. Fl_Tooltip::hoverdelay( 0.1f );
  47. Fl::visible_focus( 0 );
  48. LOG_REGISTER_CREATE( Mixer_Strip );
  49. init_boxtypes();
  50. Fl::get_system_colors();
  51. Fl::scheme( "plastic" );
  52. // Fl::scheme( "gtk+" );
  53. /* Fl::foreground( 0xFF, 0xFF, 0xFF ); */
  54. /* Fl::background( 0x10, 0x10, 0x10 ); */
  55. MESSAGE( "Initializing JACK" );
  56. engine = new Engine();
  57. engine->init( "Non-Mixer" );
  58. Fl_Single_Window *o = main_window = new Fl_Single_Window( 1024, 768, "Mixer" );
  59. {
  60. Fl_Widget *o = mixer = new Mixer( 0, 0, main_window->w(), main_window->h(), NULL );
  61. Fl_Group::current()->resizable(o);
  62. }
  63. o->end();
  64. o->show( argc, argv );
  65. {
  66. engine->lock();
  67. if ( argc > 1 )
  68. {
  69. char name[1024];
  70. snprintf( name, sizeof( name ), "%s/history", argv[1] );
  71. Loggable::open( name );
  72. }
  73. else
  74. {
  75. WARNING( "Running without a project--nothing will be saved." );
  76. }
  77. engine->unlock();
  78. }
  79. Fl::run();
  80. delete engine;
  81. MESSAGE( "Your fun is over" );
  82. }