25 assert(glView != nil &&
"GLViewIsValid, glView parameter is nil");
27 if ([glView isHiddenOrHasHiddenAncestor]) {
33 const NSRect visibleRect = [glView visibleRect];
34 if (visibleRect.size.width < 1. || visibleRect.size.height < 1.) {
52- (
id) initWithFrame : (NSRect) frameRect pixelFormat : (NSOpenGLPixelFormat *) format
54 if (self = [super initWithFrame : frameRect windowAttributes : 0]) {
55 [
self setHidden : YES];
59 if ([[NSScreen mainScreen] backingScaleFactor] > 1.)
60 [
self setWantsBestResolutionOpenGLSurface : YES];
70 [fOpenGLContext clearDrawable];
72 self.fOpenGLContext = nil;
73 [fPixelFormat release];
85- (
void) setPixelFormat : (NSOpenGLPixelFormat *) pixelFormat
88 [fPixelFormat release];
112#pragma unused(notUsed)
118 [
self setHidden : NO];
125 assert([[self subviews] count] == 0 &&
"mapSubwindows, GL-view has children");
135 "configureNotifyTree, gVirtualX is either null or has type different from TGCocoa");
149- (
void) setOverlapped : (BOOL) overlap
156 [
self setHidden : fIsOverlapped];
160 "setFrameSize:, gVirtualX is either null or has a type, different from TGCocoa");
161 [fOpenGLContext update];
177- (
void) setFrame : (NSRect) newFrame
182 if (NSEqualRects(newFrame, self.frame))
185 [
super setFrame : newFrame];
189- (
void) setFrameSize : (NSSize) newSize
193 [
super setFrameSize : newSize];
196 [fOpenGLContext update];
202 "setFrameSize:, gVirtualX is either null or has a type, different from TGCocoa");
210- (
void) drawRect : (NSRect) dirtyRect
212#pragma unused(dirtyRect)
224- (
void) setLayer:(CALayer *) layer
const Mask_t kStructureNotifyMask
typedef void((*Func_t)())
void GenerateExposeEvent(NSView< X11Window > *view, const NSRect &exposedRect)
void GenerateConfigureNotifyEvent(NSView< X11Window > *view, const NSRect &newFrame)
This class implements TVirtualX interface for MacOS X, using Cocoa and Quartz 2D.
ROOT::MacOSX::X11::EventTranslator * GetEventTranslator() const
void configureNotifyTree()
NSOpenGLContext * fOpenGLContext
NSOpenGLPixelFormat * pixelFormat()
QuartzPixmap * fBackBuffer
NSOpenGLPixelFormat * fPixelFormat
bool GLViewIsValidDrawable(ROOTOpenGLView *glView)
Namespace for new ROOT classes and functions.