Code

Adding dbus descriptions to EXTRA_DIST
[inkscape.git] / src / extension / dbus / document-interface.xml
index 171508dcdfa29de2db44297801c6f74dff10d5c3..8b0252765f197f4f153d941c087daa164cbd5f1e 100644 (file)
@@ -1,4 +1,23 @@
 <?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ * 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
+-->
 <node name="/org/inkscape/document"
   xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"
 >
     </method>
 
     <method name="text">
+      <arg type="i" name="x" direction="in" >
+        <doc:doc>
+          <doc:summary>The x coordinate to put the text at.</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="i" name="y" direction="in" >
+        <doc:doc>
+          <doc:summary>The y coordinate to put the text at.</doc:summary>
+        </doc:doc>
+      </arg>
       <arg type="s" name="text" direction="in" >
         <doc:doc>
           <doc:summary>The text you want.</doc:summary>
         </doc:doc>
       </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>This method creates some text in the current layer.</doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
+    
+    <method name="image">
+      <arg type="i" name="x" direction="in" >
+        <doc:doc>
+          <doc:summary>The x coordinate to put the image at.</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="i" name="y" direction="in" >
+        <doc:doc>
+          <doc:summary>The y coordinate to put the image at.</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="s" name="text" direction="in" >
+        <doc:doc>
+          <doc:summary>The full path of the image you want.</doc:summary>
+        </doc:doc>
+      </arg>
       <arg type="s" name="object_name" direction="out" >
         <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="error"/>
         <doc:doc>
-          <doc:summary>The name of the new text object.</doc:summary>
+          <doc:summary>The name of the new image.</doc:summary>
         </doc:doc>
       </arg>
       <doc:doc>
         <doc:description>
-          <doc:para>This method creates some text in the current layer.</doc:para>
+          <doc:para>This method imports a non-vector image (such as a jpeg, png, etc.) and places it at the given coordinates.  The resulting shape has no style or path but can be treated like a rectangle.  With and height can be set explicitly (will deform image) or transform strings or <doc:ref type="method" to="document.selection_scale">selection_scale()</doc:ref> can scale it relatively.</doc:para>
         </doc:description>
       </doc:doc>
     </method>
       </arg>
       <doc:doc>
         <doc:description>
-          <doc:para>Get the path value of an object.  Equivilent to calling <doc:ref type="method" to="document.get_attribte">get_attribte()</doc:ref> with argument "d".  Will not turn object into a path if it is not already.</doc:para>
+          <doc:para>Get the path value of an object.  Equivilent to calling <doc:ref type="method" to="document.get_attribute">get_attribte()</doc:ref> with argument "d".  Will not turn object into a path if it is not already.</doc:para>
         </doc:description>
         <doc:seealso><doc:ref type="interface" to="Paths">Paths</doc:ref></doc:seealso>
       </doc:doc>
         <doc:seealso><doc:ref type="interface" to="Style Strings">Style Strings</doc:ref></doc:seealso>
       </doc:doc>
     </method>
+    
+    <method name="set_color">
+      <arg type="s" name="shape" direction="in" >
+        <doc:doc>
+          <doc:summary>Any object, or 'document' to apply to document style.</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="i" name="red" direction="in" >
+        <doc:doc>
+          <doc:summary>The red component.</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="i" name="green" direction="in" >
+        <doc:doc>
+          <doc:summary>The green component.</doc:summary>
+        </doc:doc>
+      </arg>
+            <arg type="i" name="blue" direction="in" >
+        <doc:doc>
+          <doc:summary>The blue component.</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="b" name="fill" direction="in" >
+        <doc:doc>
+          <doc:summary>True to change fill color, false for stroke color.</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>Modifies the fill or stroke color of an object (or the document style) based on RGB values.</doc:para>
+          <doc:para>Red green and blue must be between 0-255 inclusive.</doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
 
     <method name="move_to_layer">
       <arg type="s" name="objectname" direction="in" >
           <doc:summary>A object that contains a path ("d") attribute.</doc:summary>
         </doc:doc>
       </arg>
-      <arg type="a(ii)" name="points" direction="out" >
+      <arg type="ai" name="points" direction="out" >
         <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
         <doc:doc>
           <doc:summary>An array of points.</doc:summary>
         </doc:description>
       </doc:doc>
     </method>
+
+    <method name="mark_as_unmodified" >
+      <doc:doc>
+        <doc:description>
+          <doc:para>Marks the document as unmodified/saved.</doc:para>
+          <doc:para>Will prevent save confirmation on close if called at end of script.</doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
     <!--
     <method name="print_to_file" >
       <doc:doc>