23 #if SDL_VIDEO_DRIVER_X11
29 #include "../SDL_shape_internals.h"
42 #if SDL_VIDEO_DRIVER_X11_XSHAPE
43 if (SDL_X11_HAVE_XSHAPE) {
65 unsigned int bitmapsize = window->
w / 8;
70 bitmapsize *= window->
h;
77 return SDL_SetError(
"Could not allocate memory for shaped-window bitmap.");
98 #if SDL_VIDEO_DRIVER_X11_XSHAPE
111 XShapeCombineMask(windowdata->
videodata->
display,windowdata->
xwindow, ShapeBounding, 0, 0,shapemask, ShapeSet);
int X11_ResizeWindowShape(SDL_Window *window)
GLfloat GLfloat GLfloat GLfloat h
int X11_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_WindowShapeMode *shapeMode)
A collection of pixels used in software blitting.
#define SDL_SHAPEMODEALPHA(mode)
SDL_Window * X11_CreateShapedWindow(const char *title, unsigned int x, unsigned int y, unsigned int w, unsigned int h, Uint32 flags)
uint32_t Uint32
An unsigned 32-bit integer type.
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
SDL_WindowShaper * shaper
struct SDL_VideoData * videodata
DECLSPEC int SDLCALL SDL_SetError(const char *fmt,...)
The default mode, a binarized alpha cutoff of 1.
DECLSPEC void *SDLCALL SDL_malloc(size_t size)
SDL_WindowShapeParams parameters
Window-shape parameters.
SDL_WindowShaper * X11_CreateShaper(SDL_Window *window)
#define SDL_assert(condition)
EGLSurface EGLint EGLint y
DECLSPEC SDL_Window *SDLCALL SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
Create a window with the specified position, dimensions, and flags.
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display retur XCreateBitmapFromData)
DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window *window, int x, int y)
Set the position of a window.
GLenum GLsizei GLsizei GLsizei GLsizei GLbitfield flags
Uint8 binarizationCutoff
a cutoff alpha value for binarization of the window shape's alpha channel.
GLint GLint GLint GLint GLint w
A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents...
WindowShapeMode mode
The mode of these window-shape parameters.
void SDL_CalculateShapeBitmap(SDL_WindowShapeMode mode, SDL_Surface *shape, Uint8 *bitmap, Uint8 ppb)