summaryrefslogtreecommitdiffstats
path: root/ganv
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-15 13:20:11 +0100
committerDavid Robillard <d@drobilla.net>2020-12-15 18:32:12 +0100
commit4295f103d71d947e3ed92731e648ba409d3664ac (patch)
tree868aa0b684edc5f64400721188901da6b7c6269b /ganv
parent93fee4579d013ba36d1eedc273fc2d9385d76e19 (diff)
downloadganv-4295f103d71d947e3ed92731e648ba409d3664ac.tar.gz
ganv-4295f103d71d947e3ed92731e648ba409d3664ac.tar.bz2
ganv-4295f103d71d947e3ed92731e648ba409d3664ac.zip
Clean up includes
Diffstat (limited to 'ganv')
-rw-r--r--ganv/Box.hpp7
-rw-r--r--ganv/Canvas.hpp13
-rw-r--r--ganv/Circle.hpp19
-rw-r--r--ganv/Edge.hpp14
-rw-r--r--ganv/Item.hpp16
-rw-r--r--ganv/Module.hpp18
-rw-r--r--ganv/Node.hpp15
-rw-r--r--ganv/Port.hpp14
-rw-r--r--ganv/box.h7
-rw-r--r--ganv/canvas.h12
-rw-r--r--ganv/circle.h8
-rw-r--r--ganv/edge.h7
-rw-r--r--ganv/ganv.h21
-rw-r--r--ganv/ganv.hpp12
-rw-r--r--ganv/group.h6
-rw-r--r--ganv/item.h10
-rw-r--r--ganv/module.h6
-rw-r--r--ganv/node.h7
-rw-r--r--ganv/port.h7
-rw-r--r--ganv/text.h7
-rw-r--r--ganv/types.hpp12
-rw-r--r--ganv/widget.h6
-rw-r--r--ganv/wrap.hpp2
23 files changed, 161 insertions, 85 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 <glib.h>
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 <string>
+#include "ganv/canvas.h"
+#include "ganv/item.h"
+#include "ganv/types.h"
+#include "ganv/wrap.hpp"
+#include <cairo.h>
+#include <gdkmm/event.h>
#include <glib.h>
-#include <glibmm.h>
#include <gtkmm/layout.h>
-
-#include "ganv/canvas.h"
-#include "ganv/wrap.hpp"
+#include <sigc++/signal.h>
/** 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 <algorithm>
-#include <map>
-#include <string>
-#include <stdint.h>
-
-#include <gdkmm/types.h>
-
-#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 <glib.h>
+
+#include <cstdint>
+#include <string>
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 <stdint.h>
-
-#include <gdk/gdkevents.h>
-
#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 <glib-object.h>
+#include <glib.h>
+
+#include <cstdint>
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 <assert.h>
+#include "ganv/Canvas.hpp"
+#include "ganv/item.h"
+#include "ganv/wrap.hpp"
+#include <gdk/gdk.h>
+#include <gdkmm/event.h>
+#include <glib-object.h>
#include <glib.h>
-
+#include <gobject/gclosure.h>
+#include <gtk/gtk.h>
#include <sigc++/signal.h>
#include <sigc++/trackable.h>
-#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 <string>
-#include <vector>
-
-#include <gtkmm/container.h>
-
+#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 <glib.h>
+#include <gtkmm/widget.h>
+
+#include <string>
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 <glib.h>
-#include <assert.h>
-
-#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 <glib-object.h>
+#include <glib.h>
+#include <glibmm/object.h>
+#include <gobject/gclosure.h>
+#include <sigc++/signal.h>
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 <stdint.h>
-
-#include <string>
-
-#include <gdkmm/types.h>
-
#include "ganv/Box.hpp"
#include "ganv/port.h"
+#include "ganv/types.h"
+#include "ganv/wrap.hpp"
+
+#include <glib.h>
+#include <sigc++/signal.h>
+
+#include <cstdint>
+#include <string>
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 <glib-object.h>
+#include <glib.h>
+#include <gtk/gtk.h>
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 <stdarg.h>
+#include "ganv/item.h"
+#include "ganv/types.h"
#include <cairo.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <glib.h>
#include <gtk/gtk.h>
-#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 <glib-object.h>
+#include <glib.h>
+#include <gtk/gtk.h>
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 <glib-object.h>
+#include <glib.h>
+#include <gtk/gtk.h>
+
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 <glib-object.h>
+#include <glib.h>
+
G_BEGIN_DECLS
/* Based on GnomeCanvasGroup, by Federico Mena <federico@nuclecu.unam.mx>
@@ -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 <stdarg.h>
-
#include <cairo.h>
+#include <gdk/gdk.h>
+#include <glib-object.h>
+#include <glib.h>
#include <gtk/gtk.h>
+#include <stdarg.h>
+
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 <glib-object.h>
#include <glib.h>
#include <gtk/gtk.h>
#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 <glib-object.h>
+#include <glib.h>
+#include <gtk/gtk.h>
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 <glib-object.h>
+#include <glib.h>
+#include <gtk/gtk.h>
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 <glib-object.h>
+#include <glib.h>
+#include <gtk/gtk.h>
+
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 <glib-object.h>
+#include <glib.h>
+
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 <glib.h>
-
#define CONNECT_PROP_SIGNAL(gobj, name, notify, handler) \
g_signal_connect(gobj, "notify::" #name, \
G_CALLBACK(notify), &_signal_##name); \