Commit 2f4d2d54 authored by Martin Nordholts's avatar Martin Nordholts Committed by Martin Nordholts

Added gimp-bin-types.h and gimp-bin-gui-types.h and moved CLI and GUI

2008-02-17  Martin Nordholts  <martinn@svn.gnome.org>

	Added gimp-bin-types.h and gimp-bin-gui-types.h and moved CLI and
	GUI typedefs there.

	* bin/gegl-bin-types.h
	* bin/gegl-bin-gui-types.h: The two new files.

	* bin/gegl.c
	* bin/export.[ch]
	* bin/editor.[ch]
	* bin/gegl-view.[nch]
	* bin/editor-optype.c
	* bin/gegl-store.[ch]
	* bin/gegl-options.[ch]
	* bin/gegl-tree-editor.[ch]
	* bin/gegl-node-editor.[ch]
	* bin/gegl-tree-editor-action.[ch]: Make sure config.h is included
	in .c files and also include the appropriate types-headers as well
	as organize the other #include:s. Remove unneccesary #include:s in
	header files. Don't include the system-gegl.h but the one in the
	source tree. Also did some other minor restructuring.

	* bin/Makefile.am: Added the two new files.

svn path=/trunk/; revision=2032
parent 6b51da66
2008-02-17 Martin Nordholts <martinn@svn.gnome.org>
Added gimp-bin-types.h and gimp-bin-gui-types.h and moved CLI and
GUI typedefs there.
* bin/gegl-bin-types.h
* bin/gegl-bin-gui-types.h: The two new files.
* bin/gegl.c
* bin/export.[ch]
* bin/editor.[ch]
* bin/gegl-view.[nch]
* bin/editor-optype.c
* bin/gegl-store.[ch]
* bin/gegl-options.[ch]
* bin/gegl-tree-editor.[ch]
* bin/gegl-node-editor.[ch]
* bin/gegl-tree-editor-action.[ch]: Make sure config.h is included
in .c files and also include the appropriate types-headers as well
as organize the other #include:s. Remove unneccesary #include:s in
header files. Don't include the system-gegl.h but the one in the
source tree. Also did some other minor restructuring.
* bin/Makefile.am: Added the two new files.
2008-02-17 Martin Nordholts <martinn@svn.gnome.org>
* bin/gegl-options.c (parse_args): Applied patch from Fredrik
......
......@@ -15,6 +15,8 @@ gui_sources = \
editor-optype.h \
export.c \
export.h \
gegl-bin-types.h \
gegl-bin-gui-types.h \
gegl-node-editor.c \
gegl-node-editor.h \
gegl-store.c \
......
......@@ -23,6 +23,8 @@
#include <gtk/gtk.h>
#include "gegl-bin-gui-types.h"
#include "gegl-plugin.h" /* FIXME: should just be gegl.h */
#include "editor.h"
......
......@@ -16,18 +16,27 @@
* Copyright (C) 2003, 2004, 2006 Øyvind Kolås
*/
#include "config.h"
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include "gegl-bin-gui-types.h"
#include "gegl.h"
#include "editor-optype.h"
#include "gegl-node-editor.h"
#include "gegl-options.h"
#include "gegl-store.h"
#include "gegl-tree-editor.h"
#include "gegl-node-editor.h"
#include "editor.h"
#include "gegl-view.h"
#include "editor-optype.h"
#include <gdk/gdkkeysyms.h>
#include "gegl-view.h"
#include "editor.h"
#ifdef G_OS_WIN32
#ifndef PATH_MAX
......
......@@ -19,10 +19,7 @@
#ifndef EDITOR_H
#define EDITOR_H
#include "gegl-options.h"
#include "gegl-view.h"
typedef struct Editor
struct _Editor
{
GeglNode *gegl;
GeglOptions *options;
......@@ -42,7 +39,7 @@ typedef struct Editor
GtkWidget *graph_editor;
GtkWidget *view;
} Editor;
};
extern Editor editor;
GtkWidget * StockIcon (const gchar *id, GtkIconSize size, GtkWidget *widget);
......
......@@ -16,19 +16,29 @@
* Copyright (C) 2003, 2004, 2006 Øyvind Kolås
*/
#include "config.h"
#include <stdio.h>
#include <png.h>
#include <gtk/gtk.h>
#include "gegl-bin-gui-types.h"
#include "gegl.h"
#include "gegl-plugin.h"
#include "graph/gegl-node.h" /*< FIXME: including internal header */
#include "gegl-view.h"
#include "editor.h"
#include "export.h"
#include <png.h>
static gint
gegl_buffer_export_png (GeglBuffer *gegl_buffer,
GeglRectangle *rect,
const gchar *path);
#include <stdio.h>
static void set_to_defined (GtkWidget *export)
{
......
......@@ -18,5 +18,9 @@
#ifndef EXPORT_H
#define EXPORT_H
void export_window (void);
#endif
/* This file is part of GEGL editor -- a gtk frontend for GEGL
*
* 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/>.
*
* Copyright (C) 2008 Martin Nordholts
*/
#ifndef GEGL_BIN_GUI_TYPES_H
#define GEGL_BIN_GUI_TYPES_H
#include "gegl-bin-types.h"
typedef struct _Editor Editor;
typedef struct _GeglNodeEditor GeglNodeEditor;
typedef struct _GeglStore GeglStore;
typedef struct _GeglView GeglView;
#endif /* GEGL_EDITOR_TYPES_H */
/* This file is part of GEGL editor -- a gtk frontend for GEGL
*
* 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/>.
*
* Copyright (C) 2008 Martin Nordholts
*/
#ifndef GEGL_BIN_TYPES_TYPES_H
#define GEGL_BIN_TYPES_TYPES_H
typedef struct _GeglOptions GeglOptions;
#endif /* GEGL_BIN_TYPES_TYPES_H */
......@@ -23,6 +23,10 @@
#include <unistd.h>
#endif
#include <gtk/gtk.h>
#include "gegl-bin-gui-types.h"
#include "gegl.h"
#include "gegl-node-editor.h"
......
......@@ -19,9 +19,7 @@
#ifndef GEGL_NODE_EDITOR_H
#define GEGL_NODE_EDITOR_H
#include <gtk/gtk.h>
#include <gtk/gtkvbox.h>
#include <gegl.h>
#define GEGL_TYPE_NODE_EDITOR (gegl_node_editor_get_type ())
#define GEGL_NODE_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_NODE_EDITOR, GeglNodeEditor))
......@@ -30,7 +28,6 @@
#define GEGL_IS_NODE_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_NODE_EDITOR))
#define GEGL_NODE_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_NODE_EDITOR, GeglNodeEditorClass))
typedef struct _GeglNodeEditor GeglNodeEditor;
typedef struct _GeglNodeEditorClass GeglNodeEditorClass;
struct _GeglNodeEditor
......
......@@ -17,11 +17,16 @@
*/
#include "config.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "gegl-bin-types.h"
#include "gegl-options.h"
static GeglOptions *opts_new (void)
{
GeglOptions *o = g_malloc0 (sizeof (GeglOptions));
......
......@@ -30,7 +30,7 @@ typedef enum
GEGL_RUN_MODE_XML
} GeglRunMode;
typedef struct GeglOptions
struct _GeglOptions
{
GeglRunMode mode;
......@@ -46,7 +46,7 @@ typedef struct GeglOptions
gfloat delay;
gboolean play;
} GeglOptions;
};
GeglOptions *gegl_options_parse (gint argc,
gchar **argv);
......
......@@ -16,10 +16,18 @@
* Copyright (C) 2003, 2004, 2006 Øyvind Kolås
*/
#include "config.h"
#include <gegl.h>
#include "gegl-store.h"
#include <stdio.h>
#include <string.h>
#include <gtk/gtk.h>
#include "gegl-bin-gui-types.h"
#include "gegl.h"
#include "gegl-store.h"
GeglNode *
gegl_children (GeglNode *item)
......@@ -341,8 +349,6 @@ prev_siblings (GeglNode *item)
return cnt;
}
#include <stdio.h>
static GtkTreePath *
gegl_store_get_path (GtkTreeModel *tree_model, GtkTreeIter *iter)
{
......@@ -367,8 +373,6 @@ gegl_store_get_path (GtkTreeModel *tree_model, GtkTreeIter *iter)
return path;
}
#include <string.h>
static void
gegl_store_get_value (GtkTreeModel *tree_model,
GtkTreeIter *iter,
......
......@@ -18,8 +18,7 @@
#ifndef GEGL_STORE_H
#define GEGL_STORE_H
#include <gtk/gtk.h>
#include <gegl.h>
#include <glib-object.h>
#define TYPE_GEGL_STORE (gegl_store_get_type ())
#define GEGL_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GEGL_STORE, GeglStore))
......@@ -41,7 +40,6 @@ enum
GEGL_STORE_N_COLUMNS
};
typedef struct _GeglStore GeglStore;
typedef struct _GeglStoreClass GeglStoreClass;
......
......@@ -16,12 +16,19 @@
* Copyright (C) 2003, 2004, 2006 Øyvind Kolås
*/
#include "config.h"
#include <gtk/gtk.h>
#include <string.h>
#include "gegl-bin-gui-types.h"
#include "gegl.h"
#include "gegl-view.h"
#include "editor.h"
#include "gegl-store.h"
#include "gegl-tree-editor.h"
#include "gegl-view.h"
/* The reason for these surviving is that it was the API used to
......
......@@ -19,8 +19,6 @@
#ifndef GEGL_TREE_EDITOR_ACTION_H
#define GEGL_TREE_EDITOR_ACTION_H
#include <gtk/gtk.h>
GtkActionGroup *tree_editor_action_group (GtkWidget *tree_editor);
GeglNode *gegl_add_sibling (const gchar *type);
......
......@@ -16,11 +16,21 @@
* Copyright (C) 2003, 2004, 2006 Øyvind Kolås
*/
#include "config.h"
#include <gtk/gtk.h>
#include "gegl-bin-gui-types.h"
#include "gegl.h"
#include "editor.h"
#include "gegl-node-editor.h"
#include "gegl-plugin.h"
#include "gegl-store.h"
#include "gegl-tree-editor-action.h"
#include "gegl-tree-editor.h"
#include "gegl-node-editor.h"
#include "editor.h"
void property_editor_rebuild (GtkWidget *container,
GeglNode *node)
......
......@@ -19,9 +19,6 @@
#ifndef GEGL_TREE_EDITOR_H
#define GEGL_TREE_EDITOR_H
#include "gegl-tree-editor-action.h"
#include <gegl.h>
#include "gegl-store.h"
GtkWidget * tree_editor_new (GtkWidget *property_editor);
......@@ -35,4 +32,5 @@ GtkWidget * tree_editor_get_treeview (GtkWidget *tree_editor);
void property_editor_rebuild (GtkWidget *container,
GeglNode *node);
#endif /* TREE_EDITOR_H */
#endif /* GEGL_TREE_EDITOR_H */
......@@ -16,13 +16,21 @@
* Copyright (C) 2003, 2004, 2006 Øyvind Kolås
*/
#include "config.h"
#include <math.h>
#include <babl/babl.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include "gegl-bin-gui-types.h"
#include "gegl.h"
#include <babl/babl.h>
#include "gegl-view.h"
#include "gegl-tree-editor.h"
#include "editor.h"
#include <math.h>
enum
{
......@@ -33,31 +41,8 @@ enum
PROP_SCALE
};
G_DEFINE_TYPE (GeglView, gegl_view, GTK_TYPE_DRAWING_AREA)
#define GEGL_VIEW_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GEGL_TYPE_VIEW, GeglViewPrivate))
static void gegl_view_class_init (GeglViewClass *klass);
static void gegl_view_init (GeglView *self);
static void finalize (GObject *gobject);
static void set_property (GObject *gobject,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void get_property (GObject *gobject,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static gboolean motion_notify_event (GtkWidget *widget,
GdkEventMotion *event);
static gboolean button_press_event (GtkWidget *widget,
GdkEventButton *event);
static gboolean expose_event (GtkWidget *widget,
GdkEventExpose *event);
struct _GeglViewPrivate
typedef struct _GeglViewPrivate
{
GeglNode *node;
gint x;
......@@ -78,9 +63,30 @@ struct _GeglViewPrivate
guint monitor_id;
GeglProcessor *processor;
};
} GeglViewPrivate;
G_DEFINE_TYPE (GeglView, gegl_view, GTK_TYPE_DRAWING_AREA)
#define GEGL_VIEW_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GEGL_TYPE_VIEW, GeglViewPrivate))
static void gegl_view_class_init (GeglViewClass *klass);
static void gegl_view_init (GeglView *self);
static void finalize (GObject *gobject);
static void set_property (GObject *gobject,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void get_property (GObject *gobject,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static gboolean motion_notify_event (GtkWidget *widget,
GdkEventMotion *event);
static gboolean button_press_event (GtkWidget *widget,
GdkEventButton *event);
static gboolean expose_event (GtkWidget *widget,
GdkEventExpose *event);
static void
......
......@@ -19,9 +19,6 @@
#ifndef __GEGL_VIEW_H__
#define __GEGL_VIEW_H__
#include <gtk/gtk.h>
#include "gegl.h"
G_BEGIN_DECLS
#define GEGL_TYPE_VIEW (gegl_view_get_type ())
......@@ -31,9 +28,7 @@ G_BEGIN_DECLS
#define GEGL_IS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_VIEW))
#define GEGL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEGL_TYPE_VIEW, GeglViewClass))
typedef struct _GeglView GeglView;
typedef struct _GeglViewClass GeglViewClass;
typedef struct _GeglViewPrivate GeglViewPrivate;
struct _GeglView
{
......
......@@ -26,6 +26,9 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "gegl-bin-types.h"
#include "gegl-options.h"
#include "gegl-dot.h"
......@@ -40,6 +43,7 @@
#if HAVE_GTK
#include <gtk/gtk.h>
#include "gegl-bin-gui-types.h"
#include "editor.h"
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment