Add a .gitignore file
[melted] / mlt++ / src / MltGeometry.h
index d383f23..0105467 100644 (file)
 #ifndef _MLTPP_GEOMETRY_H
 #define _MLTPP_GEOMETRY_H
 
+#include "config.h"
+
 #include <framework/mlt.h>
 
 namespace Mlt
 {
        // Just for consistent naming purposes
-       class GeometryItem 
+       class MLTPP_DECLSPEC GeometryItem 
        {
                private:
                        struct mlt_geometry_item_s item;
                public:
                        mlt_geometry_item get_item( ) { return &item; }
-                       bool key( ) { return item.key; }
+                       bool key( ) { return item.key != 0; }
                        int frame( ) { return item.frame; }
                        void frame( int value ) { item.frame = value; }
                        float x( ) { return item.x; }
-                       void x( float value ) { item.x = value; }
+                       void x( float value ) { item.f[0] = 1; item.x = value; }
                        float y( ) { return item.y; }
-                       void y( float value ) { item.y = value; }
+                       void y( float value ) { item.f[1] = 1; item.y = value; }
                        float w( ) { return item.w; }
-                       void w( float value ) { item.w = value; }
+                       void w( float value ) { item.f[2] = 1; item.w = value; }
                        float h( ) { return item.h; }
-                       void h( float value ) { item.h = value; }
+                       void h( float value ) { item.f[3] = 1; item.h = value; }
                        float mix( ) { return item.mix; }
-                       void mix( float value ) { item.mix = value; }
+                       void mix( float value ) { item.f[4] = 1; item.mix = value; }
        };
 
-       class Geometry
+       class MLTPP_DECLSPEC Geometry
        {
                private:
                        mlt_geometry geometry;
@@ -64,8 +66,10 @@ namespace Mlt
                        // Remove the key at the specified position
                        int remove( int position );
                        // Get the key at the position or the next following
-                       int key( GeometryItem &item, int position );
-                       int key( GeometryItem *item, int position );
+                       int next_key( GeometryItem &item, int position );
+                       int next_key( GeometryItem *item, int position );
+                       int prev_key( GeometryItem &item, int position );
+                       int prev_key( GeometryItem *item, int position );
                        // Serialise the current geometry
                        char *serialise( int in, int out );
                        char *serialise( );