#ifndef __RunLoop_h_OBJECTS_INCLUDE #define __RunLoop_h_OBJECTS_INCLUDE #include #include #include #include #include @interface RunLoop : NSObject { id _current_mode; NSMapTable *_mode_2_timers; NSMapTable *_mode_2_in_ports; NSMapTable *_mode_2_fd_listeners; } - (void) addPort: port forMode: (id )mode; - (void) removePort: port forMode: (id )mode; - (void) addTimer: timer forMode: (id )mode; - limitDateForMode: (id )mode; - (void) acceptInputForMode: (id )mode beforeDate: date; - (id ) currentMode; - (void) run; - (void) runUntilDate: limit_date; - (BOOL) runOnceBeforeDate: date; - (BOOL) runOnceBeforeDate: date forMode: (id )mode; + (void) run; + (void) runUntilDate: date; + (void) runUntilDate: date forMode: (id )mode; + (BOOL) runOnceBeforeDate: date; + (BOOL) runOnceBeforeDate: date forMode: (id )mode; + currentInstance; + (id ) currentMode; @end /* Mode strings. */ extern id RunLoopDefaultMode; /* xxx This interface will probably change. */ @protocol FdListening - (void) readyForReadingOnFileDescriptor: (int)fd; @end /* xxx This interface will probably change. */ @interface NSObject (OptionalPortRunLoop) /* If a InPort object responds to this, it is sent just before we are about to wait listening for input. This interface will probably change. */ - (void) getFds: (int*)fds count: (int*)count; @end #endif /* __RunLoop_h_OBJECTS_INCLUDE */