From 4295f103d71d947e3ed92731e648ba409d3664ac Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 15 Dec 2020 13:20:11 +0100 Subject: Clean up includes --- ganv/Box.hpp | 7 +++++ ganv/Canvas.hpp | 13 ++++---- ganv/Circle.hpp | 19 ++++++------ ganv/Edge.hpp | 14 +++++---- ganv/Item.hpp | 16 +++++----- ganv/Module.hpp | 18 ++++++----- ganv/Node.hpp | 15 ++++++---- ganv/Port.hpp | 14 +++++---- ganv/box.h | 7 +++++ ganv/canvas.h | 12 ++++---- ganv/circle.h | 8 +++++ ganv/edge.h | 7 ++++- ganv/ganv.h | 21 +++++++------ ganv/ganv.hpp | 12 ++++---- ganv/group.h | 6 ++++ ganv/item.h | 10 +++++-- ganv/module.h | 6 ++++ ganv/node.h | 7 ++++- ganv/port.h | 7 ++++- ganv/text.h | 7 +++++ ganv/types.hpp | 12 ++++---- ganv/widget.h | 6 ++++ ganv/wrap.hpp | 2 -- src/Canvas.cpp | 87 +++++++++++++++++++++++++++++++++++------------------- src/Port.cpp | 17 +++++++---- src/boilerplate.h | 9 ++++++ src/box.c | 22 +++++++++----- src/circle.c | 23 +++++++++++---- src/edge.c | 22 ++++++++------ src/fdgl.hpp | 5 ++-- src/ganv-private.h | 9 ++++-- src/ganv_bench.cpp | 26 ++++++++++++---- src/ganv_test.c | 4 +-- src/group.c | 14 ++++++--- src/item.c | 19 ++++++++---- src/module.c | 22 ++++++++++---- src/node.c | 22 ++++++++++---- src/port.c | 27 ++++++++++++----- src/text.c | 30 ++++++++++++------- src/widget.c | 17 +++++++---- 40 files changed, 422 insertions(+), 199 deletions(-) diff --git a/ganv/Box.hpp b/ganv/Box.hpp index 6ea0392..fe24622 100644 --- a/ganv/Box.hpp +++ b/ganv/Box.hpp @@ -18,9 +18,16 @@ #include "ganv/Node.hpp" #include "ganv/box.h" +#include "ganv/node.h" +#include "ganv/types.h" +#include "ganv/wrap.hpp" + +#include namespace Ganv { +class Canvas; + class Box : public Node { public: diff --git a/ganv/Canvas.hpp b/ganv/Canvas.hpp index a862ae3..5dd91df 100644 --- a/ganv/Canvas.hpp +++ b/ganv/Canvas.hpp @@ -16,14 +16,16 @@ #ifndef GANV_CANVAS_HPP #define GANV_CANVAS_HPP -#include +#include "ganv/canvas.h" +#include "ganv/item.h" +#include "ganv/types.h" +#include "ganv/wrap.hpp" +#include +#include #include -#include #include - -#include "ganv/canvas.h" -#include "ganv/wrap.hpp" +#include /** Ganv namespace, everything is defined under this. * @@ -34,7 +36,6 @@ namespace Ganv { class Edge; class Item; class Node; -class Port; /** @defgroup Ganv Ganv * diff --git a/ganv/Circle.hpp b/ganv/Circle.hpp index 8534c0a..b60b89d 100644 --- a/ganv/Circle.hpp +++ b/ganv/Circle.hpp @@ -16,23 +16,22 @@ #ifndef GANV_CIRCLE_HPP #define GANV_CIRCLE_HPP -#include -#include -#include -#include - -#include - -#include "ganv/types.hpp" +#include "ganv/Canvas.hpp" #include "ganv/Node.hpp" #include "ganv/circle.h" +#include "ganv/item.h" +#include "ganv/node.h" +#include "ganv/wrap.hpp" + +#include + +#include +#include GANV_GLIB_WRAP(Circle) namespace Ganv { -class Canvas; - /** An elliptical Item which is Node. * * Unlike a Module, this doesn't contain ports, but is directly joinable itself diff --git a/ganv/Edge.hpp b/ganv/Edge.hpp index f7a50b1..c7056a3 100644 --- a/ganv/Edge.hpp +++ b/ganv/Edge.hpp @@ -16,21 +16,23 @@ #ifndef GANV_EDGE_HPP #define GANV_EDGE_HPP -#include - -#include - #include "ganv/Canvas.hpp" #include "ganv/Item.hpp" #include "ganv/Node.hpp" #include "ganv/edge.h" +#include "ganv/item.h" +#include "ganv/types.h" +#include "ganv/wrap.hpp" + +#include +#include + +#include GANV_GLIB_WRAP(Edge) namespace Ganv { -class Canvas; - /** A edge (line) between two Node objects. * * @ingroup Ganv diff --git a/ganv/Item.hpp b/ganv/Item.hpp index 8f0f9c2..09e2f13 100644 --- a/ganv/Item.hpp +++ b/ganv/Item.hpp @@ -16,23 +16,23 @@ #ifndef GANV_ITEM_HPP #define GANV_ITEM_HPP -#include +#include "ganv/Canvas.hpp" +#include "ganv/item.h" +#include "ganv/wrap.hpp" +#include +#include +#include #include - +#include +#include #include #include -#include "ganv/Canvas.hpp" -#include "ganv/item.h" -#include "ganv/wrap.hpp" - GANV_GLIB_WRAP(Item) namespace Ganv { -class Canvas; - /** An item on the canvas. */ class Item : public sigc::trackable { diff --git a/ganv/Module.hpp b/ganv/Module.hpp index 00d295d..8d13700 100644 --- a/ganv/Module.hpp +++ b/ganv/Module.hpp @@ -16,22 +16,24 @@ #ifndef GANV_MODULE_HPP #define GANV_MODULE_HPP -#include -#include - -#include - +#include "ganv/Box.hpp" #include "ganv/Canvas.hpp" -#include "ganv/Node.hpp" #include "ganv/Port.hpp" +#include "ganv/box.h" +#include "ganv/item.h" #include "ganv/module.h" +#include "ganv/types.h" +#include "ganv/wrap.hpp" + +#include +#include + +#include GANV_GLIB_WRAP(Module) namespace Ganv { -class Canvas; - /** A rectangular Item which can hold a Port. * * @ingroup Ganv diff --git a/ganv/Node.hpp b/ganv/Node.hpp index c40a7ea..311385e 100644 --- a/ganv/Node.hpp +++ b/ganv/Node.hpp @@ -16,18 +16,23 @@ #ifndef GANV_NODE_HPP #define GANV_NODE_HPP -#include -#include - -#include "ganv/node.h" #include "ganv/Item.hpp" +#include "ganv/item.h" +#include "ganv/node.h" +#include "ganv/types.h" +#include "ganv/wrap.hpp" + +#include +#include +#include +#include +#include GANV_GLIB_WRAP(Node) namespace Ganv { class Canvas; -class Node; /** An object a Edge can connect to. */ diff --git a/ganv/Port.hpp b/ganv/Port.hpp index 20a7e00..c665b08 100644 --- a/ganv/Port.hpp +++ b/ganv/Port.hpp @@ -16,14 +16,16 @@ #ifndef GANV_PORT_HPP #define GANV_PORT_HPP -#include - -#include - -#include - #include "ganv/Box.hpp" #include "ganv/port.h" +#include "ganv/types.h" +#include "ganv/wrap.hpp" + +#include +#include + +#include +#include GANV_GLIB_WRAP(Port) diff --git a/ganv/box.h b/ganv/box.h index ab166bf..c4a15b4 100644 --- a/ganv/box.h +++ b/ganv/box.h @@ -17,6 +17,11 @@ #define GANV_BOX_H #include "ganv/node.h" +#include "ganv/types.h" + +#include +#include +#include G_BEGIN_DECLS @@ -27,6 +32,8 @@ G_BEGIN_DECLS #define GANV_IS_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_BOX)) #define GANV_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_BOX, GanvBoxClass)) +struct _GanvBoxClass; + typedef struct _GanvBoxClass GanvBoxClass; typedef struct _GanvBoxPrivate GanvBoxPrivate; diff --git a/ganv/canvas.h b/ganv/canvas.h index c978e24..089bb1d 100644 --- a/ganv/canvas.h +++ b/ganv/canvas.h @@ -16,15 +16,15 @@ #ifndef GANV_CANVAS_H #define GANV_CANVAS_H -#include +#include "ganv/item.h" +#include "ganv/types.h" #include +#include +#include +#include #include -#include "ganv/types.h" -#include "ganv/edge.h" -#include "ganv/item.h" - G_BEGIN_DECLS #define GANV_TYPE_CANVAS (ganv_canvas_get_type()) @@ -34,6 +34,8 @@ G_BEGIN_DECLS #define GANV_IS_CANVAS_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_CANVAS)) #define GANV_CANVAS_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_CANVAS, GanvCanvasClass)) +struct _GanvCanvasClass; + typedef struct GanvCanvasImpl GanvCanvasPrivate; typedef struct _GanvCanvasClass GanvCanvasClass; diff --git a/ganv/circle.h b/ganv/circle.h index f181b54..6f4a301 100644 --- a/ganv/circle.h +++ b/ganv/circle.h @@ -17,6 +17,11 @@ #define GANV_CIRCLE_H #include "ganv/node.h" +#include "ganv/types.h" + +#include +#include +#include G_BEGIN_DECLS @@ -27,6 +32,9 @@ G_BEGIN_DECLS #define GANV_IS_CIRCLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_CIRCLE)) #define GANV_CIRCLE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_CIRCLE, GanvCircleClass)) +struct _GanvCircle; +struct _GanvCircleClass; + typedef struct _GanvCircle GanvCircle; typedef struct _GanvCircleClass GanvCircleClass; typedef struct _GanvCirclePrivate GanvCirclePrivate; diff --git a/ganv/edge.h b/ganv/edge.h index bf0fb14..a8f7657 100644 --- a/ganv/edge.h +++ b/ganv/edge.h @@ -17,9 +17,12 @@ #define GANV_EDGE_H #include "ganv/item.h" -#include "ganv/node.h" #include "ganv/types.h" +#include +#include +#include + G_BEGIN_DECLS #define GANV_TYPE_EDGE (ganv_edge_get_type()) @@ -29,6 +32,8 @@ G_BEGIN_DECLS #define GANV_IS_EDGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_EDGE)) #define GANV_EDGE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_EDGE, GanvEdgeClass)) +struct _GanvEdgeClass; + typedef struct _GanvEdgeClass GanvEdgeClass; typedef struct _GanvEdgePrivate GanvEdgePrivate; diff --git a/ganv/ganv.h b/ganv/ganv.h index 9a00143..f86165f 100644 --- a/ganv/ganv.h +++ b/ganv/ganv.h @@ -16,16 +16,15 @@ #ifndef GANV_GANV_H #define GANV_GANV_H -#include "ganv/box.h" -#include "ganv/canvas.h" -#include "ganv/circle.h" -#include "ganv/edge.h" -#include "ganv/ganv.h" -#include "ganv/group.h" -#include "ganv/module.h" -#include "ganv/node.h" -#include "ganv/port.h" -#include "ganv/text.h" -#include "ganv/types.h" +#include "ganv/box.h" // IWYU pragma: export +#include "ganv/canvas.h" // IWYU pragma: export +#include "ganv/circle.h" // IWYU pragma: export +#include "ganv/edge.h" // IWYU pragma: export +#include "ganv/group.h" // IWYU pragma: export +#include "ganv/module.h" // IWYU pragma: export +#include "ganv/node.h" // IWYU pragma: export +#include "ganv/port.h" // IWYU pragma: export +#include "ganv/text.h" // IWYU pragma: export +#include "ganv/types.h" // IWYU pragma: export #endif /* GANV_GANV_H */ diff --git a/ganv/ganv.hpp b/ganv/ganv.hpp index 9b0334d..3e3f259 100644 --- a/ganv/ganv.hpp +++ b/ganv/ganv.hpp @@ -16,11 +16,11 @@ #ifndef GANV_GANV_HPP #define GANV_GANV_HPP -#include "ganv/Canvas.hpp" -#include "ganv/Circle.hpp" -#include "ganv/Edge.hpp" -#include "ganv/Module.hpp" -#include "ganv/Node.hpp" -#include "ganv/Port.hpp" +#include "ganv/Canvas.hpp" // IWYU pragma: export +#include "ganv/Circle.hpp" // IWYU pragma: export +#include "ganv/Edge.hpp" // IWYU pragma: export +#include "ganv/Module.hpp" // IWYU pragma: export +#include "ganv/Node.hpp" // IWYU pragma: export +#include "ganv/Port.hpp" // IWYU pragma: export #endif // GANV_GANV_HPP diff --git a/ganv/group.h b/ganv/group.h index 0f835e4..d21a8ed 100644 --- a/ganv/group.h +++ b/ganv/group.h @@ -18,6 +18,9 @@ #include "ganv/item.h" +#include +#include + G_BEGIN_DECLS /* Based on GnomeCanvasGroup, by Federico Mena @@ -32,6 +35,9 @@ G_BEGIN_DECLS #define GANV_IS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GANV_TYPE_GROUP)) #define GANV_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GANV_TYPE_GROUP, GanvGroupClass)) +struct _GanvGroup; +struct _GanvGroupClass; + typedef struct _GanvGroup GanvGroup; typedef struct _GanvGroupPrivate GanvGroupPrivate; typedef struct _GanvGroupClass GanvGroupClass; diff --git a/ganv/item.h b/ganv/item.h index 4605ffb..2433574 100644 --- a/ganv/item.h +++ b/ganv/item.h @@ -21,14 +21,18 @@ #ifndef GANV_ITEM_H #define GANV_ITEM_H -#include - #include +#include +#include +#include #include +#include + G_BEGIN_DECLS -struct _GanvCanvas; +struct _GanvItem; +struct _GanvItemClass; typedef struct _GanvItem GanvItem; typedef struct _GanvItemPrivate GanvItemPrivate; diff --git a/ganv/module.h b/ganv/module.h index 37fcf96..59c1909 100644 --- a/ganv/module.h +++ b/ganv/module.h @@ -16,10 +16,14 @@ #ifndef GANV_MODULE_H #define GANV_MODULE_H +#include "ganv/types.h" + +#include #include #include #include "ganv/box.h" +#include "ganv/canvas.h" G_BEGIN_DECLS @@ -30,6 +34,8 @@ G_BEGIN_DECLS #define GANV_IS_MODULE_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_MODULE)) #define GANV_MODULE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_MODULE, GanvModuleClass)) +struct _GanvModuleClass; + typedef struct _GanvModuleClass GanvModuleClass; typedef struct _GanvModulePrivate GanvModulePrivate; diff --git a/ganv/node.h b/ganv/node.h index b0dd82f..03cce5f 100644 --- a/ganv/node.h +++ b/ganv/node.h @@ -18,7 +18,10 @@ #include "ganv/item.h" #include "ganv/types.h" -#include "ganv/text.h" + +#include +#include +#include G_BEGIN_DECLS @@ -29,6 +32,8 @@ G_BEGIN_DECLS #define GANV_IS_NODE_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_NODE)) #define GANV_NODE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_NODE, GanvNodeClass)) +struct _GanvNodeClass; + typedef struct _GanvNodeClass GanvNodeClass; typedef struct _GanvNodePrivate GanvNodePrivate; diff --git a/ganv/port.h b/ganv/port.h index 03f4bb3..bfcd9da 100644 --- a/ganv/port.h +++ b/ganv/port.h @@ -17,8 +17,11 @@ #define GANV_PORT_H #include "ganv/box.h" +#include "ganv/types.h" -struct _GanvModule; +#include +#include +#include G_BEGIN_DECLS @@ -29,6 +32,8 @@ G_BEGIN_DECLS #define GANV_IS_PORT_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_PORT)) #define GANV_PORT_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_PORT, GanvPortClass)) +struct _GanvPortClass; + typedef struct _GanvPortClass GanvPortClass; typedef struct _GanvPortPrivate GanvPortPrivate; diff --git a/ganv/text.h b/ganv/text.h index 6f03a1b..2aee253 100644 --- a/ganv/text.h +++ b/ganv/text.h @@ -18,6 +18,10 @@ #include "ganv/item.h" +#include +#include +#include + G_BEGIN_DECLS #define GANV_TYPE_TEXT (ganv_text_get_type()) @@ -27,6 +31,9 @@ G_BEGIN_DECLS #define GANV_IS_TEXT_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GANV_TYPE_TEXT)) #define GANV_TEXT_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GANV_TYPE_TEXT, GanvTextClass)) +struct _GanvText; +struct _GanvTextClass; + typedef struct _GanvText GanvText; typedef struct _GanvTextClass GanvTextClass; typedef struct _GanvTextPrivate GanvTextPrivate; diff --git a/ganv/types.hpp b/ganv/types.hpp index 0e0e15e..ba797ba 100644 --- a/ganv/types.hpp +++ b/ganv/types.hpp @@ -18,12 +18,12 @@ namespace Ganv { -class Canvas; -class Edge; -class Item; -class Module; -class Node; -class Port; +class Canvas; // IWYU pragma: keep +class Edge; // IWYU pragma: keep +class Item; // IWYU pragma: keep +class Module; // IWYU pragma: keep +class Node; // IWYU pragma: keep +class Port; // IWYU pragma: keep } // namespace Ganv diff --git a/ganv/widget.h b/ganv/widget.h index 5b54ba4..213e669 100644 --- a/ganv/widget.h +++ b/ganv/widget.h @@ -22,6 +22,9 @@ #include "ganv/item.h" +#include +#include + G_BEGIN_DECLS #define GANV_TYPE_WIDGET (ganv_widget_get_type ()) @@ -31,6 +34,9 @@ G_BEGIN_DECLS #define GANV_IS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GANV_TYPE_WIDGET)) #define GANV_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GANV_TYPE_WIDGET, GanvWidgetClass)) +struct _GanvWidget; +struct _GanvWidgetClass; + typedef struct _GanvWidget GanvWidget; typedef struct _GanvWidgetPrivate GanvWidgetPrivate; typedef struct _GanvWidgetClass GanvWidgetClass; diff --git a/ganv/wrap.hpp b/ganv/wrap.hpp index 80aa0d2..a71be41 100644 --- a/ganv/wrap.hpp +++ b/ganv/wrap.hpp @@ -16,8 +16,6 @@ #ifndef GANV_WRAP_HPP #define GANV_WRAP_HPP -#include - #define CONNECT_PROP_SIGNAL(gobj, name, notify, handler) \ g_signal_connect(gobj, "notify::" #name, \ G_CALLBACK(notify), &_signal_##name); \ diff --git a/src/Canvas.cpp b/src/Canvas.cpp index 4e83507..f3b2499 100644 --- a/src/Canvas.cpp +++ b/src/Canvas.cpp @@ -21,42 +21,66 @@ #define _POSIX_C_SOURCE 200809L // strdup #define _XOPEN_SOURCE 600 // isascii on BSD -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include +#include "color.h" +#include "ganv-marshal.h" +#include "ganv-private.h" +#include "gettext.h" #include "ganv/Canvas.hpp" -#include "ganv/Circle.hpp" #include "ganv/Edge.hpp" -#include "ganv/Module.hpp" -#include "ganv/Port.hpp" +#include "ganv/Item.hpp" +#include "ganv/Node.hpp" #include "ganv/box.h" #include "ganv/canvas.h" +#include "ganv/circle.h" #include "ganv/edge.h" #include "ganv/group.h" +#include "ganv/item.h" +#include "ganv/module.h" #include "ganv/node.h" +#include "ganv/port.h" +#include "ganv/types.h" #include "ganv_config.h" -#include "./color.h" -#include "./ganv-marshal.h" -#include "./ganv-private.h" -#include "./gettext.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef HAVE_AGRAPH // Deal with graphviz API amateur hour... @@ -64,7 +88,10 @@ # define _dll_import 0 # define _BLD_cdt 0 # define _PACKAGE_ast 0 +# include # include +# include +# include #endif #ifdef GANV_FDGL # include "./fdgl.hpp" @@ -74,6 +101,8 @@ static const double GANV_CANVAS_PAD = 8.0; +struct GanvCanvasImpl; + typedef struct { int x; int y; @@ -1777,11 +1806,7 @@ Canvas::get_edge(Node* tail, Node* head) const extern "C" { -#include "ganv/canvas.h" - -#include "./boilerplate.h" -#include "./color.h" -#include "./gettext.h" +#include "boilerplate.h" G_DEFINE_TYPE_WITH_CODE(GanvCanvas, ganv_canvas, GTK_TYPE_LAYOUT, G_ADD_PRIVATE(GanvCanvas)) diff --git a/src/Port.cpp b/src/Port.cpp index 3506039..c17afe5 100644 --- a/src/Port.cpp +++ b/src/Port.cpp @@ -13,15 +13,22 @@ * with Ganv. If not, see . */ -#include - -#include +#include "color.h" -#include "ganv/Canvas.hpp" +#include "ganv/Box.hpp" #include "ganv/Module.hpp" #include "ganv/Port.hpp" +#include "ganv/box.h" +#include "ganv/port.h" +#include "ganv/types.h" -#include "./color.h" +#include +#include +#include + +#include +#include +#include namespace Ganv { diff --git a/src/boilerplate.h b/src/boilerplate.h index a419711..770b286 100644 --- a/src/boilerplate.h +++ b/src/boilerplate.h @@ -13,6 +13,13 @@ * with Ganv. If not, see . */ +#ifndef GANV_BOILERPLATE_H +#define GANV_BOILERPLATE_H + +#include "ganv/item.h" + +#include + typedef gpointer gobject; /** @@ -41,3 +48,5 @@ typedef gpointer gobject; case PROP_##prop: \ g_value_set_##type(value, field); \ break; + +#endif // GANV_BOILERPLATE_H diff --git a/src/box.c b/src/box.c index 4ee8e29..01814d1 100644 --- a/src/box.c +++ b/src/box.c @@ -13,17 +13,23 @@ * with Ganv. If not, see . */ -#include -#include - -#include +#include "boilerplate.h" +#include "color.h" +#include "ganv-private.h" +#include "gettext.h" #include "ganv/box.h" +#include "ganv/item.h" +#include "ganv/node.h" +#include "ganv/types.h" -#include "./boilerplate.h" -#include "./color.h" -#include "./gettext.h" -#include "./ganv-private.h" +#include +#include +#include +#include + +#include +#include static const double STACKED_OFFSET = 4.0; diff --git a/src/circle.c b/src/circle.c index 5cd9cb9..723b229 100644 --- a/src/circle.c +++ b/src/circle.c @@ -13,16 +13,27 @@ * with Ganv. If not, see . */ -#include -#include +#include "boilerplate.h" +#include "color.h" +#include "ganv-private.h" +#include "gettext.h" #include "ganv/canvas.h" #include "ganv/circle.h" +#include "ganv/item.h" +#include "ganv/node.h" +#include "ganv/text.h" +#include "ganv/types.h" + +#include +#include +#include +#include -#include "./color.h" -#include "./boilerplate.h" -#include "./gettext.h" -#include "./ganv-private.h" +#include +#include +#include +#include G_DEFINE_TYPE_WITH_CODE(GanvCircle, ganv_circle, GANV_TYPE_NODE, G_ADD_PRIVATE(GanvCircle)) diff --git a/src/edge.c b/src/edge.c index 417030a..a1a5df2 100644 --- a/src/edge.c +++ b/src/edge.c @@ -13,21 +13,25 @@ * with Ganv. If not, see . */ -#include -#include - -#include +#include "boilerplate.h" +#include "color.h" +#include "ganv-private.h" +#include "gettext.h" #include "ganv/canvas.h" #include "ganv/edge.h" +#include "ganv/item.h" #include "ganv/node.h" +#include "ganv/types.h" -#include "./boilerplate.h" -#include "./color.h" -#include "./gettext.h" +#include +#include +#include +#include +#include -#include "color.h" -#include "ganv-private.h" +#include +#include #define ARROW_DEPTH 32 #define ARROW_BREADTH 32 diff --git a/src/fdgl.hpp b/src/fdgl.hpp index 38fded1..1ea5e9d 100644 --- a/src/fdgl.hpp +++ b/src/fdgl.hpp @@ -13,8 +13,9 @@ * with Ganv. If not, see . */ -#include -#include +#include "ganv-private.h" + +#include static const double CHARGE_KE = 4000000.0; static const double EDGE_K = 16.0; diff --git a/src/ganv-private.h b/src/ganv-private.h index df611a9..3d0b7e0 100644 --- a/src/ganv-private.h +++ b/src/ganv-private.h @@ -20,12 +20,17 @@ extern "C" { #endif -#include - #include "ganv/canvas.h" +#include "ganv/item.h" #include "ganv/text.h" #include "ganv/types.h" +#include +#include +#include +#include +#include + #define GANV_CLOSE_ENOUGH 1 extern guint signal_moved; diff --git a/src/ganv_bench.cpp b/src/ganv_bench.cpp index 5f723b3..1ad00f2 100644 --- a/src/ganv_bench.cpp +++ b/src/ganv_bench.cpp @@ -13,16 +13,30 @@ * with Ganv. If not, see . */ -#include -#include -#include - -#include +#include "ganv/Canvas.hpp" +#include "ganv/Circle.hpp" +#include "ganv/Edge.hpp" +#include "ganv/Module.hpp" +#include "ganv/Port.hpp" + +#include +#include #include +#include #include #include +#include + +#include +#include +#include +#include +#include +#include -#include "ganv/ganv.hpp" +namespace Ganv { +class Node; +} using namespace std; using namespace Ganv; diff --git a/src/ganv_test.c b/src/ganv_test.c index ec1b0a8..c2e1534 100644 --- a/src/ganv_test.c +++ b/src/ganv_test.c @@ -13,10 +13,10 @@ * with Ganv. If not, see . */ -#include - #include "ganv/ganv.h" +#include + static void on_window_destroy(GtkWidget* widget, void* data) { diff --git a/src/group.c b/src/group.c index b60495b..54a3765 100644 --- a/src/group.c +++ b/src/group.c @@ -18,13 +18,19 @@ * Copyright 1997-2000 Free Software Foundation */ -#include +#include "ganv-private.h" -#include "ganv/canvas.h" #include "ganv/group.h" +#include "ganv/item.h" + +#include +#include +#include +#include +#include -#include "./gettext.h" -#include "./ganv-private.h" +#include +#include enum { GROUP_PROP_0 diff --git a/src/item.c b/src/item.c index c44085b..06db304 100644 --- a/src/item.c +++ b/src/item.c @@ -18,13 +18,20 @@ * Copyright 1997-2000 Free Software Foundation */ -#include "ganv/canvas.h" -#include "ganv/node.h" +#include "ganv-marshal.h" +#include "ganv-private.h" +#include "gettext.h" -#include "./boilerplate.h" -#include "./ganv-marshal.h" -#include "./ganv-private.h" -#include "./gettext.h" +#include "ganv/item.h" +#include "ganv/types.h" + +#include +#include +#include +#include + +#include +#include /* All canvas items are derived from GanvItem. The only information a GanvItem * contains is its parent canvas, its parent canvas item, its bounding box in diff --git a/src/module.c b/src/module.c index a33b27c..e96932e 100644 --- a/src/module.c +++ b/src/module.c @@ -13,18 +13,28 @@ * with Ganv. If not, see . */ -#include -#include +#include "ganv-private.h" +#include "ganv/box.h" #include "ganv/canvas.h" +#include "ganv/item.h" #include "ganv/module.h" +#include "ganv/node.h" #include "ganv/port.h" +#include "ganv/text.h" +#include "ganv/types.h" #include "ganv/widget.h" -#include "./color.h" -#include "./boilerplate.h" -#include "./gettext.h" -#include "./ganv-private.h" +#include +#include +#include +#include +#include + +#include +#include +#include +#include #define FOREACH_PORT(ports, i) \ for (GanvPort** i = (GanvPort**)ports->pdata; \ diff --git a/src/node.c b/src/node.c index c93e116..81d10a6 100644 --- a/src/node.c +++ b/src/node.c @@ -13,14 +13,26 @@ * with Ganv. If not, see . */ +#include "boilerplate.h" +#include "color.h" +#include "ganv-marshal.h" +#include "ganv-private.h" +#include "gettext.h" + #include "ganv/canvas.h" +#include "ganv/edge.h" +#include "ganv/item.h" #include "ganv/node.h" +#include "ganv/text.h" +#include "ganv/types.h" + +#include +#include +#include +#include +#include -#include "./boilerplate.h" -#include "./color.h" -#include "./ganv-marshal.h" -#include "./ganv-private.h" -#include "./gettext.h" +#include guint signal_moved; diff --git a/src/port.c b/src/port.c index e06c64b..dcd3ac3 100644 --- a/src/port.c +++ b/src/port.c @@ -13,17 +13,30 @@ * with Ganv. If not, see . */ -#include -#include +#include "boilerplate.h" +#include "color.h" +#include "ganv-private.h" +#include "gettext.h" +#include "ganv/box.h" #include "ganv/canvas.h" -#include "ganv/port.h" +#include "ganv/edge.h" +#include "ganv/item.h" #include "ganv/module.h" +#include "ganv/node.h" +#include "ganv/port.h" +#include "ganv/text.h" +#include "ganv/types.h" -#include "./boilerplate.h" -#include "./color.h" -#include "./ganv-private.h" -#include "./gettext.h" +#include +#include +#include +#include +#include + +#include +#include +#include static const double PORT_LABEL_HPAD = 4.0; static const double PORT_LABEL_VPAD = 1.0; diff --git a/src/text.c b/src/text.c index 89e460e..058d765 100644 --- a/src/text.c +++ b/src/text.c @@ -13,20 +13,30 @@ * with Ganv. If not, see . */ -#include -#include -#include -#include - -#include +#include "boilerplate.h" +#include "color.h" +#include "ganv-private.h" +#include "gettext.h" #include "ganv/canvas.h" +#include "ganv/item.h" +#include "ganv/node.h" #include "ganv/text.h" +#include "ganv/types.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include -#include "./color.h" -#include "./boilerplate.h" -#include "./gettext.h" -#include "./ganv-private.h" +#include +#include +#include G_DEFINE_TYPE_WITH_CODE(GanvText, ganv_text, GANV_TYPE_ITEM, G_ADD_PRIVATE(GanvText)) diff --git a/src/widget.c b/src/widget.c index 5828922..e67a485 100644 --- a/src/widget.c +++ b/src/widget.c @@ -17,15 +17,22 @@ * Copyright 1997-2000 Free Software Foundation */ -#include - -#include +#include "ganv-private.h" +#include "gettext.h" #include "ganv/canvas.h" +#include "ganv/item.h" #include "ganv/widget.h" -#include "./gettext.h" -#include "./ganv-private.h" +#include +#include +#include +#include +#include +#include + +#include +#include G_DEFINE_TYPE_WITH_CODE(GanvWidget, ganv_widget, GANV_TYPE_ITEM, G_ADD_PRIVATE(GanvWidget)) -- cgit v1.2.1