From e145df21652a643c358afabe979cdca8e0c55429 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 15 Sep 2014 09:17:56 +0000 Subject: Add methods to intercept low level system events. This gives applications the means to handle some low level integration with the system that might otherwise not be possible without modifying FLTK itself. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10310 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Fl_cocoa.mm') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 5c96fb255..9756c35dc 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -81,6 +81,7 @@ typedef unsigned int NSUInteger; // external functions extern void fl_fix_focus(); extern unsigned short *fl_compute_macKeyLookUp(); +extern int fl_send_system_handlers(void *e); // forward definition of functions in this file // converting cr lf converter function @@ -1375,6 +1376,9 @@ void fl_open_callback(void (*cb)(const char *)) { @implementation FLApplication + (void)sendEvent:(NSEvent *)theEvent { + if (fl_send_system_handlers(theEvent)) + return; + NSEventType type = [theEvent type]; if (type == NSLeftMouseDown) { fl_lock_function(); -- cgit v1.2.3