summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-08-31 18:17:26 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-08-31 18:17:26 +0000
commit1f2d8bc4ce99e970cead4ca96c1859c383a9c043 (patch)
tree07731605bc486145ce5817c5f98a27b0136c7074 /src
parentMinor pass of header cleanup (diff)
downloadinkscape-1f2d8bc4ce99e970cead4ca96c1859c383a9c043.tar.gz
inkscape-1f2d8bc4ce99e970cead4ca96c1859c383a9c043.zip
Header cleanup: stop using Glib types where they aren't truly needed. Eases GThread deprecation errors.
(bzr r13341.1.190)
Diffstat (limited to '')
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/Makefile_insert1
-rw-r--r--src/box3d-side.h8
-rw-r--r--src/box3d.h20
-rw-r--r--src/context-fns.cpp13
-rw-r--r--src/context-fns.h15
-rw-r--r--src/desktop-style.h3
-rw-r--r--src/dir-util.h5
-rw-r--r--src/document-private.h1
-rw-r--r--src/document-undo.cpp13
-rw-r--r--src/document.cpp2
-rw-r--r--src/document.h56
-rw-r--r--src/draw-anchor.cpp4
-rw-r--r--src/draw-anchor.h9
-rw-r--r--src/event-log.h8
-rw-r--r--src/extension/internal/gdkpixbuf-input.cpp13
-rw-r--r--src/extension/internal/gdkpixbuf-input.h2
-rw-r--r--src/extract-uri.h4
-rw-r--r--src/factory.h2
-rw-r--r--src/file.h8
-rw-r--r--src/filter-chemistry.h9
-rw-r--r--src/filter-enums.h2
-rw-r--r--src/gc-anchored.h1
-rw-r--r--src/gc-core.h1
-rw-r--r--src/gradient-chemistry.h21
-rw-r--r--src/graphlayout.h13
-rw-r--r--src/helper-fns.h30
-rw-r--r--src/inkscape-version.h2
-rw-r--r--src/interface.cpp2
-rw-r--r--src/interface.h18
-rw-r--r--src/isinf.h2
-rw-r--r--src/isnormal.h19
-rw-r--r--src/knot-holder-entity.h30
-rw-r--r--src/knot.h62
-rw-r--r--src/knotholder.h9
-rw-r--r--src/layer-manager.h11
-rw-r--r--src/layer-model.h6
-rw-r--r--src/line-geometry.h5
-rw-r--r--src/line-snapper.cpp5
-rw-r--r--src/line-snapper.h5
-rw-r--r--src/live_effects/lpe-copy_rotate.cpp1
-rw-r--r--src/live_effects/lpe-knot.cpp1
-rw-r--r--src/live_effects/lpeobject-reference.h6
-rw-r--r--src/live_effects/lpeobject.h4
-rw-r--r--src/main-cmdlineact.h6
-rw-r--r--src/marker.h10
-rw-r--r--src/message-context.h15
-rw-r--r--src/message-stack.h31
-rw-r--r--src/number-opt-number.h30
-rw-r--r--src/object-edit.cpp140
-rw-r--r--src/object-hierarchy.cpp23
-rw-r--r--src/object-hierarchy.h3
-rw-r--r--src/path-chemistry.h5
-rw-r--r--src/path-prefix.h16
-rw-r--r--src/persp3d-reference.h7
-rw-r--r--src/persp3d.h15
-rw-r--r--src/perspective-line.h1
-rw-r--r--src/preferences-skeleton.h3
-rw-r--r--src/preferences.h6
-rw-r--r--src/print.h6
-rw-r--r--src/profile-manager.h5
-rw-r--r--src/proj_pt.h16
-rw-r--r--src/rdf.h39
-rw-r--r--src/removeoverlap.h2
-rw-r--r--src/rubberband.h10
-rw-r--r--src/selcue.h8
-rw-r--r--src/selection-chemistry.h30
-rw-r--r--src/selection-describer.h6
-rw-r--r--src/selection.h21
-rw-r--r--src/seltrans-handles.h14
-rw-r--r--src/seltrans.h67
-rw-r--r--src/shape-editor.h8
-rw-r--r--src/shortcuts.h11
-rw-r--r--src/snap-candidate.h5
-rw-r--r--src/snap-preferences.h18
-rw-r--r--src/snap.h1
-rw-r--r--src/snapped-curve.h6
-rw-r--r--src/snapped-point.h7
-rw-r--r--src/snapper.h13
-rw-r--r--src/sp-anchor.h14
-rw-r--r--src/sp-clippath.h21
-rw-r--r--src/sp-conn-end-pair.h18
-rw-r--r--src/sp-conn-end.h13
-rw-r--r--src/sp-cursor.cpp9
-rw-r--r--src/sp-cursor.h9
-rw-r--r--src/sp-defs.h2
-rw-r--r--src/sp-desc.h6
-rw-r--r--src/sp-ellipse.h8
-rw-r--r--src/sp-filter-primitive.h12
-rw-r--r--src/sp-filter.h17
-rw-r--r--src/sp-flowdiv.h26
-rw-r--r--src/sp-flowregion.h8
-rw-r--r--src/sp-flowtext.h10
-rw-r--r--src/sp-font-face.h12
-rw-r--r--src/sp-font.h8
-rw-r--r--src/sp-glyph-kerning.h10
-rw-r--r--src/sp-glyph.h4
-rw-r--r--src/sp-gradient-vector.h5
-rw-r--r--src/sp-gradient.h21
-rw-r--r--src/sp-guide.h2
-rw-r--r--src/sp-image.h13
-rw-r--r--src/sp-item-group.h17
-rw-r--r--src/sp-item-notify-moveto.cpp9
-rw-r--r--src/sp-item-transform.cpp2
-rw-r--r--src/sp-item-transform.h9
-rw-r--r--src/sp-item.cpp2
-rw-r--r--src/sp-item.h25
-rw-r--r--src/sp-line.h6
-rw-r--r--src/sp-linear-gradient.cpp2
-rw-r--r--src/sp-linear-gradient.h4
-rw-r--r--src/sp-lpe-item.h10
-rw-r--r--src/sp-mask.h16
-rw-r--r--src/sp-mesh-array.h64
-rw-r--r--src/sp-mesh-gradient.h4
-rw-r--r--src/sp-mesh-patch.h6
-rw-r--r--src/sp-mesh-row.h5
-rw-r--r--src/sp-metadata.h9
-rw-r--r--src/sp-missing-glyph.h12
-rw-r--r--src/sp-namedview.cpp2
-rw-r--r--src/sp-namedview.h29
-rw-r--r--src/sp-object-group.h2
-rw-r--r--src/sp-object.cpp16
-rw-r--r--src/sp-object.h14
-rw-r--r--src/sp-offset.h18
-rw-r--r--src/sp-paint-server-reference.h3
-rw-r--r--src/sp-paint-server.h4
-rw-r--r--src/sp-path.h10
-rw-r--r--src/sp-pattern.h31
-rw-r--r--src/sp-polygon.h13
-rw-r--r--src/sp-polyline.h6
-rw-r--r--src/sp-radial-gradient.cpp2
-rw-r--r--src/sp-radial-gradient.h8
-rw-r--r--src/sp-rect.h32
-rw-r--r--src/sp-root.h8
-rw-r--r--src/sp-script.h10
-rw-r--r--src/sp-shape.h16
-rw-r--r--src/sp-solid-color.cpp2
-rw-r--r--src/sp-solid-color.h8
-rw-r--r--src/sp-spiral.h16
-rw-r--r--src/sp-star.h18
-rw-r--r--src/sp-stop.h13
-rw-r--r--src/sp-string.h4
-rw-r--r--src/sp-style-elem.h4
-rw-r--r--src/sp-switch.h10
-rw-r--r--src/sp-symbol.h18
-rw-r--r--src/sp-text.h18
-rw-r--r--src/sp-textpath.h7
-rw-r--r--src/sp-title.h6
-rw-r--r--src/sp-tref-reference.h8
-rw-r--r--src/sp-tref.h6
-rw-r--r--src/sp-tspan.h7
-rw-r--r--src/sp-use-reference.h8
-rw-r--r--src/sp-use.h15
-rw-r--r--src/splivarot.h7
-rw-r--r--src/streq.h1
-rw-r--r--src/style-enums.h6
-rw-r--r--src/style.h35
-rw-r--r--src/svg-view-widget.h2
-rw-r--r--src/svg-view.h13
-rw-r--r--src/text-chemistry.h2
-rw-r--r--src/text-editing.h19
-rw-r--r--src/transf_mat_3x4.h4
-rw-r--r--src/unclump.cpp1
-rw-r--r--src/unclump.h2
-rw-r--r--src/unicoderange.h14
-rw-r--r--src/uri-references.h6
-rw-r--r--src/uri.h35
-rw-r--r--src/vanishing-point.h12
-rw-r--r--src/verbs.h49
-rw-r--r--src/version.cpp22
-rw-r--r--src/version.h12
171 files changed, 1028 insertions, 1113 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ab697d126..34f06ed99 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -351,7 +351,6 @@ set(inkscape_SRC
inkscape.h
interface.h
isinf.h
- isnormal.h
knot-enums.h
knot-holder-entity.h
knot.h
diff --git a/src/Makefile_insert b/src/Makefile_insert
index 8e45cb4e0..e1b95c1d6 100644
--- a/src/Makefile_insert
+++ b/src/Makefile_insert
@@ -74,7 +74,6 @@ ink_common_sources += \
inkscape.cpp inkscape.h inkscape-private.h \
interface.cpp interface.h \
isinf.h \
- isnormal.h \
knot.cpp knot.h \
knot-enums.h \
knotholder.cpp knotholder.h \
diff --git a/src/box3d-side.h b/src/box3d-side.h
index 04bd196c2..89b3b0399 100644
--- a/src/box3d-side.h
+++ b/src/box3d-side.h
@@ -36,16 +36,16 @@ public:
static Box3DSide * createBox3DSide(SPBox3D *box);
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
- virtual void set(unsigned int key, gchar const* value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
- virtual void update(SPCtx *ctx, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
+ virtual void update(SPCtx *ctx, unsigned int flags);
virtual void set_shape();
};
void box3d_side_position_set (Box3DSide *side); // FIXME: Replace this by box3d_side_set_shape??
-gchar *box3d_side_axes_string(Box3DSide *side);
+char *box3d_side_axes_string(Box3DSide *side);
Persp3D *box3d_side_perspective(Box3DSide *side);
diff --git a/src/box3d.h b/src/box3d.h
index 4107d2452..60b966187 100644
--- a/src/box3d.h
+++ b/src/box3d.h
@@ -32,9 +32,9 @@ public:
SPBox3D();
virtual ~SPBox3D();
- gint z_orders[6]; // z_orders[i] holds the ID of the face at position #i in the group (from top to bottom)
+ int z_orders[6]; // z_orders[i] holds the ID of the face at position #i in the group (from top to bottom)
- gchar *persp_href;
+ char *persp_href;
Persp3DReference *persp_ref;
Proj::Pt3 orig_corner0;
@@ -45,7 +45,7 @@ public:
Box3D::Axis swapped; // to indicate which coordinates are swapped during dragging
- gint my_counter; // for debugging only
+ int my_counter; // for debugging only
/**
* Create a SPBox3D and append it to the parent.
@@ -54,24 +54,24 @@ public:
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
virtual void release();
- virtual void set(unsigned int key, gchar const* value);
- virtual void update(SPCtx *ctx, guint flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual void update(SPCtx *ctx, unsigned int flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
virtual const char* display_name();
virtual Geom::Affine set_transform(Geom::Affine const &transform);
virtual void convert_to_guides() const;
virtual const char* displayName() const;
- virtual gchar *description() const;
+ virtual char *description() const;
};
void box3d_position_set (SPBox3D *box);
-Proj::Pt3 box3d_get_proj_corner (SPBox3D const *box, guint id);
-Geom::Point box3d_get_corner_screen (SPBox3D const *box, guint id, bool item_coords = true);
+Proj::Pt3 box3d_get_proj_corner (SPBox3D const *box, unsigned int id);
+Geom::Point box3d_get_corner_screen (SPBox3D const *box, unsigned int id, bool item_coords = true);
Proj::Pt3 box3d_get_proj_center (SPBox3D *box);
Geom::Point box3d_get_center_screen (SPBox3D *box);
-void box3d_set_corner (SPBox3D *box, guint id, Geom::Point const &new_pos, Box3D::Axis movement, bool constrained);
+void box3d_set_corner (SPBox3D *box, unsigned int id, Geom::Point const &new_pos, Box3D::Axis movement, bool constrained);
void box3d_set_center (SPBox3D *box, Geom::Point const &new_pos, Geom::Point const &old_pos, Box3D::Axis movement, bool constrained);
void box3d_corners_for_PLs (const SPBox3D * box, Proj::Axis axis, Geom::Point &corner1, Geom::Point &corner2, Geom::Point &corner3, Geom::Point &corner4);
bool box3d_recompute_z_orders (SPBox3D *box);
diff --git a/src/context-fns.cpp b/src/context-fns.cpp
index 1e30e51de..e1df53d98 100644
--- a/src/context-fns.cpp
+++ b/src/context-fns.cpp
@@ -1,17 +1,14 @@
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include <glibmm/i18n.h>
-#include "sp-item.h"
+
+#include "context-fns.h"
#include "desktop.h"
+#include "display/snap-indicator.h"
#include "message-context.h"
#include "message-stack.h"
-#include "context-fns.h"
#include "snap.h"
-#include "ui/tools/tool-base.h"
+#include "sp-item.h"
#include "sp-namedview.h"
-#include "display/snap-indicator.h"
+#include "ui/tools/tool-base.h"
static const double midpt_1_goldenratio = (1 + goldenratio) / 2;
static const double midpt_goldenratio_2 = (goldenratio + 2) / 2;
diff --git a/src/context-fns.h b/src/context-fns.h
index bd48e5fb8..82554a6c9 100644
--- a/src/context-fns.h
+++ b/src/context-fns.h
@@ -2,7 +2,6 @@
#define SEEN_CONTEXT_FNS_H
/*
- * <description>
*
* Authors:
*
@@ -11,11 +10,13 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <gdk/gdk.h>
#include <2geom/forward.h>
-class SPDesktop;
-class SPItem;
+class SPDesktop;
+class SPItem;
+typedef union _GdkEvent GdkEvent;
+
+const double goldenratio = 1.61803398874989484820; // golden ratio
namespace Inkscape {
namespace UI {
@@ -25,12 +26,6 @@ class ToolBase;
}
}
-}
-
-const double goldenratio = 1.61803398874989484820; // golden ratio
-
-namespace Inkscape
-{
class MessageContext;
class MessageStack;
diff --git a/src/desktop-style.h b/src/desktop-style.h
index fc20e97b9..40ca27e9e 100644
--- a/src/desktop-style.h
+++ b/src/desktop-style.h
@@ -13,13 +13,12 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glib.h>
-
class ColorRGBA;
class SPCSSAttr;
class SPDesktop;
class SPObject;
class SPStyle;
+typedef struct _GSList GSList;
namespace Inkscape {
namespace XML {
class Node;
diff --git a/src/dir-util.h b/src/dir-util.h
index 17261af41..4865158bd 100644
--- a/src/dir-util.h
+++ b/src/dir-util.h
@@ -9,8 +9,7 @@
*
*/
-#include <stdlib.h>
-#include <glib.h>
+#include <cstdlib>
/**
* Returns a form of \a path relative to \a base if that is easy to construct (eg if \a path
@@ -49,7 +48,7 @@ char *inkscape_rel2abs(char const *path, char const *base, char *result, size_t
char *inkscape_abs2rel(char const *path, char const *base, char *result, size_t const size);
-gchar *prepend_current_dir_if_relative(gchar const *filename);
+gchar *prepend_current_dir_if_relative(char const *filename);
#endif // !SEEN_DIR_UTIL_H
diff --git a/src/document-private.h b/src/document-private.h
index 4560aa28f..8e28b288b 100644
--- a/src/document-private.h
+++ b/src/document-private.h
@@ -34,6 +34,7 @@ class Event;
}
}
+typedef struct _GHashTable GHashTable;
struct SPDocumentPrivate {
typedef std::map<GQuark, SPDocument::IDChangedSignal> IDChangedSignalMap;
diff --git a/src/document-undo.cpp b/src/document-undo.cpp
index 478266b7b..0519b6874 100644
--- a/src/document-undo.cpp
+++ b/src/document-undo.cpp
@@ -44,19 +44,6 @@
* (Lauris Kaplinski)
*/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-
-
-#if HAVE_STRING_H
-#endif
-
-
-#if HAVE_STDLIB_H
-#endif
-
#include <string>
#include <cstring>
#include "xml/repr.h"
diff --git a/src/document.cpp b/src/document.cpp
index f79a00178..bb1954916 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -1370,7 +1370,7 @@ GSList *SPDocument::getItemsAtPoints(unsigned const key, std::vector<Geom::Point
}
SPItem *SPDocument::getItemAtPoint( unsigned const key, Geom::Point const &p,
- gboolean const into_groups, SPItem *upto) const
+ bool const into_groups, SPItem *upto) const
{
g_return_val_if_fail(this->priv != NULL, NULL);
diff --git a/src/document.h b/src/document.h
index ee903449d..4ace249ae 100644
--- a/src/document.h
+++ b/src/document.h
@@ -75,8 +75,8 @@ class SPDocument : public Inkscape::GC::Managed<>,
public:
typedef sigc::signal<void, SPObject *> IDChangedSignal;
typedef sigc::signal<void> ResourcesChangedSignal;
- typedef sigc::signal<void, guint> ModifiedSignal;
- typedef sigc::signal<void, gchar const *> URISetSignal;
+ typedef sigc::signal<void, unsigned> ModifiedSignal;
+ typedef sigc::signal<void, char const *> URISetSignal;
typedef sigc::signal<void, double, double> ResizedSignal;
typedef sigc::signal<void> ReconstructionStart;
typedef sigc::signal<void> ReconstructionFinish;
@@ -100,9 +100,9 @@ public:
CRCascade *style_cascade;
protected:
- gchar *uri; ///< A filename (not a URI yet), or NULL
- gchar *base; ///< To be used for resolving relative hrefs.
- gchar *name; ///< basename(uri) or other human-readable label for the document.
+ char *uri; ///< A filename (not a URI yet), or NULL
+ char *base; ///< To be used for resolving relative hrefs.
+ char *name; ///< basename(uri) or other human-readable label for the document.
public:
@@ -112,10 +112,10 @@ public:
Glib::ustring actionkey;
/// Handler ID
- guint modified_id;
+ unsigned modified_id;
/// Connector rerouting handler ID
- guint rerouting_handler_id;
+ unsigned rerouting_handler_id;
Inkscape::ProfileManager* profileManager;
@@ -137,15 +137,15 @@ public:
Inkscape::XML::Document const *getReprDoc() const { return rdoc; }
/** A filename (not a URI yet), or NULL */
- gchar const *getURI() const { return uri; }
- void setUri(gchar const *uri);
+ char const *getURI() const { return uri; }
+ void setUri(char const *uri);
/** To be used for resolving relative hrefs. */
- gchar const *getBase() const { return base; };
- void setBase( gchar const* base );
+ char const *getBase() const { return base; };
+ void setBase( char const* base );
/** basename(uri) or other human-readable label for the document. */
- gchar const* getName() const { return name; }
+ char const* getName() const { return name; }
/** Return the main defs object for the document. */
SPDefs *getDefs();
@@ -173,10 +173,10 @@ public:
sigc::connection connectResized(ResizedSignal::slot_type slot);
sigc::connection connectCommit(CommitSignal::slot_type slot);
- void bindObjectToId(gchar const *id, SPObject *object);
+ void bindObjectToId(char const *id, SPObject *object);
SPObject *getObjectById(Glib::ustring const &id) const;
- SPObject *getObjectById(gchar const *id) const;
- sigc::connection connectIdChanged(const gchar *id, IDChangedSignal::slot_type slot);
+ SPObject *getObjectById(char const *id) const;
+ sigc::connection connectIdChanged(const char *id, IDChangedSignal::slot_type slot);
void bindObjectToRepr(Inkscape::XML::Node *repr, SPObject *object);
SPObject *getObjectByRepr(Inkscape::XML::Node *repr) const;
@@ -222,12 +222,12 @@ public:
sigc::connection _selection_changed_connection;
sigc::connection _desktop_activated_connection;
- sigc::connection connectResourcesChanged(const gchar *key, SPDocument::ResourcesChangedSignal::slot_type slot);
+ sigc::connection connectResourcesChanged(char const *key, SPDocument::ResourcesChangedSignal::slot_type slot);
void fitToRect(Geom::Rect const &rect, bool with_margins = false);
- static SPDocument *createNewDoc(const gchar *uri, unsigned int keepalive,
+ static SPDocument *createNewDoc(char const*uri, unsigned int keepalive,
bool make_new = false, SPDocument *parent=NULL );
- static SPDocument *createNewDocFromMem(const gchar *buffer, gint length, unsigned int keepalive);
+ static SPDocument *createNewDocFromMem(char const*buffer, int length, unsigned int keepalive);
SPDocument *createChildDoc(std::string const &uri);
/**
@@ -235,8 +235,8 @@ public:
*/
static SPItem *getItemFromListAtPointBottom(unsigned int dkey, SPGroup *group, const GSList *list, Geom::Point const &p, bool take_insensitive = false);
- static SPDocument *createDoc(Inkscape::XML::Document *rdoc, gchar const *uri,
- gchar const *base, gchar const *name, unsigned int keepalive,
+ static SPDocument *createDoc(Inkscape::XML::Document *rdoc, char const *uri,
+ char const *base, char const *name, unsigned int keepalive,
SPDocument *parent);
SPDocument *doRef();
@@ -250,25 +250,25 @@ public:
void setHeight(const Inkscape::Util::Quantity &height);
void setViewBox(const Geom::Rect &viewBox);
void requestModified();
- gint ensureUpToDate();
- bool addResource(const gchar *key, SPObject *object);
- bool removeResource(const gchar *key, SPObject *object);
- const GSList *getResourceList(const gchar *key) const;
+ int ensureUpToDate();
+ bool addResource(char const *key, SPObject *object);
+ bool removeResource(char const *key, SPObject *object);
+ const GSList *getResourceList(char const *key) const;
GSList *getItemsInBox(unsigned int dkey, Geom::Rect const &box) const;
GSList *getItemsPartiallyInBox(unsigned int dkey, Geom::Rect const &box) const;
- SPItem *getItemAtPoint(unsigned int key, Geom::Point const &p, gboolean into_groups, SPItem *upto = NULL) const;
+ SPItem *getItemAtPoint(unsigned int key, Geom::Point const &p, bool into_groups, SPItem *upto = NULL) const;
GSList *getItemsAtPoints(unsigned const key, std::vector<Geom::Point> points) const;
SPItem *getGroupAtPoint(unsigned int key, Geom::Point const &p) const;
- void changeUriAndHrefs(gchar const *uri);
- void emitResizedSignal(gdouble width, gdouble height);
+ void changeUriAndHrefs(char const *uri);
+ void emitResizedSignal(double width, double height);
unsigned int vacuumDocument();
void importDefs(SPDocument *source);
private:
- void do_change_uri(gchar const *const filename, bool const rebase);
+ void do_change_uri(char const *const filename, bool const rebase);
void setupViewport(SPItemCtx *ctx);
};
diff --git a/src/draw-anchor.cpp b/src/draw-anchor.cpp
index 00db936e1..6b02bb607 100644
--- a/src/draw-anchor.cpp
+++ b/src/draw-anchor.cpp
@@ -30,7 +30,7 @@ using Inkscape::ControlManager;
/**
* Creates an anchor object and initializes it.
*/
-SPDrawAnchor *sp_draw_anchor_new(Inkscape::UI::Tools::FreehandBase *dc, SPCurve *curve, gboolean start, Geom::Point delta)
+SPDrawAnchor *sp_draw_anchor_new(Inkscape::UI::Tools::FreehandBase *dc, SPCurve *curve, bool start, Geom::Point delta)
{
if (SP_IS_LPETOOL_CONTEXT(dc)) {
// suppress all kinds of anchors in LPEToolContext
@@ -73,7 +73,7 @@ SPDrawAnchor *sp_draw_anchor_destroy(SPDrawAnchor *anchor)
* Test if point is near anchor, if so fill anchor on canvas and return
* pointer to it or NULL.
*/
-SPDrawAnchor *sp_draw_anchor_test(SPDrawAnchor *anchor, Geom::Point w, gboolean activate)
+SPDrawAnchor *sp_draw_anchor_test(SPDrawAnchor *anchor, Geom::Point w, bool activate)
{
SPCtrl *ctrl = SP_CTRL(anchor->ctrl);
diff --git a/src/draw-anchor.h b/src/draw-anchor.h
index e7b252186..1f7b55920 100644
--- a/src/draw-anchor.h
+++ b/src/draw-anchor.h
@@ -5,7 +5,6 @@
* Drawing anchors.
*/
-#include <glib.h>
#include <2geom/point.h>
namespace Inkscape {
@@ -26,17 +25,17 @@ struct SPCanvasItem;
struct SPDrawAnchor {
Inkscape::UI::Tools::FreehandBase *dc;
SPCurve *curve;
- guint start : 1;
- guint active : 1;
+ unsigned int start : 1;
+ unsigned int active : 1;
Geom::Point dp;
SPCanvasItem *ctrl;
};
-SPDrawAnchor *sp_draw_anchor_new(Inkscape::UI::Tools::FreehandBase *dc, SPCurve *curve, gboolean start,
+SPDrawAnchor *sp_draw_anchor_new(Inkscape::UI::Tools::FreehandBase *dc, SPCurve *curve, bool start,
Geom::Point delta);
SPDrawAnchor *sp_draw_anchor_destroy(SPDrawAnchor *anchor);
-SPDrawAnchor *sp_draw_anchor_test(SPDrawAnchor *anchor, Geom::Point w, gboolean activate);
+SPDrawAnchor *sp_draw_anchor_test(SPDrawAnchor *anchor, Geom::Point w, bool activate);
#endif /* !SEEN_DRAW_ANCHOR_H */
diff --git a/src/event-log.h b/src/event-log.h
index 7e3ba6817..6d4112a5a 100644
--- a/src/event-log.h
+++ b/src/event-log.h
@@ -11,14 +11,6 @@
#ifndef INKSCAPE_EVENT_LOG_H
#define INKSCAPE_EVENT_LOG_H
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
-
#include <gtkmm/treestore.h>
#include <glibmm/refptr.h>
#include <gtkmm/treeselection.h>
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp
index da179bee0..28e44c461 100644
--- a/src/extension/internal/gdkpixbuf-input.cpp
+++ b/src/extension/internal/gdkpixbuf-input.cpp
@@ -1,21 +1,20 @@
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
#include <boost/scoped_ptr.hpp>
#include <glib/gprintf.h>
#include <glibmm/i18n.h>
+#include "dir-util.h"
+#include "display/cairo-utils.h"
#include "document-private.h"
-#include <dir-util.h>
+#include "document-undo.h"
#include "extension/input.h"
#include "extension/system.h"
+#include "image-resolution.h"
#include "gdkpixbuf-input.h"
#include "preferences.h"
#include "selection-chemistry.h"
#include "sp-image.h"
-#include "document-undo.h"
#include "util/units.h"
-#include "image-resolution.h"
-#include "display/cairo-utils.h"
#include <set>
namespace Inkscape {
diff --git a/src/extension/internal/gdkpixbuf-input.h b/src/extension/internal/gdkpixbuf-input.h
index 597e7246b..2e03a96db 100644
--- a/src/extension/internal/gdkpixbuf-input.h
+++ b/src/extension/internal/gdkpixbuf-input.h
@@ -10,7 +10,7 @@ namespace Internal {
class GdkpixbufInput : Inkscape::Extension::Implementation::Implementation {
public:
SPDocument *open(Inkscape::Extension::Input *mod,
- gchar const *uri);
+ char const *uri);
static void init();
};
diff --git a/src/extract-uri.h b/src/extract-uri.h
index a6707f1a1..e9ee0b1d8 100644
--- a/src/extract-uri.h
+++ b/src/extract-uri.h
@@ -1,9 +1,7 @@
#ifndef SEEN_EXTRACT_URI_H
#define SEEN_EXTRACT_URI_H
-#include <glib.h>
-
-gchar *extract_uri(gchar const *s, gchar const** endptr = 0);
+char *extract_uri(char const *s, char const** endptr = 0);
#endif /* !SEEN_EXTRACT_URI_H */
diff --git a/src/factory.h b/src/factory.h
index c76501cfd..c1288b460 100644
--- a/src/factory.h
+++ b/src/factory.h
@@ -91,7 +91,7 @@ struct NodeTraits {
break;
case Inkscape::XML::ELEMENT_NODE: {
- gchar const *const sptype = node.attribute("sodipodi:type");
+ char const *const sptype = node.attribute("sodipodi:type");
if (sptype) {
name = sptype;
diff --git a/src/file.h b/src/file.h
index 7f80f3645..4ffbc8ec0 100644
--- a/src/file.h
+++ b/src/file.h
@@ -75,7 +75,7 @@ bool sp_file_open(
* Displays a file open dialog. Calls sp_file_open on
* an OK.
*/
-void sp_file_open_dialog (Gtk::Window &parentWindow, gpointer object, gpointer data);
+void sp_file_open_dialog (Gtk::Window &parentWindow, void* object, void* data);
/**
* Reverts file to disk-copy on "YES"
@@ -96,19 +96,19 @@ bool file_save_remote(SPDocument *doc, const Glib::ustring &uri,
/**
*
*/
-bool sp_file_save (Gtk::Window &parentWindow, gpointer object, gpointer data);
+bool sp_file_save (Gtk::Window &parentWindow, void* object, void* data);
/**
* Saves the given document. Displays a file select dialog
* to choose the new name.
*/
-bool sp_file_save_as (Gtk::Window &parentWindow, gpointer object, gpointer data);
+bool sp_file_save_as (Gtk::Window &parentWindow, void* object, void* data);
/**
* Saves a copy of the given document. Displays a file select dialog
* to choose a name for the copy.
*/
-bool sp_file_save_a_copy (Gtk::Window &parentWindow, gpointer object, gpointer data);
+bool sp_file_save_a_copy (Gtk::Window &parentWindow, void* object, void* data);
/**
diff --git a/src/filter-chemistry.h b/src/filter-chemistry.h
index 2ac3ebe8f..104016845 100644
--- a/src/filter-chemistry.h
+++ b/src/filter-chemistry.h
@@ -14,8 +14,6 @@
#ifndef SEEN_SP_FILTER_CHEMISTRY_H
#define SEEN_SP_FILTER_CHEMISTRY_H
-#include <glib.h>
-
#include "display/nr-filter-types.h"
class SPDocument;
@@ -24,12 +22,11 @@ class SPFilterPrimitive;
class SPItem;
class SPObject;
-
SPFilterPrimitive *filter_add_primitive(SPFilter *filter, Inkscape::Filters::FilterPrimitiveType);
SPFilter *new_filter (SPDocument *document);
-SPFilter *new_filter_gaussian_blur (SPDocument *document, gdouble stdDeviation, double expansion, double expansionX, double expansionY, double width, double height);
-SPFilter *new_filter_simple_from_item (SPDocument *document, SPItem *item, const char *mode, gdouble stdDeviation);
-SPFilter *modify_filter_gaussian_blur_from_item (SPDocument *document, SPItem *item, gdouble stdDeviation);
+SPFilter *new_filter_gaussian_blur (SPDocument *document, double stdDeviation, double expansion, double expansionX, double expansionY, double width, double height);
+SPFilter *new_filter_simple_from_item (SPDocument *document, SPItem *item, const char *mode, double stdDeviation);
+SPFilter *modify_filter_gaussian_blur_from_item (SPDocument *document, SPItem *item, double stdDeviation);
void remove_filter (SPObject *item, bool recursive);
void remove_filter_gaussian_blur (SPObject *item);
bool filter_is_single_gaussian_blur(SPFilter *filter);
diff --git a/src/filter-enums.h b/src/filter-enums.h
index e6d656f8a..3ced5ab94 100644
--- a/src/filter-enums.h
+++ b/src/filter-enums.h
@@ -12,8 +12,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glibmm.h>
-
#include "display/nr-filter-blend.h"
#include "display/nr-filter-colormatrix.h"
#include "display/nr-filter-component-transfer.h"
diff --git a/src/gc-anchored.h b/src/gc-anchored.h
index a20904dce..99b78c784 100644
--- a/src/gc-anchored.h
+++ b/src/gc-anchored.h
@@ -9,7 +9,6 @@
#ifndef SEEN_INKSCAPE_GC_ANCHORED_H
#define SEEN_INKSCAPE_GC_ANCHORED_H
-#include <glib.h>
#include "gc-managed.h"
namespace Inkscape {
diff --git a/src/gc-core.h b/src/gc-core.h
index 3957bda1a..d9d0bf4ff 100644
--- a/src/gc-core.h
+++ b/src/gc-core.h
@@ -24,7 +24,6 @@
#else
# include <gc.h>
#endif
-#include <glib.h>
namespace Inkscape {
namespace GC {
diff --git a/src/gradient-chemistry.h b/src/gradient-chemistry.h
index 728874f88..792ccc72e 100644
--- a/src/gradient-chemistry.h
+++ b/src/gradient-chemistry.h
@@ -22,6 +22,7 @@
class SPCSSAttr;
class SPItem;
+typedef unsigned int guint32;
/**
* Either normalizes given gradient to vector, or returns fresh normalized
@@ -53,7 +54,7 @@ SPGradient *sp_gradient_vector_for_object( SPDocument *doc, SPDesktop *desktop,
void sp_object_ensure_fill_gradient_normalized (SPObject *object);
void sp_object_ensure_stroke_gradient_normalized (SPObject *object);
-SPGradient *sp_gradient_convert_to_userspace (SPGradient *gr, SPItem *item, const gchar *property);
+SPGradient *sp_gradient_convert_to_userspace (SPGradient *gr, SPItem *item, const char *property);
SPGradient *sp_gradient_reset_to_userspace (SPGradient *gr, SPItem *item);
SPGradient *sp_gradient_fork_vector_if_necessary (SPGradient *gr);
@@ -61,11 +62,11 @@ SPGradient *sp_gradient_get_forked_vector_if_necessary(SPGradient *gradient, boo
SPStop* sp_last_stop(SPGradient *gradient);
-SPStop* sp_get_stop_i(SPGradient *gradient, guint i);
-guint sp_number_of_stops(SPGradient const *gradient);
-guint sp_number_of_stops_before_stop(SPGradient const *gradient, SPStop *target);
+SPStop* sp_get_stop_i(SPGradient *gradient, unsigned int i);
+unsigned int sp_number_of_stops(SPGradient const *gradient);
+unsigned int sp_number_of_stops_before_stop(SPGradient const *gradient, SPStop *target);
-guint32 average_color(guint32 c1, guint32 c2, gdouble p = 0.5);
+guint32 average_color(guint32 c1, guint32 c2, double p = 0.5);
SPStop *sp_vector_add_stop(SPGradient *vector, SPStop* prev_stop, SPStop* next_stop, gfloat offset);
@@ -86,20 +87,20 @@ void sp_gradient_unset_swatch(SPDesktop *desktop, std::string id);
SPGradient *getGradient(SPItem *item, Inkscape::PaintTarget fill_or_stroke);
-void sp_item_gradient_set_coords(SPItem *item, GrPointType point_type, guint point_i, Geom::Point p_desk, Inkscape::PaintTarget fill_or_stroke, bool write_repr, bool scale);
+void sp_item_gradient_set_coords(SPItem *item, GrPointType point_type, unsigned int point_i, Geom::Point p_desk, Inkscape::PaintTarget fill_or_stroke, bool write_repr, bool scale);
/**
* Returns the position of point point_type of the gradient applied to item (either fill_or_stroke),
* in desktop coordinates.
*/
-Geom::Point getGradientCoords(SPItem *item, GrPointType point_type, guint point_i, Inkscape::PaintTarget fill_or_stroke);
+Geom::Point getGradientCoords(SPItem *item, GrPointType point_type, unsigned int point_i, Inkscape::PaintTarget fill_or_stroke);
SPGradient *sp_item_gradient_get_vector(SPItem *item, Inkscape::PaintTarget fill_or_stroke);
SPGradientSpread sp_item_gradient_get_spread(SPItem *item, Inkscape::PaintTarget fill_or_stroke);
-void sp_item_gradient_stop_set_style(SPItem *item, GrPointType point_type, guint point_i, Inkscape::PaintTarget fill_or_stroke, SPCSSAttr *stop);
-guint32 sp_item_gradient_stop_query_style(SPItem *item, GrPointType point_type, guint point_i, Inkscape::PaintTarget fill_or_stroke);
-void sp_item_gradient_edit_stop(SPItem *item, GrPointType point_type, guint point_i, Inkscape::PaintTarget fill_or_stroke);
+void sp_item_gradient_stop_set_style(SPItem *item, GrPointType point_type, unsigned int point_i, Inkscape::PaintTarget fill_or_stroke, SPCSSAttr *stop);
+guint32 sp_item_gradient_stop_query_style(SPItem *item, GrPointType point_type, unsigned int point_i, Inkscape::PaintTarget fill_or_stroke);
+void sp_item_gradient_edit_stop(SPItem *item, GrPointType point_type, unsigned int point_i, Inkscape::PaintTarget fill_or_stroke);
void sp_item_gradient_reverse_vector(SPItem *item, Inkscape::PaintTarget fill_or_stroke);
void sp_item_gradient_invert_vector_color(SPItem *item, Inkscape::PaintTarget fill_or_stroke);
diff --git a/src/graphlayout.h b/src/graphlayout.h
index 6083ad77f..0ffb645b6 100644
--- a/src/graphlayout.h
+++ b/src/graphlayout.h
@@ -14,10 +14,15 @@
#ifndef SEEN_GRAPHLAYOUT_H
#define SEEN_GRAPHLAYOUT_H
-struct _GSList;
-void graphlayout(_GSList const *const items);
+#include <list>
+
+typedef struct _GSList GSList;
class SPItem;
+
+void graphlayout(GSList const *const items);
+
bool isConnector(SPItem const *const item);
-#include <list>
-void filterConnectors(_GSList const *const items, std::list<SPItem *> &filtered);
+
+void filterConnectors(GSList const *const items, std::list<SPItem *> &filtered);
+
#endif // SEEN_GRAPHLAYOUT_H
diff --git a/src/helper-fns.h b/src/helper-fns.h
index 699fbbe11..2f1829c37 100644
--- a/src/helper-fns.h
+++ b/src/helper-fns.h
@@ -10,7 +10,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <string.h>
+#include <cstring>
#include <vector>
#include <sstream>
@@ -63,34 +63,6 @@ inline bool helperfns_read_bool(gchar const *value, bool default_value){
* the function can only be used to convert numbers as given by gui elements that use localized representation
* numbers are delimeted by space
* @param value ascii representation of the number
- * @param size number of elements in string
- * @return the vector of the converted numbers
- */
-/*
-inline std::vector<gdouble> helperfns_read_vector(const gchar* value, int size){
- std::vector<gdouble> v(size, (gdouble) 0);
- std::istringstream is(value);
- for(int i = 0; i < size; i++){
- std::string str;
- is >> str;
- char *end;
-
- double ret = g_ascii_strtod(str.c_str(), &end);
- if (*end) {
- g_warning("helper-fns::helperfns_read_vector() Unable to convert \"%s\" to number", str.c_str());
- // We could leave this out, too. If strtod can't convert
- // anything, it will return zero.
- ret = 0;
- }
- v[i] = ret;
- };
- return v;
-}
-*/
-/* convert ascii representation to double
- * the function can only be used to convert numbers as given by gui elements that use localized representation
- * numbers are delimeted by space
- * @param value ascii representation of the number
* @return the vector of the converted numbers
*/
inline std::vector<gdouble> helperfns_read_vector(const gchar* value){
diff --git a/src/inkscape-version.h b/src/inkscape-version.h
index 791351184..ff219047e 100644
--- a/src/inkscape-version.h
+++ b/src/inkscape-version.h
@@ -16,7 +16,7 @@
namespace Inkscape {
-extern gchar const *version_string; ///< Full version string
+extern char const *version_string; ///< Full version string
} // namespace Inkscape
diff --git a/src/interface.cpp b/src/interface.cpp
index 1cbeb44a3..3b5958a33 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -149,7 +149,7 @@ static void injectRenamedIcons();
static const int MIN_ONSCREEN_DISTANCE = 50;
void
-sp_create_window(SPViewWidget *vw, gboolean editable)
+sp_create_window(SPViewWidget *vw, bool editable)
{
g_return_if_fail(vw != NULL);
g_return_if_fail(SP_IS_VIEW_WIDGET(vw));
diff --git a/src/interface.h b/src/interface.h
index 215a3bfc9..2418223ae 100644
--- a/src/interface.h
+++ b/src/interface.h
@@ -17,13 +17,9 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H
-#include <glibmm/threads.h>
-#endif
+//#ifdef HAVE_CONFIG_H
+//# include <config.h>
+//#endif
#include <gtkmm/menu.h>
@@ -50,7 +46,7 @@ class View;
/**
* Create a new document window.
*/
-void sp_create_window (SPViewWidget *vw, gboolean editable);
+void sp_create_window (SPViewWidget *vw, bool editable);
/**
* \param widget unused
@@ -87,15 +83,15 @@ unsigned int sp_ui_close_all (void);
GtkWidget *sp_ui_main_menubar (Inkscape::UI::View::View *view);
void sp_menu_append_recent_documents (GtkWidget *menu);
-void sp_ui_dialog_title_string (Inkscape::Verb * verb, gchar* c);
+void sp_ui_dialog_title_string (Inkscape::Verb * verb, char* c);
Glib::ustring getLayoutPrefPath( Inkscape::UI::View::View *view );
/**
*
*/
-void sp_ui_error_dialog (const gchar * message);
-bool sp_ui_overwrite_file (const gchar * filename);
+void sp_ui_error_dialog (char const* message);
+bool sp_ui_overwrite_file (char const* filename);
/**
diff --git a/src/isinf.h b/src/isinf.h
index b4c56f79d..8d590b972 100644
--- a/src/isinf.h
+++ b/src/isinf.h
@@ -2,7 +2,7 @@
#define __ISINF_H__
/*
- * Fix for missing std::isnormal with SOLARIS8/GCC3.2
+ * Fix for missing std::isinf with SOLARIS8/GCC3.2
*/
#if defined (SOLARIS)
diff --git a/src/isnormal.h b/src/isnormal.h
deleted file mode 100644
index d53105926..000000000
--- a/src/isnormal.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef __ISNORMAL_H__
-#define __ISNORMAL_H__
-
-/*
- * Fix for missing std::isnormal with SOLARIS8/GCC3.2
- */
-
-#if defined (SOLARIS)
-
- #include <ieeefp.h>
- #define isnormal(x) (fpclass(x) >= FP_NZERO)
-
-#else
-
- using std::isnormal;
-
-#endif
-
-#endif /* __ISNORMAL_H__ */
diff --git a/src/knot-holder-entity.h b/src/knot-holder-entity.h
index dde60f515..43ab25e5c 100644
--- a/src/knot-holder-entity.h
+++ b/src/knot-holder-entity.h
@@ -14,11 +14,11 @@
* Released under GNU GPL
*/
-#include <glib.h>
-#include "knot.h"
#include <2geom/forward.h>
-#include "snapper.h"
+
#include "display/sp-canvas-item.h"
+#include "knot.h"
+#include "snapper.h"
class SPItem;
class SPKnot;
@@ -31,7 +31,7 @@ namespace LivePathEffect {
} // namespace LivePathEffect
} // namespace Inkscape
-typedef void (* SPKnotHolderSetFunc) (SPItem *item, Geom::Point const &p, Geom::Point const &origin, guint state);
+typedef void (* SPKnotHolderSetFunc) (SPItem *item, Geom::Point const &p, Geom::Point const &origin, unsigned int state);
typedef Geom::Point (* SPKnotHolderGetFunc) (SPItem *item);
/**
@@ -50,22 +50,22 @@ public:
virtual void create(SPDesktop *desktop, SPItem *item, KnotHolder *parent,
Inkscape::ControlType type = Inkscape::CTRL_TYPE_UNKNOWN,
- const gchar *tip = "",
+ char const*tip = "",
SPKnotShapeType shape = SP_KNOT_SHAPE_DIAMOND,
SPKnotModeType mode = SP_KNOT_MODE_XOR,
guint32 color = 0xffffff00);
/* the get/set/click handlers are virtual functions; each handler class for a knot
should be derived from KnotHolderEntity and override these functions */
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state) = 0;
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state) = 0;
virtual Geom::Point knot_get() const = 0;
- virtual void knot_click(guint /*state*/) {}
+ virtual void knot_click(unsigned int /*state*/) {}
void update_knot();
//private:
- Geom::Point snap_knot_position(Geom::Point const &p, guint state);
- Geom::Point snap_knot_position_constrained(Geom::Point const &p, Inkscape::Snapper::SnapConstraint const &constraint, guint state);
+ Geom::Point snap_knot_position(Geom::Point const &p, unsigned int state);
+ Geom::Point snap_knot_position_constrained(Geom::Point const &p, Inkscape::Snapper::SnapConstraint const &constraint, unsigned int state);
SPKnot *knot;
SPItem *item;
@@ -77,11 +77,11 @@ public:
static int counter;
/** Connection to \a knot's "moved" signal. */
- guint handler_id;
+ unsigned int handler_id;
/** Connection to \a knot's "clicked" signal. */
- guint _click_handler_id;
+ unsigned int _click_handler_id;
/** Connection to \a knot's "ungrabbed" signal. */
- guint _ungrab_handler_id;
+ unsigned int _ungrab_handler_id;
private:
sigc::connection _moved_connection;
@@ -103,7 +103,7 @@ class PatternKnotHolderEntityXY : public KnotHolderEntity {
public:
PatternKnotHolderEntityXY(bool fill) : KnotHolderEntity(), _fill(fill) {}
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
private:
// true if the entity tracks fill, false for stroke
bool _fill;
@@ -113,7 +113,7 @@ class PatternKnotHolderEntityAngle : public KnotHolderEntity {
public:
PatternKnotHolderEntityAngle(bool fill) : KnotHolderEntity(), _fill(fill) {}
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
private:
bool _fill;
};
@@ -122,7 +122,7 @@ class PatternKnotHolderEntityScale : public KnotHolderEntity {
public:
PatternKnotHolderEntityScale(bool fill) : KnotHolderEntity(), _fill(fill) {}
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
private:
bool _fill;
};
diff --git a/src/knot.h b/src/knot.h
index b79614bcb..e3ad98e66 100644
--- a/src/knot.h
+++ b/src/knot.h
@@ -14,15 +14,19 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <gdk/gdk.h>
#include <2geom/point.h>
-#include "knot-enums.h"
#include <sigc++/sigc++.h>
+
+#include "knot-enums.h"
#include "enums.h"
class SPDesktop;
-struct SPCanvasItem;
class SPItem;
+struct SPCanvasItem;
+
+typedef struct _GdkCursor GdkCursor;
+typedef union _GdkEvent GdkEvent;
+typedef unsigned int guint32;
#define SP_KNOT(obj) (dynamic_cast<SPKnot*>(static_cast<SPKnot*>(obj)))
#define SP_IS_KNOT(obj) (dynamic_cast<const SPKnot*>(static_cast<const SPKnot*>(obj)) != NULL)
@@ -36,19 +40,17 @@ class SPItem;
*/
class SPKnot {
public:
- SPKnot(SPDesktop *desktop, gchar const *tip);
+ SPKnot(SPDesktop *desktop, char const *tip);
virtual ~SPKnot();
-
- int ref_count;
-
+ int ref_count; // FIXME encapsulation
SPDesktop *desktop; /**< Desktop we are on. */
SPCanvasItem *item; /**< Our CanvasItem. */
SPItem *owner; /**< Optional Owner Item */
- guint flags;
+ unsigned int flags;
- guint size; /**< Always square. */
+ unsigned int size; /**< Always square. */
Geom::Point pos; /**< Our desktop coordinates. */
Geom::Point grabbed_rel_pos; /**< Grabbed relative position. */
Geom::Point drag_origin; /**< Origin of drag. */
@@ -59,39 +61,41 @@ public:
guint32 fill[SP_KNOT_VISIBLE_STATES];
guint32 stroke[SP_KNOT_VISIBLE_STATES];
- guchar *image[SP_KNOT_VISIBLE_STATES];
+ unsigned char *image[SP_KNOT_VISIBLE_STATES];
GdkCursor *cursor[SP_KNOT_VISIBLE_STATES];
GdkCursor *saved_cursor;
- gpointer pixbuf;
+ void* pixbuf;
- gchar *tip;
+ char *tip;
- gulong _event_handler_id;
+ unsigned long _event_handler_id;
double pressure; /**< The tablet pen pressure when the knot is being dragged. */
- sigc::signal<void, SPKnot *, guint> click_signal;
- sigc::signal<void, SPKnot*, guint> doubleclicked_signal;
- sigc::signal<void, SPKnot*, guint> grabbed_signal;
- sigc::signal<void, SPKnot *, guint> ungrabbed_signal;
- sigc::signal<void, SPKnot *, Geom::Point const &, guint> moved_signal;
+ // FIXME: signals should NOT need to emit the object they came from, the callee should
+ // be able to figure that out
+ sigc::signal<void, SPKnot *, unsigned int> click_signal;
+ sigc::signal<void, SPKnot*, unsigned int> doubleclicked_signal;
+ sigc::signal<void, SPKnot*, unsigned int> grabbed_signal;
+ sigc::signal<void, SPKnot *, unsigned int> ungrabbed_signal;
+ sigc::signal<void, SPKnot *, Geom::Point const &, unsigned int> moved_signal;
sigc::signal<bool, SPKnot*, GdkEvent*> event_signal;
- sigc::signal<bool, SPKnot*, Geom::Point*, guint> request_signal;
+ sigc::signal<bool, SPKnot*, Geom::Point*, unsigned int> request_signal;
//TODO: all the members above should eventualle become private, accessible via setters/getters
- void setSize(guint i);
- void setShape(guint i);
- void setAnchor(guint i);
- void setMode(guint i);
- void setPixbuf(gpointer p);
+ void setSize(unsigned int i);
+ void setShape(unsigned int i);
+ void setAnchor(unsigned int i);
+ void setMode(unsigned int i);
+ void setPixbuf(void* p);
void setFill(guint32 normal, guint32 mouseover, guint32 dragging);
void setStroke(guint32 normal, guint32 mouseover, guint32 dragging);
- void setImage(guchar* normal, guchar* mouseover, guchar* dragging);
+ void setImage(unsigned char* normal, unsigned char* mouseover, unsigned char* dragging);
void setCursor(GdkCursor* normal, GdkCursor* mouseover, GdkCursor* dragging);
@@ -108,7 +112,7 @@ public:
/**
* Set flag in knot, with side effects.
*/
- void setFlag(guint flag, bool set);
+ void setFlag(unsigned int flag, bool set);
/**
* Update knot's pixbuf and set its control state.
@@ -118,17 +122,17 @@ public:
/**
* Request or set new position for knot.
*/
- void requestPosition(Geom::Point const &pos, guint state);
+ void requestPosition(Geom::Point const &pos, unsigned int state);
/**
* Update knot for dragging and tell canvas an item was grabbed.
*/
- void startDragging(Geom::Point const &p, gint x, gint y, guint32 etime);
+ void startDragging(Geom::Point const &p, int x, int y, guint32 etime);
/**
* Move knot to new position and emits "moved" signal.
*/
- void setPosition(Geom::Point const &p, guint state);
+ void setPosition(Geom::Point const &p, unsigned int state);
/**
* Move knot to new position, without emitting a MOVED signal.
diff --git a/src/knotholder.h b/src/knotholder.h
index dc2300105..d33adb610 100644
--- a/src/knotholder.h
+++ b/src/knotholder.h
@@ -17,7 +17,6 @@
*
*/
-#include <glib.h>
#include <2geom/forward.h>
#include <list>
#include <sigc++/connection.h>
@@ -47,9 +46,9 @@ public:
void update_knots();
- void knot_moved_handler(SPKnot *knot, Geom::Point const &p, guint state);
- void knot_clicked_handler(SPKnot *knot, guint state);
- void knot_ungrabbed_handler(SPKnot *knot, guint);
+ void knot_moved_handler(SPKnot *knot, Geom::Point const &p, unsigned int state);
+ void knot_clicked_handler(SPKnot *knot, unsigned int state);
+ void knot_ungrabbed_handler(SPKnot *knot, unsigned int);
void add(KnotHolderEntity *e);
@@ -76,7 +75,7 @@ protected:
SPKnotHolderReleasedFunc released;
- gboolean local_change; ///< if true, no need to recreate knotholder if repr was changed.
+ bool local_change; ///< if true, no need to recreate knotholder if repr was changed.
bool dragging;
diff --git a/src/layer-manager.h b/src/layer-manager.h
index 1b69324d5..9eea68004 100644
--- a/src/layer-manager.h
+++ b/src/layer-manager.h
@@ -10,11 +10,12 @@
#ifndef SEEN_INKSCAPE_LAYER_MANAGER_H
#define SEEN_INKSCAPE_LAYER_MANAGER_H
+#include <vector>
+#include <map>
+
#include "document-subset.h"
#include "gc-finalized.h"
#include "gc-soft-ptr.h"
-#include <vector>
-#include <map>
class SPDesktop;
class SPDocument;
@@ -29,8 +30,8 @@ public:
virtual ~LayerManager();
void setCurrentLayer( SPObject* obj );
- void renameLayer( SPObject* obj, gchar const *label, bool uniquify );
- Glib::ustring getNextLayerName( SPObject* obj, gchar const *label);
+ void renameLayer( SPObject* obj, char const *label, bool uniquify );
+ Glib::ustring getNextLayerName( SPObject* obj, char const *label);
sigc::connection connectCurrentLayerChanged(const sigc::slot<void, SPObject *> & slot) {
return _layer_changed_signal.connect(slot);
@@ -44,7 +45,7 @@ private:
friend class LayerWatcher;
class LayerWatcher;
- void _objectModified( SPObject* obj, guint flags );
+ void _objectModified( SPObject* obj, unsigned int flags );
void _setDocument(SPDocument *document);
void _rebuild();
void _selectedLayerChanged(SPObject *layer);
diff --git a/src/layer-model.h b/src/layer-model.h
index 79b7fbe44..86aba63ef 100644
--- a/src/layer-model.h
+++ b/src/layer-model.h
@@ -22,12 +22,8 @@
*
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stddef.h>
#include <sigc++/sigc++.h>
+#include <cstddef>
class SPDocument;
class SPObject;
diff --git a/src/line-geometry.h b/src/line-geometry.h
index d7be9570c..a77d6e1f3 100644
--- a/src/line-geometry.h
+++ b/src/line-geometry.h
@@ -12,13 +12,14 @@
#ifndef SEEN_LINE_GEOMETRY_H
#define SEEN_LINE_GEOMETRY_H
+#include <2geom/point.h>
#include <boost/optional.hpp>
-#include "glib.h"
+
#include "axis-manip.h" // FIXME: This is only for Box3D::epsilon; move that to a better location
-#include "2geom/point.h"
#include "persp3d.h"
class SPDesktop;
+typedef unsigned int guint32;
namespace Box3D {
diff --git a/src/line-snapper.cpp b/src/line-snapper.cpp
index 930b7fca9..6122b133a 100644
--- a/src/line-snapper.cpp
+++ b/src/line-snapper.cpp
@@ -11,9 +11,10 @@
*/
#include <2geom/line.h>
+#include <cassert>
+
#include "line-snapper.h"
#include "snapped-line.h"
-//#include <gtk/gtk.h>
#include "snap.h"
Inkscape::LineSnapper::LineSnapper(SnapManager *sm, Geom::Coord const d) : Snapper(sm, d)
@@ -37,7 +38,7 @@ void Inkscape::LineSnapper::freeSnap(IntermSnapResults &isr,
Geom::Point const p1 = i->second; // point at guide/grid line
Geom::Point const p2 = p1 + Geom::rot90(i->first); // 2nd point at guide/grid line
// std::cout << " line through " << i->second << " with normal " << i->first;
- g_assert(i->first != Geom::Point(0,0)); // we cannot project on an linesegment of zero length
+ assert(i->first != Geom::Point(0,0)); // we cannot project on an linesegment of zero length
Geom::Point const p_proj = Geom::projection(p.getPoint(), Geom::Line(p1, p2));
Geom::Coord const dist = Geom::L2(p_proj - p.getPoint());
diff --git a/src/line-snapper.h b/src/line-snapper.h
index 4b165e0a5..b2fc3d389 100644
--- a/src/line-snapper.h
+++ b/src/line-snapper.h
@@ -12,10 +12,9 @@
#include "snapper.h"
-namespace Inkscape
-{
-class SnapCandidatePoint;
+namespace Inkscape {
+class SnapCandidatePoint;
/**
* Superclass for snappers to horizontal and vertical lines.
diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp
index 65bbcdad1..e466093d3 100644
--- a/src/live_effects/lpe-copy_rotate.cpp
+++ b/src/live_effects/lpe-copy_rotate.cpp
@@ -12,6 +12,7 @@
*/
#include <glibmm/i18n.h>
+#include <gdk/gdk.h>
#include "live_effects/lpe-copy_rotate.h"
#include "sp-shape.h"
diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp
index cac3a9347..938287c22 100644
--- a/src/live_effects/lpe-knot.cpp
+++ b/src/live_effects/lpe-knot.cpp
@@ -22,6 +22,7 @@
#include "knotholder.h"
#include <glibmm/i18n.h>
+#include <gdk/gdk.h>
#include <2geom/sbasis-to-bezier.h>
#include <2geom/sbasis.h>
diff --git a/src/live_effects/lpeobject-reference.h b/src/live_effects/lpeobject-reference.h
index b1ba1ee4e..374e715ec 100644
--- a/src/live_effects/lpeobject-reference.h
+++ b/src/live_effects/lpeobject-reference.h
@@ -9,10 +9,10 @@
* Released under GNU GPL, read the file 'COPYING' for more information.
*/
-#include <uri-references.h>
-#include <stddef.h>
#include <sigc++/sigc++.h>
+#include "uri-references.h"
+
namespace Inkscape {
namespace XML {
class Node;
@@ -33,7 +33,7 @@ public:
SPObject *owner;
// concerning the LPEObject that is refered to:
- gchar *lpeobject_href;
+ char *lpeobject_href;
Inkscape::XML::Node *lpeobject_repr;
LivePathEffectObject *lpeobject;
diff --git a/src/live_effects/lpeobject.h b/src/live_effects/lpeobject.h
index 9700024fe..2e62707e3 100644
--- a/src/live_effects/lpeobject.h
+++ b/src/live_effects/lpeobject.h
@@ -47,9 +47,9 @@ protected:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
virtual void release();
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, char const* value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
#endif
diff --git a/src/main-cmdlineact.h b/src/main-cmdlineact.h
index fe11357fa..c8ef64f10 100644
--- a/src/main-cmdlineact.h
+++ b/src/main-cmdlineact.h
@@ -15,20 +15,18 @@
* Released under GNU GPL v2.x, read the file 'COPYING' for more information
*/
-#include <glib.h>
-
namespace Inkscape {
class ActionContext;
class CmdLineAction {
bool _isVerb;
- gchar * _arg;
+ char * _arg;
static std::list <CmdLineAction *> _list;
public:
- CmdLineAction (bool isVerb, gchar const * arg);
+ CmdLineAction (bool isVerb, char const * arg);
virtual ~CmdLineAction ();
void doIt (ActionContext const & context);
diff --git a/src/marker.h b/src/marker.h
index 9eefcdf16..b58523251 100644
--- a/src/marker.h
+++ b/src/marker.h
@@ -1,5 +1,5 @@
-#ifndef __SP_MARKER_H__
-#define __SP_MARKER_H__
+#ifndef SEEN_SP_MARKER_H
+#define SEEN_SP_MARKER_H
/*
* SVG <marker> implementation
@@ -12,7 +12,6 @@
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-
/*
* This is quite similar in logic to <svg>
* Maybe we should merge them somehow (Lauris)
@@ -26,8 +25,9 @@ struct SPMarkerView;
#include <2geom/rect.h>
#include <2geom/affine.h>
-#include "svg/svg-length.h"
+
#include "enums.h"
+#include "svg/svg-length.h"
#include "sp-item-group.h"
#include "uri-references.h"
#include "viewbox.h"
@@ -93,7 +93,7 @@ Inkscape::DrawingItem *sp_marker_show_instance (SPMarker *marker, Inkscape::Draw
unsigned int key, unsigned int pos,
Geom::Affine const &base, float linewidth);
void sp_marker_hide (SPMarker *marker, unsigned int key);
-const gchar *generate_marker (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Point center, Geom::Affine move);
+const char *generate_marker (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Point center, Geom::Affine move);
SPObject *sp_marker_fork_if_necessary(SPObject *marker);
#endif
diff --git a/src/message-context.h b/src/message-context.h
index a92874d68..ea86c4ec0 100644
--- a/src/message-context.h
+++ b/src/message-context.h
@@ -14,8 +14,9 @@
#ifndef SEEN_INKSCAPE_MESSAGE_CONTEXT_H
#define SEEN_INKSCAPE_MESSAGE_CONTEXT_H
-#include <stdarg.h>
+#include <cstdarg>
#include <glib.h>
+
#include "message.h"
namespace Inkscape {
@@ -48,7 +49,7 @@ public:
* @param type the message type
* @param message the message text
*/
- void set(MessageType type, gchar const *message);
+ void set(MessageType type, char const *message);
/** @brief pushes a message on the stack using prinf-style formatting,
* and replacing our old message
@@ -56,7 +57,7 @@ public:
* @param type the message type
* @param format a printf-style formatting string
*/
- void setF(MessageType type, gchar const *format, ...) G_GNUC_PRINTF(3,4);
+ void setF(MessageType type, char const *format, ...) G_GNUC_PRINTF(3,4);
/** @brief pushes a message on the stack using printf-style formatting,
* and a stdarg argument list
@@ -65,7 +66,7 @@ public:
* @param format a printf-style formatting string
* @param args printf-style arguments
*/
- void setVF(MessageType type, gchar const *format, va_list args);
+ void setVF(MessageType type, char const *format, va_list args);
/** @brief pushes a message onto the stack for a brief period of time
* without disturbing our "current" message
@@ -73,7 +74,7 @@ public:
* @param type the message type
* @param message the message text
*/
- void flash(MessageType type, gchar const *message);
+ void flash(MessageType type, char const *message);
/** @brief pushes a message onto the stack for a brief period of time
* using printf-style formatting, without disturbing our current
@@ -82,7 +83,7 @@ public:
* @param type the message type
* @param format a printf-style formatting string
*/
- void flashF(MessageType type, gchar const *format, ...) G_GNUC_PRINTF(3,4);
+ void flashF(MessageType type, char const *format, ...) G_GNUC_PRINTF(3,4);
/** @brief pushes a message onto the stack for a brief period of time
* using printf-style formatting and a stdarg argument list;
@@ -92,7 +93,7 @@ public:
* @param format a printf-style formatting string
* @param args printf-style arguments
*/
- void flashVF(MessageType type, gchar const *format, va_list args);
+ void flashVF(MessageType type, char const *format, va_list args);
/** @brief removes our current message from the stack */
void clear();
diff --git a/src/message-stack.h b/src/message-stack.h
index 3b8307761..42bf4e8a7 100644
--- a/src/message-stack.h
+++ b/src/message-stack.h
@@ -16,11 +16,12 @@
#ifndef SEEN_INKSCAPE_MESSAGE_STACK_H
#define SEEN_INKSCAPE_MESSAGE_STACK_H
-#include <stddef.h>
-#include <sigc++/sigc++.h>
-#include <glib.h>
-#include <stdarg.h>
+#include <cstdarg>
+#include <cstddef>
+#include <glib.h> // G_GNUC_PRINTF is the only thing worth having from here
#include <glibmm/ustring.h>
+#include <sigc++/sigc++.h>
+
#include "gc-managed.h"
#include "gc-finalized.h"
#include "gc-anchored.h"
@@ -61,14 +62,14 @@ public:
/** @brief returns the text of the message currently at the top of
* the stack
*/
- gchar const *currentMessage() {
+ char const *currentMessage() {
return _messages ? _messages->message : NULL;
}
/** @brief connects to the "changed" signal which is emitted whenever
* the topmost message on the stack changes.
*/
- sigc::connection connectChanged(sigc::slot<void, MessageType, gchar const *> slot)
+ sigc::connection connectChanged(sigc::slot<void, MessageType, char const *> slot)
{
return _changed_signal.connect(slot);
}
@@ -80,7 +81,7 @@ public:
*
* @return the id of the pushed message
*/
- MessageId push(MessageType type, gchar const *message);
+ MessageId push(MessageType type, char const *message);
/** @brief pushes a message onto the stack using printf-like formatting
*
@@ -89,7 +90,7 @@ public:
*
* @return the id of the pushed message
*/
- MessageId pushF(MessageType type, gchar const *format, ...) G_GNUC_PRINTF(3,4);
+ MessageId pushF(MessageType type, char const *format, ...) G_GNUC_PRINTF(3,4);
/** @brief pushes a message onto the stack using printf-like formatting,
* using a stdarg argument list
@@ -100,7 +101,7 @@ public:
*
* @return the id of the pushed message
*/
- MessageId pushVF(MessageType type, gchar const *format, va_list args);
+ MessageId pushVF(MessageType type, char const *format, va_list args);
/** @brief removes a message from the stack, given its id
*
@@ -119,7 +120,7 @@ public:
*
* @return the id of the pushed message
*/
- MessageId flash(MessageType type, gchar const *message);
+ MessageId flash(MessageType type, char const *message);
/**
* Temporarily pushes a message onto the stack.
@@ -140,7 +141,7 @@ public:
*
* @return the id of the pushed message
*/
- MessageId flashF(MessageType type, gchar const *format, ...) G_GNUC_PRINTF(3,4);
+ MessageId flashF(MessageType type, char const *format, ...) G_GNUC_PRINTF(3,4);
/** @brief temporarily pushes a message onto the stack using
* printf-like formatting, using a stdarg argument list
@@ -151,7 +152,7 @@ public:
*
* @return the id of the pushed message
*/
- MessageId flashVF(MessageType type, gchar const *format, va_list args);
+ MessageId flashVF(MessageType type, char const *format, va_list args);
private:
struct Message {
@@ -167,13 +168,13 @@ private:
void operator=(MessageStack const &); // no assign
/// pushes a message onto the stack with an optional timeout
- MessageId _push(MessageType type, guint lifetime, gchar const *message);
+ MessageId _push(MessageType type, unsigned int lifetime, char const *message);
Message *_discard(Message *m); ///< frees a message struct and returns the next such struct in the list
void _emitChanged(); ///< emits the "changed" signal
- static gboolean _timeout(gpointer data); ///< callback to expire flashed messages
+ static int _timeout(void* data); ///< callback to expire flashed messages
- sigc::signal<void, MessageType, gchar const *> _changed_signal;
+ sigc::signal<void, MessageType, char const *> _changed_signal;
Message *_messages; ///< the stack of messages as a linked list
MessageId _next_id; ///< the next message id to assign
};
diff --git a/src/number-opt-number.h b/src/number-opt-number.h
index d9ab56102..f6fe584f9 100644
--- a/src/number-opt-number.h
+++ b/src/number-opt-number.h
@@ -13,27 +13,23 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include <glib.h>
#include <glib/gprintf.h>
-//todo: use glib instead of stdlib
-#include <stdlib.h>
+#include <cstdlib>
+
#include "svg/stringstream.h"
class NumberOptNumber {
public:
- gfloat number;
+ float number;
- gfloat optNumber;
+ float optNumber;
- guint _set : 1;
+ unsigned int _set : 1;
- guint optNumber_set : 1;
+ unsigned int optNumber_set : 1;
NumberOptNumber()
{
@@ -44,27 +40,27 @@ public:
optNumber_set = FALSE;
}
- gfloat getNumber()
+ float getNumber()
{
if(_set)
return number;
return -1;
}
- gfloat getOptNumber()
+ float getOptNumber()
{
if(optNumber_set)
return optNumber;
return -1;
}
- void setOptNumber(gfloat num)
+ void setOptNumber(float num)
{
optNumber_set = true;
optNumber = num;
}
- void setNumber(gfloat num)
+ void setNumber(float num)
{
_set = true;
number = num;
@@ -78,7 +74,7 @@ public:
return _set;
}
- gchar *getValueString()
+ char *getValueString()
{
Inkscape::SVGOStringStream os;
@@ -96,12 +92,12 @@ public:
return g_strdup(os.str().c_str());
}
- void set(gchar const *str)
+ void set(char const *str)
{
if(!str)
return;
- gchar **values = g_strsplit(str, " ", 2);
+ char **values = g_strsplit(str, " ", 2);
if( values[0] != NULL )
{
diff --git a/src/object-edit.cpp b/src/object-edit.cpp
index fe22f6c1c..14a5bd3d5 100644
--- a/src/object-edit.cpp
+++ b/src/object-edit.cpp
@@ -96,33 +96,33 @@ KnotHolder *createKnotHolder(SPItem *item, SPDesktop *desktop)
class RectKnotHolderEntityRX : public KnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual void knot_click(guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
+ virtual void knot_click(unsigned int state);
};
/* handle for vertical rounding radius */
class RectKnotHolderEntityRY : public KnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual void knot_click(guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
+ virtual void knot_click(unsigned int state);
};
/* handle for width/height adjustment */
class RectKnotHolderEntityWH : public KnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
protected:
- void set_internal(Geom::Point const &p, Geom::Point const &origin, guint state);
+ void set_internal(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
};
/* handle for x/y adjustment */
class RectKnotHolderEntityXY : public KnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
};
Geom::Point
@@ -134,7 +134,7 @@ RectKnotHolderEntityRX::knot_get() const
}
void
-RectKnotHolderEntityRX::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint state)
+RectKnotHolderEntityRX::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, unsigned int state)
{
SPRect *rect = SP_RECT(item);
@@ -159,7 +159,7 @@ RectKnotHolderEntityRX::knot_set(Geom::Point const &p, Geom::Point const &/*orig
}
void
-RectKnotHolderEntityRX::knot_click(guint state)
+RectKnotHolderEntityRX::knot_click(unsigned int state)
{
SPRect *rect = SP_RECT(item);
@@ -183,7 +183,7 @@ RectKnotHolderEntityRY::knot_get() const
}
void
-RectKnotHolderEntityRY::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint state)
+RectKnotHolderEntityRY::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, unsigned int state)
{
SPRect *rect = SP_RECT(item);
@@ -217,7 +217,7 @@ RectKnotHolderEntityRY::knot_set(Geom::Point const &p, Geom::Point const &/*orig
}
void
-RectKnotHolderEntityRY::knot_click(guint state)
+RectKnotHolderEntityRY::knot_click(unsigned int state)
{
SPRect *rect = SP_RECT(item);
@@ -255,7 +255,7 @@ RectKnotHolderEntityWH::knot_get() const
}
void
-RectKnotHolderEntityWH::set_internal(Geom::Point const &p, Geom::Point const &origin, guint state)
+RectKnotHolderEntityWH::set_internal(Geom::Point const &p, Geom::Point const &origin, unsigned int state)
{
SPRect *rect = SP_RECT(item);
@@ -327,7 +327,7 @@ RectKnotHolderEntityWH::set_internal(Geom::Point const &p, Geom::Point const &or
}
void
-RectKnotHolderEntityWH::knot_set(Geom::Point const &p, Geom::Point const &origin, guint state)
+RectKnotHolderEntityWH::knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state)
{
set_internal(p, origin, state);
update_knot();
@@ -342,7 +342,7 @@ RectKnotHolderEntityXY::knot_get() const
}
void
-RectKnotHolderEntityXY::knot_set(Geom::Point const &p, Geom::Point const &origin, guint state)
+RectKnotHolderEntityXY::knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state)
{
SPRect *rect = SP_RECT(item);
@@ -468,10 +468,10 @@ RectKnotHolder::RectKnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolderRel
class Box3DKnotHolderEntity : public KnotHolderEntity {
public:
virtual Geom::Point knot_get() const = 0;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state) = 0;
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state) = 0;
Geom::Point knot_get_generic(SPItem *item, unsigned int knot_id) const;
- void knot_set_generic(SPItem *item, unsigned int knot_id, Geom::Point const &p, guint state);
+ void knot_set_generic(SPItem *item, unsigned int knot_id, Geom::Point const &p, unsigned int state);
};
Geom::Point
@@ -481,7 +481,7 @@ Box3DKnotHolderEntity::knot_get_generic(SPItem *item, unsigned int knot_id) cons
}
void
-Box3DKnotHolderEntity::knot_set_generic(SPItem *item, unsigned int knot_id, Geom::Point const &new_pos, guint state)
+Box3DKnotHolderEntity::knot_set_generic(SPItem *item, unsigned int knot_id, Geom::Point const &new_pos, unsigned int state)
{
Geom::Point const s = snap_knot_position(new_pos, state);
@@ -504,55 +504,55 @@ Box3DKnotHolderEntity::knot_set_generic(SPItem *item, unsigned int knot_id, Geom
class Box3DKnotHolderEntity0 : public Box3DKnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
};
class Box3DKnotHolderEntity1 : public Box3DKnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
};
class Box3DKnotHolderEntity2 : public Box3DKnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
};
class Box3DKnotHolderEntity3 : public Box3DKnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
};
class Box3DKnotHolderEntity4 : public Box3DKnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
};
class Box3DKnotHolderEntity5 : public Box3DKnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
};
class Box3DKnotHolderEntity6 : public Box3DKnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
};
class Box3DKnotHolderEntity7 : public Box3DKnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
};
class Box3DKnotHolderEntityCenter : public KnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
};
Geom::Point
@@ -610,55 +610,55 @@ Box3DKnotHolderEntityCenter::knot_get() const
}
void
-Box3DKnotHolderEntity0::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity0::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, unsigned int state)
{
knot_set_generic(item, 0, new_pos, state);
}
void
-Box3DKnotHolderEntity1::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity1::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, unsigned int state)
{
knot_set_generic(item, 1, new_pos, state);
}
void
-Box3DKnotHolderEntity2::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity2::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, unsigned int state)
{
knot_set_generic(item, 2, new_pos, state);
}
void
-Box3DKnotHolderEntity3::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity3::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, unsigned int state)
{
knot_set_generic(item, 3, new_pos, state);
}
void
-Box3DKnotHolderEntity4::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity4::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, unsigned int state)
{
knot_set_generic(item, 4, new_pos, state);
}
void
-Box3DKnotHolderEntity5::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity5::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, unsigned int state)
{
knot_set_generic(item, 5, new_pos, state);
}
void
-Box3DKnotHolderEntity6::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity6::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, unsigned int state)
{
knot_set_generic(item, 6, new_pos, state);
}
void
-Box3DKnotHolderEntity7::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, guint state)
+Box3DKnotHolderEntity7::knot_set(Geom::Point const &new_pos, Geom::Point const &/*origin*/, unsigned int state)
{
knot_set_generic(item, 7, new_pos, state);
}
void
-Box3DKnotHolderEntityCenter::knot_set(Geom::Point const &new_pos, Geom::Point const &origin, guint state)
+Box3DKnotHolderEntityCenter::knot_set(Geom::Point const &new_pos, Geom::Point const &origin, unsigned int state)
{
Geom::Point const s = snap_knot_position(new_pos, state);
@@ -739,29 +739,29 @@ Box3DKnotHolder::Box3DKnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolderR
class ArcKnotHolderEntityStart : public KnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual void knot_click(guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
+ virtual void knot_click(unsigned int state);
};
class ArcKnotHolderEntityEnd : public KnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual void knot_click(guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
+ virtual void knot_click(unsigned int state);
};
class ArcKnotHolderEntityRX : public KnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual void knot_click(guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
+ virtual void knot_click(unsigned int state);
};
class ArcKnotHolderEntityRY : public KnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual void knot_click(guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
+ virtual void knot_click(unsigned int state);
};
/*
@@ -783,7 +783,7 @@ sp_genericellipse_side(SPGenericEllipse *ellipse, Geom::Point const &p)
}
void
-ArcKnotHolderEntityStart::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint state)
+ArcKnotHolderEntityStart::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, unsigned int state)
{
int snaps = Inkscape::Preferences::get()->getInt("/options/rotationsnapsperpi/value", 12);
@@ -813,7 +813,7 @@ ArcKnotHolderEntityStart::knot_get() const
}
void
-ArcKnotHolderEntityStart::knot_click(guint state)
+ArcKnotHolderEntityStart::knot_click(unsigned int state)
{
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
@@ -824,7 +824,7 @@ ArcKnotHolderEntityStart::knot_click(guint state)
}
void
-ArcKnotHolderEntityEnd::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint state)
+ArcKnotHolderEntityEnd::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, unsigned int state)
{
int snaps = Inkscape::Preferences::get()->getInt("/options/rotationsnapsperpi/value", 12);
@@ -855,7 +855,7 @@ ArcKnotHolderEntityEnd::knot_get() const
void
-ArcKnotHolderEntityEnd::knot_click(guint state)
+ArcKnotHolderEntityEnd::knot_click(unsigned int state)
{
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
@@ -867,7 +867,7 @@ ArcKnotHolderEntityEnd::knot_click(guint state)
void
-ArcKnotHolderEntityRX::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint state)
+ArcKnotHolderEntityRX::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, unsigned int state)
{
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
@@ -891,7 +891,7 @@ ArcKnotHolderEntityRX::knot_get() const
}
void
-ArcKnotHolderEntityRX::knot_click(guint state)
+ArcKnotHolderEntityRX::knot_click(unsigned int state)
{
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
@@ -902,7 +902,7 @@ ArcKnotHolderEntityRX::knot_click(guint state)
}
void
-ArcKnotHolderEntityRY::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint state)
+ArcKnotHolderEntityRY::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, unsigned int state)
{
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
@@ -926,7 +926,7 @@ ArcKnotHolderEntityRY::knot_get() const
}
void
-ArcKnotHolderEntityRY::knot_click(guint state)
+ArcKnotHolderEntityRY::knot_click(unsigned int state)
{
SPGenericEllipse *ge = SP_GENERICELLIPSE(item);
@@ -975,19 +975,19 @@ ArcKnotHolder::ArcKnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolderRelea
class StarKnotHolderEntity1 : public KnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual void knot_click(guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
+ virtual void knot_click(unsigned int state);
};
class StarKnotHolderEntity2 : public KnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual void knot_click(guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
+ virtual void knot_click(unsigned int state);
};
void
-StarKnotHolderEntity1::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint state)
+StarKnotHolderEntity1::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, unsigned int state)
{
SPStar *star = SP_STAR(item);
@@ -1013,7 +1013,7 @@ StarKnotHolderEntity1::knot_set(Geom::Point const &p, Geom::Point const &/*origi
}
void
-StarKnotHolderEntity2::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint state)
+StarKnotHolderEntity2::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, unsigned int state)
{
SPStar *star = SP_STAR(item);
@@ -1063,7 +1063,7 @@ StarKnotHolderEntity2::knot_get() const
}
static void
-sp_star_knot_click(SPItem *item, guint state)
+sp_star_knot_click(SPItem *item, unsigned int state)
{
SPStar *star = SP_STAR(item);
@@ -1080,13 +1080,13 @@ sp_star_knot_click(SPItem *item, guint state)
}
void
-StarKnotHolderEntity1::knot_click(guint state)
+StarKnotHolderEntity1::knot_click(unsigned int state)
{
sp_star_knot_click(item, state);
}
void
-StarKnotHolderEntity2::knot_click(guint state)
+StarKnotHolderEntity2::knot_click(unsigned int state)
{
sp_star_knot_click(item, state);
}
@@ -1119,14 +1119,14 @@ StarKnotHolder::StarKnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolderRel
class SpiralKnotHolderEntityInner : public KnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual void knot_click(guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
+ virtual void knot_click(unsigned int state);
};
class SpiralKnotHolderEntityOuter : public KnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
};
@@ -1137,7 +1137,7 @@ public:
* [control] constrain inner arg to round per PI/4
*/
void
-SpiralKnotHolderEntityInner::knot_set(Geom::Point const &p, Geom::Point const &origin, guint state)
+SpiralKnotHolderEntityInner::knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state)
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
int snaps = prefs->getInt("/options/rotationsnapsperpi/value", 12);
@@ -1186,7 +1186,7 @@ SpiralKnotHolderEntityInner::knot_set(Geom::Point const &p, Geom::Point const &o
* [control] constrain inner arg to round per PI/4
*/
void
-SpiralKnotHolderEntityOuter::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint state)
+SpiralKnotHolderEntityOuter::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, unsigned int state)
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
int snaps = prefs->getInt("/options/rotationsnapsperpi/value", 12);
@@ -1276,7 +1276,7 @@ SpiralKnotHolderEntityOuter::knot_get() const
}
void
-SpiralKnotHolderEntityInner::knot_click(guint state)
+SpiralKnotHolderEntityInner::knot_click(unsigned int state)
{
SPSpiral *spiral = SP_SPIRAL(item);
@@ -1314,11 +1314,11 @@ SpiralKnotHolder::SpiralKnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolde
class OffsetKnotHolderEntity : public KnotHolderEntity {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
};
void
-OffsetKnotHolderEntity::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint /*state*/)
+OffsetKnotHolderEntity::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, unsigned int /*state*/)
{
SPOffset *offset = SP_OFFSET(item);
@@ -1357,7 +1357,7 @@ OffsetKnotHolder::OffsetKnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolde
class FlowtextKnotHolderEntity : public RectKnotHolderEntityWH {
public:
virtual Geom::Point knot_get() const;
- virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
+ virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state);
};
Geom::Point
@@ -1369,7 +1369,7 @@ FlowtextKnotHolderEntity::knot_get() const
}
void
-FlowtextKnotHolderEntity::knot_set(Geom::Point const &p, Geom::Point const &origin, guint state)
+FlowtextKnotHolderEntity::knot_set(Geom::Point const &p, Geom::Point const &origin, unsigned int state)
{
set_internal(p, origin, state);
}
diff --git a/src/object-hierarchy.cpp b/src/object-hierarchy.cpp
index f2bf177dc..f241da83d 100644
--- a/src/object-hierarchy.cpp
+++ b/src/object-hierarchy.cpp
@@ -9,6 +9,9 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <cstdio>
+#include <cassert>
+
#include "sp-object.h"
#include "object-hierarchy.h"
@@ -32,7 +35,7 @@ void ObjectHierarchy::clear() {
}
void ObjectHierarchy::setTop(SPObject *object) {
- g_return_if_fail(object != NULL);
+ if (object == NULL) { printf("Assertion object != NULL failed\n"); return; }
if ( top() == object ) {
return;
@@ -53,8 +56,8 @@ void ObjectHierarchy::setTop(SPObject *object) {
}
void ObjectHierarchy::_addTop(SPObject *senior, SPObject *junior) {
- g_assert(junior != NULL);
- g_assert(senior != NULL);
+ assert(junior != NULL);
+ assert(senior != NULL);
SPObject *object = junior->parent;
do {
@@ -64,7 +67,7 @@ void ObjectHierarchy::_addTop(SPObject *senior, SPObject *junior) {
}
void ObjectHierarchy::_addTop(SPObject *object) {
- g_assert(object != NULL);
+ assert(object != NULL);
_hierarchy.push_back(_attach(object));
_added_signal.emit(object);
}
@@ -82,7 +85,7 @@ void ObjectHierarchy::_trimAbove(SPObject *limit) {
}
void ObjectHierarchy::setBottom(SPObject *object) {
- g_return_if_fail(object != NULL);
+ if (object == NULL) { printf("assertion object != NULL failed\n"); return; }
if ( bottom() == object ) {
return;
@@ -125,8 +128,8 @@ void ObjectHierarchy::_trimBelow(SPObject *limit) {
}
void ObjectHierarchy::_addBottom(SPObject *senior, SPObject *junior) {
- g_assert(junior != NULL);
- g_assert(senior != NULL);
+ assert(junior != NULL);
+ assert(senior != NULL);
if ( junior != senior ) {
_addBottom(senior, junior->parent);
@@ -135,15 +138,15 @@ void ObjectHierarchy::_addBottom(SPObject *senior, SPObject *junior) {
}
void ObjectHierarchy::_addBottom(SPObject *object) {
- g_assert(object != NULL);
+ assert(object != NULL);
_hierarchy.push_front(_attach(object));
_added_signal.emit(object);
}
void ObjectHierarchy::_trim_for_release(SPObject *object) {
this->_trimBelow(object);
- g_assert(!this->_hierarchy.empty());
- g_assert(this->_hierarchy.front().object == object);
+ assert(!this->_hierarchy.empty());
+ assert(this->_hierarchy.front().object == object);
sp_object_ref(object, NULL);
this->_detach(this->_hierarchy.front());
diff --git a/src/object-hierarchy.h b/src/object-hierarchy.h
index 0343d850e..16004c81a 100644
--- a/src/object-hierarchy.h
+++ b/src/object-hierarchy.h
@@ -10,12 +10,11 @@
#ifndef SEEN_INKSCAPE_OBJECT_HIERARCHY_H
#define SEEN_INKSCAPE_OBJECT_HIERARCHY_H
+#include <cstddef>
#include <exception>
#include <list>
-#include <stddef.h>
#include <sigc++/connection.h>
#include <sigc++/signal.h>
-#include <glib.h>
class SPObject;
diff --git a/src/path-chemistry.h b/src/path-chemistry.h
index efc687b44..a2150440c 100644
--- a/src/path-chemistry.h
+++ b/src/path-chemistry.h
@@ -13,8 +13,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glib.h>
-
class SPDesktop;
class SPItem;
@@ -25,6 +23,9 @@ class Node;
} // namespace XML
} // namespace Inkscape
+typedef unsigned int guint32;
+typedef struct _GSList GSList;
+
void sp_selected_path_combine (SPDesktop *desktop);
void sp_selected_path_break_apart (SPDesktop *desktop);
// interactive=true only has an effect if desktop != NULL, i.e. if a GUI is available
diff --git a/src/path-prefix.h b/src/path-prefix.h
index be57ae354..6ef0ccbe9 100644
--- a/src/path-prefix.h
+++ b/src/path-prefix.h
@@ -10,15 +10,15 @@
* define'd directories, and instead should use only the paths defined here.
*
*/
-#ifndef _PATH_PREFIX_H_
-#define _PATH_PREFIX_H_
+#ifndef SEEN_PATH_PREFIX_H
+#define SEEN_PATH_PREFIX_H
#include "require-config.h" // INKSCAPE_DATADIR
#include "prefix.h"
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+//#ifdef __cplusplus
+//extern "C" {
+//#endif /* __cplusplus */
#ifdef ENABLE_BINRELOC
# define INKSCAPE_APPICONDIR BR_DATADIR( "/pixmaps" )
@@ -112,8 +112,8 @@ extern "C" {
# endif
#endif
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+//#ifdef __cplusplus
+//}
+//#endif /* __cplusplus */
#endif /* _PATH_PREFIX_H_ */
diff --git a/src/persp3d-reference.h b/src/persp3d-reference.h
index fa9eca5c9..cce497d94 100644
--- a/src/persp3d-reference.h
+++ b/src/persp3d-reference.h
@@ -10,9 +10,10 @@
* Released under GNU GPL, read the file 'COPYING' for more information.
*/
-#include "uri-references.h"
-#include <stddef.h>
+#include <cstddef>
#include <sigc++/sigc++.h>
+
+#include "uri-references.h"
#include "persp3d.h"
class SPObject;
@@ -35,7 +36,7 @@ public:
SPObject *owner;
// concerning the Persp3D (we only use SPBox3D) that is refered to:
- gchar *persp_href;
+ char *persp_href;
Inkscape::XML::Node *persp_repr;
Persp3D *persp;
diff --git a/src/persp3d.h b/src/persp3d.h
index bd3777a19..be5680bcb 100644
--- a/src/persp3d.h
+++ b/src/persp3d.h
@@ -1,5 +1,5 @@
-#ifndef __PERSP3D_H__
-#define __PERSP3D_H__
+#ifndef SEEN_PERSP3D_H
+#define SEEN_PERSP3D_H
/*
* Implementation of 3D perspectives as SPObjects
@@ -16,8 +16,9 @@
#define SP_IS_PERSP3D(obj) (dynamic_cast<const Persp3D*>((SPObject*)obj) != NULL)
#include <list>
-#include <vector>
#include <map>
+#include <vector>
+
#include "transf_mat_3x4.h"
#include "document.h"
#include "inkscape.h" // for SP_ACTIVE_DOCUMENT
@@ -64,11 +65,11 @@ protected:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
virtual void release();
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, char const* value);
virtual void update(SPCtx* ctx, unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
@@ -100,7 +101,7 @@ void persp3d_update_z_orders (Persp3D *persp);
inline unsigned int persp3d_num_boxes (Persp3D *persp) { return persp->perspective_impl->boxes.size(); }
std::list<SPBox3D *> persp3d_list_of_boxes(Persp3D *persp);
-bool persp3d_perspectives_coincide(const Persp3D *lhs, const Persp3D *rhs);
+bool persp3d_perspectives_coincide(Persp3D const *lhs, Persp3D const *rhs);
void persp3d_absorb(Persp3D *persp1, Persp3D *persp2);
Persp3D * persp3d_create_xml_element (SPDocument *document, Persp3DImpl *dup = NULL);
@@ -112,7 +113,7 @@ void persp3d_print_debugging_info (Persp3D *persp);
void persp3d_print_debugging_info_all(SPDocument *doc);
void persp3d_print_all_selected();
-void print_current_persp3d(gchar *func_name, Persp3D *persp);
+void print_current_persp3d(char *func_name, Persp3D *persp);
#endif /* __PERSP3D_H__ */
diff --git a/src/perspective-line.h b/src/perspective-line.h
index 57abaae9c..64f7d03bd 100644
--- a/src/perspective-line.h
+++ b/src/perspective-line.h
@@ -13,7 +13,6 @@
#define SEEN_PERSPECTIVE_LINE_H
#include "line-geometry.h"
-#include <glib.h>
class SPDesktop;
diff --git a/src/preferences-skeleton.h b/src/preferences-skeleton.h
index 734e8a582..66a3e47d4 100644
--- a/src/preferences-skeleton.h
+++ b/src/preferences-skeleton.h
@@ -1,8 +1,9 @@
#ifndef SEEN_PREFERENCES_SKELETON_H
#define SEEN_PREFERENCES_SKELETON_H
-#include <inkscape-version.h>
+#include "inkscape-version.h"
+// FIXME why is this here?
#ifdef N_
#undef N_
#endif
diff --git a/src/preferences.h b/src/preferences.h
index d5429815e..d5ae40e56 100644
--- a/src/preferences.h
+++ b/src/preferences.h
@@ -13,14 +13,16 @@
#ifndef INKSCAPE_PREFSTORE_H
#define INKSCAPE_PREFSTORE_H
-#include <map>
-#include <vector>
#include <climits>
#include <cfloat>
#include <glibmm/ustring.h>
+#include <map>
+#include <vector>
+
#include "xml/repr.h"
class SPCSSAttr;
+typedef unsigned int guint32;
namespace Inkscape {
diff --git a/src/print.h b/src/print.h
index bbf95b833..ab2bcc0a7 100644
--- a/src/print.h
+++ b/src/print.h
@@ -41,18 +41,18 @@ unsigned int sp_print_stroke(SPPrintContext *ctx, Geom::PathVector const &pathv,
Geom::OptRect const &pbox, Geom::OptRect const &dbox, Geom::OptRect const &bbox);
unsigned int sp_print_image_R8G8B8A8_N(SPPrintContext *ctx,
- guchar *px, unsigned int w, unsigned int h, unsigned int rs,
+ unsigned char *px, unsigned int w, unsigned int h, unsigned int rs,
Geom::Affine const &transform, SPStyle const *style);
unsigned int sp_print_text(SPPrintContext *ctx, char const *text, Geom::Point p,
SPStyle const *style);
-void sp_print_get_param(SPPrintContext *ctx, gchar *name, bool *value);
+void sp_print_get_param(SPPrintContext *ctx, char *name, bool *value);
/* UI */
void sp_print_document(Gtk::Window& parentWindow, SPDocument *doc);
-void sp_print_document_to_file(SPDocument *doc, gchar const *filename);
+void sp_print_document_to_file(SPDocument *doc, char const *filename);
#endif /* !PRINT_H_INKSCAPE */
diff --git a/src/profile-manager.h b/src/profile-manager.h
index be9446c17..54cd4a1da 100644
--- a/src/profile-manager.h
+++ b/src/profile-manager.h
@@ -9,9 +9,10 @@
#ifndef SEEN_INKSCAPE_PROFILE_MANAGER_H
#define SEEN_INKSCAPE_PROFILE_MANAGER_H
+#include <vector>
+
#include "document-subset.h"
#include "gc-finalized.h"
-#include <vector>
class SPDocument;
@@ -26,7 +27,7 @@ public:
ProfileManager(SPDocument *document);
~ProfileManager();
- ColorProfile* find(gchar const* name);
+ ColorProfile* find(char const* name);
private:
ProfileManager(ProfileManager const &); // no copy
diff --git a/src/proj_pt.h b/src/proj_pt.h
index 28ec0aca3..1ee4b7f14 100644
--- a/src/proj_pt.h
+++ b/src/proj_pt.h
@@ -13,7 +13,7 @@
#define SEEN_PROJ_PT_H
#include <2geom/point.h>
-#include <glib.h>
+#include <cstdio>
namespace Proj {
@@ -25,7 +25,7 @@ public:
Pt2 () { pt[0] = 0; pt[1] = 0; pt[2] = 1.0; } // we default to (0 : 0 : 1)
Pt2 (double x, double y, double w) { pt[0] = x; pt[1] = y; pt[2] = w; }
Pt2 (Geom::Point const &point) { pt[0] = point[Geom::X]; pt[1] = point[Geom::Y]; pt[2] = 1; }
- Pt2 (const gchar *coord_str);
+ Pt2 (const char *coord_str);
inline double operator[] (unsigned int index) const {
if (index > 2) { return Geom::infinity(); }
@@ -81,8 +81,8 @@ public:
void normalize();
Geom::Point affine();
inline bool is_finite() { return pt[2] != 0; } // FIXME: Should we allow for some tolerance?
- gchar *coord_string();
- inline void print(gchar const *s) const { g_print ("%s(%8.2f : %8.2f : %8.2f)\n", s, pt[0], pt[1], pt[2]); }
+ char *coord_string();
+ inline void print(char const *s) const { printf ("%s(%8.2f : %8.2f : %8.2f)\n", s, pt[0], pt[1], pt[2]); }
private:
double pt[3];
@@ -93,7 +93,7 @@ class Pt3 {
public:
Pt3 () { pt[0] = 0; pt[1] = 0; pt[2] = 0; pt[3] = 1.0; } // we default to (0 : 0 : 0 : 1)
Pt3 (double x, double y, double z, double w) { pt[0] = x; pt[1] = y; pt[2] = z; pt[3] = w; }
- Pt3 (const gchar *coord_str);
+ Pt3 (const char *coord_str);
inline bool operator== (Pt3 &rhs) {
normalize();
@@ -146,9 +146,9 @@ public:
}
void normalize();
inline bool is_finite() { return pt[3] != 0; } // FIXME: Should we allow for some tolerance?
- gchar *coord_string();
- inline void print(gchar const *s) const {
- g_print ("%s(%8.2f : %8.2f : %8.2f : %8.2f)\n", s, pt[0], pt[1], pt[2], pt[3]);
+ char *coord_string();
+ inline void print(char const *s) const {
+ printf ("%s(%8.2f : %8.2f : %8.2f : %8.2f)\n", s, pt[0], pt[1], pt[2], pt[3]);
}
private:
diff --git a/src/rdf.h b/src/rdf.h
index 3dde1cb48..c3ced1583 100644
--- a/src/rdf.h
+++ b/src/rdf.h
@@ -11,7 +11,6 @@
#ifndef SEEN_RDF_H
#define SEEN_RDF_H
-#include <glib.h>
#include <glibmm/i18n.h>
#include "document.h"
@@ -22,18 +21,18 @@
* \brief Holds license name/resource doubles for rdf_license_t entries
*/
struct rdf_double_t {
- gchar const *name;
- gchar const *resource;
+ char const *name;
+ char const *resource;
};
/**
* \brief Holds license name and RDF information
*/
struct rdf_license_t {
- gchar const *name; /* localized name of this license */
- gchar const *uri; /* URL for the RDF/Work/license element */
+ char const *name; /* localized name of this license */
+ char const *uri; /* URL for the RDF/Work/license element */
struct rdf_double_t *details; /* the license details */
-// gchar const *fragment; /* XML contents for the RDF/License tag */
+// char const *fragment; /* XML contents for the RDF/License tag */
};
extern rdf_license_t rdf_licenses [];
@@ -69,10 +68,10 @@ enum RDF_Editable {
*/
struct rdf_work_entity_t {
char const *name; /* unique name of this entity for internal reference */
- gchar const *title; /* localized title of this entity for data entry */
- gchar const *tag; /* namespace tag for the RDF/Work element */
+ char const *title; /* localized title of this entity for data entry */
+ char const *tag; /* namespace tag for the RDF/Work element */
RDFType datatype; /* how to extract/inject the RDF information */
- gchar const *tip; /* tool tip to explain the meaning of the entity */
+ char const *tip; /* tool tip to explain the meaning of the entity */
RDF_Format format; /* in what format is this data edited? */
RDF_Editable editable;/* in what way is the data editable? */
};
@@ -83,19 +82,19 @@ extern rdf_work_entity_t rdf_work_entities [];
* \brief Generic collection of RDF information for the RDF debug function
*/
struct rdf_t {
- gchar* work_title;
- gchar* work_date;
- gchar* work_creator;
- gchar* work_owner;
- gchar* work_publisher;
- gchar* work_type;
- gchar* work_source;
- gchar* work_subject;
- gchar* work_description;
+ char* work_title;
+ char* work_date;
+ char* work_creator;
+ char* work_owner;
+ char* work_publisher;
+ char* work_type;
+ char* work_source;
+ char* work_subject;
+ char* work_description;
struct rdf_license_t* license;
};
-struct rdf_work_entity_t * rdf_find_entity(gchar const * name);
+struct rdf_work_entity_t * rdf_find_entity(char const * name);
/**
* \brief Retrieves a known RDF/Work entity's contents from the document XML by name
@@ -114,7 +113,7 @@ const gchar * rdf_get_work_entity(SPDocument const * doc,
*/
unsigned int rdf_set_work_entity(SPDocument * doc,
struct rdf_work_entity_t * entity,
- const gchar * text);
+ const char * text);
/**
* \brief Attempts to match and retrieve a known RDF/License from the document XML
diff --git a/src/removeoverlap.h b/src/removeoverlap.h
index 1ba41572a..7109c9513 100644
--- a/src/removeoverlap.h
+++ b/src/removeoverlap.h
@@ -13,7 +13,7 @@
#ifndef SEEN_REMOVEOVERLAP_H
#define SEEN_REMOVEOVERLAP_H
-#include <glib.h>
+typedef struct _GSList GSList;
void removeoverlap(GSList const *items, double xGap, double yGap);
diff --git a/src/rubberband.h b/src/rubberband.h
index fbebe2b08..a7bc57145 100644
--- a/src/rubberband.h
+++ b/src/rubberband.h
@@ -10,17 +10,17 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <boost/optional.hpp>
-#include <vector>
#include <2geom/point.h>
#include <2geom/rect.h>
+#include <boost/optional.hpp>
+#include <vector>
/* fixme: do multidocument safe */
-class CtrlRect;
+class CtrlRect;
+class SPCurve;
+class SPDesktop;
struct SPCanvasItem;
-class SPCurve;
-class SPDesktop;
enum {
RUBBERBAND_MODE_RECT,
diff --git a/src/selcue.h b/src/selcue.h
index bcac7315f..d9b16b0f5 100644
--- a/src/selcue.h
+++ b/src/selcue.h
@@ -1,5 +1,5 @@
-#ifndef __SP_SELCUE_H__
-#define __SP_SELCUE_H__
+#ifndef SEEN_SP_SELCUE_H
+#define SEEN_SP_SELCUE_H
/*
* Helper object for showing selected items
@@ -13,8 +13,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <cstddef>
#include <list>
-#include <stddef.h>
#include <sigc++/sigc++.h>
class SPDesktop;
@@ -52,7 +52,7 @@ private:
void _updateItemBboxes();
void _updateItemBboxes(Inkscape::Preferences *prefs);
- void _updateItemBboxes(gint mode, int prefs_bbox);
+ void _updateItemBboxes(int mode, int prefs_bbox);
void _newItemBboxes();
void _newTextBaselines();
void _boundingBoxPrefsChanged(int prefs_bbox);
diff --git a/src/selection-chemistry.h b/src/selection-chemistry.h
index 01c35d65a..016a54b5c 100644
--- a/src/selection-chemistry.h
+++ b/src/selection-chemistry.h
@@ -17,21 +17,21 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <2geom/forward.h>
#include "sp-item.h"
-#include "2geom/forward.h"
-namespace Inkscape { class Selection; }
+class SPCSSAttr;
+class SPDesktop;
+typedef struct _GSList GSList;
namespace Inkscape {
+
+class Selection;
+
namespace LivePathEffect {
class PathParam;
}
-}
-class SPCSSAttr;
-class SPDesktop;
-
-namespace Inkscape {
class SelectionHelper {
public:
static void selectAll(SPDesktop *desktop);
@@ -108,21 +108,21 @@ void sp_selection_apply_affine(Inkscape::Selection *selection, Geom::Affine cons
void sp_selection_remove_transform (SPDesktop *desktop);
void sp_selection_scale_absolute (Inkscape::Selection *selection, double x0, double x1, double y0, double y1);
void sp_selection_scale_relative(Inkscape::Selection *selection, Geom::Point const &align, Geom::Scale const &scale);
-void sp_selection_rotate_relative (Inkscape::Selection *selection, Geom::Point const &center, gdouble angle);
+void sp_selection_rotate_relative (Inkscape::Selection *selection, Geom::Point const &center, double angle);
void sp_selection_skew_relative (Inkscape::Selection *selection, Geom::Point const &align, double dx, double dy);
void sp_selection_move_relative (Inkscape::Selection *selection, Geom::Point const &move, bool compensate = true);
void sp_selection_move_relative (Inkscape::Selection *selection, double dx, double dy);
void sp_selection_rotate_90 (SPDesktop *desktop, bool ccw);
-void sp_selection_rotate (Inkscape::Selection *selection, gdouble angle);
-void sp_selection_rotate_screen (Inkscape::Selection *selection, gdouble angle);
+void sp_selection_rotate (Inkscape::Selection *selection, double angle);
+void sp_selection_rotate_screen (Inkscape::Selection *selection, double angle);
-void sp_selection_scale (Inkscape::Selection *selection, gdouble grow);
-void sp_selection_scale_screen (Inkscape::Selection *selection, gdouble grow_pixels);
-void sp_selection_scale_times (Inkscape::Selection *selection, gdouble times);
+void sp_selection_scale (Inkscape::Selection *selection, double grow);
+void sp_selection_scale_screen (Inkscape::Selection *selection, double grow_pixels);
+void sp_selection_scale_times (Inkscape::Selection *selection, double times);
-void sp_selection_move (Inkscape::Selection *selection, gdouble dx, gdouble dy);
-void sp_selection_move_screen (Inkscape::Selection *selection, gdouble dx, gdouble dy);
+void sp_selection_move (Inkscape::Selection *selection, double dx, double dy);
+void sp_selection_move_screen (Inkscape::Selection *selection, double dx, double dy);
void sp_selection_item_next (SPDesktop *desktop);
void sp_selection_item_prev (SPDesktop *desktop);
diff --git a/src/selection-describer.h b/src/selection-describer.h
index b4174edd8..5514ce4b1 100644
--- a/src/selection-describer.h
+++ b/src/selection-describer.h
@@ -16,11 +16,10 @@
#include <sigc++/sigc++.h>
#include "message-context.h"
-namespace Inkscape { class Selection; }
-
namespace Inkscape {
class MessageStack;
+class Selection;
class SelectionDescriber : public sigc::trackable {
public:
@@ -29,7 +28,7 @@ public:
private:
void _updateMessageFromSelection(Inkscape::Selection *selection);
- void _selectionModified(Inkscape::Selection *selection, guint /*flags*/);
+ void _selectionModified(Inkscape::Selection *selection, unsigned int /*flags*/);
sigc::connection *_selection_changed_connection;
sigc::connection *_selection_modified_connection;
@@ -43,6 +42,7 @@ private:
}
#endif
+
/*
Local Variables:
mode:c++
diff --git a/src/selection.h b/src/selection.h
index ba38bec08..5964b20e8 100644
--- a/src/selection.h
+++ b/src/selection.h
@@ -30,6 +30,7 @@ class SPDesktop;
class SPItem;
class SPBox3D;
class Persp3D;
+typedef struct _GSList GSList;
namespace Inkscape {
class LayerModel;
@@ -256,10 +257,10 @@ public:
std::list<SPBox3D *> const box3DList(Persp3D *persp = NULL);
/** Returns the number of layers in which there are selected objects. */
- guint numberOfLayers();
+ unsigned int numberOfLayers();
/** Returns the number of parents to which the selected objects belong. */
- guint numberOfParents();
+ unsigned int numberOfParents();
/** Returns the bounding rectangle of the selection. */
Geom::OptRect bounds(SPItem::BBoxType type) const;
@@ -317,11 +318,11 @@ public:
* @return the resulting connection
*
*/
- sigc::connection connectModified(sigc::slot<void, Selection *, guint> const &slot)
+ sigc::connection connectModified(sigc::slot<void, Selection *, unsigned int> const &slot)
{
return _modified_signal.connect(slot);
}
- sigc::connection connectModifiedFirst(sigc::slot<void, Selection *, guint> const &slot)
+ sigc::connection connectModifiedFirst(sigc::slot<void, Selection *, unsigned int> const &slot)
{
return _modified_signal.slots().insert(_modified_signal.slots().begin(), slot);
}
@@ -333,12 +334,12 @@ private:
void operator=(Selection const &);
/** Issues modification notification signals. */
- static gboolean _emit_modified(Selection *selection);
+ static int _emit_modified(Selection *selection);
/** Schedules an item modification signal to be sent. */
- void _schedule_modified(SPObject *obj, guint flags);
+ void _schedule_modified(SPObject *obj, unsigned int flags);
/** Issues modified selection signal. */
- void _emitModified(guint flags);
+ void _emitModified(unsigned int flags);
/** Issues changed selection signal. */
void _emitChanged(bool persist_selection_context = false);
@@ -374,15 +375,15 @@ private:
LayerModel *_layers;
GC::soft_ptr<SPDesktop> _desktop;
SPObject* _selection_context;
- guint _flags;
- guint _idle;
+ unsigned int _flags;
+ unsigned int _idle;
std::map<SPObject *, sigc::connection> _modified_connections;
std::map<SPObject *, sigc::connection> _release_connections;
sigc::connection _context_release_connection;
sigc::signal<void, Selection *> _changed_signal;
- sigc::signal<void, Selection *, guint> _modified_signal;
+ sigc::signal<void, Selection *, unsigned int> _modified_signal;
};
}
diff --git a/src/seltrans-handles.h b/src/seltrans-handles.h
index 740729a6e..ebd5758c8 100644
--- a/src/seltrans-handles.h
+++ b/src/seltrans-handles.h
@@ -14,11 +14,13 @@
#include <2geom/forward.h>
#include <gdk/gdk.h>
+
#include "enums.h"
-namespace Inkscape
-{
- class SelTrans;
+typedef unsigned int guint32;
+
+namespace Inkscape {
+ class SelTrans;
}
guint32 const DEF_COLOR[] = { 0xff, 0xff6600, 0xff6600, 0xff, 0xff, 0xff };
@@ -34,7 +36,7 @@ enum SPSelTransType {
struct SPSelTransTypeInfo {
guint32 const *color;
- gchar const *tip;
+ char const *tip;
};
// One per handle type in order
extern SPSelTransTypeInfo const handtypes[5];
@@ -45,7 +47,7 @@ struct SPSelTransHandle {
SPSelTransType type;
SPAnchorType anchor;
GdkCursorType cursor;
- guint control;
+ unsigned int control;
gdouble x, y;
};
// These are 4 * each handle type + 1 for center
@@ -64,5 +66,3 @@ extern SPSelTransHandle const hands[17];
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
-
-
diff --git a/src/seltrans.h b/src/seltrans.h
index 44268ed69..d5db1542d 100644
--- a/src/seltrans.h
+++ b/src/seltrans.h
@@ -15,32 +15,33 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <stddef.h>
-#include <sigc++/sigc++.h>
#include <2geom/point.h>
#include <2geom/affine.h>
#include <2geom/rect.h>
+#include <cstddef>
+#include <sigc++/sigc++.h>
+#include <vector>
+
#include "knot.h"
-#include "selcue.h"
#include "message-context.h"
-#include <vector>
-#include "sp-item.h"
#include "seltrans-handles.h"
+#include "selcue.h"
+#include "sp-item.h"
+
class SPKnot;
class SPDesktop;
struct SPCanvasItem;
struct SPCtrlLine;
struct SPSelTransHandle;
+typedef struct _GSList GSList;
-namespace Inkscape
-{
+namespace Inkscape {
Geom::Scale calcScaleFactors(Geom::Point const &initial_point, Geom::Point const &new_point, Geom::Point const &origin, bool const skew = false);
-namespace XML
-{
- class Node;
+namespace XML {
+ class Node;
}
class SelTrans
@@ -56,26 +57,26 @@ public:
void increaseState();
void resetState();
void setCenter(Geom::Point const &p);
- void grab(Geom::Point const &p, gdouble x, gdouble y, bool show_handles, bool translating);
+ void grab(Geom::Point const &p, double x, double y, bool show_handles, bool translating);
void transform(Geom::Affine const &rel_affine, Geom::Point const &norm);
void ungrab();
void stamp();
- void moveTo(Geom::Point const &xy, guint state);
- void stretch(SPSelTransHandle const &handle, Geom::Point &pt, guint state);
- void scale(Geom::Point &pt, guint state);
- void skew(SPSelTransHandle const &handle, Geom::Point &pt, guint state);
- void rotate(Geom::Point &pt, guint state);
- gboolean request(SPSelTransHandle const &handle, Geom::Point &pt, guint state);
- gboolean scaleRequest(Geom::Point &pt, guint state);
- gboolean stretchRequest(SPSelTransHandle const &handle, Geom::Point &pt, guint state);
- gboolean skewRequest(SPSelTransHandle const &handle, Geom::Point &pt, guint state);
- gboolean rotateRequest(Geom::Point &pt, guint state);
- gboolean centerRequest(Geom::Point &pt, guint state);
-
- gboolean handleRequest(SPKnot *knot, Geom::Point *position, guint state, SPSelTransHandle const &handle);
- void handleGrab(SPKnot *knot, guint state, SPSelTransHandle const &handle);
- void handleClick(SPKnot *knot, guint state, SPSelTransHandle const &handle);
- void handleNewEvent(SPKnot *knot, Geom::Point *position, guint state, SPSelTransHandle const &handle);
+ void moveTo(Geom::Point const &xy, unsigned int state);
+ void stretch(SPSelTransHandle const &handle, Geom::Point &pt, unsigned int state);
+ void scale(Geom::Point &pt, unsigned int state);
+ void skew(SPSelTransHandle const &handle, Geom::Point &pt, unsigned int state);
+ void rotate(Geom::Point &pt, unsigned int state);
+ int request(SPSelTransHandle const &handle, Geom::Point &pt, unsigned int state);
+ int scaleRequest(Geom::Point &pt, unsigned int state);
+ int stretchRequest(SPSelTransHandle const &handle, Geom::Point &pt, unsigned int state);
+ int skewRequest(SPSelTransHandle const &handle, Geom::Point &pt, unsigned int state);
+ int rotateRequest(Geom::Point &pt, unsigned int state);
+ int centerRequest(Geom::Point &pt, unsigned int state);
+
+ int handleRequest(SPKnot *knot, Geom::Point *position, unsigned int state, SPSelTransHandle const &handle);
+ void handleGrab(SPKnot *knot, unsigned int state, SPSelTransHandle const &handle);
+ void handleClick(SPKnot *knot, unsigned int state, SPSelTransHandle const &handle);
+ void handleNewEvent(SPKnot *knot, Geom::Point *position, unsigned int state, SPSelTransHandle const &handle);
enum Show
{
@@ -115,7 +116,7 @@ private:
void _updateHandles();
void _updateVolatileState();
void _selChanged(Inkscape::Selection *selection);
- void _selModified(Inkscape::Selection *selection, guint flags);
+ void _selModified(Inkscape::Selection *selection, unsigned int flags);
void _boundingBoxPrefsChanged(int prefs_bbox);
void _makeHandles();
void _showHandles(SPSelTransType type);
@@ -156,7 +157,7 @@ private:
Geom::OptRect _bbox;
Geom::OptRect _visual_bbox;
Geom::OptRect _geometric_bbox;
- gdouble _strokewidth;
+ double _strokewidth;
Geom::Affine _current_relative_affine;
Geom::Affine _absolute_affine;
@@ -173,8 +174,8 @@ private:
Geom::Point _origin_for_specpoints;
Geom::Point _origin_for_bboxpoints;
- gdouble _handle_x;
- gdouble _handle_y;
+ double _handle_x;
+ double _handle_y;
boost::optional<Geom::Point> _center;
bool _center_is_set; ///< we've already set _center, no need to reread it from items
@@ -184,8 +185,8 @@ private:
SPCanvasItem *_norm;
SPCanvasItem *_grip;
SPCtrlLine *_l[4];
- guint _sel_changed_id;
- guint _sel_modified_id;
+ unsigned int _sel_changed_id;
+ unsigned int _sel_modified_id;
GSList *_stamp_cache;
Geom::Point _origin; ///< position of origin for transforms
diff --git a/src/shape-editor.h b/src/shape-editor.h
index df0dbfa3a..d2611b111 100644
--- a/src/shape-editor.h
+++ b/src/shape-editor.h
@@ -12,8 +12,6 @@
*
*/
-#include <glib.h>
-
namespace Inkscape { namespace XML { class Node; } }
class KnotHolder;
@@ -37,10 +35,10 @@ public:
bool knot_mouseover() const;
- static void blockSetItem(bool b) { _blockSetItem = b; } // kludge?
+ static void blockSetItem(bool b) { _blockSetItem = b; } // kludge
- static void event_attr_changed(Inkscape::XML::Node * /*repr*/, gchar const *name, gchar const * /*old_value*/,
- gchar const * /*new_value*/, bool /*is_interactive*/, void *data);
+ static void event_attr_changed(Inkscape::XML::Node * /*repr*/, char const *name, char const * /*old_value*/,
+ char const * /*new_value*/, bool /*is_interactive*/, void *data);
private:
bool has_knotholder();
void reset_item (bool keep_knotholder = true);
diff --git a/src/shortcuts.h b/src/shortcuts.h
index 406768f97..f24a82603 100644
--- a/src/shortcuts.h
+++ b/src/shortcuts.h
@@ -1,5 +1,5 @@
-#ifndef __SP_SHORTCUTS_H__
-#define __SP_SHORTCUTS_H__
+#ifndef SEEN_SP_SHORTCUTS_H
+#define SEEN_SP_SHORTCUTS_H
/*
* Keyboard shortcut processing
@@ -16,9 +16,6 @@
typedef struct _GtkAccelGroup GtkAccelGroup;
typedef struct _GtkWidget GtkWidget;
-struct _GtkAccelGroup;
-struct _GtkWidget;
-
namespace Inkscape {
class Verb;
namespace UI {
@@ -42,14 +39,14 @@ bool sp_shortcut_invoke (unsigned int shortcut, Inkscape::UI::View::View *view);
void sp_shortcut_init();
Inkscape::Verb * sp_shortcut_get_verb (unsigned int shortcut);
unsigned int sp_shortcut_get_primary (Inkscape::Verb * verb); // Returns GDK_VoidSymbol if no shortcut is found.
-gchar* sp_shortcut_get_label (unsigned int shortcut); // Returns the human readable form of the shortcut (or NULL), for example Shift+Ctrl+F. Free the returned string with g_free.
+char* sp_shortcut_get_label (unsigned int shortcut); // Returns the human readable form of the shortcut (or NULL), for example Shift+Ctrl+F. Free the returned string with g_free.
void sp_shortcut_set(unsigned int const shortcut, Inkscape::Verb *const verb, bool const is_primary, bool const is_user_set=false);
void sp_shortcut_unset(unsigned int const shortcut);
void sp_shortcut_add_to_file(char const *action, unsigned int const shortcut);
void sp_shortcut_delete_from_file(char const *action, unsigned int const shortcut);
void sp_shortcuts_delete_all_from_file();
Glib::ustring sp_shortcut_to_label(unsigned int const shortcut);
-unsigned int sp_gdkmodifier_to_shortcut(guint accel_key, Gdk::ModifierType gdkmodifier, guint hardware_keycode);
+unsigned int sp_gdkmodifier_to_shortcut(unsigned int accel_key, Gdk::ModifierType gdkmodifier, unsigned int hardware_keycode);
void sp_shortcut_get_file_names(std::vector<Glib::ustring> *names, std::vector<Glib::ustring> *paths);
bool sp_shortcut_is_user_set(Inkscape::Verb *verb);
void sp_shortcut_file_export();
diff --git a/src/snap-candidate.h b/src/snap-candidate.h
index 8bb7cb52f..54e33e1a8 100644
--- a/src/snap-candidate.h
+++ b/src/snap-candidate.h
@@ -14,7 +14,10 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-//#include "snapped-point.h"
+#include <2geom/point.h>
+#include <2geom/rect.h>
+#include <cstdio>
+
#include "snap-enums.h"
class SPItem; // forward declaration
diff --git a/src/snap-preferences.h b/src/snap-preferences.h
index a7a2e2926..7bdeea52e 100644
--- a/src/snap-preferences.h
+++ b/src/snap-preferences.h
@@ -49,13 +49,13 @@ public:
void setSnapPerp(bool enabled) {_snap_perp = enabled;}
void setSnapTang(bool enabled) {_snap_tang = enabled;}
- gdouble getGridTolerance() const {return _grid_tolerance;}
- gdouble getGuideTolerance() const {return _guide_tolerance;}
- gdouble getObjectTolerance() const {return _object_tolerance;}
+ double getGridTolerance() const {return _grid_tolerance;}
+ double getGuideTolerance() const {return _guide_tolerance;}
+ double getObjectTolerance() const {return _object_tolerance;}
- void setGridTolerance(gdouble val) {_grid_tolerance = val;}
- void setGuideTolerance(gdouble val) {_guide_tolerance = val;}
- void setObjectTolerance(gdouble val) {_object_tolerance = val;}
+ void setGridTolerance(double val) {_grid_tolerance = val;}
+ void setGuideTolerance(double val) {_guide_tolerance = val;}
+ void setObjectTolerance(double val) {_object_tolerance = val;}
private:
@@ -91,9 +91,9 @@ private:
bool _snap_perp;
bool _snap_tang;
- gdouble _grid_tolerance;
- gdouble _guide_tolerance;
- gdouble _object_tolerance;
+ double _grid_tolerance;
+ double _guide_tolerance;
+ double _object_tolerance;
};
}
diff --git a/src/snap.h b/src/snap.h
index 67af20063..20b2b246f 100644
--- a/src/snap.h
+++ b/src/snap.h
@@ -32,6 +32,7 @@ enum SPGuideDragType { // used both here and in desktop-events.cpp
class SPGuide;
class SPNamedView;
+typedef struct _GSList GSList;
/**
* Class to coordinate snapping operations.
diff --git a/src/snapped-curve.h b/src/snapped-curve.h
index 6bb8bfeca..0e3a1c747 100644
--- a/src/snapped-curve.h
+++ b/src/snapped-curve.h
@@ -11,14 +11,14 @@
* Released under GNU GPL, read the file 'COPYING' for more information.
*/
+#include <2geom/forward.h>
#include <vector>
#include <list>
+
#include "snapped-point.h"
#include "snapped-line.h"
-#include <2geom/forward.h>
-namespace Inkscape
-{
+namespace Inkscape {
/// Class describing the result of an attempt to snap to a curve.
class SnappedCurve : public SnappedPoint
diff --git a/src/snapped-point.h b/src/snapped-point.h
index bf440c450..9d77ab162 100644
--- a/src/snapped-point.h
+++ b/src/snapped-point.h
@@ -12,10 +12,11 @@
* Released under GNU GPL, read the file 'COPYING' for more information.
*/
-#include <vector>
-#include <list>
#include <2geom/geom.h>
-#include <snap-candidate.h>
+#include <list>
+#include <vector>
+
+#include "snap-candidate.h"
namespace Inkscape
{
diff --git a/src/snapper.h b/src/snapper.h
index c609239cf..9616d0954 100644
--- a/src/snapper.h
+++ b/src/snapper.h
@@ -12,15 +12,14 @@
* Released under GNU GPL, read the file 'COPYING' for more information.
*/
-#include <map>
-#include <list>
#include <boost/optional.hpp>
-#include <glib.h> // for g_assert
+#include <cstdio>
+#include <list>
+#include "snap-candidate.h"
#include "snapped-point.h"
#include "snapped-line.h"
#include "snapped-curve.h"
-#include "snap-candidate.h"
struct IntermSnapResults {
std::list<Inkscape::SnappedPoint> points;
@@ -86,7 +85,7 @@ public:
bool hasPoint() const {return _type != DIRECTION && _type != UNDEFINED;}
Geom::Point getPoint() const {
- g_assert(_type != DIRECTION && _type != UNDEFINED);
+ assert(_type != DIRECTION && _type != UNDEFINED);
return _point;
}
@@ -95,7 +94,7 @@ public:
}
Geom::Coord getRadius() const {
- g_assert(_type == CIRCLE);
+ assert(_type == CIRCLE);
return _radius;
}
@@ -121,7 +120,7 @@ public:
Geom::Point const p2_on_cl = p1_on_cl + _direction;
return Geom::projection(p, Geom::Line(p1_on_cl, p2_on_cl));
} else {
- g_warning("Bug: trying to find the projection onto an undefined constraint");
+ printf("WARNING: Bug: trying to find the projection onto an undefined constraint");
return Geom::Point();
}
}
diff --git a/src/sp-anchor.h b/src/sp-anchor.h
index 778640032..d17718344 100644
--- a/src/sp-anchor.h
+++ b/src/sp-anchor.h
@@ -1,5 +1,5 @@
-#ifndef __SP_ANCHOR_H__
-#define __SP_ANCHOR_H__
+#ifndef SEEN_SP_ANCHOR_H
+#define SEEN_SP_ANCHOR_H
/*
* SVG <a> element implementation
@@ -23,16 +23,16 @@ public:
SPAnchor();
virtual ~SPAnchor();
- gchar *href;
+ char *href;
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
virtual void release();
- virtual void set(unsigned int key, gchar const* value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
virtual const char* displayName() const;
- virtual gchar* description() const;
- virtual gint event(SPEvent *event);
+ virtual char* description() const;
+ virtual int event(SPEvent *event);
};
#endif
diff --git a/src/sp-clippath.h b/src/sp-clippath.h
index ba7a90a57..eb8b14174 100644
--- a/src/sp-clippath.h
+++ b/src/sp-clippath.h
@@ -19,6 +19,9 @@
#define SP_IS_CLIPPATH(obj) (dynamic_cast<const SPClipPath*>((SPObject*)obj) != NULL)
struct SPClipPathView;
+typedef struct _GSList GSList;
+
+#include <cstdio>
#include "sp-object-group.h"
#include "uri-references.h"
@@ -42,8 +45,8 @@ public:
unsigned int clipPathUnits : 1;
SPClipPathView *display;
- static const gchar *create(GSList *reprs, SPDocument *document, Geom::Affine const* applyTransform);
- static GType sp_clippath_get_type(void);
+ static char const *create(GSList *reprs, SPDocument *document, Geom::Affine const* applyTransform);
+ //static GType sp_clippath_get_type(void);
Inkscape::DrawingItem *show(Inkscape::Drawing &drawing, unsigned int key);
void hide(unsigned int key);
@@ -57,12 +60,12 @@ protected:
virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref);
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, char const* value);
virtual void update(SPCtx* ctx, unsigned int flags);
virtual void modified(unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
@@ -90,10 +93,10 @@ protected:
Inkscape::XML::Node * const owner_repr = owner->getRepr();
//XML Tree being used directly here while it shouldn't be...
Inkscape::XML::Node * const obj_repr = obj->getRepr();
- gchar const * owner_name = NULL;
- gchar const * owner_clippath = NULL;
- gchar const * obj_name = NULL;
- gchar const * obj_id = NULL;
+ char const * owner_name = NULL;
+ char const * owner_clippath = NULL;
+ char const * obj_name = NULL;
+ char const * obj_id = NULL;
if (owner_repr != NULL) {
owner_name = owner_repr->name();
owner_clippath = owner_repr->attribute("clippath");
@@ -102,7 +105,7 @@ protected:
obj_name = obj_repr->name();
obj_id = obj_repr->attribute("id");
}
- g_warning("Ignoring recursive clippath reference "
+ printf("WARNING: Ignoring recursive clippath reference "
"<%s clippath=\"%s\"> in <%s id=\"%s\">",
owner_name, owner_clippath,
obj_name, obj_id);
diff --git a/src/sp-conn-end-pair.h b/src/sp-conn-end-pair.h
index 9f7f5a5d2..93f54378c 100644
--- a/src/sp-conn-end-pair.h
+++ b/src/sp-conn-end-pair.h
@@ -11,12 +11,10 @@
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glib.h>
-#include <stddef.h>
-#include <sigc++/connection.h>
-#include <sigc++/functors/slot.h>
-#include <sigc++/signal.h>
+#include <cstddef>
+#include <sigc++/sigc++.h>
+
#include "libavoid/connector.h"
@@ -33,21 +31,21 @@ class Node;
}
}
-extern void recreateCurve(SPCurve *curve, Avoid::ConnRef *connRef, gdouble curvature);
+extern void recreateCurve(SPCurve *curve, Avoid::ConnRef *connRef, double curvature);
class SPConnEndPair {
public:
SPConnEndPair(SPPath *);
~SPConnEndPair();
void release();
- void setAttr(unsigned const key, gchar const *const value);
+ void setAttr(unsigned const key, char const *const value);
void writeRepr(Inkscape::XML::Node *const repr) const;
void getAttachedItems(SPItem *[2]) const;
void getEndpoints(Geom::Point endPts[]) const;
- gdouble getCurvature(void) const;
+ double getCurvature(void) const;
SPConnEnd** getConnEnds(void);
bool isOrthogonal(void) const;
- friend void recreateCurve(SPCurve *curve, Avoid::ConnRef *connRef, gdouble curvature);
+ friend void recreateCurve(SPCurve *curve, Avoid::ConnRef *connRef, double curvature);
void tellLibavoidNewEndpoints(const bool processTransaction = false);
bool reroutePathFromLibavoid(void);
void makePathInvalid(void);
@@ -64,7 +62,7 @@ private:
Avoid::ConnRef *_connRef;
int _connType;
- gdouble _connCurvature;
+ double _connCurvature;
// A sigc connection for transformed signal.
sigc::connection _transformed_connection;
diff --git a/src/sp-conn-end.h b/src/sp-conn-end.h
index a0b1ba5df..2b89a159d 100644
--- a/src/sp-conn-end.h
+++ b/src/sp-conn-end.h
@@ -1,8 +1,7 @@
#ifndef SEEN_SP_CONN_END
#define SEEN_SP_CONN_END
-#include <glib.h>
-#include <stddef.h>
+#include <cstddef>
#include <sigc++/connection.h>
#include "sp-use-reference.h"
@@ -15,7 +14,7 @@ public:
SPConnEnd(SPObject *owner);
SPUseReference ref;
- gchar *href;
+ char *href;
/** Change of href string (not a modification of the attributes of the referrent). */
sigc::connection _changed_connection;
@@ -29,13 +28,13 @@ public:
/** A sigc connection for owning group transformed, used to do move compensation. */
sigc::connection _group_connection;
- void setAttacherHref(gchar const *, SPPath *);
- void setAttacherEndpoint(gchar const *, SPPath *);
+ void setAttacherHref(char const * value, SPPath * unused);
+ //void setAttacherEndpoint(char const *, SPPath *); // not defined
private:
- SPConnEnd(SPConnEnd const &);
- SPConnEnd &operator=(SPConnEnd const &);
+ SPConnEnd(SPConnEnd const &); // no copy
+ SPConnEnd &operator=(SPConnEnd const &); // no assign
};
void sp_conn_end_href_changed(SPObject *old_ref, SPObject *ref,
diff --git a/src/sp-cursor.cpp b/src/sp-cursor.cpp
index ea73da00c..16659d1cf 100644
--- a/src/sp-cursor.cpp
+++ b/src/sp-cursor.cpp
@@ -17,13 +17,14 @@
*/
#include <cstring>
+#include <gdk/gdk.h>
#include <map>
#include <sstream>
#include "color.h"
#include "sp-cursor.h"
-static void free_cursor_data(guchar *pixels, gpointer /*data*/) {
+static void free_cursor_data(unsigned char *pixels, void* /*data*/) {
delete [] reinterpret_cast<guint32*>(pixels);
}
@@ -53,7 +54,7 @@ struct RGBA {
}
};
-GdkPixbuf *sp_cursor_pixbuf_from_xpm(gchar const *const *xpm, GdkColor const& black, GdkColor const& white, guint32 fill, guint32 stroke)
+GdkPixbuf *sp_cursor_pixbuf_from_xpm(char const *const *xpm, GdkColor const& black, GdkColor const& white, guint32 fill, guint32 stroke)
{
int height = 0;
int width = 0;
@@ -72,7 +73,7 @@ GdkPixbuf *sp_cursor_pixbuf_from_xpm(gchar const *const *xpm, GdkColor const& bl
char const *p = xpm[1 + i];
g_assert(*p >=0);
- guchar const ccode = (guchar) *p;
+ unsigned char const ccode = (guchar) *p;
p++;
while (isspace(*p)) {
@@ -110,7 +111,7 @@ GdkPixbuf *sp_cursor_pixbuf_from_xpm(gchar const *const *xpm, GdkColor const& bl
return gdk_pixbuf_new_from_data(reinterpret_cast<guchar*>(pixmap_buffer), GDK_COLORSPACE_RGB, TRUE, 8, width, height, width * sizeof(guint32), free_cursor_data, NULL);
}
-GdkCursor *sp_cursor_new_from_xpm(gchar const *const *xpm, gint hot_x, gint hot_y)
+GdkCursor *sp_cursor_new_from_xpm(char const *const *xpm, int hot_x, int hot_y)
{
GdkCursor *cursor = 0;
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data((const gchar **)xpm);
diff --git a/src/sp-cursor.h b/src/sp-cursor.h
index f445127ad..c0b8b46a3 100644
--- a/src/sp-cursor.h
+++ b/src/sp-cursor.h
@@ -1,10 +1,13 @@
#ifndef SP_CURSOR_H
#define SP_CURSOR_H
-#include <gdk/gdk.h>
+typedef unsigned int guint32;
+typedef struct _GdkPixbuf GdkPixbuf;
+typedef struct _GdkCursor GdkCursor;
+typedef struct _GdkColor GdkColor;
-GdkPixbuf* sp_cursor_pixbuf_from_xpm(gchar const *const *xpm, GdkColor const& black, GdkColor const& white, guint32 fill, guint32 stroke);
-GdkCursor *sp_cursor_new_from_xpm(gchar const *const *xpm, gint hot_x, gint hot_y);
+GdkPixbuf* sp_cursor_pixbuf_from_xpm(char const *const *xpm, GdkColor const& black, GdkColor const& white, guint32 fill, guint32 stroke);
+GdkCursor *sp_cursor_new_from_xpm(char const *const *xpm, int hot_x, int hot_y);
#endif
diff --git a/src/sp-defs.h b/src/sp-defs.h
index 6efdea1f3..c122cb2a9 100644
--- a/src/sp-defs.h
+++ b/src/sp-defs.h
@@ -27,7 +27,7 @@ protected:
virtual void release();
virtual void update(SPCtx* ctx, unsigned int flags);
virtual void modified(unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
};
#endif // !SEEN_SP_DEFS_H
diff --git a/src/sp-desc.h b/src/sp-desc.h
index 2bb42b333..40888bee4 100644
--- a/src/sp-desc.h
+++ b/src/sp-desc.h
@@ -1,5 +1,5 @@
-#ifndef __SP_DESC_H__
-#define __SP_DESC_H__
+#ifndef SEEN_SP_DESC_H
+#define SEEN_SP_DESC_H
/*
* SVG <desc> implementation
@@ -23,7 +23,7 @@ public:
virtual ~SPDesc();
protected:
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
#endif
diff --git a/src/sp-ellipse.h b/src/sp-ellipse.h
index e575b8761..09768fd6d 100644
--- a/src/sp-ellipse.h
+++ b/src/sp-ellipse.h
@@ -24,7 +24,7 @@
#define SP_IS_GENERICELLIPSE(obj) (dynamic_cast<const SPGenericEllipse*>((obj)) != NULL)
enum GenericEllipseType {
- SP_GENERIC_ELLIPSE_UNDEFINED,
+ SP_GENERIC_ELLIPSE_UNDEFINED, // FIXME shouldn't exist
SP_GENERIC_ELLIPSE_ARC,
SP_GENERIC_ELLIPSE_CIRCLE,
SP_GENERIC_ELLIPSE_ELLIPSE
@@ -53,10 +53,10 @@ public:
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
- virtual void set(unsigned int key, gchar const *value);
+ virtual void set(unsigned int key, char const *value);
virtual void update(SPCtx *ctx, unsigned int flags);
- virtual Inkscape::XML::Node *write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual Inkscape::XML::Node *write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
virtual const char *displayName() const;
virtual void set_shape();
@@ -76,7 +76,7 @@ public:
Geom::Point getPointAtAngle(double arg) const;
bool set_elliptical_path_attribute(Inkscape::XML::Node *repr);
- void position_set(gdouble x, gdouble y, gdouble rx, gdouble ry);
+ void position_set(double x, double y, double rx, double ry);
protected:
/**
diff --git a/src/sp-filter-primitive.h b/src/sp-filter-primitive.h
index 040e2f31f..d81adbd10 100644
--- a/src/sp-filter-primitive.h
+++ b/src/sp-filter-primitive.h
@@ -1,5 +1,5 @@
-#ifndef __SP_FILTER_PRIMITIVE_H__
-#define __SP_FILTER_PRIMITIVE_H__
+#ifndef SEEN_SP_FILTER_PRIMITIVE_H
+#define SEEN_SP_FILTER_PRIMITIVE_H
/** \file
* Document level base class for all SVG filter primitives.
@@ -40,11 +40,11 @@ protected:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
virtual void release();
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, char const* value);
virtual void update(SPCtx* ctx, unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
public:
virtual void build_renderer(Inkscape::Filters::Filter* filter) = 0;
@@ -54,8 +54,8 @@ public:
void sp_filter_primitive_renderer_common(SPFilterPrimitive *sp_prim, Inkscape::Filters::FilterPrimitive *nr_prim);
int sp_filter_primitive_name_previous_out(SPFilterPrimitive *prim);
-int sp_filter_primitive_read_in(SPFilterPrimitive *prim, gchar const *name);
-int sp_filter_primitive_read_result(SPFilterPrimitive *prim, gchar const *name);
+int sp_filter_primitive_read_in(SPFilterPrimitive *prim, char const *name);
+int sp_filter_primitive_read_result(SPFilterPrimitive *prim, char const *name);
#endif
/*
diff --git a/src/sp-filter.h b/src/sp-filter.h
index 0d087c5bf..e6318c569 100644
--- a/src/sp-filter.h
+++ b/src/sp-filter.h
@@ -12,6 +12,7 @@
#ifndef SP_FILTER_H_SEEN
#define SP_FILTER_H_SEEN
+#include <glibmm/ustring.h>
#include <map>
#include "number-opt-number.h"
@@ -19,8 +20,6 @@
#include "sp-filter-units.h"
#include "svg/svg-length.h"
-#include <glibmm/ustring.h>
-
#define SP_FILTER(obj) (dynamic_cast<SPFilter*>((SPObject*)obj))
#define SP_IS_FILTER(obj) (dynamic_cast<const SPFilter*>((SPObject*)obj) != NULL)
@@ -45,9 +44,9 @@ public:
virtual ~SPFilter();
SPFilterUnits filterUnits;
- guint filterUnits_set : 1;
+ unsigned int filterUnits_set : 1;
SPFilterUnits primitiveUnits;
- guint primitiveUnits_set : 1;
+ unsigned int primitiveUnits_set : 1;
SVGLength x;
SVGLength y;
SVGLength width;
@@ -68,11 +67,11 @@ protected:
virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref);
virtual void remove_child(Inkscape::XML::Node* child);
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, const char* value);
virtual void update(SPCtx* ctx, unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
void sp_filter_set_filter_units(SPFilter *filter, SPFilterUnits filterUnits);
@@ -88,14 +87,14 @@ void sp_filter_build_renderer(SPFilter *sp_filter, Inkscape::Filters::Filter *nr
int sp_filter_primitive_count(SPFilter *filter);
/// Returns a slot number for given image name, or -1 for unknown name.
-int sp_filter_get_image_name(SPFilter *filter, gchar const *name);
+int sp_filter_get_image_name(SPFilter *filter, char const *name);
/// Returns slot number for given image name, even if it's unknown.
-int sp_filter_set_image_name(SPFilter *filter, gchar const *name);
+int sp_filter_set_image_name(SPFilter *filter, char const *name);
/** Finds image name based on it's slot number. Returns 0 for unknown slot
* numbers. */
-gchar const *sp_filter_name_for_image(SPFilter const *filter, int const image);
+char const *sp_filter_name_for_image(SPFilter const *filter, int const image);
/// Returns a result image name that is not in use inside this filter.
Glib::ustring sp_filter_get_new_result_name(SPFilter *filter);
diff --git a/src/sp-flowdiv.h b/src/sp-flowdiv.h
index d00cfc51b..4a3690726 100644
--- a/src/sp-flowdiv.h
+++ b/src/sp-flowdiv.h
@@ -1,5 +1,5 @@
-#ifndef __SP_ITEM_FLOWDIV_H__
-#define __SP_ITEM_FLOWDIV_H__
+#ifndef SEEN_SP_ITEM_FLOWDIV_H
+#define SEEN_SP_ITEM_FLOWDIV_H
/*
*/
@@ -31,11 +31,11 @@ public:
protected:
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
virtual void release();
- virtual void update(SPCtx* ctx, guint flags);
+ virtual void update(SPCtx* ctx, unsigned int flags);
virtual void modified(unsigned int flags);
- virtual void set(unsigned int key, gchar const* value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
};
class SPFlowtspan : public SPItem {
@@ -46,11 +46,11 @@ public:
protected:
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
virtual void release();
- virtual void update(SPCtx* ctx, guint flags);
+ virtual void update(SPCtx* ctx, unsigned int flags);
virtual void modified(unsigned int flags);
- virtual void set(unsigned int key, gchar const* value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
};
class SPFlowpara : public SPItem {
@@ -61,11 +61,11 @@ public:
protected:
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
virtual void release();
- virtual void update(SPCtx* ctx, guint flags);
+ virtual void update(SPCtx* ctx, unsigned int flags);
virtual void modified(unsigned int flags);
- virtual void set(unsigned int key, gchar const* value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
};
// these do not need any style
@@ -78,7 +78,7 @@ protected:
virtual void release();
virtual void modified(unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
};
class SPFlowregionbreak : public SPObject {
@@ -90,7 +90,7 @@ protected:
virtual void release();
virtual void modified(unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
};
#endif
diff --git a/src/sp-flowregion.h b/src/sp-flowregion.h
index 721eb0432..024a298b8 100644
--- a/src/sp-flowregion.h
+++ b/src/sp-flowregion.h
@@ -1,5 +1,5 @@
-#ifndef __SP_ITEM_FLOWREGION_H__
-#define __SP_ITEM_FLOWREGION_H__
+#ifndef SEEN_SP_ITEM_FLOWREGION_H
+#define SEEN_SP_ITEM_FLOWREGION_H
/*
*/
@@ -30,7 +30,7 @@ public:
virtual void remove_child(Inkscape::XML::Node *child);
virtual void update(SPCtx *ctx, unsigned int flags);
virtual void modified(guint flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
virtual const char* displayName() const;
};
@@ -47,7 +47,7 @@ public:
virtual void remove_child(Inkscape::XML::Node *child);
virtual void update(SPCtx *ctx, unsigned int flags);
virtual void modified(guint flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
virtual const char* displayName() const;
};
diff --git a/src/sp-flowtext.h b/src/sp-flowtext.h
index a5b7db22e..743d55030 100644
--- a/src/sp-flowtext.h
+++ b/src/sp-flowtext.h
@@ -4,10 +4,10 @@
/*
*/
-#include "sp-item.h"
-
#include <2geom/forward.h>
+
#include "libnrtype/Layout-TNG.h"
+#include "sp-item.h"
#define SP_FLOWTEXT(obj) (dynamic_cast<SPFlowtext*>((SPObject*)obj))
#define SP_IS_FLOWTEXT(obj) (dynamic_cast<const SPFlowtext*>((SPObject*)obj) != NULL)
@@ -63,18 +63,18 @@ public:
virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref);
virtual void remove_child(Inkscape::XML::Node* child);
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, const char* value);
virtual Geom::Affine set_transform(Geom::Affine const& xform);
virtual void update(SPCtx* ctx, unsigned int flags);
virtual void modified(unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type) const;
virtual void print(SPPrintContext *ctx);
virtual const char* displayName() const;
- virtual gchar* description() const;
+ virtual char* description() const;
virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags);
virtual void hide(unsigned int key);
virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) const;
diff --git a/src/sp-font-face.h b/src/sp-font-face.h
index 531dd5843..669b93197 100644
--- a/src/sp-font-face.h
+++ b/src/sp-font-face.h
@@ -1,9 +1,5 @@
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifndef __SP_FONTFACE_H__
-#define __SP_FONTFACE_H__
+#ifndef SEEN_SP_FONTFACE_H
+#define SEEN_SP_FONTFACE_H
#include <vector>
@@ -117,11 +113,11 @@ protected:
virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref);
virtual void remove_child(Inkscape::XML::Node* child);
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, const char* value);
virtual void update(SPCtx* ctx, unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
#endif //#ifndef __SP_FONTFACE_H__
diff --git a/src/sp-font.h b/src/sp-font.h
index 6e6f4eec2..6e26a02b2 100644
--- a/src/sp-font.h
+++ b/src/sp-font.h
@@ -1,7 +1,3 @@
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#ifndef SP_FONT_H_SEEN
#define SP_FONT_H_SEEN
@@ -40,11 +36,11 @@ protected:
virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref);
virtual void remove_child(Inkscape::XML::Node* child);
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, char const* value);
virtual void update(SPCtx* ctx, unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
#endif //#ifndef SP_FONT_H_SEEN
diff --git a/src/sp-glyph-kerning.h b/src/sp-glyph-kerning.h
index 52413f8a7..c96c0b6e4 100644
--- a/src/sp-glyph-kerning.h
+++ b/src/sp-glyph-kerning.h
@@ -25,11 +25,11 @@
class GlyphNames {
public:
- GlyphNames(const gchar* value);
+ GlyphNames(char const* value);
~GlyphNames();
- bool contains(const char* name);
+ bool contains(char const* name);
private:
- gchar* names;
+ char* names;
};
class SPGlyphKerning : public SPObject {
@@ -47,9 +47,9 @@ public:
protected:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
virtual void release();
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, char const* value);
virtual void update(SPCtx* ctx, unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
class SPHkern : public SPGlyphKerning {
diff --git a/src/sp-glyph.h b/src/sp-glyph.h
index e92357c94..297ac930e 100644
--- a/src/sp-glyph.h
+++ b/src/sp-glyph.h
@@ -52,9 +52,9 @@ public:
protected:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
virtual void release();
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, const char* value);
virtual void update(SPCtx* ctx, unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
diff --git a/src/sp-gradient-vector.h b/src/sp-gradient-vector.h
index 8e860c169..e57820b56 100644
--- a/src/sp-gradient-vector.h
+++ b/src/sp-gradient-vector.h
@@ -1,7 +1,6 @@
#ifndef SEEN_SP_GRADIENT_VECTOR_H
#define SEEN_SP_GRADIENT_VECTOR_H
-#include <glib.h>
#include <vector>
#include "color.h"
@@ -14,9 +13,9 @@
* copying from SPStop to SPGradientStop.
*/
struct SPGradientStop {
- gdouble offset;
+ double offset;
SPColor color;
- gfloat opacity;
+ float opacity;
};
/**
diff --git a/src/sp-gradient.h b/src/sp-gradient.h
index a14dcc09e..fbb48df62 100644
--- a/src/sp-gradient.h
+++ b/src/sp-gradient.h
@@ -14,29 +14,18 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <vector>
-#include <glibmm/ustring.h>
#include <2geom/affine.h>
+#include <cstddef>
+#include <glibmm/ustring.h>
+#include <sigc++/connection.h>
+#include <vector>
+
#include "sp-paint-server.h"
#include "sp-gradient-spread.h"
#include "sp-gradient-units.h"
#include "sp-gradient-vector.h"
#include "sp-mesh-array.h"
-#include <stddef.h>
-#include <sigc++/connection.h>
-
-
-
-//#include <glib.h>
-//#include <glib-object.h>
-//#include <2geom/forward.h>
-//#include "sp-gradient-spread.h"
-//#include "sp-gradient-units.h"
-//
-//class SPGradient;
-//struct SPMeshGradient;
-
class SPGradientReference;
class SPStop;
diff --git a/src/sp-guide.h b/src/sp-guide.h
index 9f5d7ba03..cd67df222 100644
--- a/src/sp-guide.h
+++ b/src/sp-guide.h
@@ -13,9 +13,9 @@
*
*/
+#include <2geom/point.h>
#include <vector>
-#include <2geom/point.h>
#include "sp-object.h"
#include "sp-guide-attachment.h"
diff --git a/src/sp-image.h b/src/sp-image.h
index 17262d74f..9fa33b5de 100644
--- a/src/sp-image.h
+++ b/src/sp-image.h
@@ -14,7 +14,6 @@
#ifndef SEEN_INKSCAPE_SP_IMAGE_H
#define SEEN_INKSCAPE_SP_IMAGE_H
-#include <gdk-pixbuf/gdk-pixbuf.h>
#include <glibmm/ustring.h>
#include "svg/svg-length.h"
#include "display/curve.h"
@@ -43,24 +42,24 @@ public:
SPCurve *curve; // This curve is at the image's boundary for snapping
- gchar *href;
+ char *href;
#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
- gchar *color_profile;
+ char *color_profile;
#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
Inkscape::Pixbuf *pixbuf;
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
virtual void release();
- virtual void set(unsigned int key, gchar const* value);
- virtual void update(SPCtx *ctx, guint flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual void update(SPCtx *ctx, unsigned int flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
virtual void modified(unsigned int flags);
virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type) const;
virtual void print(SPPrintContext *ctx);
virtual const char* displayName() const;
- virtual gchar* description() const;
+ virtual char* description() const;
virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags);
virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) const;
virtual Geom::Affine set_transform(Geom::Affine const &transform);
diff --git a/src/sp-item-group.h b/src/sp-item-group.h
index 2004a72b8..4e15ee5df 100644
--- a/src/sp-item-group.h
+++ b/src/sp-item-group.h
@@ -1,5 +1,5 @@
-#ifndef __SP_ITEM_GROUP_H__
-#define __SP_ITEM_GROUP_H__
+#ifndef SEEN_SP_ITEM_GROUP_H
+#define SEEN_SP_ITEM_GROUP_H
/*
* SVG <g> implementation
@@ -25,6 +25,7 @@ namespace Inkscape {
class Drawing;
class DrawingItem;
+typedef struct _GSList GSList;
} // namespace Inkscape
@@ -54,7 +55,7 @@ public:
void translateChildItems(Geom::Translate const &tr);
void scaleChildItemsRec(Geom::Scale const &sc, Geom::Point const &p);
- gint getItemCount() const;
+ int getItemCount() const;
virtual void _showChildren (Inkscape::Drawing &drawing, Inkscape::DrawingItem *ai, unsigned int key, unsigned int flags);
private:
@@ -69,15 +70,15 @@ public:
virtual void order_changed(Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref);
virtual void update(SPCtx *ctx, unsigned int flags);
- virtual void modified(guint flags);
- virtual void set(unsigned int key, gchar const* value);
+ virtual void modified(unsigned int flags);
+ virtual void set(unsigned int key, char const* value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype) const;
virtual void print(SPPrintContext *ctx);
virtual const char* displayName() const;
- virtual gchar *description() const;
+ virtual char *description() const;
virtual Inkscape::DrawingItem *show (Inkscape::Drawing &drawing, unsigned int key, unsigned int flags);
virtual void hide (unsigned int key);
@@ -90,7 +91,7 @@ void sp_item_group_ungroup (SPGroup *group, GSList **children, bool do_done = tr
GSList *sp_item_group_item_list (SPGroup *group);
-SPObject *sp_item_group_get_child_by_name (SPGroup *group, SPObject *ref, const gchar *name);
+SPObject *sp_item_group_get_child_by_name (SPGroup *group, SPObject *ref, const char *name);
#endif
diff --git a/src/sp-item-notify-moveto.cpp b/src/sp-item-notify-moveto.cpp
index 0f5117289..90fd676ee 100644
--- a/src/sp-item-notify-moveto.cpp
+++ b/src/sp-item-notify-moveto.cpp
@@ -9,6 +9,7 @@
#include <sp-item-notify-moveto.h>
using std::vector;
+#define return_if_fail(test) if (!(test)) { printf("WARNING: assertion '%s' failed", #test); return; }
/**
* Called by sp_guide_moveto to indicate that the guide line corresponding to g has been moved, and
@@ -19,15 +20,15 @@ using std::vector;
void sp_item_notify_moveto(SPItem &item, SPGuide const &mv_g, int const snappoint_ix,
double const position, bool const commit)
{
- g_return_if_fail(SP_IS_ITEM(&item));
- g_return_if_fail( unsigned(snappoint_ix) < 8 );
+ return_if_fail(SP_IS_ITEM(&item));
+ return_if_fail( unsigned(snappoint_ix) < 8 );
Geom::Point const dir( mv_g.normal_to_line );
double const dir_lensq(dot(dir, dir));
- g_return_if_fail( dir_lensq != 0 );
+ return_if_fail( dir_lensq != 0 );
std::vector<Inkscape::SnapCandidatePoint> snappoints;
item.getSnappoints(snappoints, NULL);
- g_return_if_fail( snappoint_ix < int(snappoints.size()) );
+ return_if_fail( snappoint_ix < int(snappoints.size()) );
double const pos0 = dot(dir, snappoints[snappoint_ix].getPoint());
/// \todo effic: skip if mv_g is already satisfied.
diff --git a/src/sp-item-transform.cpp b/src/sp-item-transform.cpp
index 086da56ff..86beee907 100644
--- a/src/sp-item-transform.cpp
+++ b/src/sp-item-transform.cpp
@@ -18,6 +18,8 @@
#include "sp-item.h"
#include "sp-item-transform.h"
+#include <glib.h>
+
void sp_item_rotate_rel(SPItem *item, Geom::Rotate const &rotation)
{
Geom::Point center = item->getCenter();
diff --git a/src/sp-item-transform.h b/src/sp-item-transform.h
index 230d5a3dd..d563c9768 100644
--- a/src/sp-item-transform.h
+++ b/src/sp-item-transform.h
@@ -1,9 +1,8 @@
#ifndef SEEN_SP_ITEM_TRANSFORM_H
#define SEEN_SP_ITEM_TRANSFORM_H
-#include <glib.h>
-
#include <2geom/forward.h>
+
class SPItem;
void sp_item_rotate_rel(SPItem *item, Geom::Rotate const &rotation);
@@ -11,9 +10,9 @@ void sp_item_scale_rel (SPItem *item, Geom::Scale const &scale);
void sp_item_skew_rel (SPItem *item, double skewX, double skewY);
void sp_item_move_rel(SPItem *item, Geom::Translate const &tr);
-Geom::Affine get_scale_transform_for_uniform_stroke (Geom::Rect const &bbox_visual, gdouble stroke_x, gdouble stroke_y, bool transform_stroke, bool preserve, gdouble x0, gdouble y0, gdouble x1, gdouble y1);
-Geom::Affine get_scale_transform_for_variable_stroke (Geom::Rect const &bbox_visual, Geom::Rect const &bbox_geom, bool transform_stroke, bool preserve, gdouble x0, gdouble y0, gdouble x1, gdouble y1);
-Geom::Rect get_visual_bbox (Geom::OptRect const &initial_geom_bbox, Geom::Affine const &abs_affine, gdouble const initial_strokewidth, bool const transform_stroke);
+Geom::Affine get_scale_transform_for_uniform_stroke (Geom::Rect const &bbox_visual, double stroke_x, double stroke_y, bool transform_stroke, bool preserve, double x0, double y0, double x1, double y1);
+Geom::Affine get_scale_transform_for_variable_stroke (Geom::Rect const &bbox_visual, Geom::Rect const &bbox_geom, bool transform_stroke, bool preserve, double x0, double y0, double x1, double y1);
+Geom::Rect get_visual_bbox (Geom::OptRect const &initial_geom_bbox, Geom::Affine const &abs_affine, double const initial_strokewidth, bool const transform_stroke);
#endif // SEEN_SP_ITEM_TRANSFORM_H
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index 428f9555e..c79508199 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -360,7 +360,7 @@ void SPItem::lowerToBottom() {
* \param target - the SPItem to move into or after
* \param intoafter - move to after the target (false), move inside (sublayer) of the target (true)
*/
-void SPItem::moveTo(SPItem *target, gboolean intoafter) {
+void SPItem::moveTo(SPItem *target, bool intoafter) {
Inkscape::XML::Node *target_ref = ( target ? target->getRepr() : NULL );
Inkscape::XML::Node *our_ref = getRepr();
diff --git a/src/sp-item.h b/src/sp-item.h
index 15784d041..197d33263 100644
--- a/src/sp-item.h
+++ b/src/sp-item.h
@@ -18,10 +18,11 @@
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <vector>
+
#include <2geom/forward.h>
#include <2geom/affine.h>
#include <2geom/rect.h>
+#include <vector>
#include "sp-object.h"
#include "snap-preferences.h"
@@ -72,7 +73,7 @@ enum PatternTransform {
class SPEvent {
public:
unsigned int type;
- gpointer data;
+ void* data;
};
/// SPItemView
@@ -179,7 +180,7 @@ public:
void lowerOne();
void raiseToTop();
void lowerToBottom();
- void moveTo(SPItem *target, gboolean intoafter);
+ void moveTo(SPItem *target, bool intoafter);
sigc::connection connectTransformed(sigc::slot<void, Geom::Affine const *, SPItem *> slot) {
return _transformed_signal.connect(slot);
@@ -198,7 +199,7 @@ public:
unsigned int pos_in_parent() const;
- gchar *detailedDescription() const;
+ char *detailedDescription() const;
bool isFiltered() const;
@@ -209,14 +210,14 @@ public:
void getSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs=0) const;
void adjust_pattern(/* Geom::Affine const &premul, */ Geom::Affine const &postmul, bool set = false, PatternTransform = TRANSFORM_BOTH);
void adjust_gradient(/* Geom::Affine const &premul, */ Geom::Affine const &postmul, bool set = false);
- void adjust_stroke(gdouble ex);
- void adjust_stroke_width_recursive(gdouble ex);
+ void adjust_stroke(double ex);
+ void adjust_stroke_width_recursive(double ex);
void freeze_stroke_width_recursive(bool freeze);
void adjust_paint_recursive(Geom::Affine advertized_transform, Geom::Affine t_ancestors, bool is_pattern);
void adjust_livepatheffect(Geom::Affine const &postmul, bool set = false);
void doWriteTransform(Inkscape::XML::Node *repr, Geom::Affine const &transform, Geom::Affine const *adv = NULL, bool compensate = true);
void set_item_transform(Geom::Affine const &transform_matrix);
- gint emitEvent (SPEvent &event);
+ int emitEvent (SPEvent &event);
Inkscape::DrawingItem *get_arenaitem(unsigned int key);
Geom::Affine i2doc_affine() const;
@@ -240,14 +241,14 @@ private:
public:
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
virtual void release();
- virtual void set(unsigned int key, gchar const* value);
- virtual void update(SPCtx *ctx, guint flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual void update(SPCtx *ctx, unsigned int flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type) const;
virtual void print(SPPrintContext *ctx);
virtual const char* displayName() const;
- virtual gchar* description() const;
+ virtual char* description() const;
virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags);
virtual void hide(unsigned int key);
virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) const;
@@ -255,7 +256,7 @@ public:
virtual void convert_to_guides() const;
- virtual gint event(SPEvent *event);
+ virtual int event(SPEvent *event);
};
diff --git a/src/sp-line.h b/src/sp-line.h
index c1932d3ee..d6a075659 100644
--- a/src/sp-line.h
+++ b/src/sp-line.h
@@ -31,13 +31,13 @@ public:
SVGLength y2;
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
- virtual void set(unsigned int key, gchar const* value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
+ virtual void set(unsigned int key, char const* value);
virtual const char* displayName() const;
virtual Geom::Affine set_transform(Geom::Affine const &transform);
virtual void convert_to_guides() const;
- virtual void update(SPCtx* ctx, guint flags);
+ virtual void update(SPCtx* ctx, unsigned int flags);
virtual void set_shape();
};
diff --git a/src/sp-linear-gradient.cpp b/src/sp-linear-gradient.cpp
index 959e8d733..6e9f5e6dd 100644
--- a/src/sp-linear-gradient.cpp
+++ b/src/sp-linear-gradient.cpp
@@ -1,3 +1,5 @@
+#include <cairo.h>
+
#include "sp-linear-gradient.h"
#include "attributes.h"
diff --git a/src/sp-linear-gradient.h b/src/sp-linear-gradient.h
index ac3fdb04a..a152e7fe2 100644
--- a/src/sp-linear-gradient.h
+++ b/src/sp-linear-gradient.h
@@ -26,8 +26,8 @@ public:
protected:
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
- virtual void set(unsigned key, gchar const *value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned key, char const *value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
};
#endif /* !SP_LINEAR_GRADIENT_H */
diff --git a/src/sp-lpe-item.h b/src/sp-lpe-item.h
index 3e858748d..fbac467fd 100644
--- a/src/sp-lpe-item.h
+++ b/src/sp-lpe-item.h
@@ -14,14 +14,12 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "sp-item.h"
-
#include <list>
+#include "sp-item.h"
#define SP_LPE_ITEM(obj) (dynamic_cast<SPLPEItem*>((SPObject*)obj))
#define SP_IS_LPE_ITEM(obj) (dynamic_cast<const SPLPEItem*>((SPObject*)obj) != NULL)
-class CLPEItem;
class LivePathEffectObject;
class SPCurve;
class SPDesktop;
@@ -58,7 +56,7 @@ public:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
virtual void release();
- virtual void set(unsigned int key, gchar const* value);
+ virtual void set(unsigned int key, char const* value);
virtual void update(SPCtx* ctx, unsigned int flags);
virtual void modified(unsigned int flags);
@@ -66,7 +64,7 @@ public:
virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref);
virtual void remove_child(Inkscape::XML::Node* child);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
virtual void update_patheffect(bool write);
@@ -90,7 +88,7 @@ public:
bool setCurrentPathEffect(Inkscape::LivePathEffect::LPEObjectReference* lperef);
void removeCurrentPathEffect(bool keep_paths);
void removeAllPathEffects(bool keep_paths);
- void addPathEffect(gchar *value, bool reset);
+ void addPathEffect(char *value, bool reset);
void addPathEffect(LivePathEffectObject * new_lpeobj);
bool forkPathEffectsIfNecessary(unsigned int nr_of_allowed_users = 1);
diff --git a/src/sp-mask.h b/src/sp-mask.h
index e08d1e81e..e991fedb6 100644
--- a/src/sp-mask.h
+++ b/src/sp-mask.h
@@ -55,12 +55,12 @@ protected:
virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref);
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, const char* value);
virtual void update(SPCtx* ctx, unsigned int flags);
virtual void modified(unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
class SPMaskReference : public Inkscape::URIReference {
@@ -86,10 +86,10 @@ protected:
Inkscape::XML::Node * const owner_repr = owner->getRepr();
//XML Tree being used directly here while it shouldn't be...
Inkscape::XML::Node * const obj_repr = obj->getRepr();
- gchar const * owner_name = NULL;
- gchar const * owner_mask = NULL;
- gchar const * obj_name = NULL;
- gchar const * obj_id = NULL;
+ char const * owner_name = NULL;
+ char const * owner_mask = NULL;
+ char const * obj_name = NULL;
+ char const * obj_id = NULL;
if (owner_repr != NULL) {
owner_name = owner_repr->name();
owner_mask = owner_repr->attribute("mask");
@@ -98,7 +98,7 @@ protected:
obj_name = obj_repr->name();
obj_id = obj_repr->attribute("id");
}
- g_warning("Ignoring recursive mask reference "
+ printf("WARNING: Ignoring recursive mask reference "
"<%s mask=\"%s\"> in <%s id=\"%s\">",
owner_name, owner_mask,
obj_name, obj_id);
@@ -108,6 +108,6 @@ protected:
}
};
-const gchar *sp_mask_create (GSList *reprs, SPDocument *document, Geom::Affine const* applyTransform);
+const char *sp_mask_create (GSList *reprs, SPDocument *document, Geom::Affine const* applyTransform);
#endif // SEEN_SP_MASK_H
diff --git a/src/sp-mesh-array.h b/src/sp-mesh-array.h
index b10974e7e..330f6d87b 100644
--- a/src/sp-mesh-array.h
+++ b/src/sp-mesh-array.h
@@ -39,8 +39,6 @@
an array which simplifies things like inserting new rows or columns.
*/
-#include <gdk/gdk.h>
-#include <glibmm/ustring.h>
#include <2geom/point.h>
#include "color.h"
@@ -89,13 +87,13 @@ public:
opacity = 0.0;
}
NodeType node_type;
- guint node_edge;
+ unsigned int node_edge;
bool set;
Geom::Point p;
- guint draggable; // index of on-screen node
- gchar path_type;
+ unsigned int draggable; // index of on-screen node
+ char path_type;
SPColor color;
- gdouble opacity;
+ double opacity;
};
@@ -110,21 +108,21 @@ private:
public:
SPMeshPatchI( std::vector<std::vector< SPMeshNode* > > *n, int r, int c );
- Geom::Point getPoint( guint side, guint point );
- std::vector< Geom::Point > getPointsForSide( guint i );
- void setPoint( guint side, guint point, Geom::Point p, bool set = true );
- gchar getPathType( guint i );
- void setPathType( guint, gchar t );
- Geom::Point getTensorPoint( guint i );
- void setTensorPoint( guint i, Geom::Point p );
+ Geom::Point getPoint( unsigned int side, unsigned int point );
+ std::vector< Geom::Point > getPointsForSide( unsigned int i );
+ void setPoint( unsigned int side, unsigned int point, Geom::Point p, bool set = true );
+ char getPathType( unsigned int i );
+ void setPathType( unsigned int, char t );
+ Geom::Point getTensorPoint( unsigned int i );
+ void setTensorPoint( unsigned int i, Geom::Point p );
bool tensorIsSet();
- bool tensorIsSet( guint i );
- Geom::Point coonsTensorPoint( guint i );
+ bool tensorIsSet( unsigned int i );
+ Geom::Point coonsTensorPoint( unsigned int i );
void updateNodes();
- SPColor getColor( guint i );
- void setColor( guint i, SPColor c );
- gdouble getOpacity( guint i );
- void setOpacity( guint i, gdouble o );
+ SPColor getColor( unsigned int i );
+ void setColor( unsigned int i, SPColor c );
+ double getOpacity( unsigned int i );
+ void setOpacity( unsigned int i, double o );
};
class SPMeshGradient;
@@ -160,26 +158,26 @@ public:
void print();
// Get size of patch
- guint patch_rows();
- guint patch_columns();
+ unsigned int patch_rows();
+ unsigned int patch_columns();
- SPMeshNode * node( guint i, guint j ) { return nodes[i][j]; }
+ SPMeshNode * node( unsigned int i, unsigned int j ) { return nodes[i][j]; }
// Operations on corners
- bool adjacent_corners( guint i, guint j, SPMeshNode* n[4] );
- guint side_toggle( std::vector< guint > );
- guint side_arc( std::vector< guint > );
- guint tensor_toggle( std::vector< guint > );
- guint color_smooth( std::vector< guint > );
- guint color_pick( std::vector< guint >, SPItem* );
+ bool adjacent_corners( unsigned int i, unsigned int j, SPMeshNode* n[4] );
+ unsigned int side_toggle( std::vector< unsigned int > );
+ unsigned int side_arc( std::vector< unsigned int > );
+ unsigned int tensor_toggle( std::vector< unsigned int > );
+ unsigned int color_smooth( std::vector< unsigned int > );
+ unsigned int color_pick( std::vector< unsigned int >, SPItem* );
// Update other nodes in response to a node move.
- void update_handles( guint corner, std::vector< guint > selected_corners, Geom::Point old_p, MeshNodeOperation op );
+ void update_handles( unsigned int corner, std::vector< unsigned int > selected_corners, Geom::Point old_p, MeshNodeOperation op );
- void split_row( guint i, guint n );
- void split_column( guint j, guint n );
- void split_row( guint i, double coord );
- void split_column( guint j, double coord );
+ void split_row( unsigned int i, unsigned int n );
+ void split_column( unsigned int j, unsigned int n );
+ void split_row( unsigned int i, double coord );
+ void split_column( unsigned int j, double coord );
};
#endif /* !SEEN_SP_MESH_ARRAY_H */
diff --git a/src/sp-mesh-gradient.h b/src/sp-mesh-gradient.h
index 0b570c4dd..4df753f62 100644
--- a/src/sp-mesh-gradient.h
+++ b/src/sp-mesh-gradient.h
@@ -24,8 +24,8 @@ public:
protected:
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
- virtual void set(unsigned key, gchar const *value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned key, char const *value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
};
#endif /* !SP_MESH_GRADIENT_H */
diff --git a/src/sp-mesh-patch.h b/src/sp-mesh-patch.h
index ddade6503..e57ad1699 100644
--- a/src/sp-mesh-patch.h
+++ b/src/sp-mesh-patch.h
@@ -12,9 +12,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glib.h>
#include <glibmm/ustring.h>
-//#include "svg/svg-length.h"
#include "sp-object.h"
#define SP_MESHPATCH(obj) (dynamic_cast<SPMeshPatch*>((SPObject*)obj))
@@ -34,8 +32,8 @@ public:
protected:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
- virtual void set(unsigned int key, const gchar* value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual void set(unsigned int key, const char* value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
#endif /* !SEEN_SP_MESHPATCH_H */
diff --git a/src/sp-mesh-row.h b/src/sp-mesh-row.h
index e39bdc631..793b5a645 100644
--- a/src/sp-mesh-row.h
+++ b/src/sp-mesh-row.h
@@ -11,7 +11,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glib.h>
#include "sp-object.h"
#define SP_MESHROW(obj) (dynamic_cast<SPMeshRow*>((SPObject*)obj))
@@ -28,8 +27,8 @@ public:
protected:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
- virtual void set(unsigned int key, const gchar* value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual void set(unsigned int key, const char* value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
#endif /* !SEEN_SP_MESHROW_H */
diff --git a/src/sp-metadata.h b/src/sp-metadata.h
index 2a9d58e11..a89020390 100644
--- a/src/sp-metadata.h
+++ b/src/sp-metadata.h
@@ -1,5 +1,5 @@
-#ifndef __SP_METADATA_H__
-#define __SP_METADATA_H__
+#ifndef SEEN_SP_METADATA_H
+#define SEEN_SP_METADATA_H
/*
* SVG <metadata> implementation
@@ -14,7 +14,6 @@
#include "sp-object.h"
-
/* Metadata base class */
#define SP_METADATA(obj) (dynamic_cast<SPMetadata*>((SPObject*)obj))
@@ -29,9 +28,9 @@ protected:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
virtual void release();
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, const char* value);
virtual void update(SPCtx* ctx, unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
SPMetadata * sp_document_metadata (SPDocument *document);
diff --git a/src/sp-missing-glyph.h b/src/sp-missing-glyph.h
index a72ed0e99..06bc92231 100644
--- a/src/sp-missing-glyph.h
+++ b/src/sp-missing-glyph.h
@@ -1,9 +1,5 @@
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifndef __SP_MISSING_GLYPH_H__
-#define __SP_MISSING_GLYPH_H__
+#ifndef SEEN_SP_MISSING_GLYPH_H
+#define SEEN_SP_MISSING_GLYPH_H
/*
* SVG <missing-glyph> element implementation
@@ -31,8 +27,8 @@ public:
protected:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
virtual void release();
- virtual void set(unsigned int key, const gchar* value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
private:
double horiz_adv_x;
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp
index a01ba891e..1d9fa06a3 100644
--- a/src/sp-namedview.cpp
+++ b/src/sp-namedview.cpp
@@ -935,7 +935,7 @@ void SPNamedView::hide(SPDesktop const *desktop)
views = g_slist_remove(views, desktop);
}
-void SPNamedView::activateGuides(gpointer desktop, gboolean active)
+void SPNamedView::activateGuides(void* desktop, bool active)
{
g_assert(desktop != NULL);
g_assert(g_slist_find(views, desktop));
diff --git a/src/sp-namedview.h b/src/sp-namedview.h
index 05cbcc398..37310dc76 100644
--- a/src/sp-namedview.h
+++ b/src/sp-namedview.h
@@ -29,6 +29,9 @@ namespace Inkscape {
}
}
+typedef unsigned int guint32;
+typedef guint32 GQuark;
+
enum {
SP_BORDER_LAYER_BOTTOM,
SP_BORDER_LAYER_TOP
@@ -48,11 +51,11 @@ public:
double zoom;
double cx;
double cy;
- gint window_width;
- gint window_height;
- gint window_x;
- gint window_y;
- gint window_maximized;
+ int window_width;
+ int window_height;
+ int window_x;
+ int window_y;
+ int window_maximized;
SnapManager snap_manager;
GSList * grids;
@@ -74,13 +77,13 @@ public:
GSList *guides;
GSList *views;
- gint viewcount;
+ int viewcount;
void show(SPDesktop *desktop);
void hide(SPDesktop const *desktop);
- void activateGuides(gpointer desktop, gboolean active);
- gchar const *getName() const;
- guint getViewCount();
+ void activateGuides(void* desktop, bool active);
+ char const *getName() const;
+ unsigned int getViewCount();
GSList const *getViewList() const;
Inkscape::Util::Unit const * getDefaultUnit() const;
@@ -100,17 +103,17 @@ private:
protected:
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
virtual void release();
- virtual void set(unsigned int key, gchar const* value);
+ virtual void set(unsigned int key, char const* value);
virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref);
virtual void remove_child(Inkscape::XML::Node* child);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
};
-SPNamedView *sp_document_namedview(SPDocument *document, gchar const *name);
-SPNamedView const *sp_document_namedview(SPDocument const *document, gchar const *name);
+SPNamedView *sp_document_namedview(SPDocument *document, char const *name);
+SPNamedView const *sp_document_namedview(SPDocument const *document, char const *name);
void sp_namedview_window_from_document(SPDesktop *desktop);
void sp_namedview_document_from_window(SPDesktop *desktop);
diff --git a/src/sp-object-group.h b/src/sp-object-group.h
index 4df346228..dcaa8a1d0 100644
--- a/src/sp-object-group.h
+++ b/src/sp-object-group.h
@@ -30,7 +30,7 @@ protected:
virtual void order_changed(Inkscape::XML::Node* child, Inkscape::XML::Node* old, Inkscape::XML::Node* new_repr);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
};
#endif // SEEN_SP_OBJECTGROUP_H
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index 65228ec0a..fcff43aa5 100644
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -1406,12 +1406,12 @@ bool SPObject::setDesc(gchar const *desc, bool verbatim)
return setTitleOrDesc(desc, "svg:desc", verbatim);
}
-gchar * SPObject::getTitleOrDesc(gchar const *svg_tagname) const
+char * SPObject::getTitleOrDesc(gchar const *svg_tagname) const
{
- gchar *result = 0;
+ char *result = NULL;
SPObject *elem = findFirstChild(svg_tagname);
if ( elem ) {
- result = g_string_free(elem->textualContent(), FALSE);
+ result = elem->textualContent();
}
return result;
}
@@ -1493,7 +1493,7 @@ SPObject * SPObject::findFirstChild(gchar const *tagname) const
return NULL;
}
-GString * SPObject::textualContent() const
+char* SPObject::textualContent() const
{
GString* text = g_string_new("");
@@ -1502,15 +1502,15 @@ GString * SPObject::textualContent() const
Inkscape::XML::NodeType child_type = child->repr->type();
if (child_type == Inkscape::XML::ELEMENT_NODE) {
- GString * new_text = child->textualContent();
- g_string_append(text, new_text->str);
- g_string_free(new_text, TRUE);
+ char* new_string = child->textualContent();
+ g_string_append(text, new_string);
+ g_free(new_string);
}
else if (child_type == Inkscape::XML::TEXT_NODE) {
g_string_append(text, child->repr->content());
}
}
- return text;
+ return g_string_free(text, FALSE);
}
/*
diff --git a/src/sp-object.h b/src/sp-object.h
index 21926ad90..423f6ba37 100644
--- a/src/sp-object.h
+++ b/src/sp-object.h
@@ -153,7 +153,7 @@ SPObject *sp_object_unref(SPObject *object, SPObject *owner=NULL);
* \pre object points to real object
* @todo need to move this to be a member of SPObject.
*/
-SPObject *sp_object_href(SPObject *object, gpointer owner);
+SPObject *sp_object_href(SPObject *object, void* owner);
/**
* Decrease weak refcount.
@@ -165,7 +165,7 @@ SPObject *sp_object_href(SPObject *object, gpointer owner);
* \pre object points to real object and hrefcount>0
* @todo need to move this to be a member of SPObject.
*/
-SPObject *sp_object_hunref(SPObject *object, gpointer owner);
+SPObject *sp_object_hunref(SPObject *object, void* owner);
/**
* SPObject is an abstract base class of all of the document nodes at the
@@ -795,7 +795,7 @@ private:
* content except the tags).
* Must not be used on anything except elements.
*/
- GString * textualContent() const;
+ char * textualContent() const;
/* Real handlers of repr signals */
@@ -803,17 +803,17 @@ public:
/**
* Callback for attr_changed node event.
*/
- static void repr_attr_changed(Inkscape::XML::Node *repr, char const *key, char const *oldval, char const *newval, bool is_interactive, gpointer data);
+ static void repr_attr_changed(Inkscape::XML::Node *repr, char const *key, char const *oldval, char const *newval, bool is_interactive, void* data);
/**
* Callback for content_changed node event.
*/
- static void repr_content_changed(Inkscape::XML::Node *repr, char const *oldcontent, char const *newcontent, gpointer data);
+ static void repr_content_changed(Inkscape::XML::Node *repr, char const *oldcontent, char const *newcontent, void* data);
/**
* Callback for child_added node event.
*/
- static void repr_child_added(Inkscape::XML::Node *repr, Inkscape::XML::Node *child, Inkscape::XML::Node *ref, gpointer data);
+ static void repr_child_added(Inkscape::XML::Node *repr, Inkscape::XML::Node *child, Inkscape::XML::Node *ref, void* data);
/**
* Callback for remove_child node event.
@@ -825,7 +825,7 @@ public:
*
* \todo fixme:
*/
- static void repr_order_changed(Inkscape::XML::Node *repr, Inkscape::XML::Node *child, Inkscape::XML::Node *old, Inkscape::XML::Node *newer, gpointer data);
+ static void repr_order_changed(Inkscape::XML::Node *repr, Inkscape::XML::Node *child, Inkscape::XML::Node *old, Inkscape::XML::Node *newer, void* data);
friend class SPObjectImpl;
diff --git a/src/sp-offset.h b/src/sp-offset.h
index 259a69b78..eb3fe227c 100644
--- a/src/sp-offset.h
+++ b/src/sp-offset.h
@@ -11,11 +11,11 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "sp-shape.h"
-
-#include <stddef.h>
+#include <cstddef>
#include <sigc++/sigc++.h>
+#include "sp-shape.h"
+
#define SP_OFFSET(obj) (dynamic_cast<SPOffset*>((SPObject*)obj))
#define SP_IS_OFFSET(obj) (dynamic_cast<const SPOffset*>((SPObject*)obj) != NULL)
@@ -54,7 +54,7 @@ public:
SPOffset();
virtual ~SPOffset();
- void *originalPath; ///< will be a livarot Path, just don't declare it here to please the gcc linker
+ void *originalPath; ///< will be a livarot Path, just don't declare it here to please the gcc linker FIXME what?
char *original; ///< SVG description of the source path
float rad; ///< offset radius
@@ -65,7 +65,7 @@ public:
bool sourceDirty;
bool isUpdating;
- gchar *sourceHref;
+ char *sourceHref;
SPUseReference *sourceRef;
Inkscape::XML::Node *sourceRepr; ///< the repr associated with that id
SPObject *sourceObject;
@@ -76,14 +76,14 @@ public:
sigc::connection _transformed_connection;
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
- virtual void set(unsigned int key, gchar const* value);
- virtual void update(SPCtx *ctx, guint flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual void update(SPCtx *ctx, unsigned int flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned flags);
virtual void release();
virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) const;
virtual const char* displayName() const;
- virtual gchar* description() const;
+ virtual char* description() const;
virtual void set_shape();
};
diff --git a/src/sp-paint-server-reference.h b/src/sp-paint-server-reference.h
index e08694c2f..bbd9c25fa 100644
--- a/src/sp-paint-server-reference.h
+++ b/src/sp-paint-server-reference.h
@@ -15,9 +15,10 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "sp-object.h"
#include "uri-references.h"
+class SPDocument;
+class SPObject;
class SPPaintServer;
class SPPaintServerReference : public Inkscape::URIReference {
diff --git a/src/sp-paint-server.h b/src/sp-paint-server.h
index c1c8d651e..beac72af5 100644
--- a/src/sp-paint-server.h
+++ b/src/sp-paint-server.h
@@ -15,10 +15,12 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <cairo.h>
#include <2geom/rect.h>
#include "sp-object.h"
+typedef struct _cairo cairo_t;
+typedef struct _cairo_pattern cairo_pattern_t;
+
#define SP_PAINT_SERVER(obj) (dynamic_cast<SPPaintServer*>((SPObject*)obj))
#define SP_IS_PAINT_SERVER(obj) (dynamic_cast<const SPPaintServer*>((SPObject*)obj) != NULL)
diff --git a/src/sp-path.h b/src/sp-path.h
index 5f8a91d98..572fd648d 100644
--- a/src/sp-path.h
+++ b/src/sp-path.h
@@ -32,7 +32,7 @@ public:
SPPath();
virtual ~SPPath();
- gint nodesInPath() const;
+ int nodesInPath() const;
// still in lowercase because the names should be clearer on whether curve, curve->copy or curve-ref is returned.
void set_original_curve (SPCurve *curve, unsigned int owner, bool write);
@@ -49,13 +49,13 @@ public:
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
virtual void release();
- virtual void update(SPCtx* ctx, guint flags);
+ virtual void update(SPCtx* ctx, unsigned int flags);
- virtual void set(unsigned int key, gchar const* value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
virtual const char* displayName() const;
- virtual gchar* description() const;
+ virtual char* description() const;
virtual Geom::Affine set_transform(Geom::Affine const &transform);
virtual void convert_to_guides() const;
diff --git a/src/sp-pattern.h b/src/sp-pattern.h
index 8f7dbbadd..f021101e2 100644
--- a/src/sp-pattern.h
+++ b/src/sp-pattern.h
@@ -18,6 +18,7 @@
class SPPatternReference;
class SPItem;
+typedef struct _GSList GSList;
#include "svg/svg-length.h"
#include "sp-paint-server.h"
@@ -33,17 +34,17 @@ public:
virtual ~SPPattern();
/* Reference (href) */
- gchar *href;
+ char *href;
SPPatternReference *ref;
/* patternUnits and patternContentUnits attribute */
- guint patternUnits : 1;
- guint patternUnits_set : 1;
- guint patternContentUnits : 1;
- guint patternContentUnits_set : 1;
+ unsigned int patternUnits : 1;
+ unsigned int patternUnits_set : 1;
+ unsigned int patternContentUnits : 1;
+ unsigned int patternContentUnits_set : 1;
/* patternTransform attribute */
Geom::Affine patternTransform;
- guint patternTransform_set : 1;
+ unsigned int patternTransform_set : 1;
/* Tile rectangle */
SVGLength x;
SVGLength y;
@@ -83,22 +84,22 @@ enum {
SP_PATTERN_UNITS_OBJECTBOUNDINGBOX
};
-guint pattern_users (SPPattern *pattern);
+unsigned int pattern_users (SPPattern *pattern);
SPPattern *pattern_chain (SPPattern *pattern);
-SPPattern *sp_pattern_clone_if_necessary (SPItem *item, SPPattern *pattern, const gchar *property);
+SPPattern *sp_pattern_clone_if_necessary (SPItem *item, SPPattern *pattern, const char *property);
void sp_pattern_transform_multiply (SPPattern *pattern, Geom::Affine postmul, bool set);
-const gchar *pattern_tile (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Affine transform, Geom::Affine move);
+const char *pattern_tile (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Affine transform, Geom::Affine move);
SPPattern *pattern_getroot (SPPattern *pat);
-guint pattern_patternUnits (SPPattern const *pat);
-guint pattern_patternContentUnits (SPPattern const *pat);
+unsigned int pattern_patternUnits (SPPattern const *pat);
+unsigned int pattern_patternContentUnits (SPPattern const *pat);
Geom::Affine const &pattern_patternTransform(SPPattern const *pat);
-gdouble pattern_x (SPPattern const *pat);
-gdouble pattern_y (SPPattern const *pat);
-gdouble pattern_width (SPPattern const *pat);
-gdouble pattern_height (SPPattern const *pat);
+double pattern_x (SPPattern const *pat);
+double pattern_y (SPPattern const *pat);
+double pattern_width (SPPattern const *pat);
+double pattern_height (SPPattern const *pat);
Geom::OptRect pattern_viewBox (SPPattern const *pat);
#endif // SEEN_SP_PATTERN_H
diff --git a/src/sp-polygon.h b/src/sp-polygon.h
index 41ab245bd..438fdf794 100644
--- a/src/sp-polygon.h
+++ b/src/sp-polygon.h
@@ -1,5 +1,5 @@
-#ifndef __SP_POLYGON_H__
-#define __SP_POLYGON_H__
+#ifndef SEEN_SP_POLYGON_H
+#define SEEN_SP_POLYGON_H
/*
* SVG <polygon> implementation
@@ -15,7 +15,6 @@
#include "sp-shape.h"
-
#define SP_POLYGON(obj) (dynamic_cast<SPPolygon*>((SPObject*)obj))
#define SP_IS_POLYGON(obj) (dynamic_cast<const SPPolygon*>((SPObject*)obj) != NULL)
@@ -25,12 +24,12 @@ public:
virtual ~SPPolygon();
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
- virtual void set(unsigned int key, gchar const* value);
- virtual gchar* description() const;
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual char* description() const;
};
// made 'public' so that SPCurve can set it as friend:
-void sp_polygon_set(SPObject *object, unsigned int key, const gchar *value);
+void sp_polygon_set(SPObject *object, unsigned int key, char const*value);
#endif
diff --git a/src/sp-polyline.h b/src/sp-polyline.h
index e24ea95c7..1ca102a9e 100644
--- a/src/sp-polyline.h
+++ b/src/sp-polyline.h
@@ -12,10 +12,10 @@ public:
virtual ~SPPolyLine();
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
- virtual void set(unsigned int key, gchar const* value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
- virtual gchar* description() const;
+ virtual char* description() const;
};
#endif // SEEN_SP_POLYLINE_H
diff --git a/src/sp-radial-gradient.cpp b/src/sp-radial-gradient.cpp
index 7c481fead..2c2b17b7d 100644
--- a/src/sp-radial-gradient.cpp
+++ b/src/sp-radial-gradient.cpp
@@ -1,3 +1,5 @@
+#include <cairo.h>
+
#include "sp-radial-gradient.h"
#include "attributes.h"
diff --git a/src/sp-radial-gradient.h b/src/sp-radial-gradient.h
index 42ff109aa..f753623b7 100644
--- a/src/sp-radial-gradient.h
+++ b/src/sp-radial-gradient.h
@@ -5,10 +5,12 @@
* SPRadialGradient: SVG <radialgradient> implementtion.
*/
-#include <glib.h>
#include "sp-gradient.h"
#include "svg/svg-length.h"
+typedef struct _cairo cairo_t;
+typedef struct _cairo_pattern cairo_pattern_t;
+
#define SP_RADIALGRADIENT(obj) (dynamic_cast<SPRadialGradient*>((SPObject*)obj))
#define SP_IS_RADIALGRADIENT(obj) (dynamic_cast<const SPRadialGradient*>((SPObject*)obj) != NULL)
@@ -28,8 +30,8 @@ public:
protected:
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
- virtual void set(unsigned key, gchar const *value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned key, char const *value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
};
#endif /* !SP_RADIAL_GRADIENT_H */
diff --git a/src/sp-rect.h b/src/sp-rect.h
index aa3f88e42..757229724 100644
--- a/src/sp-rect.h
+++ b/src/sp-rect.h
@@ -14,10 +14,10 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "svg/svg-length.h"
-#include "sp-shape.h"
#include <2geom/forward.h>
+#include "svg/svg-length.h"
+#include "sp-shape.h"
#define SP_RECT(obj) (dynamic_cast<SPRect*>((SPObject*)obj))
#define SP_IS_RECT(obj) (dynamic_cast<const SPRect*>((SPObject*)obj) != NULL)
@@ -27,34 +27,34 @@ public:
SPRect();
virtual ~SPRect();
- void setPosition(gdouble x, gdouble y, gdouble width, gdouble height);
+ void setPosition(double x, double y, double width, double height);
/* If SET if FALSE, VALUE is just ignored */
- void setRx(bool set, gdouble value);
- void setRy(bool set, gdouble value);
+ void setRx(bool set, double value);
+ void setRy(bool set, double value);
- gdouble getVisibleRx() const;
- void setVisibleRx(gdouble rx);
+ double getVisibleRx() const;
+ void setVisibleRx(double rx);
- gdouble getVisibleRy() const;
- void setVisibleRy(gdouble ry);
+ double getVisibleRy() const;
+ void setVisibleRy(double ry);
Geom::Rect getRect() const;
- gdouble getVisibleWidth() const;
- void setVisibleWidth(gdouble rx);
+ double getVisibleWidth() const;
+ void setVisibleWidth(double rx);
- gdouble getVisibleHeight() const;
- void setVisibleHeight(gdouble ry);
+ double getVisibleHeight() const;
+ void setVisibleHeight(double ry);
void compensateRxRy(Geom::Affine xform);
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
- virtual void set(unsigned key, gchar const *value);
+ virtual void set(unsigned key, char const *value);
virtual void update(SPCtx* ctx, unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
virtual const char* displayName() const;
virtual void set_shape();
@@ -71,7 +71,7 @@ public:
SVGLength ry;
private:
- static gdouble vectorStretch(Geom::Point p0, Geom::Point p1, Geom::Affine xform);
+ static double vectorStretch(Geom::Point p0, Geom::Point p1, Geom::Affine xform);
};
#endif // SEEN_SP_RECT_H
diff --git a/src/sp-root.h b/src/sp-root.h
index a25e8030c..2776ae887 100644
--- a/src/sp-root.h
+++ b/src/sp-root.h
@@ -40,7 +40,7 @@ public:
SVGLength width;
SVGLength height;
- gchar *onload;
+ char *onload;
/**
* Primary \<defs\> element where we put new defs (patterns, gradients etc.).
@@ -52,9 +52,9 @@ public:
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
virtual void release();
- virtual void set(unsigned int key, gchar const* value);
- virtual void update(SPCtx *ctx, guint flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual void update(SPCtx *ctx, unsigned int flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
virtual void modified(unsigned int flags);
virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref);
diff --git a/src/sp-script.h b/src/sp-script.h
index 36072a0ca..b71f86720 100644
--- a/src/sp-script.h
+++ b/src/sp-script.h
@@ -1,5 +1,5 @@
-#ifndef __SP_SCRIPT_H__
-#define __SP_SCRIPT_H__
+#ifndef SEEN_SP_SCRIPT_H
+#define SEEN_SP_SCRIPT_H
/*
* SVG <script> implementation
@@ -24,15 +24,15 @@ public:
SPScript();
virtual ~SPScript();
- gchar *xlinkhref;
+ char *xlinkhref;
protected:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
virtual void release();
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, char const* value);
virtual void update(SPCtx* ctx, unsigned int flags);
virtual void modified(unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
#endif
diff --git a/src/sp-shape.h b/src/sp-shape.h
index f260c1ee6..da8e4c007 100644
--- a/src/sp-shape.h
+++ b/src/sp-shape.h
@@ -15,13 +15,13 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "sp-lpe-item.h"
-#include "sp-marker-loc.h"
#include <2geom/forward.h>
-
-#include <stddef.h>
+#include <cstddef>
#include <sigc++/connection.h>
+#include "sp-lpe-item.h"
+#include "sp-marker-loc.h"
+
#define SP_SHAPE(obj) (dynamic_cast<SPShape*>((SPObject*)obj))
#define SP_IS_SHAPE(obj) (dynamic_cast<const SPShape*>((SPObject*)obj) != NULL)
@@ -57,11 +57,11 @@ public:
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
virtual void release();
- virtual void update(SPCtx* ctx, guint flags);
+ virtual void update(SPCtx* ctx, unsigned int flags);
virtual void modified(unsigned int flags);
- virtual void set(unsigned int key, gchar const* value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype) const;
virtual void print(SPPrintContext* ctx);
@@ -75,7 +75,7 @@ public:
};
-void sp_shape_set_marker (SPObject *object, unsigned int key, const gchar *value);
+void sp_shape_set_marker (SPObject *object, unsigned int key, const char *value);
Geom::Affine sp_shape_marker_get_transform(Geom::Curve const & c1, Geom::Curve const & c2);
Geom::Affine sp_shape_marker_get_transform_at_start(Geom::Curve const & c);
diff --git a/src/sp-solid-color.cpp b/src/sp-solid-color.cpp
index 9f6692f98..0d6b96b62 100644
--- a/src/sp-solid-color.cpp
+++ b/src/sp-solid-color.cpp
@@ -8,6 +8,8 @@
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <cairo.h>
+
#include "sp-solid-color.h"
#include "attributes.h"
diff --git a/src/sp-solid-color.h b/src/sp-solid-color.h
index 0ff09762e..4dbb573b0 100644
--- a/src/sp-solid-color.h
+++ b/src/sp-solid-color.h
@@ -11,10 +11,12 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glib.h>
#include "color.h"
#include "sp-paint-server.h"
+typedef struct _cairo cairo_t;
+typedef struct _cairo_pattern cairo_pattern_t;
+
#define SP_SOLIDCOLOR(obj) (dynamic_cast<SPSolidColor*>((SPObject*)obj))
#define SP_IS_SOLIDCOLOR(obj) (dynamic_cast<const SPSolidColor*>((SPObject*)obj) != NULL)
@@ -28,8 +30,8 @@ public:
protected:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
- virtual void set(unsigned int key, const gchar* value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
#endif /* !SEEN_SP_SOLIDCOLOR_H */
diff --git a/src/sp-spiral.h b/src/sp-spiral.h
index 64b95d951..94724685c 100644
--- a/src/sp-spiral.h
+++ b/src/sp-spiral.h
@@ -52,29 +52,29 @@ public:
float t0;
/* Lowlevel interface */
- void setPosition(gdouble cx, gdouble cy, gdouble exp, gdouble revo, gdouble rad, gdouble arg, gdouble t0);
+ void setPosition(double cx, double cy, double exp, double revo, double rad, double arg, double t0);
virtual Geom::Affine set_transform(Geom::Affine const& xform);
- Geom::Point getXY(gdouble t) const;
+ Geom::Point getXY(double t) const;
- void getPolar(gdouble t, gdouble* rad, gdouble* arg) const;
+ void getPolar(double t, double* rad, double* arg) const;
bool isInvalid() const;
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
- virtual void update(SPCtx *ctx, guint flags);
- virtual void set(unsigned int key, gchar const* value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
+ virtual void update(SPCtx *ctx, unsigned int flags);
+ virtual void set(unsigned int key, char const* value);
virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) const;
virtual const char* displayName() const;
- virtual gchar* description() const;
+ virtual char* description() const;
virtual void set_shape();
virtual void update_patheffect(bool write);
private:
- Geom::Point getTangent(gdouble t) const;
+ Geom::Point getTangent(double t) const;
void fitAndDraw(SPCurve* c, double dstep, Geom::Point darray[], Geom::Point const& hat1, Geom::Point& hat2, double* t) const;
};
diff --git a/src/sp-star.h b/src/sp-star.h
index 0070ce685..1ebe3298a 100644
--- a/src/sp-star.h
+++ b/src/sp-star.h
@@ -1,5 +1,5 @@
-#ifndef __SP_STAR_H__
-#define __SP_STAR_H__
+#ifndef SEEN_SP_STAR_H
+#define SEEN_SP_STAR_H
/*
* <sodipodi:star> implementation
@@ -30,7 +30,7 @@ public:
SPStar();
virtual ~SPStar();
- gint sides;
+ int sides;
Geom::Point center;
double r[2];
@@ -46,12 +46,12 @@ public:
// What does polygon have that shape doesn't?
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
- virtual void set(unsigned int key, gchar const* value);
- virtual void update(SPCtx* ctx, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual void update(SPCtx* ctx, unsigned int flags);
virtual const char* displayName() const;
- virtual gchar* description() const;
+ virtual char* description() const;
virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) const;
virtual void update_patheffect(bool write);
@@ -59,9 +59,9 @@ public:
virtual Geom::Affine set_transform(Geom::Affine const& xform);
};
-void sp_star_position_set (SPStar *star, gint sides, Geom::Point center, gdouble r1, gdouble r2, gdouble arg1, gdouble arg2, bool isflat, double rounded, double randomized);
+void sp_star_position_set (SPStar *star, int sides, Geom::Point center, double r1, double r2, double arg1, double arg2, bool isflat, double rounded, double randomized);
-Geom::Point sp_star_get_xy (SPStar const *star, SPStarPoint point, gint index, bool randomized = false);
+Geom::Point sp_star_get_xy (SPStar const *star, SPStarPoint point, int index, bool randomized = false);
diff --git a/src/sp-stop.h b/src/sp-stop.h
index b1996e054..f7b3a677a 100644
--- a/src/sp-stop.h
+++ b/src/sp-stop.h
@@ -5,12 +5,13 @@
* SPStop: SVG <stop> implementation.
*/
/*
- * Authors?
+ * Authors:
*/
#include "sp-object.h"
#include "color.h"
-#include <glib.h>
+
+typedef unsigned int guint32;
namespace Glib {
class ustring;
@@ -26,7 +27,7 @@ public:
virtual ~SPStop();
/// \todo fixme: Should be SPSVGPercentage
- gfloat offset;
+ float offset;
bool currentColor;
@@ -37,7 +38,7 @@ public:
SPColor specified_color;
/// \todo fixme: Implement SPSVGNumber or something similar.
- gfloat opacity;
+ float opacity;
Glib::ustring * path_string;
//SPCurve path;
@@ -53,8 +54,8 @@ public:
protected:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
- virtual void set(unsigned int key, const gchar* value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual void set(unsigned int key, const char* value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
diff --git a/src/sp-string.h b/src/sp-string.h
index eabf76353..b80b4b8bf 100644
--- a/src/sp-string.h
+++ b/src/sp-string.h
@@ -1,5 +1,5 @@
-#ifndef __SP_STRING_H__
-#define __SP_STRING_H__
+#ifndef SEEN_SP_STRING_H
+#define SEEN_SP_STRING_H
/*
* string elements
diff --git a/src/sp-style-elem.h b/src/sp-style-elem.h
index 8e8a2b3a8..766770216 100644
--- a/src/sp-style-elem.h
+++ b/src/sp-style-elem.h
@@ -16,9 +16,9 @@ public:
bool is_css;
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
- virtual void set(unsigned int key, gchar const* value);
+ virtual void set(unsigned int key, char const* value);
virtual void read_content();
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
diff --git a/src/sp-switch.h b/src/sp-switch.h
index c35982860..4fce1f5a6 100644
--- a/src/sp-switch.h
+++ b/src/sp-switch.h
@@ -1,5 +1,5 @@
-#ifndef __SP_SWITCH_H__
-#define __SP_SWITCH_H__
+#ifndef SEEN_SP_SWITCH_H
+#define SEEN_SP_SWITCH_H
/*
* SVG <switch> implementation
@@ -12,10 +12,12 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <cstddef>
+#include <sigc++/connection.h>
+
#include "sp-item-group.h"
-#include <stddef.h>
-#include <sigc++/connection.h>
+typedef struct _GSList GSList;
#define SP_SWITCH(obj) (dynamic_cast<SPSwitch*>((SPObject*)obj))
#define SP_IS_SWITCH(obj) (dynamic_cast<const SPSwitch*>((SPObject*)obj) != NULL)
diff --git a/src/sp-symbol.h b/src/sp-symbol.h
index a2e769cc2..6b46a8c1a 100644
--- a/src/sp-symbol.h
+++ b/src/sp-symbol.h
@@ -1,5 +1,5 @@
-#ifndef __SP_SYMBOL_H__
-#define __SP_SYMBOL_H__
+#ifndef SEEN_SP_SYMBOL_H
+#define SEEN_SP_SYMBOL_H
/*
* SVG <symbol> implementation
@@ -17,14 +17,14 @@
* Maybe we should merge them somehow (Lauris)
*/
-#define SP_TYPE_SYMBOL (sp_symbol_get_type ())
-#define SP_SYMBOL(obj) (dynamic_cast<SPSymbol*>((SPObject*)obj))
-#define SP_IS_SYMBOL(obj) (dynamic_cast<const SPSymbol*>((SPObject*)obj) != NULL)
-
#include <2geom/affine.h>
#include "sp-item-group.h"
#include "viewbox.h"
+#define SP_TYPE_SYMBOL (sp_symbol_get_type ())
+#define SP_SYMBOL(obj) (dynamic_cast<SPSymbol*>((SPObject*)obj))
+#define SP_IS_SYMBOL(obj) (dynamic_cast<const SPSymbol*>((SPObject*)obj) != NULL)
+
class SPSymbol : public SPGroup, public SPViewBox {
public:
SPSymbol();
@@ -32,9 +32,9 @@ public:
virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
virtual void release();
- virtual void set(unsigned int key, gchar const* value);
- virtual void update(SPCtx *ctx, guint flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned int key, char const* value);
+ virtual void update(SPCtx *ctx, unsigned int flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
virtual void modified(unsigned int flags);
virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref);
diff --git a/src/sp-text.h b/src/sp-text.h
index b9ae745c9..be48d7fcb 100644
--- a/src/sp-text.h
+++ b/src/sp-text.h
@@ -1,5 +1,5 @@
-#ifndef __SP_TEXT_H__
-#define __SP_TEXT_H__
+#ifndef SEEN_SP_TEXT_H
+#define SEEN_SP_TEXT_H
/*
* SVG <text> and <tspan> implementation
@@ -13,13 +13,13 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glib.h>
-#include <stddef.h>
+#include <cstddef>
#include <sigc++/sigc++.h>
-#include "sp-string.h" // Provides many other headers with SP_IS_STRING
+
+#include "libnrtype/Layout-TNG.h"
#include "sp-item.h"
+#include "sp-string.h" // Provides many other headers with SP_IS_STRING
#include "text-tag-attributes.h"
-#include "libnrtype/Layout-TNG.h"
#define SP_TEXT(obj) (dynamic_cast<SPText*>((SPObject*)obj))
#define SP_IS_TEXT(obj) (dynamic_cast<const SPText*>((SPObject*)obj) != NULL)
@@ -81,15 +81,15 @@ public:
virtual void release();
virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref);
virtual void remove_child(Inkscape::XML::Node* child);
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, const char* value);
virtual void update(SPCtx* ctx, unsigned int flags);
virtual void modified(unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type) const;
virtual void print(SPPrintContext *ctx);
virtual const char* displayName() const;
- virtual gchar* description() const;
+ virtual char* description() const;
virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags);
virtual void hide(unsigned int key);
virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) const;
diff --git a/src/sp-textpath.h b/src/sp-textpath.h
index 075743d8e..4457cb8cf 100644
--- a/src/sp-textpath.h
+++ b/src/sp-textpath.h
@@ -1,14 +1,13 @@
#ifndef INKSCAPE_SP_TEXTPATH_H
#define INKSCAPE_SP_TEXTPATH_H
-#include <glib.h>
#include "svg/svg-length.h"
#include "sp-item.h"
#include "sp-text.h"
+
class SPUsePath;
class Path;
-
#define SP_TEXTPATH(obj) (dynamic_cast<SPTextPath*>((SPObject*)obj))
#define SP_IS_TEXTPATH(obj) (dynamic_cast<const SPTextPath*>((SPObject*)obj) != NULL)
@@ -26,10 +25,10 @@ public:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
virtual void release();
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, const char* value);
virtual void update(SPCtx* ctx, unsigned int flags);
virtual void modified(unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
};
#define SP_IS_TEXT_TEXTPATH(obj) (SP_IS_TEXT(obj) && obj->firstChild() && SP_IS_TEXTPATH(obj->firstChild()))
diff --git a/src/sp-title.h b/src/sp-title.h
index 14faf4b0a..04f3829c6 100644
--- a/src/sp-title.h
+++ b/src/sp-title.h
@@ -1,5 +1,5 @@
-#ifndef __SP_TITLE_H__
-#define __SP_TITLE_H__
+#ifndef SEEN_SP_TITLE_H
+#define SEEN_SP_TITLE_H
/*
* SVG <title> implementation
@@ -22,7 +22,7 @@ public:
SPTitle();
virtual ~SPTitle();
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
};
#endif
diff --git a/src/sp-tref-reference.h b/src/sp-tref-reference.h
index 10cc25121..b555ace2d 100644
--- a/src/sp-tref-reference.h
+++ b/src/sp-tref-reference.h
@@ -12,15 +12,17 @@
* Released under GNU GPL, read the file 'COPYING' for more information.
*/
-#include "sp-item.h"
-#include <uri-references.h>
-#include <stddef.h>
+#include <cstddef>
#include <sigc++/sigc++.h>
+#include "sp-item.h"
+#include "uri-references.h"
+
#include "util/share.h"
#include "xml/node-observer.h"
#include "xml/subtree.h"
+typedef unsigned int GQuark;
class SPTRefReference : public Inkscape::URIReference,
public Inkscape::XML::NodeObserver {
diff --git a/src/sp-tref.h b/src/sp-tref.h
index f5aed9ba6..1727620cd 100644
--- a/src/sp-tref.h
+++ b/src/sp-tref.h
@@ -34,7 +34,7 @@ public:
TextTagAttributes attributes;
// Text stored in the xlink:href attribute
- gchar *href;
+ char *href;
// URI reference to original object
SPTRefReference *uriOriginalRef;
@@ -53,14 +53,14 @@ public:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
virtual void release();
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, char const* value);
virtual void update(SPCtx* ctx, unsigned int flags);
virtual void modified(unsigned int flags);
virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type) const;
virtual const char* displayName() const;
- virtual gchar* description() const;
+ virtual char* description() const;
};
void sp_tref_update_text(SPTRef *tref);
diff --git a/src/sp-tspan.h b/src/sp-tspan.h
index 4c23b2eba..1aef4cd0c 100644
--- a/src/sp-tspan.h
+++ b/src/sp-tspan.h
@@ -5,7 +5,6 @@
* tspan and textpath, based on the flowtext routines
*/
-#include <glib.h>
#include "sp-item.h"
#include "text-tag-attributes.h"
@@ -23,15 +22,15 @@ public:
SPTSpan();
virtual ~SPTSpan();
- guint role : 2;
+ unsigned int role : 2;
TextTagAttributes attributes;
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
virtual void release();
- virtual void set(unsigned int key, const gchar* value);
+ virtual void set(unsigned int key, const char* value);
virtual void update(SPCtx* ctx, unsigned int flags);
virtual void modified(unsigned int flags);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type) const;
virtual const char* displayName() const;
diff --git a/src/sp-use-reference.h b/src/sp-use-reference.h
index d99b425f1..297bdc26c 100644
--- a/src/sp-use-reference.h
+++ b/src/sp-use-reference.h
@@ -9,11 +9,11 @@
* Released under GNU GPL, read the file 'COPYING' for more information.
*/
-#include "sp-item.h"
-#include <uri-references.h>
-#include <stddef.h>
#include <sigc++/sigc++.h>
+#include "sp-item.h"
+#include "uri-references.h"
+
class Path;
namespace Inkscape {
@@ -43,7 +43,7 @@ public:
bool sourceDirty;
SPObject *owner;
- gchar *sourceHref;
+ char *sourceHref;
Inkscape::XML::Node *sourceRepr;
SPObject *sourceObject;
diff --git a/src/sp-use.h b/src/sp-use.h
index 215eb44d7..97385b986 100644
--- a/src/sp-use.h
+++ b/src/sp-use.h
@@ -1,5 +1,5 @@
-#ifndef __SP_USE_H__
-#define __SP_USE_H__
+#ifndef SEEN_SP_USE_H
+#define SEEN_SP_USE_H
/*
* SVG <use> implementation
@@ -13,8 +13,9 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <stddef.h>
+#include <cstddef>
#include <sigc++/sigc++.h>
+
#include "svg/svg-length.h"
#include "sp-item.h"
#include "enums.h"
@@ -38,7 +39,7 @@ public:
SVGLength y;
SVGLength width;
SVGLength height;
- gchar *href;
+ char *href;
// the reference to the original object
SPUseReference *ref;
@@ -52,14 +53,14 @@ public:
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
virtual void release();
- virtual void set(unsigned key, gchar const *value);
- virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
+ virtual void set(unsigned key, char const *value);
+ virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
virtual void update(SPCtx* ctx, unsigned int flags);
virtual void modified(unsigned int flags);
virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype) const;
virtual const char* displayName() const;
- virtual gchar* description() const;
+ virtual char* description() const;
virtual void print(SPPrintContext *ctx);
virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags);
virtual void hide(unsigned int key);
diff --git a/src/splivarot.h b/src/splivarot.h
index 329fc65d2..ba314399f 100644
--- a/src/splivarot.h
+++ b/src/splivarot.h
@@ -1,5 +1,5 @@
-#ifndef __SP_LIVAROT_H__
-#define __SP_LIVAROT_H__
+#ifndef SEEN_SP_LIVAROT_H
+#define SEEN_SP_LIVAROT_H
/*
* boolops and outlines
@@ -7,9 +7,10 @@
* public domain
*/
-#include "livarot/Path.h"
#include <2geom/forward.h>
#include <2geom/path.h>
+#include "livarot/Path.h"
+
class SPCurve;
class SPDesktop;
class SPItem;
diff --git a/src/streq.h b/src/streq.h
index a3524a941..7edc5cfe9 100644
--- a/src/streq.h
+++ b/src/streq.h
@@ -2,7 +2,6 @@
#define INKSCAPE_STREQ_H
#include <cstring>
-#include <string>
/** Convenience/readability wrapper for strcmp(a,b)==0. */
inline bool
diff --git a/src/style-enums.h b/src/style-enums.h
index 024943458..f52752018 100644
--- a/src/style-enums.h
+++ b/src/style-enums.h
@@ -17,7 +17,7 @@
/* SPFontStyle */
-#include "display/canvas-bpath.h"
+#include "display/canvas-bpath.h" // FIXME those enums belong here!
enum SPCSSFontSize {
SP_CSS_FONT_SIZE_XX_SMALL,
@@ -227,8 +227,8 @@ enum SPTextRendering {
struct SPStyleEnum {
- gchar const *key;
- gint value;
+ char const *key;
+ int value;
};
static SPStyleEnum const enum_fill_rule[] = {
diff --git a/src/style.h b/src/style.h
index 01a9d4b84..48eb55430 100644
--- a/src/style.h
+++ b/src/style.h
@@ -20,11 +20,9 @@
#include "style-enums.h"
#include "style-internal.h"
-#include <stddef.h>
#include <sigc++/connection.h>
#include <iostream>
#include <vector>
-// #include <map>
// Define SPIBasePtr, a Pointer to a data member of SPStyle of type SPIBase;
typedef SPIBase SPStyle::*SPIBasePtr;
@@ -40,9 +38,6 @@ class Node;
#include "libcroco/cr-declaration.h"
#include "libcroco/cr-prop-list.h"
-//struct CRDeclaration;
-//struct CRPropList;
-
/// An SVG style object.
class SPStyle {
@@ -55,8 +50,8 @@ public:
void read(SPObject *object, Inkscape::XML::Node *repr);
void readFromObject(SPObject *object);
void readFromPrefs(Glib::ustring const &path);
- void readIfUnset( gint id, gchar const *val );
- Glib::ustring write( guint const flags, SPStyle const *const base = NULL ) const;
+ void readIfUnset( int id, char const *val );
+ Glib::ustring write( unsigned int const flags, SPStyle const *const base = NULL ) const;
void cascade( SPStyle const *const parent );
void merge( SPStyle const *const parent );
bool operator==(const SPStyle& rhs);
@@ -66,7 +61,7 @@ public:
//FIXME: Make private
public:
- void _mergeString( gchar const *const p ); // Rename to readFromString?
+ void _mergeString( char const *const p ); // Rename to readFromString?
private:
void _mergeDeclList( CRDeclaration const *const decl_list );
void _mergeDecl( CRDeclaration const *const decl );
@@ -260,15 +255,15 @@ public:
SPObject *getFilter() { return (filter.href) ? filter.href->getObject() : NULL; }
SPObject const *getFilter() const { return (filter.href) ? filter.href->getObject() : NULL; }
- gchar const *getFilterURI() const { return (filter.href) ? filter.href->getURI()->toString() : NULL; }
+ char const *getFilterURI() const { return (filter.href) ? filter.href->getURI()->toString() : NULL; }
SPPaintServer *getFillPaintServer() { return (fill.value.href) ? fill.value.href->getObject() : NULL; }
SPPaintServer const *getFillPaintServer() const { return (fill.value.href) ? fill.value.href->getObject() : NULL; }
- gchar const *getFillURI() const { return (fill.value.href) ? fill.value.href->getURI()->toString() : NULL; }
+ char const *getFillURI() const { return (fill.value.href) ? fill.value.href->getURI()->toString() : NULL; }
SPPaintServer *getStrokePaintServer() { return (stroke.value.href) ? stroke.value.href->getObject() : NULL; }
SPPaintServer const *getStrokePaintServer() const { return (stroke.value.href) ? stroke.value.href->getObject() : NULL; }
- gchar const *getStrokeURI() const { return (stroke.value.href) ? stroke.value.href->getURI()->toString() : NULL; }
+ char const *getStrokeURI() const { return (stroke.value.href) ? stroke.value.href->getURI()->toString() : NULL; }
};
SPStyle *sp_style_new(SPDocument *document); // SPStyle::SPStyle( SPDocument *document = NULL );
@@ -283,39 +278,39 @@ void sp_style_read_from_object(SPStyle *style, SPObject *object); //SPStyle::rea
void sp_style_read_from_prefs(SPStyle *style, Glib::ustring const &path); // SPStyle::read( ... );
-void sp_style_merge_from_style_string(SPStyle *style, gchar const *p); // SPStyle::merge( ... );?
+void sp_style_merge_from_style_string(SPStyle *style, char const *p); // SPStyle::merge( ... );?
void sp_style_merge_from_parent(SPStyle *style, SPStyle const *parent); // SPStyle::cascade( ... );
void sp_style_merge_from_dying_parent(SPStyle *style, SPStyle const *parent); // SPStyle::merge( ... )
-gchar *sp_style_write_string(SPStyle const *style, guint flags = SP_STYLE_FLAG_IFSET);//SPStyle::write
+char *sp_style_write_string(SPStyle const *style, unsigned int flags = SP_STYLE_FLAG_IFSET);//SPStyle::write
-gchar *sp_style_write_difference(SPStyle const *from, SPStyle const *to); // SPStyle::write
+char *sp_style_write_difference(SPStyle const *from, SPStyle const *to); // SPStyle::write
-void sp_style_set_to_uri_string (SPStyle *style, bool isfill, const gchar *uri); // ?
+void sp_style_set_to_uri_string (SPStyle *style, bool isfill, const char *uri); // ?
-gchar const *sp_style_get_css_unit_string(int unit); // No change?
+char const *sp_style_get_css_unit_string(int unit); // No change?
double sp_style_css_size_px_to_units(double size, int unit); // No change?
double sp_style_css_size_units_to_px(double size, int unit); // No change?
-SPCSSAttr *sp_css_attr_from_style (SPStyle const *const style, guint flags);
-SPCSSAttr *sp_css_attr_from_object(SPObject *object, guint flags = SP_STYLE_FLAG_IFSET);
+SPCSSAttr *sp_css_attr_from_style (SPStyle const *const style, unsigned int flags);
+SPCSSAttr *sp_css_attr_from_object(SPObject *object, unsigned int flags = SP_STYLE_FLAG_IFSET);
SPCSSAttr *sp_css_attr_unset_text(SPCSSAttr *css);
SPCSSAttr *sp_css_attr_unset_uris(SPCSSAttr *css);
SPCSSAttr *sp_css_attr_scale(SPCSSAttr *css, double ex);
void sp_style_unset_property_attrs(SPObject *o);
-void sp_style_set_property_url (SPObject *item, gchar const *property, SPObject *linked, bool recursive);
+void sp_style_set_property_url (SPObject *item, char const *property, SPObject *linked, bool recursive);
void css_quote( Glib::ustring &val ); // Add quotes around CSS values
void css_unquote( Glib::ustring &val ); // Remove quotes from CSS values (style-internal.cpp, xml/repr-css.cpp)
void css_font_family_quote( Glib::ustring &val ); // style-internal.cpp, text-toolbar.cpp
void css_font_family_unquote( Glib::ustring &val ); // style-internal.cpp, text-toolbar.cpp
-Glib::ustring css2_escape_quote(gchar const *val);
+Glib::ustring css2_escape_quote(char const *val);
#endif // SEEN_SP_STYLE_H
diff --git a/src/svg-view-widget.h b/src/svg-view-widget.h
index eab5be75b..34c70f396 100644
--- a/src/svg-view-widget.h
+++ b/src/svg-view-widget.h
@@ -44,7 +44,7 @@ public:
/// Whether to resize automatically
bool resize;
- gdouble maxwidth, maxheight;
+ double maxwidth, maxheight;
// C++ Wrappers
diff --git a/src/svg-view.h b/src/svg-view.h
index 89f38ad34..bd6fd683a 100644
--- a/src/svg-view.h
+++ b/src/svg-view.h
@@ -16,7 +16,6 @@
struct SPCanvasGroup;
struct SPCanvasItem;
-
/**
* Generic SVG view.
*/
@@ -25,12 +24,12 @@ public:
unsigned int _dkey;
SPCanvasGroup *_parent;
SPCanvasItem *_drawing;
- gdouble _hscale; ///< horizontal scale
- gdouble _vscale; ///< vertical scale
+ double _hscale; ///< horizontal scale
+ double _vscale; ///< vertical scale
bool _rescale; ///< whether to rescale automatically
bool _keepaspect;
- gdouble _width;
- gdouble _height;
+ double _width;
+ double _height;
/**
@@ -43,12 +42,12 @@ public:
/**
* Rescales SPSVGView to given proportions.
*/
- void setScale(gdouble hscale, gdouble vscale);
+ void setScale(double hscale, double vscale);
/**
* Rescales SPSVGView and keeps aspect ratio.
*/
- void setRescale(bool rescale, bool keepaspect, gdouble width, gdouble height);
+ void setRescale(bool rescale, bool keepaspect, double width, double height);
/**
* Helper function that sets rescale ratio and emits resize event.
diff --git a/src/text-chemistry.h b/src/text-chemistry.h
index 1ae0a1779..c983f005f 100644
--- a/src/text-chemistry.h
+++ b/src/text-chemistry.h
@@ -1,6 +1,8 @@
#ifndef SEEN_TEXT_CHEMISTRY_H
#define SEEN_TEXT_CHEMISTRY_H
+// TODO move to selection-chemistry?
+
/*
* Text commands
*
diff --git a/src/text-editing.h b/src/text-editing.h
index 290a39194..3a86bf48e 100644
--- a/src/text-editing.h
+++ b/src/text-editing.h
@@ -13,7 +13,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <glib.h>
#include <utility> // std::pair
#include "libnrtype/Layout-TNG.h"
#include "text-tag-attributes.h"
@@ -54,14 +53,14 @@ double sp_te_get_average_linespacing (SPItem *text);
SPStyle const * sp_te_style_at_position(SPItem const *text, Inkscape::Text::Layout::iterator const &position);
SPObject const * sp_te_object_at_position(SPItem const *text, Inkscape::Text::Layout::iterator const &position);
-Inkscape::Text::Layout::iterator sp_te_insert(SPItem *item, Inkscape::Text::Layout::iterator const &position, gchar const *utf8);
-Inkscape::Text::Layout::iterator sp_te_replace(SPItem *item, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, gchar const *utf8);
+Inkscape::Text::Layout::iterator sp_te_insert(SPItem *item, Inkscape::Text::Layout::iterator const &position, char const *utf8);
+Inkscape::Text::Layout::iterator sp_te_replace(SPItem *item, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, char const *utf8);
Inkscape::Text::Layout::iterator sp_te_insert_line (SPItem *text, Inkscape::Text::Layout::iterator const &position);
bool sp_te_delete (SPItem *item, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, iterator_pair &iter_pair);
-gchar *sp_te_get_string_multiline(SPItem const *text);
+char *sp_te_get_string_multiline(SPItem const *text);
Glib::ustring sp_te_get_string_multiline(SPItem const *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end);
-void sp_te_set_repr_text_multiline(SPItem *text, gchar const *str);
+void sp_te_set_repr_text_multiline(SPItem *text, char const *str);
TextTagAttributes*
text_tag_attributes_at_position(SPItem *item, Inkscape::Text::Layout::iterator const &position, unsigned *char_index);
@@ -70,12 +69,12 @@ void sp_te_adjust_kerning_screen(SPItem *text, Inkscape::Text::Layout::iterator
void sp_te_adjust_dx (SPItem *item, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, double delta);
void sp_te_adjust_dy (SPItem *item, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, double delta);
-void sp_te_adjust_rotation_screen(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, gdouble pixels);
-void sp_te_adjust_rotation(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, gdouble degrees);
-void sp_te_set_rotation(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, gdouble degrees);
+void sp_te_adjust_rotation_screen(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, double pixels);
+void sp_te_adjust_rotation(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, double degrees);
+void sp_te_set_rotation(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, double degrees);
-void sp_te_adjust_tspan_letterspacing_screen(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, gdouble by);
-void sp_te_adjust_linespacing_screen(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, gdouble by);
+void sp_te_adjust_tspan_letterspacing_screen(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, double by);
+void sp_te_adjust_linespacing_screen(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, double by);
void sp_te_apply_style(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPCSSAttr const *css);
bool is_part_of_text_subtree (SPObject *obj);
diff --git a/src/transf_mat_3x4.h b/src/transf_mat_3x4.h
index 8542e5e00..7c0c72120 100644
--- a/src/transf_mat_3x4.h
+++ b/src/transf_mat_3x4.h
@@ -35,7 +35,7 @@ public:
return Geom::atan2(Geom::Point(vp[0], vp[1])) * 180.0/M_PI;
}
void set_infinite_direction (Proj::Axis axis, double angle) { // angle is in degrees
- g_return_if_fail(tmat[2][axis] == 0); // don't set directions for finite VPs
+ if (tmat[2][axis] != 0) return; // don't set directions for finite VPs
double a = angle * M_PI/180;
Geom::Point pt(tmat[0][axis], tmat[1][axis]);
@@ -44,7 +44,7 @@ public:
}
inline bool has_finite_image (Proj::Axis axis) { return (tmat[2][axis] != 0.0); }
- gchar * pt_to_str (Proj::Axis axis);
+ char * pt_to_str (Proj::Axis axis);
bool operator==(const TransfMat3x4 &rhs) const;
TransfMat3x4 operator*(Geom::Affine const &A) const;
diff --git a/src/unclump.cpp b/src/unclump.cpp
index 1427e8eab..940369d7a 100644
--- a/src/unclump.cpp
+++ b/src/unclump.cpp
@@ -17,6 +17,7 @@
#include "sp-item.h"
#include "unclump.h"
+#include <glib.h>
// Taking bbox of an item is an expensive operation, and we need to do it many times, so here we
// cache the centers, widths, and heights of items
diff --git a/src/unclump.h b/src/unclump.h
index 18148b215..2411cb713 100644
--- a/src/unclump.h
+++ b/src/unclump.h
@@ -11,7 +11,7 @@
#ifndef SEEN_DIALOGS_UNCLUMP_H
#define SEEN_DIALOGS_UNCLUMP_H
-#include <glib.h>
+typedef struct _GSList GSList;
void unclump(GSList *items);
diff --git a/src/unicoderange.h b/src/unicoderange.h
index 2f73f7b47..342b3fa3e 100644
--- a/src/unicoderange.h
+++ b/src/unicoderange.h
@@ -1,17 +1,19 @@
#include <glibmm/ustring.h>
-#include <glib-object.h>
#include <vector>
+// A type which can hold any UTF-32 or UCS-4 character code.
+typedef unsigned int gunichar;
+
struct Urange{
- gchar* start;
- gchar* end;
+ char* start;
+ char* end;
};
class UnicodeRange{
public:
-UnicodeRange(const gchar* val);
-int add_range(gchar* val);
-bool contains(gchar unicode);
+UnicodeRange(const char* val);
+int add_range(char* val);
+bool contains(char unicode);
Glib::ustring attribute_string();
gunichar sample_glyph();
diff --git a/src/uri-references.h b/src/uri-references.h
index f68fe70c4..0c51481cc 100644
--- a/src/uri-references.h
+++ b/src/uri-references.h
@@ -14,7 +14,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <stddef.h>
+#include <cstddef>
#include <sigc++/connection.h>
#include <sigc++/trackable.h>
@@ -149,9 +149,9 @@ private:
/**
* Resolves an item referenced by a URI in CSS form contained in "url(...)"
*/
-SPObject* sp_css_uri_reference_resolve( SPDocument *document, const gchar *uri );
+SPObject* sp_css_uri_reference_resolve( SPDocument *document, const char *uri );
-SPObject *sp_uri_reference_resolve (SPDocument *document, const gchar *uri);
+SPObject *sp_uri_reference_resolve (SPDocument *document, const char *uri);
#endif // SEEN_SP_URI_REFERENCES_H
diff --git a/src/uri.h b/src/uri.h
index c6c2264cc..cee1baa09 100644
--- a/src/uri.h
+++ b/src/uri.h
@@ -11,7 +11,6 @@
#ifndef INKSCAPE_URI_H
#define INKSCAPE_URI_H
-#include <glib.h>
#include <exception>
#include <libxml/uri.h>
#include "bad-uri-exception.h"
@@ -38,7 +37,7 @@ public:
*
* @param preformed Properly quoted C-style string to be represented.
*/
- explicit URI(gchar const *preformed) throw(BadURIException);
+ explicit URI(char const *preformed) throw(BadURIException);
/**
* Destructor.
@@ -89,25 +88,25 @@ public:
*/
bool isAbsolutePath() const { return _impl->isAbsolutePath(); }
- const gchar *getScheme() const { return _impl->getScheme(); }
+ const char *getScheme() const { return _impl->getScheme(); }
- const gchar *getPath() const { return _impl->getPath(); }
+ const char *getPath() const { return _impl->getPath(); }
- const gchar *getQuery() const { return _impl->getQuery(); }
+ const char *getQuery() const { return _impl->getQuery(); }
- const gchar *getFragment() const { return _impl->getFragment(); }
+ const char *getFragment() const { return _impl->getFragment(); }
- const gchar *getOpaque() const { return _impl->getOpaque(); }
+ const char *getOpaque() const { return _impl->getOpaque(); }
- static URI fromUtf8( gchar const* path ) throw (BadURIException);
+ static URI fromUtf8( char const* path ) throw (BadURIException);
- static URI from_native_filename(gchar const *path) throw(BadURIException);
+ static URI from_native_filename(char const *path) throw(BadURIException);
- static gchar *to_native_filename(gchar const* uri) throw(BadURIException);
+ static char *to_native_filename(char const* uri) throw(BadURIException);
const std::string getFullPath(std::string const base) const;
- gchar *toNativeFilename() const throw(BadURIException);
+ char *toNativeFilename() const throw(BadURIException);
/**
* Returns a glib string version of this URI.
@@ -116,7 +115,7 @@ public:
*
* @return a glib string version of this URI.
*/
- gchar *toString() const { return _impl->toString(); }
+ char *toString() const { return _impl->toString(); }
/**
* Assignment operator.
@@ -135,12 +134,12 @@ private:
bool isNetPath() const;
bool isRelativePath() const;
bool isAbsolutePath() const;
- const gchar *getScheme() const;
- const gchar *getPath() const;
- const gchar *getQuery() const;
- const gchar *getFragment() const;
- const gchar *getOpaque() const;
- gchar *toString() const;
+ const char *getScheme() const;
+ const char *getPath() const;
+ const char *getQuery() const;
+ const char *getFragment() const;
+ const char *getOpaque() const;
+ char *toString() const;
private:
Impl(xmlURIPtr uri);
~Impl();
diff --git a/src/vanishing-point.h b/src/vanishing-point.h
index ca34d9118..7242a94ee 100644
--- a/src/vanishing-point.h
+++ b/src/vanishing-point.h
@@ -12,8 +12,10 @@
#ifndef SEEN_VANISHING_POINT_H
#define SEEN_VANISHING_POINT_H
-#include <set>
#include <2geom/point.h>
+#include <list>
+#include <set>
+
#include "knot.h"
#include "selection.h"
#include "persp3d.h"
@@ -21,6 +23,8 @@
#include "ui/control-manager.h" // TODO break enums out separately
class SPBox3D;
+typedef struct _GList GList;
+typedef struct _GSList GSList;
namespace Box3D {
@@ -101,7 +105,7 @@ public:
g_return_if_fail (_persp);
persp3d_get_VP (_persp, _axis).print("");
}
- inline gchar const *axisString () { return Proj::string_from_axis(_axis); }
+ inline char const *axisString () { return Proj::string_from_axis(_axis); }
unsigned int my_counter;
static unsigned int global_counter; // FIXME: Only to implement operator< so that we can merge lists. Do this in a better way!!
@@ -140,7 +144,7 @@ public:
void updateTip();
- guint numberOfBoxes(); // the number of boxes linked to all VPs of the dragger
+ unsigned int numberOfBoxes(); // the number of boxes linked to all VPs of the dragger
VanishingPoint *findVPWithBox(SPBox3D *box);
std::set<VanishingPoint*, less_ptr> VPsOfSelectedBoxes();
@@ -185,7 +189,7 @@ public:
void updateBoxDisplays ();
void drawLinesForFace (const SPBox3D *box, Proj::Axis axis); //, guint corner1, guint corner2, guint corner3, guint corner4);
bool show_lines; /* whether perspective lines are drawn at all */
- guint front_or_rear_lines; /* whether we draw perspective lines from all corners or only the
+ unsigned int front_or_rear_lines; /* whether we draw perspective lines from all corners or only the
front/rear corners (indicated by the first/second bit, respectively */
diff --git a/src/verbs.h b/src/verbs.h
index 6ad4d0fee..025628e7f 100644
--- a/src/verbs.h
+++ b/src/verbs.h
@@ -13,10 +13,13 @@
* This code is GPL if done by Ted or David
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <cstring>
#include <string>
-#include "config.h"
-#include "require-config.h" /* HAVE_GTK_WINDOW_FULLSCREEN */
+//#include "require-config.h" /* HAVE_GTK_WINDOW_FULLSCREEN */
#include <glibmm/ustring.h>
struct SPAction;
@@ -347,7 +350,7 @@ enum {
SP_VERB_LAST
};
-gchar *sp_action_get_title (const SPAction *action);
+char *sp_action_get_title (const SPAction *action);
#include <map>
#include <vector>
@@ -399,20 +402,20 @@ private:
ActionTable * _actions;
/** A unique textual ID for the verb. */
- gchar const * _id;
+ char const * _id;
/** The full name of the verb. (shown on menu entries) */
- gchar const * _name;
+ char const * _name;
/** Tooltip for the verb. */
- gchar const * _tip;
+ char const * _tip;
- gchar * _full_tip; // includes shortcut
+ char * _full_tip; // includes shortcut
unsigned int _shortcut;
/** Name of the image that represents the verb. */
- gchar const * _image;
+ char const * _image;
/**
* Unique numerical representation of the verb. In most cases
@@ -422,7 +425,7 @@ private:
unsigned int _code;
/** Name of the group the verb belongs to. */
- gchar const * _group;
+ char const * _group;
/**
* Whether this verb is set to default to sensitive or
@@ -452,28 +455,28 @@ public:
unsigned int get_code (void) { return _code; }
/** Accessor to get the internal variable. */
- gchar const * get_id (void) { return _id; }
+ char const * get_id (void) { return _id; }
/** Accessor to get the internal variable. */
- gchar const * get_name (void) { return _name; }
+ char const * get_name (void) { return _name; }
/** Accessor to get the internal variable. */
- gchar const * get_short_tip (void) { return _tip; };
+ char const * get_short_tip (void) { return _tip; };
/** Accessor to get the internal variable. */
- gchar const * get_tip (void) ;
+ char const * get_tip (void) ;
/** Accessor to get the internal variable. */
- gchar const * get_image (void) { return _image; }
+ char const * get_image (void) { return _image; }
/** Get the verbs group */
- gchar const * get_group (void) { return _group; }
+ char const * get_group (void) { return _group; }
/** Set the name after initialization. */
- gchar const * set_name (gchar const * name) { _name = name; return _name; }
+ char const * set_name (char const * name) { _name = name; return _name; }
/** Set the tooltip after initialization. */
- gchar const * set_tip (gchar const * tip) { _tip = tip; return _tip; }
+ char const * set_tip (char const * tip) { _tip = tip; return _tip; }
protected:
@@ -504,11 +507,11 @@ public:
* @param image Goes to \c _image.
*/
Verb(const unsigned int code,
- gchar const * id,
- gchar const * name,
- gchar const * tip,
- gchar const * image,
- gchar const * group) :
+ char const * id,
+ char const * name,
+ char const * tip,
+ char const * image,
+ char const * group) :
_actions(0),
_id(id),
_name(name),
@@ -523,7 +526,7 @@ public:
_verbs.insert(VerbTable::value_type(_code, this));
_verb_ids.insert(VerbIDTable::value_type(_id, this));
}
- Verb (gchar const * id, gchar const * name, gchar const * tip, gchar const * image, gchar const * group);
+ Verb (char const * id, char const * name, char const * tip, char const * image, char const * group);
virtual ~Verb (void);
SPAction * get_action(Inkscape::ActionContext const & context);
diff --git a/src/version.cpp b/src/version.cpp
index 68729c62e..abe855ee7 100644
--- a/src/version.cpp
+++ b/src/version.cpp
@@ -12,14 +12,14 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glib.h>
#include <sstream>
-
#include "version.h"
-gboolean sp_version_from_string(const gchar *string, Inkscape::Version *version)
+bool sp_version_from_string(const char *string, Inkscape::Version *version)
{
if (!string) {
- return FALSE;
+ return false;
}
try
@@ -40,27 +40,27 @@ gboolean sp_version_from_string(const gchar *string, Inkscape::Version *version)
}
}
-gchar *sp_version_to_string(Inkscape::Version version)
+char *sp_version_to_string(Inkscape::Version version)
{
return g_strdup_printf("%u.%u", version._major, version._minor);
}
-gboolean sp_version_inside_range(Inkscape::Version version,
- unsigned major_min, unsigned minor_min,
- unsigned major_max, unsigned minor_max)
+bool sp_version_inside_range(Inkscape::Version version,
+ unsigned major_min, unsigned minor_min,
+ unsigned major_max, unsigned minor_max)
{
if ( version._major < major_min || version._major > major_max ) {
- return FALSE;
+ return false;
} else if ( version._major == major_min &&
version._minor <= minor_min )
{
- return FALSE;
+ return false;
} else if ( version._major == major_max &&
version._minor >= minor_max )
{
- return FALSE;
+ return false;
} else {
- return TRUE;
+ return true;
}
}
diff --git a/src/version.h b/src/version.h
index 26fbc11a3..e17688b6d 100644
--- a/src/version.h
+++ b/src/version.h
@@ -11,8 +11,6 @@
#ifndef SEEN_INKSCAPE_VERSION_H
#define SEEN_INKSCAPE_VERSION_H
-#include <glib.h>
-
#define SVG_VERSION "1.1"
namespace Inkscape {
@@ -49,13 +47,13 @@ public:
}
-gboolean sp_version_from_string(const gchar *string, Inkscape::Version *version);
+bool sp_version_from_string(const char *string, Inkscape::Version *version);
-gchar *sp_version_to_string(Inkscape::Version version);
+char *sp_version_to_string(Inkscape::Version version);
-gboolean sp_version_inside_range(Inkscape::Version version,
- unsigned major_min, unsigned minor_min,
- unsigned major_max, unsigned minor_max);
+bool sp_version_inside_range(Inkscape::Version version,
+ unsigned major_min, unsigned minor_min,
+ unsigned major_max, unsigned minor_max);
#endif // SEEN_INKSCAPE_VERSION_H
/*