summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Stephan <ralf@ark.in-berlin.de>2006-01-18 17:11:56 +0000
committerrwst <rwst@users.sourceforge.net>2006-01-18 17:11:56 +0000
commitbd68b14b6bf32d009012b431f6271e53ea6bc1e1 (patch)
treee1235b11f8966b65353033927fa78fc67aaa5182
parentadapt includes to glib 2.9 changes (diff)
downloadinkscape-bd68b14b6bf32d009012b431f6271e53ea6bc1e1.tar.gz
inkscape-bd68b14b6bf32d009012b431f6271e53ea6bc1e1.zip
optimized includes
(bzr r16)
-rw-r--r--src/context-fns.h2
-rw-r--r--src/display/nr-arena-shape.h2
-rw-r--r--src/event-context.h27
-rw-r--r--src/file.h16
-rw-r--r--src/inkscape.h16
-rw-r--r--src/libnrtype/nr-type-primitives.h2
-rw-r--r--src/selection.h4
-rw-r--r--src/shortcuts.h10
-rw-r--r--src/snapped-point.h8
-rw-r--r--src/snapper.h8
-rw-r--r--src/sp-item.h16
-rw-r--r--src/svg/svg-color.cpp5
-rw-r--r--src/version.cpp1
-rw-r--r--src/version.h2
-rw-r--r--src/widgets/button.h3
15 files changed, 65 insertions, 57 deletions
diff --git a/src/context-fns.h b/src/context-fns.h
index beb132ca9..522871e75 100644
--- a/src/context-fns.h
+++ b/src/context-fns.h
@@ -9,7 +9,7 @@ class MessageStack;
extern bool have_viable_layer(SPDesktop *desktop, MessageContext *message);
extern bool have_viable_layer(SPDesktop *desktop, MessageStack *message);
-NR::Rect snap_rectangular_box(SPDesktop const *desktop, SPItem *item,
+::NR::Rect snap_rectangular_box(SPDesktop const *desktop, SPItem *item,
NR::Point const &pt, NR::Point const &center, int state);
NR::Point setup_for_drag_start(SPDesktop *desktop, SPEventContext* ec, GdkEvent *ev);
diff --git a/src/display/nr-arena-shape.h b/src/display/nr-arena-shape.h
index f7991bf4d..9f8eec99a 100644
--- a/src/display/nr-arena-shape.h
+++ b/src/display/nr-arena-shape.h
@@ -17,8 +17,6 @@
#define NR_ARENA_SHAPE(obj) (NR_CHECK_INSTANCE_CAST ((obj), NR_TYPE_ARENA_SHAPE, NRArenaShape))
#define NR_IS_ARENA_SHAPE(obj) (NR_CHECK_INSTANCE_TYPE ((obj), NR_TYPE_ARENA_SHAPE))
-//#include <libnr/nr-svp.h>
-
#include "display/curve.h"
#include "display/canvas-bpath.h"
#include "forward.h"
diff --git a/src/event-context.h b/src/event-context.h
index d319d233e..ae7ec61da 100644
--- a/src/event-context.h
+++ b/src/event-context.h
@@ -18,27 +18,24 @@
*/
#include <glib-object.h>
-#include <gtk/gtkwidget.h>
+#include <gdk/gdktypes.h>
+#include <gdk/gdkevents.h>
-#include "forward.h"
-
-namespace Inkscape {
-namespace XML {
-class Node;
-}
-}
+struct GrDrag;
+struct SPDesktop;
+struct SPItem;
+struct SPKnotHolder;
namespace NR {
-class Point;
+ class Point;
}
-struct GrDrag;
-
-struct SPKnotHolder;
-
namespace Inkscape {
- class MessageContext;
- class SelCue;
+ class MessageContext;
+ class SelCue;
+ namespace XML {
+ class Node;
+ }
}
/**
diff --git a/src/file.h b/src/file.h
index af053f027..f18f757f6 100644
--- a/src/file.h
+++ b/src/file.h
@@ -14,12 +14,20 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <stdio.h>
-
-#include "forward.h"
-#include <extension/extension-forward.h>
+#include <glib/gslist.h>
#include <gtk/gtkwidget.h>
+#include "extension/extension-forward.h"
+
+struct SPDesktop;
+struct SPDocument;
+
+namespace Inkscape {
+ namespace Extension {
+ struct Extension;
+ }
+}
+
/*######################
## N E W
######################*/
diff --git a/src/inkscape.h b/src/inkscape.h
index 9907f320f..4c6c1dbd0 100644
--- a/src/inkscape.h
+++ b/src/inkscape.h
@@ -12,16 +12,20 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "forward.h"
+#include <glib/gtypes.h>
+
+struct SPDesktop;
+struct SPDocument;
+struct SPEventContext;
namespace Inkscape {
-namespace XML {
-class Node;
-class Document;
-}
+ struct Application;
+ namespace XML {
+ class Node;
+ class Document;
+ }
}
-
#define INKSCAPE inkscape_get_instance()
void inkscape_application_init (const gchar *argv0, gboolean use_gui);
diff --git a/src/libnrtype/nr-type-primitives.h b/src/libnrtype/nr-type-primitives.h
index 9bb181c4b..92b94e9a8 100644
--- a/src/libnrtype/nr-type-primitives.h
+++ b/src/libnrtype/nr-type-primitives.h
@@ -11,7 +11,7 @@
* This code is in public domain
*/
-#include <glib.h>
+#include <glib/gtypes.h>
struct NRNameList;
struct NRStyleList;
diff --git a/src/selection.h b/src/selection.h
index 48d1112a8..407854406 100644
--- a/src/selection.h
+++ b/src/selection.h
@@ -221,7 +221,7 @@ public:
/** @brief Returns the bounding rectangle of the selection */
NRRect *bounds(NRRect *dest) const;
/** @brief Returns the bounding rectangle of the selection */
- NR::Rect bounds() const;
+ ::NR::Rect bounds() const;
/**
* @brief Returns the bounding rectangle of the selection
@@ -235,7 +235,7 @@ public:
*
* \todo how is this different from bounds()?
*/
- NR::Rect boundsInDocument() const;
+ ::NR::Rect boundsInDocument() const;
/**
* @brief Gets the selection's snap points.
diff --git a/src/shortcuts.h b/src/shortcuts.h
index 8ce0f7685..5119851c9 100644
--- a/src/shortcuts.h
+++ b/src/shortcuts.h
@@ -10,8 +10,14 @@
* This code is in public domain
*/
-#include <forward.h>
-
+namespace Inkscape {
+ class Verb;
+ namespace UI {
+ namespace View {
+ class View;
+ }
+ }
+}
/* We define high-bit mask for packing into single int */
diff --git a/src/snapped-point.h b/src/snapped-point.h
index 89eceb991..0669ddd21 100644
--- a/src/snapped-point.h
+++ b/src/snapped-point.h
@@ -25,19 +25,19 @@ class SnappedPoint
{
public:
SnappedPoint() {}
- SnappedPoint(NR::Point p, NR::Coord d);
+ SnappedPoint(::NR::Point p, ::NR::Coord d);
~SnappedPoint();
void addHighlightGroup(HighlightGroup *group);
void addHighlightGroups(std::vector<HighlightGroup*> *groups);
- NR::Coord getDistance() const;
+ ::NR::Coord getDistance() const;
NR::Point getPoint() const;
std::vector<HighlightGroup*> getHighlightGroups() const;
private:
- NR::Coord _distance;
- NR::Point _point;
+ ::NR::Coord _distance;
+ ::NR::Point _point;
std::vector<HighlightGroup*> _hightlight_groups;
};
diff --git a/src/snapper.h b/src/snapper.h
index 4c71be7f2..02f7cb7e9 100644
--- a/src/snapper.h
+++ b/src/snapper.h
@@ -27,7 +27,7 @@ namespace Inkscape
class Snapper
{
public:
- Snapper(SPNamedView const *nv, NR::Coord const d);
+ Snapper(SPNamedView const *nv, ::NR::Coord const d);
virtual ~Snapper() {}
/// Point types to snap.
@@ -38,10 +38,10 @@ public:
typedef std::pair<PointType, NR::Point> PointWithType;
void setSnapTo(PointType t, bool s);
- void setDistance(NR::Coord d);
+ void setDistance(::NR::Coord d);
bool getSnapTo(PointType t) const;
- NR::Coord getDistance() const;
+ ::NR::Coord getDistance() const;
bool willSnapSomething() const;
@@ -93,7 +93,7 @@ private:
NR::Point const &c,
std::list<SPItem const *> const &it) const = 0;
- NR::Coord _distance; ///< snap distance (desktop coordinates)
+ ::NR::Coord _distance; ///< snap distance (desktop coordinates)
int _snap_to; ///< bitmap of point types that we will snap to
};
diff --git a/src/sp-item.h b/src/sp-item.h
index 326ea2759..252821f36 100644
--- a/src/sp-item.h
+++ b/src/sp-item.h
@@ -16,18 +16,20 @@
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-
-#include <libnr/nr-matrix.h>
-#include <libnr/nr-rect.h>
+#include <vector>
#include "display/nr-arena-forward.h"
-#include "forward.h"
#include "sp-object.h"
-#include <vector>
+#include <libnr/nr-matrix.h>
+#include <libnr/nr-rect.h>
-namespace Inkscape { class URIReference; }
class SPGuideConstraint;
-
+struct SPClipPathReference;
+struct SPMaskReference;
+struct SPAvoidRef;
+struct SPPrintContext;
+namespace Inkscape { class URIReference; }
+
enum {
SP_EVENT_INVALID,
SP_EVENT_NONE,
diff --git a/src/svg/svg-color.cpp b/src/svg/svg-color.cpp
index c523c80e0..0dc84fb08 100644
--- a/src/svg/svg-color.cpp
+++ b/src/svg/svg-color.cpp
@@ -18,12 +18,7 @@
#include <math.h>
#include <glib/gstrfuncs.h>
#include <glib/ghash.h>
-
#include <glib/gutils.h>
-#if GLIB_CHECK_VERSION(2,9,0)
-#else
-# include <glib/gprintf.h>
-#endif
#include "svg.h"
diff --git a/src/version.cpp b/src/version.cpp
index fff30ddcc..edaa600db 100644
--- a/src/version.cpp
+++ b/src/version.cpp
@@ -12,6 +12,7 @@
*/
#include <stdio.h>
+#include <glib/gstrfuncs.h>
#include "version.h"
gboolean sp_version_from_string(const gchar *string, Inkscape::Version *version)
diff --git a/src/version.h b/src/version.h
index 0c4d85d4a..750ef8e55 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
#ifndef SEEN_INKSCAPE_VERSION_H
#define SEEN_INKSCAPE_VERSION_H
-#include <glib.h>
+#include <glib/gtypes.h>
#define SVG_VERSION "1.0"
#define SODIPODI_VERSION "0.32"
diff --git a/src/widgets/button.h b/src/widgets/button.h
index a29ffe76a..5850d4b61 100644
--- a/src/widgets/button.h
+++ b/src/widgets/button.h
@@ -22,9 +22,6 @@
#include <helper/action.h>
-#include <glib.h>
-
-
typedef enum {
SP_BUTTON_TYPE_NORMAL,