zenilib
0.5.3.0
|
#include "SDL_config.h"
#include "SDL.h"
#include "SDL_assert.h"
#include "SDL_video.h"
#include "SDL_sysvideo.h"
#include "SDL_pixels.h"
#include "SDL_surface.h"
#include "SDL_shape.h"
#include "SDL_shape_internals.h"
Go to the source code of this file.
|
static |
Definition at line 121 of file SDL_shape.c.
References SDL_PixelFormat::Amask, SDL_Color::b, SDL_WindowShapeParams::binarizationCutoff, SDL_PixelFormat::BytesPerPixel, SDL_ShapeUnion::children, SDL_WindowShapeParams::colorKey, SDL_ShapeTree::data, SDL_QuadTreeChildren::downleft, SDL_QuadTreeChildren::downright, SDL_Surface::format, SDL_Color::g, SDL_Rect::h, SDL_ShapeTree::kind, SDL_WindowShapeMode::mode, NULL, OpaqueShape, SDL_WindowShapeMode::parameters, SDL_Surface::pitch, SDL_Surface::pixels, QuadShape, SDL_Color::r, SDL_FALSE, SDL_GetRGBA(), SDL_malloc(), SDL_TRUE, SDL_ShapeUnion::shape, ShapeModeBinarizeAlpha, ShapeModeColorKey, ShapeModeDefault, ShapeModeReverseBinarizeAlpha, TransparentShape, SDL_QuadTreeChildren::upleft, SDL_QuadTreeChildren::upright, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_CalculateShapeTree().
void SDL_CalculateShapeBitmap | ( | SDL_WindowShapeMode | mode, |
SDL_Surface * | shape, | ||
Uint8 * | bitmap, | ||
Uint8 | ppb | ||
) |
Definition at line 67 of file SDL_shape.c.
References SDL_PixelFormat::Amask, SDL_Color::b, SDL_WindowShapeParams::binarizationCutoff, SDL_PixelFormat::BytesPerPixel, SDL_WindowShapeParams::colorKey, SDL_Surface::format, SDL_Color::g, SDL_Surface::h, SDL_WindowShapeMode::mode, NULL, SDL_WindowShapeMode::parameters, SDL_Surface::pitch, SDL_Surface::pixels, SDL_Color::r, SDL_GetRGBA(), SDL_LockSurface(), SDL_MUSTLOCK, SDL_UnlockSurface(), ShapeModeBinarizeAlpha, ShapeModeColorKey, ShapeModeDefault, ShapeModeReverseBinarizeAlpha, and SDL_Surface::w.
SDL_ShapeTree* SDL_CalculateShapeTree | ( | SDL_WindowShapeMode | mode, |
SDL_Surface * | shape | ||
) |
Definition at line 196 of file SDL_shape.c.
References SDL_Surface::h, NULL, RecursivelyCalculateShapeTree(), SDL_LockSurface(), SDL_MUSTLOCK, SDL_UnlockSurface(), and SDL_Surface::w.
SDL_Window* SDL_CreateShapedWindow | ( | const char * | title, |
unsigned int | x, | ||
unsigned int | y, | ||
unsigned int | w, | ||
unsigned int | h, | ||
Uint32 | flags | ||
) |
Create a window that can be shaped with the specified position, dimensions, and flags.
title | The title of the window, in UTF-8 encoding. |
x | The x position of the window, SDL_WINDOWPOS_CENTERED, or SDL_WINDOWPOS_UNDEFINED. |
y | The y position of the window, SDL_WINDOWPOS_CENTERED, or SDL_WINDOWPOS_UNDEFINED. |
w | The width of the window. |
h | The height of the window. |
flags | The flags for the window, a mask of SDL_WINDOW_BORDERLESS with any of the following: SDL_WINDOW_OPENGL, SDL_WINDOW_INPUT_GRABBED, SDL_WINDOW_HIDDEN, SDL_WINDOW_RESIZABLE, SDL_WINDOW_MAXIMIZED, SDL_WINDOW_MINIMIZED, SDL_WINDOW_BORDERLESS is always set, and SDL_WINDOW_FULLSCREEN is always unset. |
Definition at line 33 of file SDL_shape.c.
References SDL_WindowShapeParams::binarizationCutoff, SDL_ShapeDriver::CreateShaper, SDL_WindowShaper::hasshape, SDL_WindowShaper::mode, SDL_WindowShapeMode::mode, NULL, SDL_WindowShapeMode::parameters, SDL_CreateWindow(), SDL_DestroyWindow(), SDL_FALSE, SDL_GetVideoDevice(), SDL_WINDOW_BORDERLESS, SDL_WINDOW_FULLSCREEN, SDL_WINDOW_RESIZABLE, SDL_VideoDevice::shape_driver, ShapeModeDefault, SDL_Window::shaper, SDL_WindowShaper::userx, and SDL_WindowShaper::usery.
void SDL_FreeShapeTree | ( | SDL_ShapeTree ** | shape_tree | ) |
Definition at line 223 of file SDL_shape.c.
References NULL, QuadShape, SDL_free(), and SDL_FreeShapeTree().
Referenced by SDL_FreeShapeTree().
int SDL_GetShapedWindowMode | ( | SDL_Window * | window, |
SDL_WindowShapeMode * | shape_mode | ||
) |
Get the shape parameters of a shaped window.
window | The shaped window whose parameters should be retrieved. |
shape_mode | An empty shape-mode structure to fill, or NULL to check whether the window has a shape. |
Definition at line 267 of file SDL_shape.c.
References SDL_WindowShaper::mode, NULL, SDL_IsShapedWindow(), SDL_NONSHAPEABLE_WINDOW, SDL_WINDOW_LACKS_SHAPE, SDL_WindowHasAShape(), and SDL_Window::shaper.
SDL_bool SDL_IsShapedWindow | ( | const SDL_Window * | window | ) |
Return whether the given window is a shaped window.
window | The window to query for being shaped. |
Definition at line 57 of file SDL_shape.c.
References NULL, SDL_FALSE, and SDL_Window::shaper.
Referenced by SDL_GetShapedWindowMode(), SDL_SetWindowShape(), and SDL_WindowHasAShape().
int SDL_SetWindowShape | ( | SDL_Window * | window, |
SDL_Surface * | shape, | ||
SDL_WindowShapeMode * | shape_mode | ||
) |
Set the shape and parameters of a shaped window.
window | The shaped window whose parameters should be set. |
shape | A surface encoding the desired shape for the window. |
shape_mode | The parameters to set for the shaped window. |
Definition at line 236 of file SDL_shape.c.
References SDL_WindowShaper::hasshape, SDL_WindowShaper::mode, NULL, SDL_GetVideoDevice(), SDL_INVALID_SHAPE_ARGUMENT, SDL_IsShapedWindow(), SDL_NONSHAPEABLE_WINDOW, SDL_SetWindowPosition(), SDL_TRUE, SDL_ShapeDriver::SetWindowShape, SDL_VideoDevice::shape_driver, SDL_Window::shaper, SDL_WindowShaper::userx, and SDL_WindowShaper::usery.
void SDL_TraverseShapeTree | ( | SDL_ShapeTree * | tree, |
SDL_TraversalFunction | function, | ||
void * | closure | ||
) |
Definition at line 209 of file SDL_shape.c.
References SDL_ShapeUnion::children, SDL_ShapeTree::data, SDL_QuadTreeChildren::downleft, SDL_QuadTreeChildren::downright, SDL_ShapeTree::kind, NULL, QuadShape, SDL_assert, SDL_TraverseShapeTree(), SDL_QuadTreeChildren::upleft, and SDL_QuadTreeChildren::upright.
Referenced by SDL_TraverseShapeTree().
|
static |
Definition at line 259 of file SDL_shape.c.
References SDL_WindowShaper::hasshape, NULL, SDL_FALSE, SDL_IsShapedWindow(), and SDL_Window::shaper.
Referenced by SDL_GetShapedWindowMode().