summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3f7b86f)
raw | patch | inline | side by side (parent: 3f7b86f)
author | joncruz <joncruz@users.sourceforge.net> | |
Sat, 1 Dec 2007 20:03:42 +0000 (20:03 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Sat, 1 Dec 2007 20:03:42 +0000 (20:03 +0000) |
15 files changed:
index bb710a0217ce5881eeb10b9cc7f6457059d9c6e7..f1a991434866b8c92a8d23daeca0161c8239c392 100644 (file)
signals[ARENA_EVENT] = gtk_signal_new ("arena_event",
GTK_RUN_LAST,
GTK_CLASS_TYPE(object_class),
- GTK_SIGNAL_OFFSET (SPCanvasArenaClass, arena_event),
+ ((glong)((guint8*)&(klass->arena_event) - (guint8*)klass)),
sp_marshal_INT__POINTER_POINTER,
GTK_TYPE_INT, 2, GTK_TYPE_POINTER, GTK_TYPE_POINTER);
index f39ff12740fd0cd79f22ce5f36659b48dc791a37..5e6188eeed4fb9da41364189e95e16daabf8ed91 100644 (file)
-#ifndef __SP_CANVAS_ARENA_H__
-#define __SP_CANVAS_ARENA_H__
+#ifndef SEEN_SP_CANVAS_ARENA_H
+#define SEEN_SP_CANVAS_ARENA_H
/*
* RGBA display list system for inkscape
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-struct SPCanvasArena;
-struct SPCanvasArenaClass;
+#include "../display/sp-canvas.h"
+#include "nr-arena-item.h"
+
+G_BEGIN_DECLS
#define SP_TYPE_CANVAS_ARENA (sp_canvas_arena_get_type ())
#define SP_CANVAS_ARENA(obj) (GTK_CHECK_CAST ((obj), SP_TYPE_CANVAS_ARENA, SPCanvasArena))
#define SP_IS_CANVAS_ARENA(obj) (GTK_CHECK_TYPE ((obj), SP_TYPE_CANVAS_ARENA))
#define SP_IS_CANVAS_ARENA_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SP_TYPE_CANVAS_ARENA))
-#include "../display/sp-canvas.h"
-#include "nr-arena-item.h"
+typedef struct _SPCanvasArena SPCanvasArena;
+typedef struct _SPCanvasArenaClass SPCanvasArenaClass;
-struct SPCanvasArena {
+struct _SPCanvasArena {
SPCanvasItem item;
guint cursor : 1;
gdouble delta;
};
-struct SPCanvasArenaClass {
+struct _SPCanvasArenaClass {
SPCanvasItemClass parent_class;
gint (* arena_event) (SPCanvasArena *carena, NRArenaItem *item, GdkEvent *event);
void sp_canvas_arena_render_pixblock (SPCanvasArena *ca, NRPixBlock *pb);
-#endif
+G_END_DECLS
+
+#endif // SEEN_SP_CANVAS_ARENA_H
index 3d291f42a014ec420781abfb27a13e3e0fd9a475..a2443ca1782b657c5e9ce0ff3a6f9b1511876307 100644 (file)
@@ -158,7 +158,7 @@ grid_canvasitem_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned i
};
CanvasGrid::CanvasGrid(SPNamedView * nv, Inkscape::XML::Node * in_repr, SPDocument *in_doc, GridType type)
- : namelabel("", Gtk::ALIGN_CENTER), gridtype(type), visible(true), snap_enabled(true)
+ : namelabel("", Gtk::ALIGN_CENTER), visible(true), snap_enabled(true), gridtype(type)
{
repr = in_repr;
doc = in_doc;
index 2af6f2c4403351ddc328cafcef94a51e35512700..a28b7d03a350dd091c93cf6eed2a04a25268f831 100644 (file)
struct SPCanvas;
struct SPCanvasClass;
struct SPCanvasItem;
-struct SPCanvasItemClass;
+typedef struct _SPCanvasItemClass SPCanvasItemClass;
struct SPCanvasGroup;
struct SPCanvasGroupClass;
struct SPCurve;
diff --git a/src/display/nr-arena.h b/src/display/nr-arena.h
index 89cb58f39bb37eee10616b4cf2d92028408954a3..b6d5a4539cdedf91cfeab115c3c3c78713c56a5a 100644 (file)
--- a/src/display/nr-arena.h
+++ b/src/display/nr-arena.h
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glib/gmacros.h>
+
+G_BEGIN_DECLS
+
+typedef struct _SPCanvasArena SPCanvasArena;
+
+G_END_DECLS
+
#define NR_TYPE_ARENA (nr_arena_get_type ())
#define NR_ARENA(o) (NR_CHECK_INSTANCE_CAST ((o), NR_TYPE_ARENA, NRArena))
#define NR_IS_ARENA(o) (NR_CHECK_INSTANCE_TYPE ((o), NR_TYPE_ARENA))
RENDERMODE_OUTLINE
};
-struct SPCanvasArena;
-
struct NRArena : public NRActiveObject {
static NRArena *create() {
return reinterpret_cast<NRArena *>(nr_object_new(NR_TYPE_ARENA));
index 2af12b6c373525cc91c233c742630b613b8b269a..efc4fd112a34fe4257aee30d8d4403453de65263 100644 (file)
item_signals[ITEM_EVENT] = g_signal_new ("event",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (SPCanvasItemClass, event),
+ ((glong)((guint8*)&(klass->event) - (guint8*)klass)),
NULL, NULL,
sp_marshal_BOOLEAN__POINTER,
G_TYPE_BOOLEAN, 1,
index 4b6d7b3b866f21b8d7ae29d5eacdf47232491da6..d8cc3157d60f04385147362861cefb59676398c6 100644 (file)
--- a/src/display/sp-canvas.h
+++ b/src/display/sp-canvas.h
-#ifndef __SP_CANVAS_H__
-#define __SP_CANVAS_H__
+#ifndef SEEN_SP_CANVAS_H
+#define SEEN_SP_CANVAS_H
/** \file
* SPCanvas, SPCanvasBuf, and SPCanvasItem.
#include <libnr/nr-rect.h>
#include <libnr/nr-rect-l.h>
+G_BEGIN_DECLS
+
struct SPCanvas;
struct SPCanvasGroup;
+typedef struct _SPCanvasItemClass SPCanvasItemClass;
enum {
SP_CANVAS_UPDATE_REQUESTED = 1 << 0,
/**
* The vtable of an SPCanvasItem.
*/
-struct SPCanvasItemClass : public GtkObjectClass {
+struct _SPCanvasItemClass : public GtkObjectClass {
void (* update) (SPCanvasItem *item, NR::Matrix const &affine, unsigned int flags);
void (* render) (SPCanvasItem *item, SPCanvasBuf *buf);
SPCanvasItem *sp_canvas_item_new(SPCanvasGroup *parent, GtkType type, const gchar *first_arg_name, ...);
+G_END_DECLS
+
#define sp_canvas_item_set gtk_object_set
void sp_canvas_item_affine_absolute(SPCanvasItem *item, NR::Matrix const &aff);
@@ -198,15 +203,15 @@ void sp_canvas_request_redraw(SPCanvas *canvas, int x1, int y1, int x2, int y2);
void sp_canvas_force_full_redraw_after_interruptions(SPCanvas *canvas, unsigned int count);
void sp_canvas_end_forced_full_redraws(SPCanvas *canvas);
+bool sp_canvas_world_pt_inside_window(SPCanvas const *canvas, NR::Point const &world);
+
void sp_canvas_window_to_world(SPCanvas const *canvas, double winx, double winy, double *worldx, double *worldy);
void sp_canvas_world_to_window(SPCanvas const *canvas, double worldx, double worldy, double *winx, double *winy);
NR::Point sp_canvas_window_to_world(SPCanvas const *canvas, NR::Point const win);
NR::Point sp_canvas_world_to_window(SPCanvas const *canvas, NR::Point const world);
-bool sp_canvas_world_pt_inside_window(SPCanvas const *canvas, NR::Point const &world);
-
-#endif
+#endif // SEEN_SP_CANVAS_H
/*
Local Variables:
index 3bb6a6ff308b21471204727146b6782e3b4f8900..dc60af4dd68bf2097dacb6955450bb931e4dcbb0 100644 (file)
namespace Internal {
bool
-PsOutput::check (Inkscape::Extension::Extension * module)
+PsOutput::check( Inkscape::Extension::Extension * /*module*/ )
{
- if (NULL == Inkscape::Extension::db.get(SP_MODULE_KEY_PRINT_PS))
- return FALSE;
+ if (NULL == Inkscape::Extension::db.get(SP_MODULE_KEY_PRINT_PS))
+ return FALSE;
- return TRUE;
+ return TRUE;
}
/**
index 35464b374c67e78c145e8f8cc57a30cc1916dfe4..fedde86a2020989542902721f35c67641d61e89f 100644 (file)
}
unsigned int
-PrintPS::bind(Inkscape::Extension::Print *mod, NRMatrix const *transform, float opacity)
+PrintPS::bind(Inkscape::Extension::Print */*mod*/, NRMatrix const *transform, float /*opacity*/)
{
if (!_stream) return 0; // XXX: fixme, returning -1 as unsigned.
if (_bitmap) return 0;
}
unsigned int
-PrintPS::release(Inkscape::Extension::Print *mod)
+PrintPS::release(Inkscape::Extension::Print */*mod*/)
{
if (!_stream) return 0; // XXX: fixme, returning -1 as unsigned.
if (_bitmap) return 0;
}
unsigned int
-PrintPS::comment(Inkscape::Extension::Print *mod, char const *comment)
+PrintPS::comment(Inkscape::Extension::Print */*mod*/, char const *comment)
{
if (!_stream) return 0; // XXX: fixme, returning -1 as unsigned.
if (_bitmap) return 0;
index 2aa4806886f63bc6b869a35145218176565335dc..72e32ff25c0ef5c694fa014d37a57d3e3558240f 100644 (file)
and \c pref_name() are used.
*/
bool
-ParamBool::set (bool in, SPDocument * doc, Inkscape::XML::Node * node)
+ParamBool::set( bool in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/ )
{
_value = in;
index 56edc70a70b134081a2b31361de876dab693361f..a6d0c1b7bbed53bf9d7d0aba7fec6a039c0ca449 100644 (file)
public:
ParamBool(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
/** \brief Returns \c _value */
- bool get (const SPDocument * doc, const Inkscape::XML::Node * node) { return _value; }
+ bool get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
bool set (bool in, SPDocument * doc, Inkscape::XML::Node * node);
Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
Glib::ustring * string (void);
index d31dc907ce886d901af85e68a636c9bb0ae6606d..2a32086a8bcab397851f00b38948e6b3d62a2f77 100644 (file)
namespace Inkscape {
namespace Extension {
-
+
void sp_color_param_changed(SPColorSelector *csel, GObject *cp);
-
+
/** \brief Free the allocated data. */
ParamColor::~ParamColor(void)
{
-
+
}
-
-guint32
-ParamColor::set (guint32 in, SPDocument * doc, Inkscape::XML::Node * node)
+
+guint32
+ParamColor::set( guint32 in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/ )
{
_value = in;
if (paramval != NULL)
defaulthex = paramval;
-
+
_value = atoi(defaulthex);
return;
{
char str[16];
sprintf(str, "%i", _value);
-
+
return new Glib::ustring(str);
}
Gtk::Widget *
-ParamColor::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamColor::get_widget( SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * changeSignal )
{
_changeSignal = new sigc::signal<void>(*changeSignal);
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
SPColorSelector* spColorSelector = (SPColorSelector*)sp_color_selector_new(SP_TYPE_COLOR_NOTEBOOK);
-
+
ColorSelector* colorSelector = spColorSelector->base;
if (_value < 1) {
_value = 0xFF000000;
@@ -101,7 +101,7 @@ ParamColor::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::sign
gtk_widget_show(GTK_WIDGET(spColorSelector));
hbox->show();
-
+
return dynamic_cast<Gtk::Widget *>(hbox);
}
ParamColor* ptr = (ParamColor*)obj;
ptr->set(color.toRGBA32( alpha ), NULL, NULL);
-
+
ptr->_changeSignal->emit();
}
index b30c3be7a386dcd409ccd0c2262ec583e0f84d07..2d5f3e2e497fa2367b085b497be7b7877b35c185 100644 (file)
ParamColor(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
virtual ~ParamColor(void);
/** \brief Returns \c _value, with a \i const to protect it. */
- guint32 get (const SPDocument * doc, const Inkscape::XML::Node * node) { return _value; }
+ guint32 get( const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/ ) { return _value; }
guint32 set (guint32 in, SPDocument * doc, Inkscape::XML::Node * node);
Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
Glib::ustring * string (void);
diff --git a/src/io/sys.cpp b/src/io/sys.cpp
index 89afe9fb4224886f10f0514677525784764ef0f1..a1e693a24d978f9cd9a6e8cdcf4234189ac1c661 100644 (file)
--- a/src/io/sys.cpp
+++ b/src/io/sys.cpp
}
}
g_message( "fopen call %s for [%s]", id, str.data() );
+#else
+ (void)utf8name;
+ (void)id;
#endif
}
index 1e868191d80eee02bf7070acb842048adcb45280..cad344e63f8fdaa44a3b8290068a1c8ed8d9eb64 100644 (file)
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
* Construct a Panel
*/
-Panel::Panel(Glib::ustring const &label, gchar const *prefs_path,
+Panel::Panel(Glib::ustring const &label, gchar const *prefs_path,
int verb_num, Glib::ustring const &apply_label,
bool menu_desired) :
_prefs_path(prefs_path),
item->show();
}
-void Panel::_handleAction(int set_id, int item_id)
+void Panel::_handleAction(int /*set_id*/, int /*item_id*/)
{
// for subclasses to override
}
g_warning("Apply button clicked for panel [Panel::_apply()]");
}
-Gtk::Button *
+Gtk::Button *
Panel::addResponseButton(const Glib::ustring &button_text, int response_id)
{
Gtk::Button *button = new Gtk::Button(button_text);