[gtkmm] Gtk::Window: Split WindowGroup into its own .hg/.ccg file.



commit 85d375c6f6244cf3627fb523bc2db78f1e5ef973
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Feb 3 11:22:48 2015 +0100

    Gtk::Window: Split WindowGroup into its own .hg/.ccg file.
    
    Because this is tidier and to show that it wasn't the cause of
    the doxygen tags generation problem in bug #743918 .

 gtk/src/filelist.am     |    3 +-
 gtk/src/window.hg       |   30 +----------------------
 gtk/src/windowgroup.ccg |   22 +++++++++++++++++
 gtk/src/windowgroup.hg  |   61 +++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 86 insertions(+), 30 deletions(-)
---
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index 2b54f8d..05f204a 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -208,7 +208,8 @@ gtkmm_files_any_hg =                \
        volumebutton.hg         \
        widget.hg               \
        widgetpath.hg           \
-       window.hg
+       window.hg \
+       windowgroup.hg
 
 gtkmm_files_posix_hg =         \
        pagesetupunixdialog.hg  \
diff --git a/gtk/src/window.hg b/gtk/src/window.hg
index 86993ea..ac329a8 100644
--- a/gtk/src/window.hg
+++ b/gtk/src/window.hg
@@ -21,6 +21,7 @@
 #include <glibmm/object.h>
 #include <gtkmm/bin.h>
 #include <gtkmm/application.h>
+#include <gtkmm/windowgroup.h>
 
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/bin_p.h)
@@ -37,35 +38,6 @@ namespace Gtk
 class AccelGroup;
 class WindowGroup;
 
-/** Limit the effect of grabs
- */
-class WindowGroup : public Glib::Object
-{
-  _CLASS_GOBJECT(WindowGroup, GtkWindowGroup, GTK_WINDOW_GROUP, Glib::Object, GObject)
-
-protected:
-  _CTOR_DEFAULT()
-
-public:
-  _WRAP_CREATE()
-
-  _WRAP_METHOD(void add_window(Window& window), gtk_window_group_add_window)
-  _WRAP_METHOD(void remove_window(Window& window), gtk_window_group_remove_window)
-
-
-#m4 _CONVERSION(`GList*',`std::vector<Window*>',`Glib::ListHandler<Window*>::list_to_vector($3, 
Glib::OWNERSHIP_SHALLOW)')
-  _WRAP_METHOD(std::vector<Window*> list_windows(), gtk_window_group_list_windows)
-
-#m4 _CONVERSION(`GList*',`std::vector<const Window*>',`Glib::ListHandler<const Window*>::list_to_vector($3, 
Glib::OWNERSHIP_SHALLOW)')
-  _WRAP_METHOD(std::vector<const Window*> list_windows() const, gtk_window_group_list_windows)
-
-  _WRAP_METHOD(Widget* get_current_grab(), gtk_window_group_get_current_grab)
-  _WRAP_METHOD(const Widget* get_current_grab() const, gtk_window_group_get_current_grab, constversion)
-
-  _WRAP_METHOD(Widget* get_current_grab(const Glib::RefPtr<const Gdk::Device>& device), 
gtk_window_group_get_current_device_grab)
-  _WRAP_METHOD(const Widget* get_current_grab(const Glib::RefPtr<const Gdk::Device>& device) const, 
gtk_window_group_get_current_device_grab, constversion)
-};
-
 /** Toplevel Window
  * This represents all widgets which are physical windows controlled
  * by the window manager.
diff --git a/gtk/src/windowgroup.ccg b/gtk/src/windowgroup.ccg
new file mode 100644
index 0000000..01069bf
--- /dev/null
+++ b/gtk/src/windowgroup.ccg
@@ -0,0 +1,22 @@
+/*
+ * Copyright 1998-2015 The gtkmm Development Team
+ *
+ * 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; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <gtkmm/window.h>
+#include <glibmm/vectorutils.h>
+
+#include <gtk/gtk.h>
diff --git a/gtk/src/windowgroup.hg b/gtk/src/windowgroup.hg
new file mode 100644
index 0000000..ebab528
--- /dev/null
+++ b/gtk/src/windowgroup.hg
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 1998-2015 The gtkmm Development Team
+ *
+ * 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; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <vector>
+
+#include <gtkmm/widget.h>
+
+_DEFS(gtkmm,gtk)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Gtk
+{
+
+class Window;
+
+/** Limit the effect of grabs
+ */
+class WindowGroup : public Glib::Object
+{
+  _CLASS_GOBJECT(WindowGroup, GtkWindowGroup, GTK_WINDOW_GROUP, Glib::Object, GObject)
+
+protected:
+  _CTOR_DEFAULT()
+
+public:
+  _WRAP_CREATE()
+
+  _WRAP_METHOD(void add_window(Window& window), gtk_window_group_add_window)
+  _WRAP_METHOD(void remove_window(Window& window), gtk_window_group_remove_window)
+
+
+#m4 _CONVERSION(`GList*',`std::vector<Window*>',`Glib::ListHandler<Window*>::list_to_vector($3, 
Glib::OWNERSHIP_SHALLOW)')
+  _WRAP_METHOD(std::vector<Window*> list_windows(), gtk_window_group_list_windows)
+
+#m4 _CONVERSION(`GList*',`std::vector<const Window*>',`Glib::ListHandler<const Window*>::list_to_vector($3, 
Glib::OWNERSHIP_SHALLOW)')
+  _WRAP_METHOD(std::vector<const Window*> list_windows() const, gtk_window_group_list_windows)
+
+  _WRAP_METHOD(Widget* get_current_grab(), gtk_window_group_get_current_grab)
+  _WRAP_METHOD(const Widget* get_current_grab() const, gtk_window_group_get_current_grab, constversion)
+
+  _WRAP_METHOD(Widget* get_current_grab(const Glib::RefPtr<const Gdk::Device>& device), 
gtk_window_group_get_current_device_grab)
+  _WRAP_METHOD(const Widget* get_current_grab(const Glib::RefPtr<const Gdk::Device>& device) const, 
gtk_window_group_get_current_device_grab, constversion)
+};
+
+
+} // namespace Gtk


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]