Differences From Artifact [d972931bb6]:
- File src/OFObject.h — part of check-in [35de667566] at 2021-04-18 20:51:25 on branch new-naming-convention — Rename everything in several smaller files (user: js, size: 39407) [annotate] [blame] [check-ins using] [more...]
To Artifact [f1db17a081]:
- File
src/OFObject.h
— part of check-in
[2fcf5a3052]
at
2021-04-29 23:24:22
on branch trunk
— Clean up struct and enum typedefs
With TYPEDEF_HIDES_STRUCT set, Doxygen properly handles anonymous
structs and enums that are typedef'd. (user: js, size: 39289) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
50 51 52 53 54 55 56 | OF_ASSUME_NONNULL_BEGIN /** @file */ /** * @brief A result of a comparison. */ | | | | | < | | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | OF_ASSUME_NONNULL_BEGIN /** @file */ /** * @brief A result of a comparison. */ typedef enum { /** The left object is smaller than the right */ OFOrderedAscending = -1, /** Both objects are equal */ OFOrderedSame = 0, /** The left object is bigger than the right */ OFOrderedDescending = 1 } OFComparisonResult; #ifdef OF_HAVE_BLOCKS /** * @brief A comparator to compare two objects. * * @param left The left object * @param right The right object * @return The order of the objects */ typedef OFComparisonResult (^OFComparator)(id _Nonnull left, id _Nonnull right); #endif /** * @brief An enum for representing endianess. */ typedef enum { /** Most significant byte first (big endian) */ OFByteOrderBigEndian, /** Least significant byte first (little endian) */ OFByteOrderLittleEndian, /** Native byte order of the system */ #ifdef OF_BIG_ENDIAN OFByteOrderNative = OFByteOrderBigEndian #else OFByteOrderNative = OFByteOrderLittleEndian #endif } OFByteOrder; /** * @struct OFRange OFObject.h ObjFW/OFObject.h * * @brief A range. */ typedef struct OF_BOXABLE { /** The start of the range */ size_t location; /** The length of the range */ size_t length; } OFRange; /** * @brief Creates a new OFRange. * * @param start The starting index of the range * @param length The length of the range * @return An OFRangeith the specified start and length |
︙ | ︙ | |||
143 144 145 146 147 148 149 | typedef double OFTimeInterval; /** * @struct OFPoint OFObject.h ObjFW/OFObject.h * * @brief A point. */ | | < | | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | typedef double OFTimeInterval; /** * @struct OFPoint OFObject.h ObjFW/OFObject.h * * @brief A point. */ typedef struct OF_BOXABLE { /** The x coordinate of the point */ float x; /** The y coordinate of the point */ float y; } OFPoint; /** * @brief Creates a new OFPoint. * * @param x The x coordinate of the point * @param y The x coordinate of the point * @return An OFPoint with the specified coordinates |
︙ | ︙ | |||
190 191 192 193 194 195 196 | } /** * @struct OFSize OFObject.h ObjFW/OFObject.h * * @brief A size. */ | | < | | 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | } /** * @struct OFSize OFObject.h ObjFW/OFObject.h * * @brief A size. */ typedef struct OF_BOXABLE { /** The width of the size */ float width; /** The height of the size */ float height; } OFSize; /** * @brief Creates a new OFSize. * * @param width The width of the size * @param height The height of the size * @return An OFSize with the specified width and height |
︙ | ︙ | |||
237 238 239 240 241 242 243 | } /** * @struct OFRect OFObject.h ObjFW/OFObject.h * * @brief A rectangle. */ | | < | | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | } /** * @struct OFRect OFObject.h ObjFW/OFObject.h * * @brief A rectangle. */ typedef struct OF_BOXABLE { /** The point from where the rectangle originates */ OFPoint origin; /** The size of the rectangle */ OFSize size; } OFRect; /** * @brief Creates a new OFRect. * * @param x The x coordinate of the top left corner of the rectangle * @param y The y coordinate of the top left corner of the rectangle * @param width The width of the rectangle |
︙ | ︙ |