22 #include "../../SDL_internal.h" 24 #if SDL_VIDEO_DRIVER_COCOA 29 #include "../SDL_sysvideo.h" 38 [windata->
nswindow setStyleMask:NSWindowStyleMaskBorderless];
43 result->mode.parameters.binarizationCutoff = 1;
49 data->
context = [windata->nswindow graphicsContext];
67 SDL_CocoaClosure* data = (SDL_CocoaClosure*)closure;
70 [data->path appendBezierPathWithRect:[data->view convertRect:rect toView:nil]];
80 SDL_CocoaClosure closure;
82 [data->context restoreGraphicsState];
88 [NSGraphicsContext setCurrentContext:data->context];
90 [[NSColor clearColor] set];
94 closure.view = [windata->nswindow contentView];
95 closure.path = [NSBezierPath bezierPath];
96 closure.window = shaper->
window;
98 [closure.path addClip];
SDL_ShapeTree * SDL_CalculateShapeTree(SDL_WindowShapeMode mode, SDL_Surface *shape)
A collection of pixels used in software blitting.
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
int Cocoa_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode)
SDL_WindowShaper * shaper
SDL_WindowShaper * Cocoa_CreateShaper(SDL_Window *window)
The default mode, a binarized alpha cutoff of 1.
#define SDL_assert(condition)
EGLSurface EGLNativeWindowType * window
The type used to identify a window.
void SDL_TraverseShapeTree(SDL_ShapeTree *tree, SDL_TraversalFunction function, void *closure)
int Cocoa_ResizeWindowShape(SDL_Window *window)
NSGraphicsContext * context
A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents...
GLsizei const GLchar *const * path