1 /* GTK+ Integration with platform-specific application-wide features
2 * such as the OS X menubar and application delegate concepts.
4 * Copyright (C) 2007 Pioneer Research Center USA, Inc.
5 * Copyright (C) 2007 Imendio AB
6 * Copyright (C) 2009 Paul Davis
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; version 2.1
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #include <gtkmm/menushell.h>
25 #include <gtkmm/menuitem.h>
27 #include "gtkmm2ext/application.h"
28 #include "gtkmm2ext/gtkapplication.h"
31 using namespace Gtkmm2ext;
33 Application* Application::_instance = 0;
36 Application::instance ()
39 _instance = new Application;
44 Application::Application ()
46 gtk_application_init ();
49 Application::~Application ()
52 gtk_application_cleanup ();
58 gtk_application_ready ();
64 gtk_application_hide ();
68 Application::cleanup ()
70 gtk_application_cleanup ();
74 Application::set_menu_bar (MenuShell& shell)
76 gtk_application_set_menu_bar (shell.gobj());
79 GtkApplicationMenuGroup*
80 Application::add_app_menu_group ()
82 return gtk_application_add_app_menu_group ();
86 Application::add_app_menu_item (GtkApplicationMenuGroup* group,
89 gtk_application_add_app_menu_item (group, item->gobj());