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];
#define SDL_assert(condition)
int Cocoa_ResizeWindowShape(SDL_Window *window)
SDL_WindowShaper * Cocoa_CreateShaper(SDL_Window *window)
int Cocoa_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shape_mode)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei const GLchar *const * path
SDL_ShapeTree * SDL_CalculateShapeTree(SDL_WindowShapeMode mode, SDL_Surface *shape)
void SDL_TraverseShapeTree(SDL_ShapeTree *tree, SDL_TraversalFunction function, void *closure)
@ ShapeModeDefault
The default mode, a binarized alpha cutoff of 1.
EGLSurface EGLNativeWindowType * window
A collection of pixels used in software blitting.
The type used to identify a window.
A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents.