libs-base/Source/win32/NSRunLoopWin32.m
CaS abc019bbfe Deprecate old message access method ... we can be a lot more efficient if
we don't have to support it.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21922 72102866-910b-0410-8b05-ffd578937521
2005-10-30 12:46:26 +00:00

36 lines
898 B
Objective-C

#include "config.h"
#include "GNUstepBase/preface.h"
#include "Foundation/NSRunLoop.h"
#include "Foundation/NSDebug.h"
#include "../GSRunLoopCtxt.h"
@implementation NSRunLoop (mingw32)
- (void) addMsgTarget: (id)target
withMethod: (SEL)selector
forMode: (NSString*)mode
{
GSRunLoopCtxt *context;
GSOnceMLog(@"This method is deprecated, use -addEvent:type:watcher:forMode");
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