Code

Adding dbus descriptions to EXTRA_DIST
[inkscape.git] / src / extension / dbus / document-interface.xml
index ba8c7e2b316bdcb56038b72c586d7424c9516c08..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>
           <doc:para>After doing this you will no longer be able to modify the shape using shape specific attributes (cx, radius etc.) except transform</doc:para>
           <doc:para>Required for certain functions that work on paths (not yet present in this API.)</doc:para>
         </doc:description>
+        <doc:seealso><doc:ref type="interface" to="Paths">Paths</doc:ref></doc:seealso>
+      </doc:doc>
+    </method>
+
+    <method name="get_path">
+      <arg type="s" name="shape" direction="in" >
+        <doc:doc>
+          <doc:summary>The id of an object.</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="s" name="val" direction="out" >
+        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="error"/>
+        <doc:doc>
+          <doc:summary>The path of the object.  NULL if the object has no path.</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <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>
     </method>
 
         <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:doc>
     </method>
 
-    <method name="print" >
+    <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>
         <doc:description>
           <doc:para>Prints the current document with default settings.</doc:para>
         <doc:seealso><doc:ref type="interface" to="document.document_resize_to_fit_selection">document_resize_to_fit_selection()</doc:ref></doc:seealso>
       </doc:doc>
     </method>
+    -->
 
     <!-- PROGRAM CONTROL FUNCTIONS -->
 
     <!-- SELECTION FUNCTIONS -->
 
     <method name="selection_get">
-      <arg type="as" name="list" direction="out" >
-        <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
+      <arg type="as" name="listy" direction="out" >
+       <!-- <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/> -->
         <doc:doc>
           <doc:summary>List of the ids of currently selected objects.</doc:summary>
         </doc:doc>
     </method>
 
     <method name="selection_get_center">
-      <arg type="(ii)" name="centerpoint" direction="out" >
+      <arg type="ad" name="centerpoint" direction="out" >
         <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
         <doc:doc>
           <doc:summary>Center of the selection.</doc:summary>
       </doc:doc>
     </method>
 
+    <method name="selection_divide">
+      <arg type="as" name="pieces" direction="out" >
+       <!-- <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/> -->
+        <doc:doc>
+          <doc:summary>List of the ids of resulting paths.</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>Returns the result of cutting the bottom object by all other intersecting paths.</doc:para>
+          <doc:para>This may make many seperate layers.</doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
+
     <method name="selection_change_level" >
       <arg type="s" name="command" direction="in" >
         <doc:doc>