summaryrefslogtreecommitdiff
path: root/src/lib/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/types.h')
-rw-r--r--src/lib/types.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/lib/types.h b/src/lib/types.h
index c255bd0d8..3fab302fc 100644
--- a/src/lib/types.h
+++ b/src/lib/types.h
@@ -32,11 +32,19 @@ class SubtitleContent;
class FFmpegContent;
class AudioBuffers;
+namespace cxml {
+ class Node;
+}
+
+namespace xmlpp {
+ class Node;
+}
+
/** The version number of the protocol used to communicate
* with servers. Intended to be bumped when incompatibilities
* are introduced.
*/
-#define SERVER_LINK_VERSION 1
+#define SERVER_LINK_VERSION 2
typedef int64_t Time;
#define TIME_MAX INT64_MAX
@@ -85,6 +93,15 @@ enum Eyes
EYES_COUNT
};
+enum Part
+{
+ PART_LEFT_HALF,
+ PART_RIGHT_HALF,
+ PART_TOP_HALF,
+ PART_BOTTOM_HALF,
+ PART_WHOLE
+};
+
/** @struct Crop
* @brief A description of the crop of an image or video.
*/
@@ -92,6 +109,7 @@ struct Crop
{
Crop () : left (0), right (0), top (0), bottom (0) {}
Crop (int l, int r, int t, int b) : left (l), right (r), top (t), bottom (b) {}
+ Crop (boost::shared_ptr<cxml::Node>);
/** Number of pixels to remove from the left-hand side */
int left;
@@ -116,6 +134,8 @@ struct Crop
return s;
}
+
+ void as_xml (xmlpp::Node *) const;
};
extern bool operator== (Crop const & a, Crop const & b);