11 #include <Cocoa/Cocoa.h>
12 #include <Metal/Metal.h>
13 #include <QuartzCore/QuartzCore.h>
15 #include <sys/sysctl.h>
17 #pragma mark Cocoa window delegate object
27 - (
void)windowDidBecomeKey:(NSNotification *)notification;
28 - (
void)windowDidResignKey:(NSNotification *)notification;
29 - (
void)windowDidExpose:(NSNotification *)notification;
30 - (
void)windowDidResize:(NSNotification *)notification;
31 - (
void)windowDidMove:(NSNotification *)notification;
32 - (
void)windowWillMove:(NSNotification *)notification;
33 - (BOOL)windowShouldClose:(
id)sender;
34 - (
void)windowDidChangeBackingProperties:(NSNotification *)notification;
45 - (
void)windowDidBecomeKey:(NSNotification *)notification
49 [(NSWindow *)associatedWindow->getOSWindow() orderFrontRegardless];
52 - (
void)windowDidResignKey:(NSNotification *)notification
57 - (
void)windowDidExpose:(NSNotification *)notification
62 - (
void)windowDidMove:(NSNotification *)notification
67 - (
void)windowWillMove:(NSNotification *)notification
72 - (
void)windowWillEnterFullScreen:(NSNotification *)notification
77 - (
void)windowDidEnterFullScreen:(NSNotification *)notification
87 - (
void)windowWillExitFullScreen:(NSNotification *)notification
92 - (
void)windowDidExitFullScreen:(NSNotification *)notification
99 - (
void)windowDidResize:(NSNotification *)notification
107 if ([[notification
object] inLiveResize]) {
112 - (
void)windowDidChangeBackingProperties:(NSNotification *)notification
118 - (
BOOL)windowShouldClose:(
id)sender;
127 #pragma mark NSWindow subclass
153 - (
BOOL)canBecomeKeyWindow
160 - (NSDragOperation)draggingEntered:(
id<NSDraggingInfo>)sender
162 NSPoint mouseLocation = [sender draggingLocation];
163 NSPasteboard *draggingPBoard = [sender draggingPasteboard];
165 if ([[draggingPBoard
types] containsObject:NSTIFFPboardType])
167 else if ([[draggingPBoard
types] containsObject:NSFilenamesPboardType])
169 else if ([[draggingPBoard
types] containsObject:NSStringPboardType])
172 return NSDragOperationNone;
181 return NSDragOperationCopy;
184 - (
BOOL)wantsPeriodicDraggingUpdates
189 - (NSDragOperation)draggingUpdated:(
id<NSDraggingInfo>)sender
191 NSPoint mouseLocation = [sender draggingLocation];
202 - (
void)draggingExited:(
id<NSDraggingInfo>)sender
209 - (
BOOL)prepareForDragOperation:(
id<NSDraggingInfo>)sender
217 - (
BOOL)performDragOperation:(
id<NSDraggingInfo>)sender
219 NSPoint mouseLocation = [sender draggingLocation];
220 NSPasteboard *draggingPBoard = [sender draggingPasteboard];
226 if ([NSImage canInitWithPasteboard:draggingPBoard]) {
227 droppedImg = [[NSImage alloc] initWithPasteboard:draggingPBoard];
234 data = [draggingPBoard propertyListForType:NSFilenamesPboardType];
237 data = [draggingPBoard stringForType:NSStringPboardType];
255 #define COCOA_VIEW_CLASS CocoaOpenGLView
256 #define COCOA_VIEW_BASE_CLASS NSOpenGLView
258 #undef COCOA_VIEW_CLASS
259 #undef COCOA_VIEW_BASE_CLASS
261 #define COCOA_VIEW_CLASS CocoaMetalView
262 #define COCOA_VIEW_BASE_CLASS NSView
264 #undef COCOA_VIEW_CLASS
265 #undef COCOA_VIEW_BASE_CLASS
267 #pragma mark initialization / finalization
277 const bool stereoVisual,
287 m_immediateDraw(false),
288 m_debug_context(is_debug),
289 m_is_dialog(is_dialog)
293 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
299 rect.origin.x =
left;
301 rect.size.width =
width;
302 rect.size.height =
height;
304 NSWindowStyleMask styleMask = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable |
305 NSWindowStyleMaskResizable;
307 styleMask |= NSWindowStyleMaskMiniaturizable;
312 backing:NSBackingStoreBuffered
319 minSize.height = 240;
320 [
m_window setContentMinSize:minSize];
323 id<MTLDevice> metalDevice = MTLCreateSystemDefaultDevice();
337 m_metalView = [[CocoaMetalView alloc] initWithFrame:rect];
340 [
m_metalView setSystemAndWindowCocoa:systemCocoa windowCocoa:this];
345 m_openGLView = [[CocoaOpenGLView alloc] initWithFrame:rect];
346 [
m_openGLView setSystemAndWindowCocoa:systemCocoa windowCocoa:this];
353 if ([
view respondsToSelector:
@selector(setWantsBestResolutionOpenGLSurface:)]) {
354 [view setWantsBestResolutionOpenGLSurface:YES];
359 [
m_window setInitialFirstResponder:view];
361 [
m_window makeKeyAndOrderFront:nil];
373 [
m_window setDelegate:windowDelegate];
375 [
m_window setAcceptsMouseMovedEvents:YES];
377 NSView *contentview = [
m_window contentView];
378 [contentview setAllowedTouchTypes:(NSTouchTypeMaskDirect | NSTouchTypeMaskIndirect)];
380 [
m_window registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType,
385 if (is_dialog && parentWindow) {
386 [parentWindow->getCocoaWindow() addChildWindow:m_window ordered:NSWindowAbove];
387 [
m_window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
390 [
m_window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
403 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
431 NSArray *windowsList = [NSApp orderedWindows];
432 for (
int a = 0;
a < [windowsList count];
a++) {
434 [[windowsList objectAtIndex:a] makeKeyWindow];
443 #pragma mark accessors
459 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
461 NSString *windowTitle = [[NSString alloc] initWithCString:title encoding:NSUTF8StringEncoding];
464 if (windowTitle && [windowTitle hasPrefix:
@"Blender"]) {
465 NSRange fileStrRange;
466 NSString *associatedFileName;
469 fileStrRange.location = [windowTitle rangeOfString:@"["].location + 1;
470 len = [windowTitle rangeOfString:@"]"].location - fileStrRange.location;
473 fileStrRange.length =
len;
474 associatedFileName = [windowTitle substringWithRange:fileStrRange];
475 [
m_window setTitle:[associatedFileName lastPathComponent]];
478 [
m_window setRepresentedFilename:associatedFileName];
480 @catch (NSException *
e) {
481 printf(
"\nInvalid file path given in window title");
486 [
m_window setRepresentedFilename:@""];
491 [
m_window setRepresentedFilename:@""];
494 [windowTitle release];
502 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
504 NSString *windowTitle = [
m_window title];
507 if (windowTitle != nil) {
508 title = [windowTitle UTF8String];
521 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
523 NSRect screenSize = [[
m_window screen] visibleFrame];
527 bounds.m_b = screenSize.size.height - (rect.origin.y - screenSize.origin.y);
528 bounds.m_l = rect.origin.x - screenSize.origin.x;
529 bounds.m_r = rect.origin.x - screenSize.origin.x + rect.size.width;
530 bounds.m_t = screenSize.size.height - (rect.origin.y + rect.size.height - screenSize.origin.y);
540 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
542 NSRect screenSize = [[
m_window screen] visibleFrame];
545 NSRect contentRect = [
CocoaWindow contentRectForFrameRect:screenSize
550 bounds.m_b = contentRect.size.height - (rect.origin.y - contentRect.origin.y);
551 bounds.m_l = rect.origin.x - contentRect.origin.x;
552 bounds.m_r = rect.origin.x - contentRect.origin.x + rect.size.width;
553 bounds.m_t = contentRect.size.height - (rect.origin.y + rect.size.height - contentRect.origin.y);
560 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
576 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
592 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
608 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
611 NSUInteger masks = [
m_window styleMask];
613 if (masks & NSWindowStyleMaskFullScreen) {
622 else if ([
m_window isMiniaturized]) {
678 screenCoord.origin.x = inX;
679 screenCoord.origin.y = inY;
681 baseCoord = [
m_window convertRectFromScreen:screenCoord];
683 outX = baseCoord.origin.x;
684 outY = baseCoord.origin.y;
695 baseCoord.origin.x = inX;
696 baseCoord.origin.y = inY;
698 screenCoord = [
m_window convertRectToScreen:baseCoord];
700 outX = screenCoord.origin.x;
701 outY = screenCoord.origin.y;
713 NSRect backingBounds = [view convertRectToBacking:[view bounds]];
740 NSUInteger masks = [
m_window styleMask];
742 if (!(masks & NSWindowStyleMaskFullScreen)) {
749 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
750 NSUInteger masks = [
m_window styleMask];
752 if (masks & NSWindowStyleMaskFullScreen) {
769 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
771 [
m_window setDocumentEdited:isUnsavedChanges];
779 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
783 [NSApp activateIgnoringOtherApps:YES];
784 [
m_window makeKeyAndOrderFront:nil];
787 NSArray *windowsList;
792 windowsList = [NSApp orderedWindows];
793 if ([windowsList
count]) {
794 [[windowsList objectAtIndex:0] makeKeyAndOrderFront:nil];
802 #pragma mark Drawing context
811 if (
context->initializeDrawingContext())
820 #pragma mark invalidate
825 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
827 [view setNeedsDisplay:YES];
832 #pragma mark Progress bar
836 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
838 if ((progress >= 0.0) && (progress <= 1.0)) {
839 NSImage *dockIcon = [[NSImage alloc] initWithSize:NSMakeSize(128, 128)];
841 [dockIcon lockFocus];
843 [[NSImage imageNamed:@"NSApplicationIcon"] drawAtPoint:NSZeroPoint
845 operation:NSCompositingOperationSourceOver
848 NSRect progressRect = {{8, 8}, {112, 14}};
849 NSBezierPath *progressPath;
852 [[[NSColor whiteColor] colorWithAlphaComponent:0.6] setFill];
853 progressPath = [NSBezierPath bezierPathWithRoundedRect:progressRect xRadius:7 yRadius:7];
857 [[[NSColor blackColor] colorWithAlphaComponent:0.7] setFill];
858 progressRect = NSInsetRect(progressRect, 2, 2);
859 progressRect.size.width *= progress;
860 progressPath = [NSBezierPath bezierPathWithRoundedRect:progressRect xRadius:5 yRadius:5];
863 [dockIcon unlockFocus];
865 [NSApp setApplicationIconImage:dockIcon];
877 NSUserNotification *notification = [[NSUserNotification alloc] init];
878 notification.title =
@"Blender Progress Notification";
879 notification.informativeText =
@"Calculation is finished.";
880 notification.soundName = NSUserNotificationDefaultSoundName;
881 [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
882 [notification release];
891 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
893 NSImage *dockIcon = [[NSImage alloc] initWithSize:NSMakeSize(128, 128)];
894 [dockIcon lockFocus];
895 [[NSImage imageNamed:@"NSApplicationIcon"] drawAtPoint:NSZeroPoint
897 operation:NSCompositingOperationSourceOver
899 [dockIcon unlockFocus];
900 [NSApp setApplicationIconImage:dockIcon];
906 if ([NSUserNotificationCenter respondsToSelector:
@selector(defaultUserNotificationCenter)]) {
916 #pragma mark Cursor handling
920 static NSCursor *
cursors[(int)GHOST_kStandardCursorNumCursors] = {0};
921 static bool loaded[(int)GHOST_kStandardCursorNumCursors] = {
false};
923 const int index = (int)shape;
924 if (!loaded[index]) {
929 NSImage *
image = [NSImage imageNamed:name];
931 cursors[index] = [[NSCursor alloc] initWithImage:image hotSpot:hotspot];
935 loaded[index] =
true;
952 return [NSCursor disappearingItemCursor];
954 return [NSCursor IBeamCursor];
956 return [NSCursor crosshairCursor];
958 return [NSCursor resizeUpDownCursor];
960 return [NSCursor resizeLeftRightCursor];
962 return [NSCursor resizeUpCursor];
964 return [NSCursor resizeDownCursor];
966 return [NSCursor resizeLeftCursor];
968 return [NSCursor resizeRightCursor];
970 return [NSCursor dragCopyCursor];
972 return [NSCursor operationNotAllowedCursor];
974 return [NSCursor pointingHandCursor];
976 return [NSCursor arrowCursor];
984 return getImageCursor(shape,
@"eyedropper.pdf", NSMakePoint(6, 24));
990 return getImageCursor(shape,
@"scrollnsew.pdf", NSMakePoint(16, 16));
992 return getImageCursor(shape,
@"scrollns.pdf", NSMakePoint(16, 16));
994 return getImageCursor(shape,
@"scrollew.pdf", NSMakePoint(16, 16));
996 return getImageCursor(shape,
@"arrowup.pdf", NSMakePoint(16, 16));
998 return getImageCursor(shape,
@"arrowdown.pdf", NSMakePoint(16, 16));
1000 return getImageCursor(shape,
@"arrowleft.pdf", NSMakePoint(16, 16));
1002 return getImageCursor(shape,
@"arrowright.pdf", NSMakePoint(16, 16));
1004 return getImageCursor(shape,
@"splitv.pdf", NSMakePoint(16, 16));
1006 return getImageCursor(shape,
@"splith.pdf", NSMakePoint(16, 16));
1008 return getImageCursor(shape,
@"paint_cursor_cross.pdf", NSMakePoint(16, 15));
1010 return getImageCursor(shape,
@"paint_cursor_dot.pdf", NSMakePoint(16, 15));
1012 return getImageCursor(shape,
@"crossc.pdf", NSMakePoint(16, 16));
1020 static bool systemCursorVisible =
true;
1021 if (visible != systemCursorVisible) {
1024 systemCursorVisible =
true;
1028 systemCursorVisible =
false;
1033 if (cursor ==
NULL) {
1047 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
1064 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
1095 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
1107 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
1117 ch= ((ch >> 1) & 0x55) | ((ch << 1) & 0xAA);
1118 ch= ((ch >> 2) & 0x33) | ((ch << 2) & 0xCC);
1119 ch= ((ch >> 4) & 0x0F) | ((ch << 4) & 0xF0);
1127 shrt = ((shrt >> 1) & 0x5555) | ((shrt << 1) & 0xAAAA);
1128 shrt = ((shrt >> 2) & 0x3333) | ((shrt << 2) & 0xCCCC);
1129 shrt = ((shrt >> 4) & 0x0F0F) | ((shrt << 4) & 0xF0F0);
1130 shrt = ((shrt >> 8) & 0x00FF) | ((shrt << 8) & 0xFF00);
1138 NSPoint hotSpotPoint;
1139 NSBitmapImageRep *cursorImageRep;
1140 NSImage *cursorImage;
1144 NSAutoreleasePool *
pool = [[NSAutoreleasePool alloc] init];
1151 cursorImageRep = [[NSBitmapImageRep alloc]
1152 initWithBitmapDataPlanes:nil
1159 colorSpaceName:NSDeviceWhiteColorSpace
1160 bytesPerRow:(sizex / 8 + (sizex % 8 > 0 ? 1 : 0))
1163 cursorBitmap = (
uint16_t *)[cursorImageRep bitmapData];
1164 nbUns16 = [cursorImageRep bytesPerPlane] / 2;
1166 for (
y = 0;
y < nbUns16;
y++) {
1167 #if !defined(__LITTLE_ENDIAN__)
1177 if (canInvertColor) {
1178 cursorBitmap[y] = ~cursorBitmap[y];
1182 imSize.width = sizex;
1183 imSize.height = sizey;
1184 cursorImage = [[NSImage alloc] initWithSize:imSize];
1185 [cursorImage addRepresentation:cursorImageRep];
1187 hotSpotPoint.x = hotX;
1188 hotSpotPoint.y = hotY;
1191 m_customCursor = [[NSCursor alloc] initWithImage:cursorImage hotSpot:hotSpotPoint];
1193 [cursorImageRep release];
1194 [cursorImage release];
1203 #ifdef WITH_INPUT_IME
1207 [m_openGLView beginIME:x y:y w:w h:h completed:completed];
1210 [m_metalView beginIME:x y:y w:w h:h completed:completed];
1214 void GHOST_WindowCocoa::endIME()
1217 [m_openGLView endIME];
1220 [m_metalView endIME];
typedef float(TangentPoint)[2]
#define GHOST_ASSERT(x, info)
static const std::unordered_map< GHOST_TStandardCursor, const char * > 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
@ 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
GHOST_TDrawingContextType
@ GHOST_kDrawingContextTypeOpenGL
@ GHOST_kDragnDropTypeUnknown
@ GHOST_kDragnDropTypeFilenames
@ GHOST_kDragnDropTypeBitmap
@ GHOST_kDragnDropTypeString
static NSCursor * getImageCursor(GHOST_TStandardCursor shape, NSString *name, NSPoint hotspot)
static void postNotification()
static uint16_t uns16ReverseBits(uint16_t shrt)
static uint8_t uns8ReverseBits(uint8_t ch)
_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 type
_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 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)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
virtual int32_t getHeight() const
virtual int32_t getWidth() 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(int32_t x, int32_t y)
GHOST_TSuccess getCursorPosition(int32_t &x, int32_t &y) const
GHOST_SystemCocoa * m_systemCocoa
GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor shape)
GHOST_TSuccess setClientWidth(uint32_t width)
void setImmediateDraw(bool value)
void setTitle(const char *title)
std::string getTitle() 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_TSuccess setWindowCustomCursorShape(uint8_t *bitmap, uint8_t *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor)
GHOST_TabletData m_tablet
void getWindowBounds(GHOST_Rect &bounds) const
GHOST_WindowCocoa(GHOST_SystemCocoa *systemCocoa, const char *title, int32_t left, int32_t bottom, uint32_t width, uint32_t height, GHOST_TWindowState state, GHOST_TDrawingContextType type=GHOST_kDrawingContextTypeNone, const bool stereoVisual=false, bool is_debug=false, bool dialog=false, GHOST_WindowCocoa *parentWindow=0)
void clientToScreenIntern(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const
void getClientBounds(GHOST_Rect &bounds) const
void * getOSWindow() const
GHOST_TSuccess setClientHeight(uint32_t height)
NSCursor * m_customCursor
GHOST_TSuccess setModifiedState(bool isUnsavedChanges)
GHOST_TSuccess setState(GHOST_TWindowState state)
void setNativePixelSize(void)
void screenToClientIntern(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const
GHOST_TSuccess setClientSize(uint32_t width, uint32_t height)
GHOST_TSuccess invalidate()
CocoaMetalView * m_metalView
GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape)
GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode)
void loadCursor(bool visible, GHOST_TStandardCursor cursor) const
void screenToClient(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const
GHOST_TSuccess setProgressBar(float progress)
GHOST_TSuccess endProgressBar()
void clientToScreen(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const
GHOST_Rect m_cursorGrabBounds
bool getCursorVisibility() const
void setCursorGrabAccum(int32_t x, int32_t y)
GHOST_TGrabCursorMode m_cursorGrab
int32_t m_cursorGrabInitPos[2]
GHOST_TSuccess setDrawingContextType(GHOST_TDrawingContextType type)
GHOST_TSuccess releaseNativeHandles()
virtual GHOST_TSuccess setModifiedState(bool isUnsavedChanges)
bool canAcceptDragOperation() const
virtual bool getValid() const
void setAcceptDragOperation(bool canAccept)
GHOST_TSuccess updateDrawingContext()
bool m_progressBarVisible
virtual GHOST_TSuccess activateDrawingContext()
GHOST_TStandardCursor getCursorShape() const
SyclQueue void void size_t num_bytes void
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
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
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)