brute force approach to stopping GTK shutdown from causing a crash as we try to manip...
[ardour2.git] / libs / gtkmm2ext / gtkmm2ext / application.h
blob3fb107b78322e6ff0f8c3ab2f70f7412a5ddf26d
1 /* GTK+ Integration with platform-specific application-wide features
2 * such as the OS X menubar and application delegate concepts.
4 * Copyright (C) 2009 Paul Davis
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; version 2.1
9 * of the License.
11 * This library 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 GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef __GTK_APPLICATION_MM_H__
23 #define __GTK_APPLICATION_MM_H__
25 #include <gtkmm2ext/gtkapplication.h> // for GtkApplicationGroup typedef
26 #include <sigc++/signal.h>
28 namespace Gtk {
29 class MenuItem;
30 class MenuShell;
33 namespace Glib {
34 class ustring;
37 namespace Gtkmm2ext {
39 class Application
41 public:
42 static Application* instance();
43 ~Application ();
45 void ready ();
46 void cleanup ();
47 void set_menu_bar (Gtk::MenuShell&);
48 GtkApplicationMenuGroup* add_app_menu_group ();
49 void add_app_menu_item (GtkApplicationMenuGroup*, Gtk::MenuItem*);
51 sigc::signal<void,bool> ActivationChanged;
52 sigc::signal<void,const Glib::ustring&> ShouldLoad;
53 sigc::signal<void> ShouldQuit;
55 private:
56 Application ();
58 static Application* _instance;
63 #endif /* __GTK_APPLICATION_MM_H__ */