summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b90b32f)
raw | patch | inline | side by side (parent: b90b32f)
author | glimmer07 <glimmer07@users.sourceforge.net> | |
Thu, 13 Aug 2009 20:53:03 +0000 (20:53 +0000) | ||
committer | glimmer07 <glimmer07@users.sourceforge.net> | |
Thu, 13 Aug 2009 20:53:03 +0000 (20:53 +0000) |
Added lots of documentation.
diff --git a/src/extension/dbus/application-interface.cpp b/src/extension/dbus/application-interface.cpp
index 06e41ecf35675e0b3e1c81f5f87e144c6107510e..b183be93cbf5e367576cd412c83fb34cce932e54 100644 (file)
+/*
+ * This is where the implementation of the DBus based application API lives.
+ * All the methods in here are designed to be called remotly via DBus.
+ * document-interface.cpp has all of the actual manipulation methods.
+ * This interface is just for creating new document interfaces.
+ *
+ * Documentation for these methods is in application-interface.xml
+ * which is the "gold standard" as to how the interface should work.
+ *
+ * Authors:
+ * Soren Berg <Glimmer07@gmail.com>
+ *
+ * Copyright (C) 2009 Soren Berg
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
#include "application-interface.h"
#include <string.h>
#include "dbus-init.h"
diff --git a/src/extension/dbus/application-interface.h b/src/extension/dbus/application-interface.h
index a04c992c3f220d7cdf1976adfe5284f72223fc0c..e782bd1ad36c1b0af4eac053cf0a44dbdf48942f 100644 (file)
+/*
+ * This is where the implementation of the DBus based application API lives.
+ * All the methods in here are designed to be called remotly via DBus.
+ * document-interface.cpp has all of the actual manipulation methods.
+ * This interface is just for creating new document interfaces.
+ *
+ * Documentation for these methods is in application-interface.xml
+ * which is the "gold standard" as to how the interface should work.
+ *
+ * Authors:
+ * Soren Berg <Glimmer07@gmail.com>
+ *
+ * Copyright (C) 2009 Soren Berg
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
#ifndef INKSCAPE_EXTENSION_APPLICATION_INTERFACE_H_
#define INKSCAPE_EXTENSION_APPLICATION_INTERFACE_H_
diff --git a/src/extension/dbus/application-interface.xml b/src/extension/dbus/application-interface.xml
index 9b55a9b2b2bb3714ea78df80e6f6d5ef81f56cfe..e942117d634759fd84f21c2c1df1580308505557 100644 (file)
+<!--
+ * This is the master description of the DBus application interface.
+ * The interface is mostly just for creating new document instances.
+ *
+ * This file is used to generate both glue code and documentation.
+ * The methods are in the same order as the .cpp/.h and the sections are labeled.
+ *
+ * Any change to method prototypes in application-interface.cpp MUST be reflected here.
+ *
+ * This file is the proverbial gold standard for the application interface.
+ *
+ * Authors:
+ * Soren Berg <Glimmer07@gmail.com>
+ *
+ * Copyright (C) 2009 Soren Berg
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+-->
+
<?xml version="1.0" encoding="UTF-8" ?>
<node name="/org/inkscape/application"
xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"
index e0cf6a38b901e0e49bc986d2d391dd9d7c2d190c..e7af7096cb76299ccc68d9ad845afce1f2d3f845 100644 (file)
+/*
+ * This is where the implementation of the DBus based document API lives.
+ * All the methods in here (except in the helper section) are
+ * designed to be called remotly via DBus. application-interface.cpp
+ * has the methods used to connect to the bus and get a document instance.
+ *
+ * Documentation for these methods is in document-interface.xml
+ * which is the "gold standard" as to how the interface should work.
+ *
+ * Authors:
+ * Soren Berg <Glimmer07@gmail.com>
+ *
+ * Copyright (C) 2009 Soren Berg
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
#include "document-interface.h"
#include <string.h>
HELPER / SHORTCUT FUNCTIONS
****************************************************************************/
-const gchar* intToCString(int i)
-{
- std::stringstream ss;
- ss << i;
- return ss.str().c_str();
-}
-
+/*
+ * This function or the one below it translates the user input for an object
+ * into Inkscapes internal representation. It is called by almost every
+ * method so it should be as fast as possible.
+ *
+ * (eg turns "rect2234" to an SPObject or Inkscape::XML::Node)
+ *
+ * If the internal representation changes (No more 'id' attributes) this is the
+ * place to adjust things.
+ */
Inkscape::XML::Node *
get_repr_by_name (SPDesktop *desk, gchar *name, GError **error)
{
return node;
}
+/*
+ * See comment for get_repr_by_name, above.
+ */
SPObject *
get_object_by_name (SPDesktop *desk, gchar *name, GError **error)
{
return obj;
}
+/*
+ * Tests for NULL strings and throws an appropriate error.
+ * Every method that takes a string parameter (other than the
+ * name of an object, that's tested seperatly) should call this.
+ */
gboolean
dbus_check_string (gchar *string, GError ** error, const gchar * errorstr)
{
return TRUE;
}
+/*
+ * This is used to return object values to the user
+ */
const gchar *
get_name_from_object (SPObject * obj)
{
return obj->repr->attribute("id");
}
+/*
+ * Some verbs (cut, paste) only work on the active layer.
+ * This makes sure that the document that is about to recive a command is active.
+ */
void
desktop_ensure_active (SPDesktop* desk) {
if (desk != SP_ACTIVE_DESKTOP)
box = sel->boundsInDocument(box);
return box->y0 + ((box->y1 - box->y0)/2);
}
-//move_to etc
+
+/*
+ * This function is used along with selection_restore to
+ * take advantage of functionality provided by a selection
+ * for a single object.
+ *
+ * It saves the current selection and sets the selection to
+ * the object specified. Any selection verb can be used on the
+ * object and then selection_restore is called, restoring the
+ * original selection.
+ *
+ * This should be mostly transparent to the user who need never
+ * know we never bothered to implement it seperatly. Although
+ * they might see the selection box flicker if used in a loop.
+ */
const GSList *
selection_swap(SPDesktop *desk, gchar *name, GError **error)
{
return oldsel;
}
+/*
+ * See selection_swap, above
+ */
void
selection_restore(SPDesktop *desk, const GSList * oldsel)
{
sel->setList(oldsel);
}
+/*
+ * Shortcut for creating a Node.
+ */
Inkscape::XML::Node *
dbus_create_node (SPDesktop *desk, const gchar *type)
{
return xml_doc->createElement(type);
}
+/*
+ * Called by the shape creation functions. Gets the default style for the doc
+ * or sets it arbitrarily if none.
+ *
+ * There is probably a better way to do this (use the shape tools default styles)
+ * but I'm not sure how.
+ */
gchar *
finish_create_shape (DocumentInterface *object, GError **error, Inkscape::XML::Node *newNode, gchar *desc)
{
@@ -163,6 +225,14 @@ finish_create_shape (DocumentInterface *object, GError **error, Inkscape::XML::N
return strdup(newNode->attribute("id"));
}
+/*
+ * This is the code used internally to call all the verbs.
+ *
+ * It handles error reporting and update pausing (which needs some work.)
+ * This is a good place to improve efficiency as it is called a lot.
+ *
+ * document_interface_call_verb is similar but is called by the user.
+ */
gboolean
dbus_call_verb (DocumentInterface *object, int verbid, GError **error)
{
return (DocumentInterface*)g_object_new (TYPE_DOCUMENT_INTERFACE, NULL);
}
+/*
+ * Error stuff...
+ *
+ * To add a new error type, edit here and in the .h InkscapeError enum.
+ */
GQuark
inkscape_error_quark (void)
{
return quark;
}
-/* This should really be standard. */
#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
GType
gboolean
document_interface_text (DocumentInterface *object, int x, int y, gchar *text, GError **error)
{
- //FIXME: Not selectable.
+ //FIXME: Not selectable (aka broken). Needs to be rewritten completely.
SPDesktop *desktop = object->desk;
SPCanvasText * canvas_text = (SPCanvasText *) sp_canvastext_new(sp_desktop_tempgroup(desktop), desktop, Geom::Point(0,0), "");
@@ -1094,6 +1168,8 @@ document_interface_selection_move_to (DocumentInterface *object, gdouble x, gdou
}
//FIXME: does not paste in new layer.
+// This needs to use lower level cut_impl and paste_impl (messy)
+// See the built-in sp_selection_to_next_layer and duplicate.
gboolean
document_interface_selection_move_to_layer (DocumentInterface *object,
gchar *layerstr, GError **error)
index 436f6b118c6d953580b480e4959e8a1c37dba4b8..8cf9b7ec1b555bea77e11f07a6e3fcaeca4c9491 100644 (file)
+/*
+ * This is where the implementation of the DBus based document API lives.
+ * All the methods in here (except in the helper section) are
+ * designed to be called remotly via DBus. application-interface.cpp
+ * has the methods used to connect to the bus and get a document instance.
+ *
+ * Documentation for these methods is in document-interface.xml
+ * which is the "gold standard" as to how the interface should work.
+ *
+ * Authors:
+ * Soren Berg <Glimmer07@gmail.com>
+ *
+ * Copyright (C) 2009 Soren Berg
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
#ifndef INKSCAPE_EXTENSION_DOCUMENT_INTERFACE_H_
#define INKSCAPE_EXTENSION_DOCUMENT_INTERFACE_H_
index c9cd8aa69c009345d39dbbec0896f2ffdd440d66..2f154948827aaf01d016e80b29a29ab694fd0263 100644 (file)
+<!--
+ * This is the master description of the DBus document interface.
+ *
+ * This file is used to generate both glue code and documentation.
+ * The methods are in the same order as the .cpp/.h and the sections are labeled.
+ *
+ * Any change to method prototypes in document-interface.cpp MUST be reflected here.
+ *
+ * This file is the proverbial gold standard for the document interface.
+ *
+ * Authors:
+ * Soren Berg <Glimmer07@gmail.com>
+ *
+ * Copyright (C) 2009 Soren Berg
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+-->
+
<?xml version="1.0" encoding="UTF-8" ?>
<node name="/org/inkscape/document"
xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"
index d13aedfa8317ecb6198f7c337367d97c59a4e670..692f4fa1933ecf903f51dee82da8a3493472a6c4 100644 (file)
wrapper: #inkscape-dbus-wrapper.c inkscape-dbus-wrapper.h
- gcc -fPIC -c inkscape-dbus-wrapper.c $(shell pkg-config --cflags --libs glib-2.0 gobject-2.0 dbus-glib-1)
+ gcc -fPIC -c inkscape-dbus-wrapper.c $(shell pkg-config --cflags --libs glib-2.0 gobject-2.0 dbus-glib-1 dbus-1)
ld -shared -soname libinkdbus.so.1 -o libinkdbus.so.1.0 -lc inkscape-dbus-wrapper.o
+ ln -sf libinkdbus.so.1.0 libinkdbus.so
+ ln -sf libinkdbus.so.1.0 libinkdbus.so.1
+
+test: wrapper tester.c
+ gcc -Wall -L. tester.c -linkdbus -o test $(shell pkg-config --cflags --libs glib-2.0 gobject-2.0)
+
diff --git a/src/extension/dbus/wrapper/inkscape-dbus-wrapper.c b/src/extension/dbus/wrapper/inkscape-dbus-wrapper.c
index 77d01029510a7f4637a4d59dc27fbfdb337ab1ca..e6d2818a2cd323af01313727a4951059c62d523f 100644 (file)
#include "../document-client-glue.h"
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus.h>
// (static.*(\n[^}]*)*(async)+.*(\n[^}]*)*})|typedef void .*;
// http://www.josephkahn.com/music/index.xml
DOCUMENT INTERFACE CLASS STUFF
****************************************************************************/
+struct _DocumentInterface {
+ GObject parent;
+ DBusGProxy * proxy;
+};
+
G_DEFINE_TYPE(DocumentInterface, document_interface, G_TYPE_OBJECT)
static void
}
-static
+//static
gboolean
inkscape_delete_all (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_delete_all (proxy, error);
}
-static
+//static
gboolean
inkscape_call_verb (DocumentInterface *doc, const char * IN_verbid, GError **error)
{
@@ -128,7 +135,7 @@ inkscape_call_verb (DocumentInterface *doc, const char * IN_verbid, GError **err
}
-static
+//static
gchar *
inkscape_rectangle (DocumentInterface *doc, const gint IN_x, const gint IN_y, const gint IN_width, const gint IN_height, GError **error)
{
@@ -138,7 +145,7 @@ inkscape_rectangle (DocumentInterface *doc, const gint IN_x, const gint IN_y, co
return OUT_object_name;
}
-static
+//static
char *
inkscape_ellipse (DocumentInterface *doc, const gint IN_x, const gint IN_y, const gint IN_width, const gint IN_height, GError **error)
{
@@ -148,7 +155,7 @@ inkscape_ellipse (DocumentInterface *doc, const gint IN_x, const gint IN_y, cons
return OUT_object_name;
}
-static
+//static
char *
inkscape_polygon (DocumentInterface *doc, const gint IN_cx, const gint IN_cy, const gint IN_radius, const gint IN_rotation, const gint IN_sides, GError **error)
{
@@ -158,7 +165,7 @@ inkscape_polygon (DocumentInterface *doc, const gint IN_cx, const gint IN_cy, co
return OUT_object_name;
}
-static
+//static
char *
inkscape_star (DocumentInterface *doc, const gint IN_cx, const gint IN_cy, const gint IN_r1, const gint IN_r2, const gdouble IN_arg1, const gdouble IN_arg2, const gint IN_sides, const gdouble IN_rounded, GError **error)
{
@@ -168,7 +175,7 @@ inkscape_star (DocumentInterface *doc, const gint IN_cx, const gint IN_cy, const
return OUT_object_name;
}
-static
+//static
char *
inkscape_spiral (DocumentInterface *doc, const gint IN_cx, const gint IN_cy, const gint IN_r, const gint IN_revolutions, GError **error)
{
@@ -178,7 +185,7 @@ inkscape_spiral (DocumentInterface *doc, const gint IN_cx, const gint IN_cy, con
return OUT_object_name;
}
-static
+//static
char *
inkscape_line (DocumentInterface *doc, const gint IN_x, const gint IN_y, const gint IN_x2, const gint IN_y2, GError **error)
{
@@ -188,7 +195,7 @@ inkscape_line (DocumentInterface *doc, const gint IN_x, const gint IN_y, const g
return OUT_object_name;
}
-static
+//static
gboolean
inkscape_text (DocumentInterface *doc, const gint IN_x, const gint IN_y, const char * IN_text, GError **error)
{
@@ -196,7 +203,7 @@ inkscape_text (DocumentInterface *doc, const gint IN_x, const gint IN_y, const c
return org_inkscape_document_text (proxy, IN_x, IN_y, IN_text, error);
}
-static
+//static
char *
inkscape_image (DocumentInterface *doc, const gint IN_x, const gint IN_y, const char * IN_text, GError **error)
{
return OUT_object_name;
}
-static
+//static
char *
inkscape_node (DocumentInterface *doc, const char * IN_svgtype, GError **error)
{
return OUT_node_name;
}
-static
+//static
gdouble
inkscape_document_get_width (DocumentInterface *doc, GError **error)
{
return OUT_val;
}
-static
+//static
gdouble
inkscape_document_get_height (DocumentInterface *doc, GError **error)
{
return OUT_val;
}
-static
+//static
char *
inkscape_document_get_css (DocumentInterface *doc, GError **error)
{
return OUT_css;
}
-static
+//static
gboolean
inkscape_document_set_css (DocumentInterface *doc, const char * IN_stylestring, GError **error)
{
return org_inkscape_document_document_document_set_css (proxy, IN_stylestring, error);
}
-static
+//static
gboolean
inkscape_document_merge_css (DocumentInterface *doc, const char * IN_stylestring, GError **error)
{
@@ -262,7 +269,7 @@ inkscape_document_merge_css (DocumentInterface *doc, const char * IN_stylestring
return org_inkscape_document_document_document_merge_css (proxy, IN_stylestring, error);
}
-static
+//static
gboolean
inkscape_document_resize_to_fit_selection (DocumentInterface *doc, GError **error)
{
@@ -270,7 +277,7 @@ inkscape_document_resize_to_fit_selection (DocumentInterface *doc, GError **erro
return org_inkscape_document_document_document_resize_to_fit_selection (proxy, error);
}
-static
+//static
gboolean
inkscape_set_attribute (DocumentInterface *doc, const char * IN_shape, const char * IN_attribute, const char * IN_newval, GError **error)
{
@@ -278,7 +285,7 @@ inkscape_set_attribute (DocumentInterface *doc, const char * IN_shape, const cha
return org_inkscape_document_set_attribute (proxy, IN_shape, IN_attribute, IN_newval, error);
}
-static
+//static
gboolean
inkscape_set_int_attribute (DocumentInterface *doc, const char * IN_shape, const char * IN_attribute, const gint IN_newval, GError **error)
{
@@ -286,7 +293,7 @@ inkscape_set_int_attribute (DocumentInterface *doc, const char * IN_shape, const
return org_inkscape_document_set_int_attribute (proxy, IN_shape, IN_attribute, IN_newval, error);
}
-static
+//static
gboolean
inkscape_set_double_attribute (DocumentInterface *doc, const char * IN_shape, const char * IN_attribute, const gdouble IN_newval, GError **error)
{
@@ -294,7 +301,7 @@ inkscape_set_double_attribute (DocumentInterface *doc, const char * IN_shape, co
return org_inkscape_document_set_double_attribute (proxy, IN_shape, IN_attribute, IN_newval, error);
}
-static
+//static
char *
inkscape_get_attribute (DocumentInterface *doc, const char * IN_shape, const char * IN_attribute, GError **error)
{
@@ -304,7 +311,7 @@ inkscape_get_attribute (DocumentInterface *doc, const char * IN_shape, const cha
return OUT_val;
}
-static
+//static
gboolean
inkscape_move (DocumentInterface *doc, const char * IN_shape, const gdouble IN_x, const gdouble IN_y, GError **error)
{
@@ -312,7 +319,7 @@ inkscape_move (DocumentInterface *doc, const char * IN_shape, const gdouble IN_x
return org_inkscape_document_move (proxy, IN_shape, IN_x, IN_y, error);
}
-static
+//static
gboolean
inkscape_move_to (DocumentInterface *doc, const char * IN_shape, const gdouble IN_x, const gdouble IN_y, GError **error)
{
@@ -320,7 +327,7 @@ inkscape_move_to (DocumentInterface *doc, const char * IN_shape, const gdouble I
return org_inkscape_document_move_to (proxy, IN_shape, IN_x, IN_y, error);
}
-static
+//static
gboolean
inkscape_object_to_path (DocumentInterface *doc, const char * IN_objectname, GError **error)
{
@@ -328,7 +335,7 @@ inkscape_object_to_path (DocumentInterface *doc, const char * IN_objectname, GEr
return org_inkscape_document_object_to_path (proxy, IN_objectname, error);
}
-static
+//static
char *
inkscape_get_path (DocumentInterface *doc, const char * IN_shape, GError **error)
{
@@ -338,7 +345,7 @@ inkscape_get_path (DocumentInterface *doc, const char * IN_shape, GError **error
return OUT_val;
}
-static
+//static
gboolean
inkscape_transform (DocumentInterface *doc, const char * IN_shape, const char * IN_transformstr, GError **error)
{
return org_inkscape_document_transform (proxy, IN_shape, IN_transformstr, error);
}
-static
+//static
char *
inkscape_get_css (DocumentInterface *doc, const char * IN_shape, GError **error)
{
@@ -356,7 +363,7 @@ inkscape_get_css (DocumentInterface *doc, const char * IN_shape, GError **error)
return OUT_css;
}
-static
+//static
gboolean
inkscape_modify_css (DocumentInterface *doc, const char * IN_shape, const char * IN_cssattrib, const char * IN_newval, GError **error)
{
@@ -364,7 +371,7 @@ inkscape_modify_css (DocumentInterface *doc, const char * IN_shape, const char *
return org_inkscape_document_modify_css (proxy, IN_shape, IN_cssattrib, IN_newval, error);
}
-static
+//static
gboolean
inkscape_merge_css (DocumentInterface *doc, const char * IN_shape, const char * IN_stylestring, GError **error)
{
return org_inkscape_document_merge_css (proxy, IN_shape, IN_stylestring, error);
}
-static
+//static
gboolean
inkscape_set_color (DocumentInterface *doc, const char * IN_shape, const gint IN_red, const gint IN_green, const gint IN_blue, const gboolean IN_fill, GError **error)
{
@@ -380,7 +387,7 @@ inkscape_set_color (DocumentInterface *doc, const char * IN_shape, const gint IN
return org_inkscape_document_set_color (proxy, IN_shape, IN_red, IN_green, IN_blue, IN_fill, error);
}
-static
+//static
gboolean
inkscape_move_to_layer (DocumentInterface *doc, const char * IN_objectname, const char * IN_layername, GError **error)
{
@@ -388,7 +395,7 @@ inkscape_move_to_layer (DocumentInterface *doc, const char * IN_objectname, cons
return org_inkscape_document_move_to_layer (proxy, IN_objectname, IN_layername, error);
}
-static
+//static
GArray*
inkscape_get_node_coordinates (DocumentInterface *doc, const char * IN_shape, GError **error)
{
@@ -398,7 +405,7 @@ inkscape_get_node_coordinates (DocumentInterface *doc, const char * IN_shape, GE
return OUT_points;
}
-static
+//static
gboolean
inkscape_save (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_save (proxy, error);
}
-static
+//static
gboolean
inkscape_save_as (DocumentInterface *doc, const char * IN_pathname, GError **error)
{
@@ -414,7 +421,7 @@ inkscape_save_as (DocumentInterface *doc, const char * IN_pathname, GError **err
return org_inkscape_document_save_as (proxy, IN_pathname, error);
}
-static
+//static
gboolean
inkscape_load (DocumentInterface *doc, const char * IN_pathname, GError **error)
{
@@ -422,7 +429,7 @@ inkscape_load (DocumentInterface *doc, const char * IN_pathname, GError **error)
return org_inkscape_document_load (proxy, IN_pathname, error);
}
-static
+//static
gboolean
inkscape_mark_as_unmodified (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_mark_as_unmodified (proxy, error);
}
-static
+//static
gboolean
inkscape_close (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_close (proxy, error);
}
-static
+//static
gboolean
inkscape_inkscape_exit (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_exit (proxy, error);
}
-static
+//static
gboolean
inkscape_undo (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_undo (proxy, error);
}
-static
+//static
gboolean
inkscape_redo (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_redo (proxy, error);
}
-static
+//static
gboolean
inkscape_pause_updates (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_pause_updates (proxy, error);
}
-static
+//static
gboolean
inkscape_resume_updates (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_resume_updates (proxy, error);
}
-static
+//static
gboolean
inkscape_update (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_update (proxy, error);
}
-static
+//static
char **
inkscape_selection_get (DocumentInterface *doc, GError **error)
{
return OUT_listy;
}
-static
+//static
gboolean
inkscape_selection_add (DocumentInterface *doc, const char * IN_name, GError **error)
{
@@ -504,7 +511,7 @@ inkscape_selection_add (DocumentInterface *doc, const char * IN_name, GError **e
return org_inkscape_document_selection_add (proxy, IN_name, error);
}
-static
+//static
gboolean
inkscape_selection_add_list (DocumentInterface *doc, const char ** IN_name, GError **error)
{
@@ -512,7 +519,7 @@ inkscape_selection_add_list (DocumentInterface *doc, const char ** IN_name, GErr
return org_inkscape_document_selection_add_list (proxy, IN_name, error);
}
-static
+//static
gboolean
inkscape_selection_set (DocumentInterface *doc, const char * IN_name, GError **error)
{
@@ -520,7 +527,7 @@ inkscape_selection_set (DocumentInterface *doc, const char * IN_name, GError **e
return org_inkscape_document_selection_set (proxy, IN_name, error);
}
-static
+//static
gboolean
inkscape_selection_set_list (DocumentInterface *doc, const char ** IN_name, GError **error)
{
@@ -528,7 +535,7 @@ inkscape_selection_set_list (DocumentInterface *doc, const char ** IN_name, GErr
return org_inkscape_document_selection_set_list (proxy, IN_name, error);
}
-static
+//static
gboolean
inkscape_selection_rotate (DocumentInterface *doc, const gint IN_angle, GError **error)
{
@@ -536,7 +543,7 @@ inkscape_selection_rotate (DocumentInterface *doc, const gint IN_angle, GError *
return org_inkscape_document_selection_rotate (proxy, IN_angle, error);
}
-static
+//static
gboolean
inkscape_selection_delete (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_selection_delete (proxy, error);
}
-static
+//static
gboolean
inkscape_selection_clear (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_selection_clear (proxy, error);
}
-static
+//static
gboolean
inkscape_select_all (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_select_all (proxy, error);
}
-static
+//static
gboolean
inkscape_select_all_in_all_layers (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_select_all_in_all_layers (proxy, error);
}
-static
+//static
gboolean
inkscape_selection_box (DocumentInterface *doc, const gint IN_x, const gint IN_y, const gint IN_x2, const gint IN_y2, const gboolean IN_replace, GError **error)
{
@@ -576,7 +583,7 @@ inkscape_selection_box (DocumentInterface *doc, const gint IN_x, const gint IN_y
return org_inkscape_document_selection_box (proxy, IN_x, IN_y, IN_x2, IN_y2, IN_replace, error);
}
-static
+//static
gboolean
inkscape_selection_invert (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_selection_invert (proxy, error);
}
-static
+//static
gboolean
inkscape_selection_group (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_selection_group (proxy, error);
}
-static
+//static
gboolean
inkscape_selection_ungroup (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_selection_ungroup (proxy, error);
}
-static
+//static
gboolean
inkscape_selection_cut (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_selection_cut (proxy, error);
}
-static
+//static
gboolean
inkscape_selection_copy (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_selection_copy (proxy, error);
}
-static
+//static
gboolean
inkscape_selection_paste (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_selection_paste (proxy, error);
}
-static
+//static
gboolean
inkscape_selection_scale (DocumentInterface *doc, const gdouble IN_grow, GError **error)
{
return org_inkscape_document_selection_scale (proxy, IN_grow, error);
}
-static
+//static
gboolean
inkscape_selection_move (DocumentInterface *doc, const gdouble IN_x, const gdouble IN_y, GError **error)
{
@@ -640,7 +647,7 @@ inkscape_selection_move (DocumentInterface *doc, const gdouble IN_x, const gdoub
return org_inkscape_document_selection_move (proxy, IN_x, IN_y, error);
}
-static
+//static
gboolean
inkscape_selection_move_to (DocumentInterface *doc, const gdouble IN_x, const gdouble IN_y, GError **error)
{
@@ -648,7 +655,7 @@ inkscape_selection_move_to (DocumentInterface *doc, const gdouble IN_x, const gd
return org_inkscape_document_selection_move_to (proxy, IN_x, IN_y, error);
}
-static
+//static
gboolean
inkscape_selection_move_to_layer (DocumentInterface *doc, const char * IN_layer, GError **error)
{
@@ -656,7 +663,7 @@ inkscape_selection_move_to_layer (DocumentInterface *doc, const char * IN_layer,
return org_inkscape_document_selection_move_to_layer (proxy, IN_layer, error);
}
-static
+//static
GArray *
inkscape_selection_get_center (DocumentInterface *doc, GError **error)
{
return OUT_centerpoint;
}
-static
+//static
gboolean
inkscape_selection_to_path (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_selection_to_path (proxy, error);
}
-static
+//static
char *
inkscape_selection_combine (DocumentInterface *doc, const char * IN_type, GError **error)
{
@@ -684,7 +691,7 @@ inkscape_selection_combine (DocumentInterface *doc, const char * IN_type, GError
return OUT_newpath;
}
-static
+//static
char **
inkscape_selection_divide (DocumentInterface *doc, GError **error)
{
return OUT_pieces;
}
-static
+//static
gboolean
inkscape_selection_change_level (DocumentInterface *doc, const char * IN_command, GError **error)
{
@@ -704,7 +711,7 @@ inkscape_selection_change_level (DocumentInterface *doc, const char * IN_command
return OUT_objectsmoved;
}
-static
+//static
char *
inkscape_layer_new (DocumentInterface *doc, GError **error)
{
return OUT_layername;
}
-static
+//static
gboolean
inkscape_layer_set (DocumentInterface *doc, const char * IN_layer, GError **error)
{
@@ -722,7 +729,7 @@ inkscape_layer_set (DocumentInterface *doc, const char * IN_layer, GError **erro
return org_inkscape_document_layer_set (proxy, IN_layer, error);
}
-static
+//static
char **
inkscape_layer_get_all (DocumentInterface *doc, GError **error)
{
return OUT_layers;
}
-static
+//static
gboolean
inkscape_layer_change_level (DocumentInterface *doc, const char * IN_command, GError **error)
{
@@ -742,7 +749,7 @@ inkscape_layer_change_level (DocumentInterface *doc, const char * IN_command, GE
return OUT_layermoved;
}
-static
+//static
gboolean
inkscape_layer_next (DocumentInterface *doc, GError **error)
{
return org_inkscape_document_layer_next (proxy, error);
}
-static
+//static
gboolean
inkscape_layer_previous (DocumentInterface *doc, GError **error)
{
diff --git a/src/extension/dbus/wrapper/inkscape-dbus-wrapper.h b/src/extension/dbus/wrapper/inkscape-dbus-wrapper.h
index c48a712b4bdfaf4716ebaf0e6364613f6dc2afc9..c314bf6f8acbd515faa306bb82c803cbb44b35e4 100644 (file)
#include <glib.h>
#include <glib-object.h>
-#include <dbus/dbus-glib.h>
-
//#include "document-client-glue-mod.h"
//#include <dbus/dbus-glib-bindings.h>
typedef struct _DocumentInterface DocumentInterface;
typedef struct _DocumentInterfaceClass DocumentInterfaceClass;
-struct _DocumentInterface {
- GObject parent;
- DBusGProxy * proxy;
-};
+struct _DocumentInterface;
struct _DocumentInterfaceClass {
GObjectClass parent;
-DocumentInterface * inkscape_desktop_init_dbus ();
-static
+DocumentInterface *
+inkscape_desktop_init_dbus ();
+
+//static
gboolean
inkscape_delete_all (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_call_verb (DocumentInterface *doc, const char * IN_verbid, GError **error);
-static
+//static
gchar *
inkscape_rectangle (DocumentInterface *doc, const gint IN_x, const gint IN_y, const gint IN_width, const gint IN_height, GError **error);
-static
+//static
char *
inkscape_ellipse (DocumentInterface *doc, const gint IN_x, const gint IN_y, const gint IN_width, const gint IN_height, GError **error);
-static
+//static
char *
inkscape_polygon (DocumentInterface *doc, const gint IN_cx, const gint IN_cy, const gint IN_radius, const gint IN_rotation, const gint IN_sides, GError **error);
-static
+//static
char *
inkscape_star (DocumentInterface *doc, const gint IN_cx, const gint IN_cy, const gint IN_r1, const gint IN_r2, const gdouble IN_arg1, const gdouble IN_arg2, const gint IN_sides, const gdouble IN_rounded, GError **error);
-static
+//static
char *
inkscape_spiral (DocumentInterface *doc, const gint IN_cx, const gint IN_cy, const gint IN_r, const gint IN_revolutions, GError **error);
-static
+//static
char *
inkscape_line (DocumentInterface *doc, const gint IN_x, const gint IN_y, const gint IN_x2, const gint IN_y2, GError **error);
-static
+//static
gboolean
inkscape_text (DocumentInterface *doc, const gint IN_x, const gint IN_y, const char * IN_text, GError **error);
-static
+//static
char *
inkscape_image (DocumentInterface *doc, const gint IN_x, const gint IN_y, const char * IN_text, GError **error);
-static
+//static
char *
inkscape_node (DocumentInterface *doc, const char * IN_svgtype, GError **error);
-static
+//static
gdouble
inkscape_document_get_width (DocumentInterface *doc, GError **error);
-static
+//static
gdouble
inkscape_document_get_height (DocumentInterface *doc, GError **error);
-static
+//static
char *
inkscape_document_get_css (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_document_set_css (DocumentInterface *doc, const char * IN_stylestring, GError **error);
-static
+//static
gboolean
inkscape_document_merge_css (DocumentInterface *doc, const char * IN_stylestring, GError **error);
-static
+//static
gboolean
inkscape_document_resize_to_fit_selection (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_set_attribute (DocumentInterface *doc, const char * IN_shape, const char * IN_attribute, const char * IN_newval, GError **error);
-static
+//static
gboolean
inkscape_set_int_attribute (DocumentInterface *doc, const char * IN_shape, const char * IN_attribute, const gint IN_newval, GError **error);
-static
+//static
gboolean
inkscape_set_double_attribute (DocumentInterface *doc, const char * IN_shape, const char * IN_attribute, const gdouble IN_newval, GError **error);
-static
+//static
char *
inkscape_get_attribute (DocumentInterface *doc, const char * IN_shape, const char * IN_attribute, GError **error);
-static
+//static
gboolean
inkscape_move (DocumentInterface *doc, const char * IN_shape, const gdouble IN_x, const gdouble IN_y, GError **error);
-static
+//static
gboolean
inkscape_move_to (DocumentInterface *doc, const char * IN_shape, const gdouble IN_x, const gdouble IN_y, GError **error);
-static
+//static
gboolean
inkscape_object_to_path (DocumentInterface *doc, const char * IN_objectname, GError **error);
-static
+//static
char *
inkscape_get_path (DocumentInterface *doc, const char * IN_shape, GError **error);
-static
+//static
gboolean
inkscape_transform (DocumentInterface *doc, const char * IN_shape, const char * IN_transformstr, GError **error);
-static
+//static
char *
inkscape_get_css (DocumentInterface *doc, const char * IN_shape, GError **error);
-static
+//static
gboolean
inkscape_modify_css (DocumentInterface *doc, const char * IN_shape, const char * IN_cssattrib, const char * IN_newval, GError **error);
-static
+//static
gboolean
inkscape_inkscape_merge_css (DocumentInterface *doc, const char * IN_shape, const char * IN_stylestring, GError **error);
-static
+//static
gboolean
inkscape_set_color (DocumentInterface *doc, const char * IN_shape, const gint IN_red, const gint IN_green, const gint IN_blue, const gboolean IN_fill, GError **error);
-static
+//static
gboolean
inkscape_move_to_layer (DocumentInterface *doc, const char * IN_objectname, const char * IN_layername, GError **error);
-static
+//static
GArray*
inkscape_get_node_coordinates (DocumentInterface *doc, const char * IN_shape, GError **error);
-static
+//static
gboolean
inkscape_save (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_save_as (DocumentInterface *doc, const char * IN_pathname, GError **error);
-static
+//static
gboolean
inkscape_load (DocumentInterface *doc, const char * IN_pathname, GError **error);
-static
+//static
gboolean
inkscape_mark_as_unmodified (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_close (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_inkscape_exit (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_undo (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_redo (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_pause_updates (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_resume_updates (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_update (DocumentInterface *doc, GError **error);
-static
+//static
char **
inkscape_selection_get (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_selection_add (DocumentInterface *doc, const char * IN_name, GError **error);
-static
+//static
gboolean
inkscape_selection_add_list (DocumentInterface *doc, const char ** IN_name, GError **error);
-static
+//static
gboolean
inkscape_selection_set (DocumentInterface *doc, const char * IN_name, GError **error);
-static
+//static
gboolean
inkscape_selection_set_list (DocumentInterface *doc, const char ** IN_name, GError **error);
-static
+//static
gboolean
inkscape_selection_rotate (DocumentInterface *doc, const gint IN_angle, GError **error);
-static
+//static
gboolean
inkscape_selection_delete (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_selection_clear (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_select_all (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_select_all_in_all_layers (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_selection_box (DocumentInterface *doc, const gint IN_x, const gint IN_y, const gint IN_x2, const gint IN_y2, const gboolean IN_replace, GError **error);
-static
+//static
gboolean
inkscape_selection_invert (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_selection_group (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_selection_ungroup (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_selection_cut (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_selection_copy (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_selection_paste (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_selection_scale (DocumentInterface *doc, const gdouble IN_grow, GError **error);
-static
+//static
gboolean
inkscape_selection_move (DocumentInterface *doc, const gdouble IN_x, const gdouble IN_y, GError **error);
-static
+//static
gboolean
inkscape_selection_move_to (DocumentInterface *doc, const gdouble IN_x, const gdouble IN_y, GError **error);
-static
+//static
gboolean
inkscape_selection_move_to_layer (DocumentInterface *doc, const char * IN_layer, GError **error);
-static
+//static
GArray *
inkscape_selection_get_center (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_selection_to_path (DocumentInterface *doc, GError **error);
-static
+//static
char *
inkscape_selection_combine (DocumentInterface *doc, const char * IN_type, GError **error);
-static
+//static
char **
inkscape_selection_divide (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_selection_change_level (DocumentInterface *doc, const char * IN_command, GError **error);
-static
+//static
char *
inkscape_layer_new (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_layer_set (DocumentInterface *doc, const char * IN_layer, GError **error);
-static
+//static
char **
inkscape_layer_get_all (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_layer_change_level (DocumentInterface *doc, const char * IN_command, GError **error);
-static
+//static
gboolean
inkscape_layer_next (DocumentInterface *doc, GError **error);
-static
+//static
gboolean
inkscape_layer_previous (DocumentInterface *doc, GError **error);