@@ -37,19 +37,19 @@ @class OFDate; /** * @brief A mode for an OFRunLoop. */ -typedef OFConstantString *of_run_loop_mode_t; +typedef OFConstantString *OFRunLoopMode; #ifdef __cplusplus extern "C" { #endif /** * @brief The default mode for an OFRunLoop. */ -extern const of_run_loop_mode_t of_run_loop_mode_default; +extern const OFRunLoopMode OFDefaultRunLoopMode; #ifdef __cplusplus } #endif /** @@ -62,20 +62,19 @@ { OFMutableDictionary *_states; #ifdef OF_HAVE_THREADS OFMutex *_statesMutex; #endif - of_run_loop_mode_t _Nullable _currentMode; + OFRunLoopMode _Nullable _currentMode; volatile bool _stop; } #ifdef OF_HAVE_CLASS_PROPERTIES @property (class, readonly, nullable, nonatomic) OFRunLoop *mainRunLoop; @property (class, readonly, nullable, nonatomic) OFRunLoop *currentRunLoop; #endif -@property OF_NULLABLE_PROPERTY (readonly, nonatomic) - of_run_loop_mode_t currentMode; +@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFRunLoopMode currentMode; /** * @brief Returns the run loop for the main thread. * * @return The run loop for the main thread @@ -100,12 +99,11 @@ * @brief Adds an OFTimer to the run loop for the specified mode. * * @param timer The timer to add * @param mode The run loop mode in which to run the timer */ -- (void)addTimer: (OFTimer *)timer - forMode: (of_run_loop_mode_t)mode; +- (void)addTimer: (OFTimer *)timer forMode: (OFRunLoopMode)mode; #ifdef OF_AMIGAOS /** * @brief Adds an Exec Signal to the run loop. * @@ -118,13 +116,11 @@ * @param target The target to call when the signal was received * @param selector The selector to call on the target when the signal was * received. The selector must have one parameter for the ULONG * of the signal that was received. */ -- (void)addExecSignal: (ULONG)signal - target: (id)target - selector: (SEL)selector; +- (void)addExecSignal: (ULONG)signal target: (id)target selector: (SEL)selector; /** * @brief Adds an Exec Signal to the run loop for the specified mode. * * If a signal is added multiple times, the specified methods will be performed @@ -138,11 +134,11 @@ * @param selector The selector to call on the target when the signal was * received. The selector must have one parameter for the ULONG * of the signal that was received. */ - (void)addExecSignal: (ULONG)signal - forMode: (of_run_loop_mode_t)mode + forMode: (OFRunLoopMode)mode target: (id)target selector: (SEL)selector; /** * @brief Removes the specified Exec Signal with the specified target and @@ -164,11 +160,11 @@ * @param mode The run loop mode to which the signal was added * @param target The target which was specified when adding the signal * @param selector The selector which was specified when adding the signal */ - (void)removeExecSignal: (ULONG)signal - forMode: (of_run_loop_mode_t)mode + forMode: (OFRunLoopMode)mode target: (id)target selector: (SEL)selector; #endif /** @@ -188,16 +184,15 @@ * deadline is reached. * * @param mode The mode in which to run the run loop * @param deadline The date until which the run loop should run at the longest */ -- (void)runMode: (of_run_loop_mode_t)mode - beforeDate: (nullable OFDate *)deadline; +- (void)runMode: (OFRunLoopMode)mode beforeDate: (nullable OFDate *)deadline; /** * @brief Stops the run loop. If there is still an operation being executed, it * is finished before the run loop stops. */ - (void)stop; @end OF_ASSUME_NONNULL_END