moreupdates
[synfig.git] / synfig-core / trunk / src / synfig / module.h
index 31d3bae..e3afdfb 100644 (file)
@@ -1,4 +1,4 @@
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
 /*!    \file module.h
 **     \brief writeme
 **
@@ -21,8 +21,8 @@
 
 /* === S T A R T =========================================================== */
 
-#ifndef __SINFG_MODULE_H
-#define __SINFG_MODULE_H
+#ifndef __SYNFIG_MODULE_H
+#define __SYNFIG_MODULE_H
 
 /* === H E A D E R S ======================================================= */
 
@@ -41,7 +41,7 @@
 /* === M A C R O S ========================================================= */
 
 //! Marks the start of a module description
-#define MODULE_DESC_BEGIN(x) struct x##_modclass : public sinfg::Module { x##_modclass(sinfg::ProgressCallback *callback=NULL); 
+#define MODULE_DESC_BEGIN(x) struct x##_modclass : public synfig::Module { x##_modclass(synfig::ProgressCallback *callback=NULL); 
 
 //! Sets the localized name of the module
 #define MODULE_NAME(x)                         virtual const char * Name() { return x; }
@@ -59,7 +59,7 @@
 #define MODULE_COPYRIGHT(x)            virtual const char * Copyright() { return x; }
 
 //! Describes the module's construction function
-#define MODULE_CONSTRUCTOR(x)  bool constructor_(sinfg::ProgressCallback *cb) { return x(cb); }
+#define MODULE_CONSTRUCTOR(x)  bool constructor_(synfig::ProgressCallback *cb) { return x(cb); }
 
 //! Describes the module's destruction function
 #define MODULE_DESTRUCTOR(x)   virtual void destructor_() { return x(); }
 #ifdef __APPLE__
 //! Marks the start of a module's inventory
 #define MODULE_INVENTORY_BEGIN(x)  extern "C" {                \
-       sinfg::Module* _##x##_LTX_new_instance(sinfg::ProgressCallback *cb) \
-       { if(SINFG_CHECK_VERSION()){x##_modclass *mod=new x##_modclass(cb); mod->constructor_(cb); return mod; }\
+       synfig::Module* _##x##_LTX_new_instance(synfig::ProgressCallback *cb) \
+       { if(SYNFIG_CHECK_VERSION()){x##_modclass *mod=new x##_modclass(cb); mod->constructor_(cb); return mod; }\
        if(cb)cb->error(#x": Unable to load module due to version mismatch."); return NULL; } \
-       }; x##_modclass::x##_modclass(sinfg::ProgressCallback *cb) { 
+       }; x##_modclass::x##_modclass(synfig::ProgressCallback *cb) { 
 #else
 //! Marks the start of a module's inventory
 #define MODULE_INVENTORY_BEGIN(x)  extern "C" {                \
-       sinfg::Module* x##_LTX_new_instance(sinfg::ProgressCallback *cb) \
-       { if(SINFG_CHECK_VERSION()){x##_modclass *mod=new x##_modclass(cb); mod->constructor_(cb); return mod; }\
+       synfig::Module* x##_LTX_new_instance(synfig::ProgressCallback *cb) \
+       { if(SYNFIG_CHECK_VERSION()){x##_modclass *mod=new x##_modclass(cb); mod->constructor_(cb); return mod; }\
        if(cb)cb->error(#x": Unable to load module due to version mismatch."); return NULL; } \
-       }; x##_modclass::x##_modclass(sinfg::ProgressCallback *cb) { 
+       }; x##_modclass::x##_modclass(synfig::ProgressCallback *cb) { 
 #endif
 
 //! Marks the start of the layers in the module's inventory
 #define BEGIN_LAYERS {
 
 //! DEPRECATED - use @INCLUDE_LAYER()
-//#define LAYER(x) sinfg::Layer::book()[sinfg::String(x::name__)]=x::create;
-#define LAYER(class)   sinfg::Layer::register_in_book(sinfg::Layer::BookEntry(class::create,class::name__,class::local_name__,class::category__,class::cvs_id__,class::version__));
-#define LAYER_ALIAS(class,alias)       sinfg::Layer::register_in_book(sinfg::Layer::BookEntry(class::create,alias,alias,_("Do Not Use"),class::cvs_id__,class::version__));
+//#define LAYER(x) synfig::Layer::book()[synfig::String(x::name__)]=x::create;
+#define LAYER(class)   synfig::Layer::register_in_book(synfig::Layer::BookEntry(class::create,class::name__,class::local_name__,class::category__,class::cvs_id__,class::version__));
+#define LAYER_ALIAS(class,alias)       synfig::Layer::register_in_book(synfig::Layer::BookEntry(class::create,alias,alias,_("Do Not Use"),class::cvs_id__,class::version__));
 
 //! Marks the end of the layers in the module's inventory
 #define END_LAYERS }
@@ -98,9 +98,9 @@
 //! Marks the start of the targets in the module's inventory
 #define BEGIN_TARGETS {
 
-#define TARGET(x) sinfg::Target::book()[sinfg::String(x::name__)]=std::pair<sinfg::Target::Factory,sinfg::String>(x::create,sinfg::String(x::ext__));sinfg::Target::ext_book()[sinfg::String(x::ext__)]=x::name__;
+#define TARGET(x) synfig::Target::book()[synfig::String(x::name__)]=std::pair<synfig::Target::Factory,synfig::String>(x::create,synfig::String(x::ext__));synfig::Target::ext_book()[synfig::String(x::ext__)]=x::name__;
 
-#define TARGET_EXT(x,y) sinfg::Target::ext_book()[sinfg::String(y)]=x::name__;
+#define TARGET_EXT(x,y) synfig::Target::ext_book()[synfig::String(y)]=x::name__;
 
 //! Marks the end of the targets in the module's inventory
 #define END_TARGETS }
 //! Marks the start of the importers in the module's inventory
 #define BEGIN_IMPORTERS {
 
-#define IMPORTER(x) sinfg::Importer::book()[sinfg::String(x::ext__)]=x::create;
+#define IMPORTER(x) synfig::Importer::book()[synfig::String(x::ext__)]=x::create;
 
-#define IMPORTER_EXT(x,y) sinfg::Importer::book()[sinfg::String(y)]=x::create;
+#define IMPORTER_EXT(x,y) synfig::Importer::book()[synfig::String(y)]=x::create;
 
 //! Marks the end of the importers in the module's inventory
 #define END_IMPORTERS }
 
 /* === C L A S S E S & S T R U C T S ======================================= */
 
-namespace sinfg {
+namespace synfig {
 
 class ProgressCallback;
 
@@ -132,7 +132,7 @@ class ProgressCallback;
 class Module : public etl::shared_object
 {
 public:
-       bool constructor_(sinfg::ProgressCallback *cb) { return true; }
+       bool constructor_(synfig::ProgressCallback *cb) { return true; }
        virtual void destructor_() { }
        
        typedef etl::handle<Module> Handle;
@@ -159,12 +159,12 @@ public:
        virtual const char * Desc() { return " "; }
        virtual const char * Author() { return " "; }
        virtual const char * Version() { return " "; }
-       virtual const char * Copyright() { return SINFG_COPYRIGHT; }
+       virtual const char * Copyright() { return SYNFIG_COPYRIGHT; }
 
        virtual ~Module() { destructor_(); }
 };
 
-}; // END of namespace sinfg
+}; // END of namespace synfig
 
 /* === E N D =============================================================== */