1 /* 2 * Copyright (C) 2008-2009 David Robillard <d@drobilla.net> 3 * Copyright (C) 2009-2013 Paul Davis <paul@linuxaudiosystems.com> 4 * Copyright (C) 2017 Robin Gareus <robin@gareus.org> 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 along 17 * with this program; if not, write to the Free Software Foundation, Inc., 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 */ 20 21 #ifndef __ardour_gtk_splash_h__ 22 #define __ardour_gtk_splash_h__ 23 24 #include <set> 25 26 #include <gtkmm/window.h> 27 #include <gtkmm/drawingarea.h> 28 #include <gtkmm/box.h> 29 #include <gtkmm/label.h> 30 #include <gdkmm/pixbuf.h> 31 32 #include "pbd/signals.h" 33 34 class ARDOUR_UI; 35 36 class Splash : public Gtk::Window 37 { 38 public: 39 ~Splash (); 40 41 static Splash* instance(); 42 static void drop(); 43 static bool exists (); 44 45 void display (); 46 void pop_back_for (Gtk::Window&); 47 void pop_front_for (Gtk::Window&); 48 49 bool expose (GdkEventExpose*); 50 bool on_button_release_event (GdkEventButton*); 51 void on_realize (); 52 bool on_map_event (GdkEventAny*); 53 void message (const std::string& msg); 54 void hide (); 55 56 private: 57 Splash (); 58 static Splash* the_splash; 59 60 Glib::RefPtr<Gdk::Pixbuf> pixbuf; 61 Gtk::DrawingArea darea; 62 Glib::RefPtr<Pango::Layout> layout; 63 64 void pop_front (); 65 std::set<Gtk::Window*> _window_stack; 66 67 void boot_message (std::string); 68 PBD::ScopedConnection msg_connection; 69 70 sigc::connection idle_connection; 71 volatile bool expose_done; 72 bool expose_is_the_one; 73 bool idle_after_expose (); 74 }; 75 76 #endif /* __ardour_gtk_splash_h__ */ 77