diff options
Diffstat (limited to 'libs/gtkmm2ext/gtkmm2ext')
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/application.h | 62 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/gtk_ui.h | 1 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/gtkapplication.h | 4 |
3 files changed, 65 insertions, 2 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/application.h b/libs/gtkmm2ext/gtkmm2ext/application.h new file mode 100644 index 0000000000..346f76d2f0 --- /dev/null +++ b/libs/gtkmm2ext/gtkmm2ext/application.h @@ -0,0 +1,62 @@ +/* GTK+ Integration with platform-specific application-wide features + * such as the OS X menubar and application delegate concepts. + * + * Copyright (C) 2009 Paul Davis + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; version 2.1 + * of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GTK_APPLICATION_MM_H__ +#define __GTK_APPLICATION_MM_H__ + +#include <gtkmm2ext/gtkapplication.h> // for GtkApplicationGroup typedef +#include <sigc++/signal.h> + +namespace Gtk { + class MenuItem; + class MenuShell; +} + +namespace Glib { + class ustring; +} + +namespace Gtkmm2ext { + +class Application +{ +public: + static Application* instance(); + ~Application (); + + void ready (); + void set_menu_bar (Gtk::MenuShell&); + GtkApplicationMenuGroup* add_app_menu_group (); + void add_app_menu_item (GtkApplicationMenuGroup*, Gtk::MenuItem*); + + sigc::signal<void,bool> ActivationChanged; + sigc::signal<void,const Glib::ustring&> ShouldLoad; + sigc::signal<void> ShouldQuit; + +private: + Application (); + + static Application* _instance; +}; + +} + +#endif /* __GTK_APPLICATION_MM_H__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h index cf7db9f1b2..4d4d7181ed 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h @@ -142,6 +142,7 @@ class UI : public Receiver, public AbstractUI<UIRequest> protected: bool _auto_display_errors; + virtual void handle_fatal (const char *); virtual void display_message (const char *prefix, gint prefix_len, Glib::RefPtr<Gtk::TextBuffer::Tag> ptag, diff --git a/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h b/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h index 08c3a84588..68b7bd7a9f 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h @@ -31,13 +31,13 @@ G_BEGIN_DECLS typedef struct _GtkApplicationMenuGroup GtkApplicationMenuGroup; int gtk_application_init (); +void gtk_application_ready (); void gtk_application_cleanup (); void gtk_application_set_menu_bar (GtkMenuShell *menu_shell); GtkApplicationMenuGroup * gtk_application_add_app_menu_group (void); void gtk_application_add_app_menu_item (GtkApplicationMenuGroup *group, - GtkMenuItem *menu_item, - const gchar *label); + GtkMenuItem *menu_item); /* these are private but here until GtkApplication becomes a GtkObject with an interface */ |