From: rwst Date: Wed, 18 Jan 2006 17:11:56 +0000 (+0000) Subject: optimized includes X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1c08a33cfc4402041ddc6f9f470d643df81676e4;p=inkscape.git optimized includes --- 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 ¢er, 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 - #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 -#include +#include +#include -#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 - -#include "forward.h" -#include +#include #include +#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 + +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 +#include 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 - +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 *groups); - NR::Coord getDistance() const; + ::NR::Coord getDistance() const; NR::Point getPoint() const; std::vector getHighlightGroups() const; private: - NR::Coord _distance; - NR::Point _point; + ::NR::Coord _distance; + ::NR::Point _point; std::vector _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 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 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 -#include +#include #include "display/nr-arena-forward.h" -#include "forward.h" #include "sp-object.h" -#include +#include +#include -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 #include #include - #include -#if GLIB_CHECK_VERSION(2,9,0) -#else -# include -#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 +#include #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 +#include #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 -#include - - typedef enum { SP_BUTTON_TYPE_NORMAL,