X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fmodule.h;h=26638cd6866b2ff694a160410c4a0d91ecce4d56;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=d142287ddc5ea3bd771223695930cbb048936e2a;hpb=2f30f664764cd4e2908d3465197c680b9ed2145d;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/module.h b/synfig-core/trunk/src/synfig/module.h index d142287..26638cd 100644 --- a/synfig-core/trunk/src/synfig/module.h +++ b/synfig-core/trunk/src/synfig/module.h @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -31,6 +32,7 @@ #include #include #include "string.h" +#include "releases.h" #include #include "vector.h" #include "color.h" @@ -89,9 +91,23 @@ #define BEGIN_LAYERS { //! DEPRECATED - use #INCLUDE_LAYER(class) -#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(x) synfig::Layer::book()[synfig::String(x::name__)]=x::create; -#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__)); +#define LAYER(class) \ + synfig::Layer::register_in_book( \ + synfig::Layer::BookEntry(class::create, \ + class::name__, \ + dgettext("synfig", 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, \ + CATEGORY_DO_NOT_USE, \ + class::cvs_id__, \ + class::version__)); //! Marks the end of the layers in the module's inventory #define END_LAYERS } @@ -123,10 +139,11 @@ //! Marks the start of the valuenodes in the module's inventory #define BEGIN_VALUENODES { synfig::LinkableValueNode::Book &book(synfig::LinkableValueNode::book()); -#define VALUENODE(class,name,local) \ +#define VALUENODE(class,name,local,version) \ book[name].factory=reinterpret_cast(&class::create); \ book[name].check_type=&class::check_type; \ - book[name].local_name=local; + book[name].local_name=local; \ + book[name].release_version=version; //! Marks the end of the valuenodes in the module's inventory #define END_VALUENODES } @@ -165,7 +182,7 @@ public: static bool subsys_init(const String &prefix); static bool subsys_stop(); - static bool register_default_modules(); + static void register_default_modules(ProgressCallback *cb=NULL); static void Register(Handle mod); static bool Register(const String &module_name, ProgressCallback *cb=NULL);