Code

Improved version reporting. Add SVN revision and custom status to
[inkscape.git] / src / extension / extension.h
index e4f2dc88ecf1256667654f3d9eb9fcf25c7676a1..48ca86cf780871c77fdaef8206aabecb21206ff0 100644 (file)
@@ -22,7 +22,6 @@
 #include <gtkmm/table.h>
 #include <glibmm/ustring.h>
 #include "xml/repr.h"
-#include "document.h"
 #include "extension/extension-forward.h"
 
 /** The key that is used to identify that the I/O should be autodetected */
@@ -44,6 +43,7 @@
 /** Defines the key for Postscript printing */
 #define SP_MODULE_KEY_PRINT_PS    "org.inkscape.print.ps"
 #define SP_MODULE_KEY_PRINT_CAIRO_PS    "org.inkscape.print.ps.cairo"
+#define SP_MODULE_KEY_PRINT_CAIRO_EPS    "org.inkscape.print.eps.cairo"
 /** Defines the key for PDF printing */
 #define SP_MODULE_KEY_PRINT_PDF    "org.inkscape.print.pdf"
 #define SP_MODULE_KEY_PRINT_CAIRO_PDF    "org.inkscape.print.pdf.cairo"
 /** Name of the extension error file */
 #define EXTENSION_ERROR_LOG_FILENAME  "extension-errors.log"
 
+
+#define INKSCAPE_EXTENSION_URI   "http://www.inkscape.org/namespace/inkscape/extension"
+#define INKSCAPE_EXTENSION_NS_NC "extension"
+#define INKSCAPE_EXTENSION_NS    "extension:"
+
+struct SPDocument;
+
 namespace Inkscape {
 namespace Extension {
 
@@ -94,7 +101,7 @@ private:
     static std::ofstream error_file;      /**< This is the place where errors get reported */
 
 protected:
-    Inkscape::XML::Node *repr;                         /**< The XML description of the Extension */
+    Inkscape::XML::Node *repr;            /**< The XML description of the Extension */
     Implementation::Implementation * imp; /**< An object that holds all the functions for making this work */
     ExpirationTimer * timer;              /**< Timeout to unload after a given time */
 
@@ -123,6 +130,23 @@ private:
                               This only gets created if there are parameters in this
                               extension */
 
+public:
+    /** \brief  A function to get the the number of parameters that
+                the extension has.
+        \return The number of parameters. */
+    unsigned int param_count ( ) { return parameters == NULL ? 0 :
+                                              g_slist_length(parameters); };
+    /** \brief  A function to get the the number of parameters that
+                are visible to the user that the extension has.
+        \return The number of visible parameters. 
+        
+        \note Currently this just calls param_count as visible isn't implemented
+              but in the future it'll do something different.  Please call
+              the appropriate function in code so that it'll work in the
+              future.
+    */
+    unsigned int param_visible_count ( );
+
 public:
     /** An error class for when a parameter is called on a type it is not */
     class param_wrong_type {};