Hi,
I am making a plugin that will inform my Mac application of various input events like trackpad swipe/pinch etc. For now I am just trying to get the plugin to be able to detect a mouseDown event but nothing I have tried has been successful.
In TrackPad.h:
#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>
@interface TrackPad : NSWindow <NSWindowDelegate> {
}
@end
extern "C" {
extern bool IsMouseDown();
}
and in TrackPad.m:
#import "TrackPad.h"
#import <Cocoa/Cocoa.h>
@implementation TrackPad
static bool bIsDown = false;
#pragma mark NSResponder
- (void) mouseDown:(NSEvent *)event
{
bIsDown = true;
}
@end
bool IsMouseDown()
{
return bIsDown;
}
The mouseDown function is never entered and I have no clue as to why not? Anybody have any ideas?