1 //from "sdl_shape.h"
3 {** SDL_shape.h
4 *
5 * Header file for the shaped window API.
6 *}
7 const
8 SDL_NONSHAPEABLE_WINDOW = -1;
9 SDL_INVALID_SHAPE_ARGUMENT = -2;
10 SDL_WINDOW_LACKS_SHAPE = -3;
12 type
13 PPSDL_Window = ^PSDL_Window;
14 PSDL_Window = ^TSDL_Window;
16 {** An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. *}
17 TWindowShapeMode = ({** The default mode, a binarized alpha cutoff of 1. *}
18 ShapeModeDefault,
19 {** A binarized alpha cutoff with a given integer value. *}
20 ShapeModeBinarizeAlpha,
21 {** A binarized alpha cutoff with a given integer value, but with the opposite comparison. *}
22 ShapeModeReverseBinarizeAlpha,
23 {** A color key is applied. *}
24 ShapeModeColorKey);
26 //#define SDL_SHAPEMODEALPHA(mode) (mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha)
28 {** A union containing parameters for shaped windows. *}
29 TSDL_WindowShapeParams = record
30 case Integer of
31 {** a cutoff alpha value for binarization of the window shape's alpha channel. *}
32 0: (binarizationCutoff: UInt8;);
33 1: (colorKey: TSDL_Color;);
34 end;
36 {** A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. *}
37 PSDL_WindowShapeMode = ^TSDL_WindowShapeMode;
38 TSDL_WindowShapeMode = record
39 {** The mode of these window-shape parameters. *}
40 mode: TWindowShapeMode;
41 {** Window-shape parameters. *}
42 parameters: TSDL_WindowShapeParams;
43 end;