mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Apply modified patch to support windows native event handling
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20785 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0e7313bb94
commit
2a9f4ec7c0
24 changed files with 2735 additions and 1640 deletions
43
Source/win32/GSRunLoopWatcher.m
Normal file
43
Source/win32/GSRunLoopWatcher.m
Normal file
|
@ -0,0 +1,43 @@
|
|||
#include "config.h"
|
||||
|
||||
#include "GNUstepBase/preface.h"
|
||||
#include "GNUstepBase/GSRunLoopWatcher.h"
|
||||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSPort.h>
|
||||
|
||||
SEL eventSel; /* Initialized in [NSRunLoop +initialize] */
|
||||
|
||||
@implementation GSRunLoopWatcher
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
RELEASE(_date);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id) initWithType: (RunLoopEventType)aType
|
||||
receiver: (id)anObj
|
||||
data: (void*)item
|
||||
{
|
||||
_invalidated = NO;
|
||||
|
||||
switch (aType)
|
||||
{
|
||||
case ET_RPORT: type = aType; break;
|
||||
case ET_HANDLE: type = aType; break;
|
||||
default:
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"NSRunLoop - unknown event type"];
|
||||
}
|
||||
receiver = anObj;
|
||||
if ([receiver respondsToSelector: eventSel] == YES)
|
||||
handleEvent = [receiver methodForSelector: eventSel];
|
||||
else
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"RunLoop listener has no event handling method"];
|
||||
data = item;
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue