25 #if defined(WITH_GL_EGL)
31 #include <Cocoa/Cocoa.h>
32 #include <Metal/Metal.h>
33 #include <QuartzCore/QuartzCore.h>
35 #include <sys/sysctl.h>
37 #pragma mark Cocoa window delegate object
47 - (void)windowDidBecomeKey:(NSNotification *)notification;
48 - (void)windowDidResignKey:(NSNotification *)notification;
49 - (void)windowDidExpose:(NSNotification *)notification;
50 - (void)windowDidResize:(NSNotification *)notification;
51 - (void)windowDidMove:(NSNotification *)notification;
52 - (void)windowWillMove:(NSNotification *)notification;
53 - (BOOL)windowShouldClose:(
id)sender;
54 - (void)windowDidChangeBackingProperties:(NSNotification *)notification;
65 - (void)windowDidBecomeKey:(NSNotification *)notification
69 [(NSWindow *)associatedWindow->getOSWindow() orderFrontRegardless];
72 - (void)windowDidResignKey:(NSNotification *)notification
77 - (void)windowDidExpose:(NSNotification *)notification
82 - (void)windowDidMove:(NSNotification *)notification
87 - (void)windowWillMove:(NSNotification *)notification
92 - (void)windowWillEnterFullScreen:(NSNotification *)notification
97 - (void)windowDidEnterFullScreen:(NSNotification *)notification
107 - (void)windowWillExitFullScreen:(NSNotification *)notification
112 - (void)windowDidExitFullScreen:(NSNotification *)notification
119 - (void)windowDidResize:(NSNotification *)notification
127 if ([[notification
object] inLiveResize]) {
132 - (void)windowDidChangeBackingProperties:(NSNotification *)notification
138 - (BOOL)windowShouldClose:(
id)sender;
147 #pragma mark NSWindow subclass
173 - (BOOL)canBecomeKeyWindow
180 - (NSDragOperation)draggingEntered:(
id<NSDraggingInfo>)sender
182 NSPoint mouseLocation = [sender draggingLocation];
183 NSPasteboard *draggingPBoard = [sender draggingPasteboard];
185 if ([[draggingPBoard
types] containsObject:NSTIFFPboardType])
187 else if ([[draggingPBoard
types] containsObject:NSFilenamesPboardType])
189 else if ([[draggingPBoard
types] containsObject:NSStringPboardType])
192 return NSDragOperationNone;
201 return NSDragOperationCopy;
204 - (BOOL)wantsPeriodicDraggingUpdates
209 - (NSDragOperation)draggingUpdated:(
id<NSDraggingInfo>)sender
211 NSPoint mouseLocation = [sender draggingLocation];
222 - (void)draggingExited:(
id<NSDraggingInfo>)sender
229 - (BOOL)prepareForDragOperation:(
id<NSDraggingInfo>)sender
237 - (BOOL)performDragOperation:(
id<NSDraggingInfo>)sender
239 NSPoint mouseLocation = [sender draggingLocation];
240 NSPasteboard *draggingPBoard = [sender draggingPasteboard];
246 if ([NSImage canInitWithPasteboard:draggingPBoard]) {
247 droppedImg = [[NSImage alloc] initWithPasteboard:draggingPBoard];
254 data = [draggingPBoard propertyListForType:NSFilenamesPboardType];
257 data = [draggingPBoard stringForType:NSStringPboardType];
275 #define COCOA_VIEW_CLASS CocoaOpenGLView
276 #define COCOA_VIEW_BASE_CLASS NSOpenGLView
278 #undef COCOA_VIEW_CLASS
279 #undef COCOA_VIEW_BASE_CLASS
281 #define COCOA_VIEW_CLASS CocoaMetalView
282 #define COCOA_VIEW_BASE_CLASS NSView
284 #undef COCOA_VIEW_CLASS
285 #undef COCOA_VIEW_BASE_CLASS
287 #pragma mark initialization / finalization
297 const bool stereoVisual,
307 m_immediateDraw(false),
308 m_debug_context(is_debug),
309 m_is_dialog(is_dialog)
313 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
319 rect.origin.x =
left;
321 rect.size.width =
width;
322 rect.size.height =
height;
324 NSWindowStyleMask styleMask = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable |
325 NSWindowStyleMaskResizable;
327 styleMask |= NSWindowStyleMaskMiniaturizable;
332 backing:NSBackingStoreBuffered
339 minSize.height = 240;
340 [
m_window setContentMinSize:minSize];
343 id<MTLDevice> metalDevice = MTLCreateSystemDefaultDevice();
357 m_metalView = [[CocoaMetalView alloc] initWithFrame:rect];
360 [
m_metalView setSystemAndWindowCocoa:systemCocoa windowCocoa:this];
365 m_openGLView = [[CocoaOpenGLView alloc] initWithFrame:rect];
366 [
m_openGLView setSystemAndWindowCocoa:systemCocoa windowCocoa:this];
373 if ([
view respondsToSelector:
@selector(setWantsBestResolutionOpenGLSurface:)]) {
374 [view setWantsBestResolutionOpenGLSurface:YES];
379 [
m_window setInitialFirstResponder:view];
381 [
m_window makeKeyAndOrderFront:nil];
393 [
m_window setDelegate:windowDelegate];
395 [
m_window setAcceptsMouseMovedEvents:YES];
397 NSView *contentview = [
m_window contentView];
398 [contentview setAllowedTouchTypes:(NSTouchTypeMaskDirect | NSTouchTypeMaskIndirect)];
400 [
m_window registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType,
405 if (is_dialog && parentWindow) {
406 [parentWindow->getCocoaWindow() addChildWindow:m_window ordered:NSWindowAbove];
407 [
m_window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
410 [
m_window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
423 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
451 NSArray *windowsList = [NSApp orderedWindows];
452 for (
int a = 0;
a < [windowsList count];
a++) {
454 [[windowsList objectAtIndex:a] makeKeyWindow];
463 #pragma mark accessors
479 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
481 NSString *windowTitle = [[NSString alloc] initWithCString:title encoding:NSUTF8StringEncoding];
484 if (windowTitle && [windowTitle hasPrefix:
@"Blender"]) {
485 NSRange fileStrRange;
486 NSString *associatedFileName;
489 fileStrRange.location = [windowTitle rangeOfString:@"["].location + 1;
490 len = [windowTitle rangeOfString:@"]"].location - fileStrRange.location;
493 fileStrRange.length =
len;
494 associatedFileName = [windowTitle substringWithRange:fileStrRange];
495 [
m_window setTitle:[associatedFileName lastPathComponent]];
498 [
m_window setRepresentedFilename:associatedFileName];
500 @catch (NSException *
e) {
501 printf(
"\nInvalid file path given in window title");
506 [
m_window setRepresentedFilename:@""];
511 [
m_window setRepresentedFilename:@""];
514 [windowTitle release];
522 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
524 NSString *windowTitle = [
m_window title];
527 if (windowTitle != nil) {
528 title = [windowTitle UTF8String];
541 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
543 NSRect screenSize = [[
m_window screen] visibleFrame];
547 bounds.m_b = screenSize.size.height - (rect.origin.y - screenSize.origin.y);
548 bounds.m_l = rect.origin.x - screenSize.origin.x;
549 bounds.m_r = rect.origin.x - screenSize.origin.x + rect.size.width;
550 bounds.m_t = screenSize.size.height - (rect.origin.y + rect.size.height - screenSize.origin.y);
560 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
562 NSRect screenSize = [[
m_window screen] visibleFrame];
565 NSRect contentRect = [
CocoaWindow contentRectForFrameRect:screenSize
570 bounds.m_b = contentRect.size.height - (rect.origin.y - contentRect.origin.y);
571 bounds.m_l = rect.origin.x - contentRect.origin.x;
572 bounds.m_r = rect.origin.x - contentRect.origin.x + rect.size.width;
573 bounds.m_t = contentRect.size.height - (rect.origin.y + rect.size.height - contentRect.origin.y);
580 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
596 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
612 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
629 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
632 NSUInteger masks = [
m_window styleMask];
634 if (masks & NSWindowStyleMaskFullScreen) {
643 else if ([
m_window isMiniaturized]) {
699 screenCoord.origin.x = inX;
700 screenCoord.origin.y = inY;
702 baseCoord = [
m_window convertRectFromScreen:screenCoord];
704 outX = baseCoord.origin.x;
705 outY = baseCoord.origin.y;
716 baseCoord.origin.x = inX;
717 baseCoord.origin.y = inY;
719 screenCoord = [
m_window convertRectToScreen:baseCoord];
721 outX = screenCoord.origin.x;
722 outY = screenCoord.origin.y;
734 NSRect backingBounds = [view convertRectToBacking:[view bounds]];
761 NSUInteger masks = [
m_window styleMask];
763 if (!(masks & NSWindowStyleMaskFullScreen)) {
770 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
771 NSUInteger masks = [
m_window styleMask];
773 if (masks & NSWindowStyleMaskFullScreen) {
790 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
792 [
m_window setDocumentEdited:isUnsavedChanges];
800 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
804 [NSApp activateIgnoringOtherApps:YES];
805 [
m_window makeKeyAndOrderFront:nil];
808 NSArray *windowsList;
813 windowsList = [NSApp orderedWindows];
814 if ([windowsList
count]) {
815 [[windowsList objectAtIndex:0] makeKeyAndOrderFront:nil];
823 #pragma mark Drawing context
832 if (
context->initializeDrawingContext())
841 #pragma mark invalidate
846 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
848 [view setNeedsDisplay:YES];
853 #pragma mark Progress bar
857 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
859 if ((progress >= 0.0) && (progress <= 1.0)) {
860 NSImage *dockIcon = [[NSImage alloc] initWithSize:NSMakeSize(128, 128)];
862 [dockIcon lockFocus];
864 [[NSImage imageNamed:@"NSApplicationIcon"] drawAtPoint:NSZeroPoint
866 operation:NSCompositingOperationSourceOver
869 NSRect progressRect = {{8, 8}, {112, 14}};
870 NSBezierPath *progressPath;
873 [[[NSColor whiteColor] colorWithAlphaComponent:0.6] setFill];
874 progressPath = [NSBezierPath bezierPathWithRoundedRect:progressRect xRadius:7 yRadius:7];
878 [[[NSColor blackColor] colorWithAlphaComponent:0.7] setFill];
879 progressRect = NSInsetRect(progressRect, 2, 2);
880 progressRect.size.width *= progress;
881 progressPath = [NSBezierPath bezierPathWithRoundedRect:progressRect xRadius:5 yRadius:5];
884 [dockIcon unlockFocus];
886 [NSApp setApplicationIconImage:dockIcon];
898 NSUserNotification *notification = [[NSUserNotification alloc] init];
899 notification.title =
@"Blender Progress Notification";
900 notification.informativeText =
@"Calculation is finished.";
901 notification.soundName = NSUserNotificationDefaultSoundName;
902 [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
903 [notification release];
912 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
914 NSImage *dockIcon = [[NSImage alloc] initWithSize:NSMakeSize(128, 128)];
915 [dockIcon lockFocus];
916 [[NSImage imageNamed:@"NSApplicationIcon"] drawAtPoint:NSZeroPoint
918 operation:NSCompositingOperationSourceOver
920 [dockIcon unlockFocus];
921 [NSApp setApplicationIconImage:dockIcon];
927 if ([NSUserNotificationCenter respondsToSelector:
@selector(defaultUserNotificationCenter)]) {
937 #pragma mark Cursor handling
941 static NSCursor *
cursors[(int)GHOST_kStandardCursorNumCursors] = {0};
942 static bool loaded[(int)GHOST_kStandardCursorNumCursors] = {
false};
944 const int index = (int)shape;
945 if (!loaded[index]) {
950 NSImage *image = [NSImage imageNamed:name];
952 cursors[index] = [[NSCursor alloc] initWithImage:image hotSpot:hotspot];
956 loaded[index] =
true;
973 return [NSCursor disappearingItemCursor];
975 return [NSCursor IBeamCursor];
977 return [NSCursor crosshairCursor];
979 return [NSCursor resizeUpDownCursor];
981 return [NSCursor resizeLeftRightCursor];
983 return [NSCursor resizeUpCursor];
985 return [NSCursor resizeDownCursor];
987 return [NSCursor resizeLeftCursor];
989 return [NSCursor resizeRightCursor];
991 return [NSCursor dragCopyCursor];
993 return [NSCursor operationNotAllowedCursor];
995 return [NSCursor pointingHandCursor];
997 return [NSCursor arrowCursor];
1005 return getImageCursor(shape,
@"eyedropper.pdf", NSMakePoint(6, 24));
1011 return getImageCursor(shape,
@"scrollnsew.pdf", NSMakePoint(16, 16));
1013 return getImageCursor(shape,
@"scrollns.pdf", NSMakePoint(16, 16));
1015 return getImageCursor(shape,
@"scrollew.pdf", NSMakePoint(16, 16));
1017 return getImageCursor(shape,
@"arrowup.pdf", NSMakePoint(16, 16));
1019 return getImageCursor(shape,
@"arrowdown.pdf", NSMakePoint(16, 16));
1021 return getImageCursor(shape,
@"arrowleft.pdf", NSMakePoint(16, 16));
1023 return getImageCursor(shape,
@"arrowright.pdf", NSMakePoint(16, 16));
1025 return getImageCursor(shape,
@"splitv.pdf", NSMakePoint(16, 16));
1027 return getImageCursor(shape,
@"splith.pdf", NSMakePoint(16, 16));
1029 return getImageCursor(shape,
@"paint_cursor_cross.pdf", NSMakePoint(16, 15));
1031 return getImageCursor(shape,
@"paint_cursor_dot.pdf", NSMakePoint(16, 15));
1033 return getImageCursor(shape,
@"crossc.pdf", NSMakePoint(16, 16));
1041 static bool systemCursorVisible =
true;
1042 if (visible != systemCursorVisible) {
1045 systemCursorVisible =
true;
1049 systemCursorVisible =
false;
1054 if (cursor ==
NULL) {
1068 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
1085 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
1116 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
1128 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
1138 ch= ((ch >> 1) & 0x55) | ((ch << 1) & 0xAA);
1139 ch= ((ch >> 2) & 0x33) | ((ch << 2) & 0xCC);
1140 ch= ((ch >> 4) & 0x0F) | ((ch << 4) & 0xF0);
1148 shrt = ((shrt >> 1) & 0x5555) | ((shrt << 1) & 0xAAAA);
1149 shrt = ((shrt >> 2) & 0x3333) | ((shrt << 2) & 0xCCCC);
1150 shrt = ((shrt >> 4) & 0x0F0F) | ((shrt << 4) & 0xF0F0);
1151 shrt = ((shrt >> 8) & 0x00FF) | ((shrt << 8) & 0xFF00);
1161 bool canInvertColor)
1164 NSPoint hotSpotPoint;
1165 NSBitmapImageRep *cursorImageRep;
1166 NSImage *cursorImage;
1170 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
1177 cursorImageRep = [[NSBitmapImageRep alloc]
1178 initWithBitmapDataPlanes:nil
1185 colorSpaceName:NSDeviceWhiteColorSpace
1186 bytesPerRow:(sizex / 8 + (sizex % 8 > 0 ? 1 : 0))
1189 cursorBitmap = (
GHOST_TUns16 *)[cursorImageRep bitmapData];
1190 nbUns16 = [cursorImageRep bytesPerPlane] / 2;
1192 for (
y = 0;
y < nbUns16;
y++) {
1193 #if !defined(__LITTLE_ENDIAN__)
1203 if (canInvertColor) {
1204 cursorBitmap[y] = ~cursorBitmap[y];
1208 imSize.width = sizex;
1209 imSize.height = sizey;
1210 cursorImage = [[NSImage alloc] initWithSize:imSize];
1211 [cursorImage addRepresentation:cursorImageRep];
1213 hotSpotPoint.x = hotX;
1214 hotSpotPoint.y = hotY;
1217 m_customCursor = [[NSCursor alloc] initWithImage:cursorImage hotSpot:hotSpotPoint];
1219 [cursorImageRep release];
1220 [cursorImage release];
typedef float(TangentPoint)[2]
#define GHOST_ASSERT(x, info)
static const std::unordered_map< GHOST_TStandardCursor, std::string > cursors
@ GHOST_kWindowStateMinimized
@ GHOST_kWindowStateMaximized
@ GHOST_kWindowStateNormal
@ GHOST_kWindowStateFullScreen
@ GHOST_kStandardCursorZoomIn
@ GHOST_kStandardCursorVerticalSplit
@ GHOST_kStandardCursorCopy
@ GHOST_kStandardCursorHorizontalSplit
@ GHOST_kStandardCursorTopSide
@ GHOST_kStandardCursorStop
@ GHOST_kStandardCursorCrosshair
@ GHOST_kStandardCursorCustom
@ GHOST_kStandardCursorNSEWScroll
@ GHOST_kStandardCursorLeftRight
@ GHOST_kStandardCursorPencil
@ GHOST_kStandardCursorNSScroll
@ GHOST_kStandardCursorCrosshairA
@ GHOST_kStandardCursorUpDown
@ GHOST_kStandardCursorUpArrow
@ GHOST_kStandardCursorBottomSide
@ GHOST_kStandardCursorEyedropper
@ GHOST_kStandardCursorKnife
@ GHOST_kStandardCursorMove
@ GHOST_kStandardCursorCrosshairB
@ GHOST_kStandardCursorDownArrow
@ GHOST_kStandardCursorEraser
@ GHOST_kStandardCursorDefault
@ GHOST_kStandardCursorEWScroll
@ GHOST_kStandardCursorRightSide
@ GHOST_kStandardCursorRightArrow
@ GHOST_kStandardCursorDestroy
@ GHOST_kStandardCursorCrosshairC
@ GHOST_kStandardCursorZoomOut
@ GHOST_kStandardCursorLeftSide
@ GHOST_kStandardCursorText
@ GHOST_kStandardCursorLeftArrow
unsigned int GHOST_TUns32
@ GHOST_kEventWindowClose
@ GHOST_kEventDraggingDropDone
@ GHOST_kEventDraggingExited
@ GHOST_kEventNativeResolutionChange
@ GHOST_kEventDraggingUpdated
@ GHOST_kEventDraggingEntered
@ GHOST_kEventWindowActivate
@ GHOST_kEventWindowUpdate
@ GHOST_kEventWindowDeactivate
static const GHOST_TabletData GHOST_TABLET_DATA_NONE
unsigned short GHOST_TUns16
GHOST_TDrawingContextType
@ GHOST_kDrawingContextTypeOpenGL
@ GHOST_kDragnDropTypeUnknown
@ GHOST_kDragnDropTypeFilenames
@ GHOST_kDragnDropTypeBitmap
@ GHOST_kDragnDropTypeString
unsigned char GHOST_TUns8
static GHOST_TUns16 uns16ReverseBits(GHOST_TUns16 shrt)
static NSCursor * getImageCursor(GHOST_TStandardCursor shape, NSString *name, NSPoint hotspot)
static void postNotification()
static GHOST_TUns8 uns8ReverseBits(GHOST_TUns8 ch)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint order
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble bottom
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
virtual GHOST_TInt32 getWidth() const
virtual GHOST_TInt32 getHeight() const
GHOST_TSuccess handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa *window)
GHOST_TSuccess handleDraggingEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType, GHOST_WindowCocoa *window, int mouseX, int mouseY, void *data)
GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y)
GHOST_TSuccess getCursorPosition(GHOST_TInt32 &x, GHOST_TInt32 &y) const
void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const
GHOST_TSuccess setClientWidth(GHOST_TUns32 width)
GHOST_WindowCocoa(GHOST_SystemCocoa *systemCocoa, const char *title, GHOST_TInt32 left, GHOST_TInt32 bottom, GHOST_TUns32 width, GHOST_TUns32 height, GHOST_TWindowState state, GHOST_TDrawingContextType type=GHOST_kDrawingContextTypeNone, const bool stereoVisual=false, bool is_debug=false, bool dialog=false, GHOST_WindowCocoa *parentWindow=0)
GHOST_SystemCocoa * m_systemCocoa
GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor shape)
void setImmediateDraw(bool value)
void setTitle(const char *title)
std::string getTitle() const
void clientToScreenIntern(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const
GHOST_Context * newDrawingContext(GHOST_TDrawingContextType type)
GHOST_TSuccess setWindowCursorVisibility(bool visible)
CocoaOpenGLView * m_openGLView
CAMetalLayer * m_metalLayer
GHOST_TSuccess setOrder(GHOST_TWindowOrder order)
NSCursor * getStandardCursor(GHOST_TStandardCursor cursor) const
GHOST_TWindowState getState() const
GHOST_TabletData m_tablet
void getWindowBounds(GHOST_Rect &bounds) const
GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height)
void getClientBounds(GHOST_Rect &bounds) const
void * getOSWindow() const
void screenToClientIntern(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const
NSCursor * m_customCursor
GHOST_TSuccess setModifiedState(bool isUnsavedChanges)
GHOST_TSuccess setState(GHOST_TWindowState state)
void setNativePixelSize(void)
void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const
GHOST_TSuccess invalidate()
CocoaMetalView * m_metalView
GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor)
GHOST_TSuccess setClientHeight(GHOST_TUns32 height)
GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape)
GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode)
void loadCursor(bool visible, GHOST_TStandardCursor cursor) const
GHOST_TSuccess setProgressBar(float progress)
GHOST_TSuccess endProgressBar()
GHOST_Rect m_cursorGrabBounds
bool getCursorVisibility() const
GHOST_TGrabCursorMode m_cursorGrab
GHOST_TSuccess setDrawingContextType(GHOST_TDrawingContextType type)
GHOST_TSuccess releaseNativeHandles()
virtual GHOST_TSuccess setModifiedState(bool isUnsavedChanges)
bool canAcceptDragOperation() const
GHOST_TInt32 m_cursorGrabInitPos[2]
virtual bool getValid() const
void setCursorGrabAccum(GHOST_TInt32 x, GHOST_TInt32 y)
void setAcceptDragOperation(bool canAccept)
GHOST_TSuccess updateDrawingContext()
bool m_progressBarVisible
virtual GHOST_TSuccess activateDrawingContext()
GHOST_TStandardCursor getCursorShape() const
GHOST_WindowCocoa * associatedWindow
void setSystemAndWindowCocoa:windowCocoa:(GHOST_SystemCocoa *sysCocoa,[windowCocoa] GHOST_WindowCocoa *winCocoa)
GHOST_SystemCocoa * systemCocoa
GHOST_SystemCocoa * systemCocoa
GHOST_WindowCocoa * associatedWindow
void setSystemAndWindowCocoa:windowCocoa:(GHOST_SystemCocoa *sysCocoa,[windowCocoa] GHOST_WindowCocoa *winCocoa)
GHOST_TDragnDropTypes m_draggedObjectType
struct SELECTID_Context context
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)