[gimp] Add new toplevel window class GimpImageWindow
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Add new toplevel window class GimpImageWindow
- Date: Tue, 29 Sep 2009 18:35:27 +0000 (UTC)
commit b83a58b64ee3d2f81b957f38bb39352494fb6d78
Author: Michael Natterer <mitch gimp org>
Date: Wed Sep 23 12:24:22 2009 +0200
Add new toplevel window class GimpImageWindow
This one will be the toplevel where GimpDisplayShells live in
once they are no toplevels any longer.
app/display/Makefile.am | 2 +
app/display/display-types.h | 2 +
app/display/gimpimagewindow.c | 116 +++++++++++++++++++++++++++++++++++++++++
app/display/gimpimagewindow.h | 49 +++++++++++++++++
4 files changed, 169 insertions(+), 0 deletions(-)
---
diff --git a/app/display/Makefile.am b/app/display/Makefile.am
index ed44b79..240ae3e 100644
--- a/app/display/Makefile.am
+++ b/app/display/Makefile.am
@@ -75,6 +75,8 @@ libappdisplay_a_sources = \
gimpdisplayshell-title.h \
gimpdisplayshell-transform.c \
gimpdisplayshell-transform.h \
+ gimpimagewindow.c \
+ gimpimagewindow.h \
gimpnavigationeditor.c \
gimpnavigationeditor.h \
gimpscalecombobox.c \
diff --git a/app/display/display-types.h b/app/display/display-types.h
index af243f6..6e81bac 100644
--- a/app/display/display-types.h
+++ b/app/display/display-types.h
@@ -30,6 +30,8 @@ typedef struct _GimpDisplay GimpDisplay;
typedef struct _GimpDisplayShell GimpDisplayShell;
/* typedef struct _GimpDisplayOptions GimpDisplayOptions; in config-types.h */
+typedef struct _GimpImageWindow GimpImageWindow;
+
typedef struct _GimpCursorView GimpCursorView;
typedef struct _GimpNavigationEditor GimpNavigationEditor;
typedef struct _GimpScaleComboBox GimpScaleComboBox;
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
new file mode 100644
index 0000000..05173d5
--- /dev/null
+++ b/app/display/gimpimagewindow.c
@@ -0,0 +1,116 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * 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 <gegl.h>
+#include <gtk/gtk.h>
+
+#include "libgimpwidgets/gimpwidgets.h"
+
+#include "display-types.h"
+
+#include "gimpimagewindow.h"
+
+#include "gimp-intl.h"
+
+
+/* local function prototypes */
+
+static void gimp_image_window_finalize (GObject *object);
+static void gimp_image_window_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gimp_image_window_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static void gimp_image_window_destroy (GtkObject *object);
+
+
+G_DEFINE_TYPE (GimpImageWindow, gimp_image_window, GIMP_TYPE_WINDOW)
+
+#define parent_class gimp_image_window_parent_class
+
+
+static void
+gimp_image_window_class_init (GimpImageWindowClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
+
+ object_class->finalize = gimp_image_window_finalize;
+ object_class->set_property = gimp_image_window_set_property;
+ object_class->get_property = gimp_image_window_get_property;
+
+ gtk_object_class->destroy = gimp_image_window_destroy;
+}
+
+static void
+gimp_image_window_init (GimpImageWindow *window)
+{
+}
+
+static void
+gimp_image_window_finalize (GObject *object)
+{
+ GimpImageWindow *window = GIMP_IMAGE_WINDOW (object);
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gimp_image_window_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GimpImageWindow *window = GIMP_IMAGE_WINDOW (object);
+
+ switch (property_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gimp_image_window_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GimpImageWindow *window = GIMP_IMAGE_WINDOW (object);
+
+ switch (property_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+gimp_image_window_destroy (GtkObject *object)
+{
+ GimpImageWindow *window = GIMP_IMAGE_WINDOW (object);
+
+ GTK_OBJECT_CLASS (parent_class)->destroy (object);
+}
diff --git a/app/display/gimpimagewindow.h b/app/display/gimpimagewindow.h
new file mode 100644
index 0000000..5726ef5
--- /dev/null
+++ b/app/display/gimpimagewindow.h
@@ -0,0 +1,49 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * 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_IMAGE_WINDOW_H__
+#define __GIMP_IMAGE_WINDOW_H__
+
+
+#include "widgets/gimpwindow.h"
+
+
+#define GIMP_TYPE_IMAGE_WINDOW (gimp_image_window_get_type ())
+#define GIMP_IMAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_IMAGE_WINDOW, GimpImageWindow))
+#define GIMP_IMAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_IMAGE_WINDOW, GimpImageWindowClass))
+#define GIMP_IS_IMAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_IMAGE_WINDOW))
+#define GIMP_IS_IMAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_IMAGE_WINDOW))
+#define GIMP_IMAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_IMAGE_WINDOW, GimpImageWindowClass))
+
+
+typedef struct _GimpImageWindowClass GimpImageWindowClass;
+
+struct _GimpImageWindow
+{
+ GimpWindow parent_instance;
+};
+
+struct _GimpImageWindowClass
+{
+ GimpWindowClass parent_class;
+};
+
+
+GType gimp_image_window_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_IMAGE_WINDOW_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]