mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Many new methods declared.
(RunLoop _mode_2_timers): New ivar. (RunLoop _mode_2_in_ports): New ivar. (RunLoop _mode_2_fd_listeners): New ivar. (RunLoopDefaultMode): New extern variable. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1186 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a91e058724
commit
d885418358
2 changed files with 62 additions and 34 deletions
|
@ -3,46 +3,60 @@
|
|||
|
||||
#include <objects/stdobjects.h>
|
||||
#include <objects/NotificationDispatcher.h>
|
||||
#include <objects/Bag.h>
|
||||
#include <objects/Heap.h>
|
||||
#include <objects/Set.h>
|
||||
#include <Foundation/NSMapTable.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
@interface RunLoop : NSObject
|
||||
{
|
||||
fd_set _fds;
|
||||
NSMapTable *_fd_2_object;
|
||||
Bag *_fd_objects;
|
||||
Heap *_timers;
|
||||
NotificationDispatcher *_dispatcher;
|
||||
Array *_queues;
|
||||
id _current_mode;
|
||||
NSMapTable *_mode_2_timers;
|
||||
NSMapTable *_mode_2_in_ports;
|
||||
NSMapTable *_mode_2_fd_listeners;
|
||||
}
|
||||
|
||||
- (void) addFileDescriptor: (int)fd
|
||||
invocation: invocation
|
||||
forMode: (id <String>)mode;
|
||||
- (void) removeFileDescriptor: (int)fd
|
||||
forMode: (id <String>)mode;
|
||||
- (void) addPort: port
|
||||
forMode: (id <String>)mode;
|
||||
- (void) removePort: port
|
||||
forMode: (id <String>)mode;
|
||||
|
||||
- (void) addTimer: timer forMode: (id <String>)mode;
|
||||
|
||||
- limitDateForMode: (id <String>)mode;
|
||||
- (void) acceptInputForMode: (id <String>)mode
|
||||
beforeDate: date;
|
||||
- (id <String>) currentMode;
|
||||
|
||||
- (void) run;
|
||||
- (void) runUntilDate: limit_date;
|
||||
- (BOOL) runOnceBeforeDate: date
|
||||
forMode: (id <String>)mode;
|
||||
- (BOOL) runMode: (id <String>)mode
|
||||
beforeDate: limit_date;
|
||||
- (BOOL) runOnceBeforeDate: date;
|
||||
- (BOOL) runOnceBeforeDate: date forMode: (id <String>)mode;
|
||||
|
||||
+ (void) run;
|
||||
+ (void) runUntilDate: date;
|
||||
+ (void) runUntilDate: date forMode: (id <String>)mode;
|
||||
+ (BOOL) runOnceBeforeDate: date;
|
||||
+ (BOOL) runOnceBeforeDate: date forMode: (id <String>)mode;
|
||||
|
||||
+ currentInstance;
|
||||
+ (id <String>) 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 */
|
||||
|
|
|
@ -3,46 +3,60 @@
|
|||
|
||||
#include <objects/stdobjects.h>
|
||||
#include <objects/NotificationDispatcher.h>
|
||||
#include <objects/Bag.h>
|
||||
#include <objects/Heap.h>
|
||||
#include <objects/Set.h>
|
||||
#include <Foundation/NSMapTable.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
@interface RunLoop : NSObject
|
||||
{
|
||||
fd_set _fds;
|
||||
NSMapTable *_fd_2_object;
|
||||
Bag *_fd_objects;
|
||||
Heap *_timers;
|
||||
NotificationDispatcher *_dispatcher;
|
||||
Array *_queues;
|
||||
id _current_mode;
|
||||
NSMapTable *_mode_2_timers;
|
||||
NSMapTable *_mode_2_in_ports;
|
||||
NSMapTable *_mode_2_fd_listeners;
|
||||
}
|
||||
|
||||
- (void) addFileDescriptor: (int)fd
|
||||
invocation: invocation
|
||||
forMode: (id <String>)mode;
|
||||
- (void) removeFileDescriptor: (int)fd
|
||||
forMode: (id <String>)mode;
|
||||
- (void) addPort: port
|
||||
forMode: (id <String>)mode;
|
||||
- (void) removePort: port
|
||||
forMode: (id <String>)mode;
|
||||
|
||||
- (void) addTimer: timer forMode: (id <String>)mode;
|
||||
|
||||
- limitDateForMode: (id <String>)mode;
|
||||
- (void) acceptInputForMode: (id <String>)mode
|
||||
beforeDate: date;
|
||||
- (id <String>) currentMode;
|
||||
|
||||
- (void) run;
|
||||
- (void) runUntilDate: limit_date;
|
||||
- (BOOL) runOnceBeforeDate: date
|
||||
forMode: (id <String>)mode;
|
||||
- (BOOL) runMode: (id <String>)mode
|
||||
beforeDate: limit_date;
|
||||
- (BOOL) runOnceBeforeDate: date;
|
||||
- (BOOL) runOnceBeforeDate: date forMode: (id <String>)mode;
|
||||
|
||||
+ (void) run;
|
||||
+ (void) runUntilDate: date;
|
||||
+ (void) runUntilDate: date forMode: (id <String>)mode;
|
||||
+ (BOOL) runOnceBeforeDate: date;
|
||||
+ (BOOL) runOnceBeforeDate: date forMode: (id <String>)mode;
|
||||
|
||||
+ currentInstance;
|
||||
+ (id <String>) 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 */
|
||||
|
|
Loading…
Reference in a new issue