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.

76 lines
2.7KB

  1. /*******************************************************************************/
  2. /* Copyright (C) 2010 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 "color_scheme.H"
  19. #include <FL/Fl.H>
  20. #include <string.h>
  21. static Fl_Color system_colors[3];
  22. void
  23. get_system_colors ( void )
  24. {
  25. Fl::get_system_colors();
  26. system_colors[ 0 ] = (Fl_Color)Fl::get_color( FL_BACKGROUND_COLOR );
  27. system_colors[ 1 ] = (Fl_Color)Fl::get_color( FL_FOREGROUND_COLOR );
  28. system_colors[ 2 ] = (Fl_Color)Fl::get_color( FL_BACKGROUND2_COLOR );
  29. }
  30. void
  31. color_scheme ( const char *name )
  32. {
  33. if ( !strcasecmp( name, "dark" ) )
  34. {
  35. Fl::background2( 100, 100, 100 );
  36. Fl::background( 50, 50, 50 );
  37. Fl::foreground( 255, 255, 255 );
  38. }
  39. else if ( !strcasecmp( name, "light" ))
  40. {
  41. Fl::background2( 192, 192, 192 );
  42. Fl::background( 220, 220, 220 );
  43. Fl::foreground( 0, 0, 0 );
  44. }
  45. if ( !strcasecmp( name, "very dark" ) )
  46. {
  47. Fl::background2( 100, 100, 100 );
  48. Fl::background( 20, 20, 20 );
  49. Fl::foreground( 240, 240, 240 );
  50. }
  51. else if ( !strcasecmp( name, "system" ) )
  52. {
  53. unsigned char r, g, b;
  54. Fl::get_color( system_colors[ 0 ], r, g, b );
  55. Fl::background( r, g, b );
  56. Fl::get_color( system_colors[ 1 ], r, g, b );
  57. Fl::foreground( r, g, b );
  58. Fl::get_color( system_colors[ 2 ], r, g, b );
  59. Fl::background2( r, g, b );
  60. }
  61. Fl::scheme( Fl::scheme() );
  62. }