X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fextension%2Fextension.h;h=0129f4d742584e2fcec9c23bf63f0db726425321;hb=e0c38bd294fd720cebbabeda1a0d87259f68bf7f;hp=b1171548b0bb387a7611281c3acf158941282b29;hpb=b52e65ffa832a0bf6b99e7e11b79b14b31641ab8;p=inkscape.git diff --git a/src/extension/extension.h b/src/extension/extension.h index b1171548b..0129f4d74 100644 --- a/src/extension/extension.h +++ b/src/extension/extension.h @@ -44,6 +44,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" @@ -57,14 +58,9 @@ /** Defines the default printing to use */ #define SP_MODULE_KEY_PRINT_DEFAULT SP_MODULE_KEY_PRINT_WIN32 #else -#ifdef WITH_GNOME_PRINT -/** Defines the default printing to use */ -#define SP_MODULE_KEY_PRINT_DEFAULT SP_MODULE_KEY_PRINT_GNOME -#else /** Defines the default printing to use */ #define SP_MODULE_KEY_PRINT_DEFAULT SP_MODULE_KEY_PRINT_PS #endif -#endif /** Mime type for SVG */ #define MIME_SVG "image/svg+xml" @@ -72,6 +68,11 @@ /** 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:" + namespace Inkscape { namespace Extension { @@ -99,7 +100,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 */ @@ -128,6 +129,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 {}; @@ -165,10 +183,10 @@ public: const gchar * get_param_string (const gchar * name, const SPDocument * doc = NULL, const Inkscape::XML::Node * node = NULL); - SPColor* get_param_color (const gchar * name, + guint32 get_param_color (const gchar * name, const SPDocument * doc = NULL, const Inkscape::XML::Node * node = NULL); - const gchar * get_param_enum (const gchar * name, + const gchar * get_param_enum (const gchar * name, const SPDocument * doc = NULL, const Inkscape::XML::Node * node = NULL); bool set_param_bool (const gchar * name, @@ -187,8 +205,8 @@ public: const gchar * value, SPDocument * doc = NULL, Inkscape::XML::Node * node = NULL); - SPColor* set_param_color (const gchar * name, - SPColor* color, + guint32 set_param_color (const gchar * name, + guint32 color, SPDocument * doc = NULL, Inkscape::XML::Node * node = NULL);