Removed the window shape API for SDL 3.0

Fixes https://github.com/libsdl-org/SDL/issues/6654
Fixes https://github.com/libsdl-org/SDL/issues/6897
This commit is contained in:
Sam Lantinga
2023-11-22 11:46:36 -08:00
parent 45938bbfa5
commit 81fc7ded78
30 changed files with 34 additions and 1081 deletions

View File

@@ -17,6 +17,36 @@
#define SHAPED_WINDOW_DIMENSION 640
/** An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. */
typedef enum
{
/** The default mode, a binarized alpha cutoff of 1. */
ShapeModeDefault,
/** A binarized alpha cutoff with a given integer value. */
ShapeModeBinarizeAlpha,
/** A binarized alpha cutoff with a given integer value, but with the opposite comparison. */
ShapeModeReverseBinarizeAlpha,
/** A color key is applied. */
ShapeModeColorKey
} WindowShapeMode;
/** A union containing parameters for shaped windows. */
typedef union
{
/** A cutoff alpha value for binarization of the window shape's alpha channel. */
Uint8 binarizationCutoff;
SDL_Color colorKey;
} SDL_WindowShapeParams;
/** A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. */
typedef struct SDL_WindowShapeMode
{
/** The mode of these window-shape parameters. */
WindowShapeMode mode;
/** Window-shape parameters. */
SDL_WindowShapeParams parameters;
} SDL_WindowShapeMode;
typedef struct LoadedPicture
{
SDL_Surface *surface;