From 67dc0b3943a5a6320f8173c8e001a514667be3fa Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Wed, 15 Aug 2012 20:47:06 +0200 Subject: [PATCH] Make OakRunIOAlertPanel accessible from C++ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I moved it to a C header. An alternative would be to put some #ifdef’s around the Objective-C stuff in OakAppKit.h, but with the standalone header, it’s clear that this is the only thing we need from OakAppKit. --- Frameworks/OakAppKit/src/IOAlertPanel.h | 8 ++++++++ Frameworks/OakAppKit/src/OakAppKit.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 Frameworks/OakAppKit/src/IOAlertPanel.h diff --git a/Frameworks/OakAppKit/src/IOAlertPanel.h b/Frameworks/OakAppKit/src/IOAlertPanel.h new file mode 100644 index 00000000..d264fbf4 --- /dev/null +++ b/Frameworks/OakAppKit/src/IOAlertPanel.h @@ -0,0 +1,8 @@ +#ifndef IO_ALERT_PANEL_H_TGU0N94P +#define IO_ALERT_PANEL_H_TGU0N94P + +#include + +PUBLIC void OakRunIOAlertPanel (char const* format, ...) __attribute__ ((format (printf, 1, 2))); + +#endif /* end of include guard: IO_ALERT_PANEL_H_TGU0N94P */ diff --git a/Frameworks/OakAppKit/src/OakAppKit.h b/Frameworks/OakAppKit/src/OakAppKit.h index d8be5ff4..b96c2cc4 100644 --- a/Frameworks/OakAppKit/src/OakAppKit.h +++ b/Frameworks/OakAppKit/src/OakAppKit.h @@ -1,8 +1,8 @@ +#include "IOAlertPanel.h" #include PUBLIC extern NSString* const OakCursorDidHideNotification; -PUBLIC void OakRunIOAlertPanel (char const* format, ...) __attribute__ ((format (printf, 1, 2))); PUBLIC BOOL OakIsAlternateKeyOrMouseEvent (NSUInteger flags = NSAlternateKeyMask, NSEvent* anEvent = [NSApp currentEvent]); #if !defined(MAC_OS_X_VERSION_10_7) || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7)