22 #include "../../SDL_internal.h" 24 #if SDL_VIDEO_DRIVER_COCOA 29 #include "../SDL_sysvideo.h" 38 if ([windata->
nswindow respondsToSelector:
@selector(setStyleMask:)]) {
39 [windata->nswindow setStyleMask:NSBorderlessWindowMask];
51 data->
context = [windata->nswindow graphicsContext];
69 SDL_CocoaClosure* data = (SDL_CocoaClosure*)closure;
72 [data->path appendBezierPathWithRect:[data->view convertRect:rect toView:nil]];
82 SDL_CocoaClosure closure;
84 [data->context restoreGraphicsState];
90 [NSGraphicsContext setCurrentContext:data->context];
92 [[NSColor clearColor] set];
96 closure.view = [windata->nswindow contentView];
97 closure.path = [NSBezierPath bezierPath];
98 closure.window = shaper->
window;
100 [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.
SDL_WindowShapeParams parameters
Window-shape parameters.
#define SDL_assert(condition)
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
Uint8 binarizationCutoff
a cutoff alpha value for binarization of the window shape's alpha channel.
A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents...
GLsizei const GLchar *const * path
WindowShapeMode mode
The mode of these window-shape parameters.