2005-02-23 16:05:09 +00:00
|
|
|
#include "config.h"
|
|
|
|
#include "GNUstepBase/preface.h"
|
|
|
|
#include "Foundation/NSRunLoop.h"
|
2005-10-30 12:08:54 +00:00
|
|
|
#include "Foundation/NSDebug.h"
|
2005-10-30 10:42:42 +00:00
|
|
|
#include "../GSRunLoopCtxt.h"
|
2005-02-23 16:05:09 +00:00
|
|
|
|
|
|
|
@implementation NSRunLoop (mingw32)
|
|
|
|
- (void) addMsgTarget: (id)target
|
|
|
|
withMethod: (SEL)selector
|
|
|
|
forMode: (NSString*)mode
|
|
|
|
{
|
|
|
|
GSRunLoopCtxt *context;
|
|
|
|
|
2005-10-30 12:46:26 +00:00
|
|
|
GSOnceMLog(@"This method is deprecated, use -addEvent:type:watcher:forMode");
|
2005-02-23 16:05:09 +00:00
|
|
|
context = NSMapGet(_contextMap, mode);
|
|
|
|
if (context == nil)
|
|
|
|
{
|
|
|
|
context = [[GSRunLoopCtxt alloc] initWithMode: mode extra: _extra];
|
|
|
|
NSMapInsert(_contextMap, context->mode, context);
|
|
|
|
RELEASE(context);
|
|
|
|
}
|
|
|
|
context->msgTarget = target;
|
|
|
|
context->msgSelector = selector;
|
|
|
|
}
|
|
|
|
- (void) removeMsgForMode: (NSString*)mode
|
|
|
|
{
|
|
|
|
GSRunLoopCtxt *context;
|
|
|
|
|
|
|
|
context = NSMapGet(_contextMap, mode);
|
|
|
|
if (context == nil)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
context->msgTarget = nil;
|
|
|
|
}
|
|
|
|
@end
|