[gimp] app: Introduce GimpDockWindow
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] app: Introduce GimpDockWindow
- Date: Wed, 9 Sep 2009 16:23:24 +0000 (UTC)
commit 0110eb0cdf0a20d517c39d5d78739457fa42f7d4
Author: Martin Nordholts <martinn src gnome org>
Date: Wed Sep 9 18:15:34 2009 +0200
app: Introduce GimpDockWindow
Introduce GimpDockWindow and make GimpDock inherit from it. Right now
it is just a GimpWindow, but window logic from GimpDock and subclasses
will gradually be moved here so that we eventually can make GimpDock a
GtkBin. That in turn will allow us to put several GimpDocks next to
each other in columns, or GimpDocks in an image window.
app/widgets/Makefile.am | 2 +
app/widgets/gimpdock.c | 2 +-
app/widgets/gimpdock.h | 6 ++--
app/widgets/gimpdockwindow.c | 58 +++++++++++++++++++++++++++++++++++++++++
app/widgets/gimpdockwindow.h | 59 ++++++++++++++++++++++++++++++++++++++++++
app/widgets/widgets-types.h | 1 +
6 files changed, 124 insertions(+), 4 deletions(-)
---
diff --git a/app/widgets/Makefile.am b/app/widgets/Makefile.am
index f6a65e9..a8698a3 100644
--- a/app/widgets/Makefile.am
+++ b/app/widgets/Makefile.am
@@ -134,6 +134,8 @@ libappwidgets_a_sources = \
gimpdocked.h \
gimpdockseparator.c \
gimpdockseparator.h \
+ gimpdockwindow.c \
+ gimpdockwindow.h \
gimpdocumentview.c \
gimpdocumentview.h \
gimpdrawabletreeview.c \
diff --git a/app/widgets/gimpdock.c b/app/widgets/gimpdock.c
index ccf6e37..a74c6da 100644
--- a/app/widgets/gimpdock.c
+++ b/app/widgets/gimpdock.c
@@ -103,7 +103,7 @@ static void gimp_dock_real_book_removed (GimpDock *dock,
GimpDockbook *dockbook);
-G_DEFINE_TYPE (GimpDock, gimp_dock, GIMP_TYPE_WINDOW)
+G_DEFINE_TYPE (GimpDock, gimp_dock, GIMP_TYPE_DOCK_WINDOW)
#define parent_class gimp_dock_parent_class
diff --git a/app/widgets/gimpdock.h b/app/widgets/gimpdock.h
index e9107ca..cb57876 100644
--- a/app/widgets/gimpdock.h
+++ b/app/widgets/gimpdock.h
@@ -22,7 +22,7 @@
#define __GIMP_DOCK_H__
-#include "widgets/gimpwindow.h"
+#include "widgets/gimpdockwindow.h"
#define GIMP_TYPE_DOCK (gimp_dock_get_type ())
@@ -41,14 +41,14 @@ typedef struct _GimpDockPrivate GimpDockPrivate;
*/
struct _GimpDock
{
- GimpWindow parent_instance;
+ GimpDockWindow parent_instance;
GimpDockPrivate *p;
};
struct _GimpDockClass
{
- GimpWindowClass parent_class;
+ GimpDockWindowClass parent_class;
/* virtual functions */
void (* setup) (GimpDock *dock,
diff --git a/app/widgets/gimpdockwindow.c b/app/widgets/gimpdockwindow.c
new file mode 100644
index 0000000..e173d30
--- /dev/null
+++ b/app/widgets/gimpdockwindow.c
@@ -0,0 +1,58 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpdockwindow.c
+ * Copyright (C) 2001-2005 Michael Natterer <mitch gimp org>
+ * Copyright (C) 2009 Martin Nordholts <martinn src gnome org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <gtk/gtk.h>
+
+#include "libgimpwidgets/gimpwidgets.h"
+
+#include "widgets-types.h"
+
+#include "gimpdockwindow.h"
+#include "gimpwindow.h"
+
+#include "gimp-intl.h"
+
+
+struct _GimpDockWindowPrivate
+{
+ gint dummy;
+};
+
+
+G_DEFINE_TYPE (GimpDockWindow, gimp_dock_window, GIMP_TYPE_WINDOW)
+
+#define parent_class gimp_dock_window_parent_class
+
+static void
+gimp_dock_window_class_init (GimpDockWindowClass *klass)
+{
+ g_type_class_add_private (klass, sizeof (GimpDockWindowPrivate));
+}
+
+static void
+gimp_dock_window_init (GimpDockWindow *dock_window)
+{
+ dock_window->p = G_TYPE_INSTANCE_GET_PRIVATE (dock_window,
+ GIMP_TYPE_DOCK_WINDOW,
+ GimpDockWindowPrivate);
+}
diff --git a/app/widgets/gimpdockwindow.h b/app/widgets/gimpdockwindow.h
new file mode 100644
index 0000000..e9e2419
--- /dev/null
+++ b/app/widgets/gimpdockwindow.h
@@ -0,0 +1,59 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpdockwindow.h
+ * Copyright (C) 2001-2005 Michael Natterer <mitch gimp org>
+ * Copyright (C) 2009 Martin Nordholts <martinn src gnome org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GIMP_DOCK_WINDOW_H__
+#define __GIMP_DOCK_WINDOW_H__
+
+
+#include "widgets/gimpwindow.h"
+
+
+#define GIMP_TYPE_DOCK_WINDOW (gimp_dock_window_get_type ())
+#define GIMP_DOCK_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DOCK_WINDOW, GimpDockWindow))
+#define GIMP_DOCK_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DOCK_WINDOW, GimpDockWindowClass))
+#define GIMP_IS_DOCK_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_DOCK_WINDOW))
+#define GIMP_IS_DOCK_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_DOCK_WINDOW))
+#define GIMP_DOCK_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_DOCK_WINDOW, GimpDockWindowClass))
+
+
+typedef struct _GimpDockWindowClass GimpDockWindowClass;
+typedef struct _GimpDockWindowPrivate GimpDockWindowPrivate;
+
+/**
+ * A top-level window containing GimpDocks.
+ */
+struct _GimpDockWindow
+{
+ GimpWindow parent_instance;
+
+ GimpDockWindowPrivate *p;
+};
+
+struct _GimpDockWindowClass
+{
+ GimpWindowClass parent_class;
+};
+
+
+GType gimp_dock_window_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_DOCK_WINDOW_H__ */
diff --git a/app/widgets/widgets-types.h b/app/widgets/widgets-types.h
index dd4c826..29fa483 100644
--- a/app/widgets/widgets-types.h
+++ b/app/widgets/widgets-types.h
@@ -38,6 +38,7 @@ typedef struct _GimpControllerWheel GimpControllerWheel;
typedef struct _GimpDock GimpDock;
typedef struct _GimpDockSeparator GimpDockSeparator; /* not a dock */
+typedef struct _GimpDockWindow GimpDockWindow;
typedef struct _GimpImageDock GimpImageDock;
typedef struct _GimpMenuDock GimpMenuDock;
typedef struct _GimpToolbox GimpToolbox;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]