Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -46,10 +46,18 @@ OF_ORDERED_SAME = 0, /// The left object is bigger than the right OF_ORDERED_DESCENDING = 1 } of_comparison_result_t; +/** + * \brief An enum for storing endianess. + */ +typedef enum of_endianess_t { + OF_ENDIANESS_BIG_ENDIAN, + OF_ENDIANESS_LITTLE_ENDIAN +} of_endianess_t; + /** * \brief A range. */ typedef struct of_range_t { /// The start of the range @@ -57,16 +65,33 @@ /// The length of the range size_t length; } of_range_t; /** - * \brief An enum for storing endianess. + * \brief A point. + */ +typedef struct of_point_t { + int x; + int y; +} of_point_t; + +/** + * \brief A dimension. + */ +typedef struct of_dimension_t { + int width; + int height; +} of_dimension_t; + +/** + * \brief A rectangle. */ -typedef enum of_endianess_t { - OF_ENDIANESS_BIG_ENDIAN, - OF_ENDIANESS_LITTLE_ENDIAN -} of_endianess_t; +typedef struct of_rectangle_t +{ + of_point_t origin; + of_dimension_t size; +} of_rectangle_t; @class OFString; /** * \brief The protocol which all root classes implement.