Up

NSRunLoop class reference

Authors

Andrew Kachites McCallum (mccallum@gnu.ai.mit.edu)
Richard Frith-Macdonald (richard@brainstorm.co.uk)

Version: 1.110

Date: 2003/08/20 12:13:34

Copyright: (C) 1996-1999 Free Software Foundation, Inc.


Contents -

  1. Software documentation for the NSRunLoop class
  2. Software documentation for the NSObject(OptionalPortRunLoop) informal protocol
  3. Software documentation for the NSRunLoop(GNUstepExtensions) category
  4. Software documentation for the NSRunLoop(OPENSTEP) category
  5. Software documentation for the RunLoopEvents protocol

Software documentation for the NSRunLoop class

NSRunLoop : NSObject

Declared in:
Foundation/NSRunLoop.h
Conforms to:
GCFinalization
Standards:

Description forthcoming.

Method summary

currentRunLoop

+ (NSRunLoop*) currentRunLoop;

Description forthcoming.


acceptInputForMode:beforeDate:

- (void) acceptInputForMode: (NSString*)mode beforeDate: (NSDate*)limit_date;

Listen to input sources.
If limit_date is nil or in the past, then don't wait; just poll inputs and return, otherwise block until input is available or until the earliest limit date has passed (whichever comes first).
If the supplied mode is nil, uses NSDefaultRunLoopMode.


addTimer:forMode:

- (void) addTimer: (NSTimer*)timer forMode: (NSString*)mode;

Adds a timer to the loop in the specified mode.
Timers are removed automatically when they are invalid.


currentMode

- (NSString*) currentMode;

Returns the current mode of this runloop. If the runloop is not running then this method returns nil.


limitDateForMode:

- (NSDate*) limitDateForMode: (NSString*)mode;

Fire appropriate timers and determine the earliest time that anything watched for becomes useless.


run

- (void) run;

Description forthcoming.


runMode:beforeDate:

- (BOOL) runMode: (NSString*)mode beforeDate: (NSDate*)date;

Calls -acceptInputForMode:beforeDate: to run the loop once.
The specified date may be nil... in which case the loop runs until the first input or timeout.
If the limit dates for all of mode's input sources have passed, returns NO without running the loop, otherwise returns YES.


runUntilDate:

- (void) runUntilDate: (NSDate*)date;

Description forthcoming.


Software documentation for the NSObject(OptionalPortRunLoop) informal protocol

NSObject(OptionalPortRunLoop)

Declared in:
Foundation/NSRunLoop.h
Standards:

Description forthcoming.

Method summary

getFds:count:

- (void) getFds: (int*)fds count: (int*)count;

Description forthcoming.


Software documentation for the NSRunLoop(GNUstepExtensions) category

NSRunLoop(GNUstepExtensions)

Declared in:
Foundation/NSRunLoop.h
Standards:

Description forthcoming.

Method summary

addEvent:type:watcher:forMode:

- (void) addEvent: (void*)data type: (RunLoopEventType)type watcher: (id<RunLoopEvents>)watcher forMode: (NSString*)mode;

Adds a runloop watcher matching the specified data and type in this runloop. If the mode is nil, either the currentMode is used (if the loop is running) or NSDefaultRunLoopMode is used.


removeEvent:type:forMode:all:

- (void) removeEvent: (void*)data type: (RunLoopEventType)type forMode: (NSString*)mode all: (BOOL)removeAll;

Removes a runloop watcher matching the specified data and type in this runloop. If the mode is nil, either the currentMode is used (if the loop is running) or NSDefaultRunLoopMode is used. The additional removeAll flag may be used to remove all instances of the watcher rather than just a single one.


Software documentation for the NSRunLoop(OPENSTEP) category

NSRunLoop(OPENSTEP)

Declared in:
Foundation/NSRunLoop.h
Standards:

Description forthcoming.

Method summary

addPort:forMode:

- (void) addPort: (NSPort*)port forMode: (NSString*)mode;

Description forthcoming.


cancelPerformSelector:target:argument:

- (void) cancelPerformSelector: (SEL)aSelector target: (id)target argument: (id)argument;

Cancels any perform operations set up for the specified target in the receiver, but only if the value of aSelector and argument with which the performs were set up match those supplied.
Matching of the argument may be either by pointer equality or by use of the [NSObject -isEqual:] method.


cancelPerformSelectorsWithTarget:

- (void) cancelPerformSelectorsWithTarget: (id)target;

Cancels any perform operations set up for the specified target in the receiver.


configureAsServer

- (void) configureAsServer;

Description forthcoming.


performSelector:target:argument:order:modes:

- (void) performSelector: (SEL)aSelector target: (id)target argument: (id)argument order: (unsigned int)order modes: (NSArray*)modes;

Sets up sending of aSelector to target with argument.
The selector is sent before the next runloop iteration (unless cancelled before then).
The target and argument objects are not retained.
The order value is used to determine the order in which messages are sent if multiple messages have been set up. Messages with a lower order value are sent first.


removePort:forMode:

- (void) removePort: (NSPort*)port forMode: (NSString*)mode;

Description forthcoming.


Software documentation for the RunLoopEvents protocol

RunLoopEvents

Declared in:
Foundation/NSRunLoop.h
Standards:

Description forthcoming.

Method summary

receivedEvent:type:extra:forMode:

- (void) receivedEvent: (void*)data type: (RunLoopEventType)type extra: (void*)extra forMode: (NSString*)mode;

Description forthcoming.


timedOutEvent:type:forMode:

- (NSDate*) timedOutEvent: (void*)data type: (RunLoopEventType)type forMode: (NSString*)mode;

Description forthcoming.



Up