42 #import <Cocoa/Cocoa.h> 43 #include <private/qwidget_p.h> 45 #include <private/qt_mac_p.h> 98 #ifndef QT_MAC_USE_COCOA 107 #ifndef QT_MAC_USE_COCOA
116 #ifndef QT_MAC_USE_COCOA 157 return [[
d->nsview retain] autorelease];
168 NSView *view =
static_cast<NSView *
>(cocoaViewToWrap);
169 NSView *oldView =
d->nsview;
173 #ifndef QT_MAC_USE_COCOA 175 qWarning(
"QMacCocoaViewContainer::setCocoaView: You cannot use this class with Carbon on versions of Mac OS X less than 10.5.");
178 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 180 CFRelease(
d->wrapperView);
181 HICocoaViewCreate(
d->nsview, 0, &
d->wrapperView);
virtual ~QMacCocoaViewContainer()
Destroy the QMacCocoaViewContainer and release the wrapped view.
#define QT_END_NAMESPACE
This macro expands to.
~QMacCocoaViewContainerPrivate()
#define QT_BEGIN_NAMESPACE
This macro expands to.
struct OpaqueControlRef * HIViewRef
Q_CORE_EXPORT void qWarning(const char *,...)
QMacCocoaViewContainer(void *cocoaViewToWrap, QWidget *parent=0)
Create a new QMacCocoaViewContainer using the NSView pointer in cocoaViewToWrap with parent...
void * cocoaView() const
Returns the NSView that has been set on this container.
#define Q_DECLARE_PUBLIC(Class)
QMacCocoaViewContainerPrivate()
static const MacVersion MacintoshVersion
the version of the Macintosh operating system on which the application is run (Mac only)...
void setCocoaView(void *cocoaViewToWrap)
Sets the NSView to contain to be cocoaViewToWrap and retains it.