Author: Carlos Lopez <[email protected]>
Date:   Thu Nov 29 18:13:03 2012 +0100

Add RenderMethod enumeration as independent header.

---

 synfig-core/src/modules/lyr_std/import.h |   24 ++++++++-------
 synfig-core/src/synfig/Makefile.am       |    1 +
 synfig-core/src/synfig/layer.h           |    1 +
 synfig-core/src/synfig/rendermethod.h    |   46 ++++++++++++++++++++++++++++++
 4 files changed, 61 insertions(+), 11 deletions(-)

diff --git a/synfig-core/src/modules/lyr_std/import.h 
b/synfig-core/src/modules/lyr_std/import.h
index 50cbd6a..33b9432 100644
--- a/synfig-core/src/modules/lyr_std/import.h
+++ b/synfig-core/src/modules/lyr_std/import.h
@@ -31,7 +31,9 @@
 #include <synfig/color.h>
 #include <synfig/vector.h>
 #include <synfig/importer.h>
-#include <synfig/target.h>
+#include <synfig/rendermethod.h>
+
+using namespace synfig;
 
 /* === M A C R O S ========================================================= */
 
@@ -39,15 +41,15 @@
 
 /* === C L A S S E S & S T R U C T S ======================================= */
 
-class Import : public synfig::Layer_Bitmap
+class Import : public Layer_Bitmap
 {
        SYNFIG_LAYER_MODULE_EXT
 
 private:
-       synfig::String filename;
-       synfig::String abs_filename;
-       synfig::Importer::Handle importer;
-       synfig::Time time_offset;
+       String filename;
+       String abs_filename;
+       Importer::Handle importer;
+       Time time_offset;
 
 protected:
        Import();
@@ -55,19 +57,19 @@ protected:
 public:
        ~Import();
 
-       virtual bool set_param(const synfig::String & param, const 
synfig::ValueBase &value);
+       virtual bool set_param(const String & param, const ValueBase &value);
 
-       virtual synfig::ValueBase get_param(const synfig::String & param)const;
+       virtual ValueBase get_param(const String & param)const;
 
        virtual Vocab get_param_vocab()const;
 
        virtual void on_canvas_set();
 
-       virtual void set_time(synfig::Context context, synfig::Time time)const;
+       virtual void set_time(Context context, Time time)const;
 
-       virtual void set_time(synfig::Context context, synfig::Time time, const 
synfig::Point &point)const;
+       virtual void set_time(Context context, Time time, const Point 
&point)const;
        
-       virtual void set_render_method(synfig::Context context, 
synfig::RenderMethod x);
+       virtual void set_render_method(Context context, RenderMethod x);
 };
 
 /* === E N D =============================================================== */
diff --git a/synfig-core/src/synfig/Makefile.am 
b/synfig-core/src/synfig/Makefile.am
index 92fa656..314ca26 100644
--- a/synfig-core/src/synfig/Makefile.am
+++ b/synfig-core/src/synfig/Makefile.am
@@ -234,6 +234,7 @@ SYNFIGHEADERS = \
        rect.h \
        renddesc.h \
        render.h \
+       rendermethod.h \
        savecanvas.h \
        surface.h \
        target.h \
diff --git a/synfig-core/src/synfig/layer.h b/synfig-core/src/synfig/layer.h
index 6072816..87ff267 100644
--- a/synfig-core/src/synfig/layer.h
+++ b/synfig-core/src/synfig/layer.h
@@ -43,6 +43,7 @@
 
 #include "cairo.h"
 #include "cairomm/cairomm.h"
+#include "rendermethod.h"
 
 /* === M A C R O S ========================================================= */
 
diff --git a/synfig-core/src/synfig/rendermethod.h 
b/synfig-core/src/synfig/rendermethod.h
new file mode 100644
index 0000000..4846701
--- /dev/null
+++ b/synfig-core/src/synfig/rendermethod.h
@@ -0,0 +1,46 @@
+/* === S Y N F I G ========================================================= */
+/*!    \file rendermethod.h
+ **    \brief Enumeration to define the render method used
+ **
+ **    $Id$
+ **
+ **    \legal
+ **    Copyright (c) 2012 Nikita Kitaev
+ **
+ **    This package is free software; you can redistribute it and/or
+ **    modify it under the terms of the GNU General Public License as
+ **    published by the Free Software Foundation; either version 2 of
+ **    the License, or (at your option) any later version.
+ **
+ **    This package is distributed in the hope that it will be useful,
+ **    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ **    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ **    General Public License for more details.
+ **    \endlegal
+ */
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SYNFIG_RENDERMETHOD_H
+#define __SYNFIG_RENDERMETHOD_H
+
+/* === H E A D E R S ======================================================= */
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+namespace synfig
+{
+//! Available rendering methods
+enum RenderMethod {
+       SOFTWARE = 0x100,               //!< Software rendering
+       OPENGL,                         //!< OpenGL rendering (not supported)
+       CAIRO                           //!< Cairo rendering
+};
+}; // end namespace synfig
+/* === E N D =============================================================== */
+
+#endif


------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
VERIFY Test and improve your parallel project with help from experts 
and peers. http://goparallel.sourceforge.net
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to