forked from ev1313/Pascal-SDL-2-Headers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sdlshape.inc
43 lines (37 loc) · 1.61 KB
/
sdlshape.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//from "sdl_shape.h"
{** SDL_shape.h
*
* Header file for the shaped window API.
*}
const
SDL_NONSHAPEABLE_WINDOW = -1;
SDL_INVALID_SHAPE_ARGUMENT = -2;
SDL_WINDOW_LACKS_SHAPE = -3;
type
PPSDL_Window = ^PSDL_Window;
PSDL_Window = ^TSDL_Window;
{** An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. *}
TWindowShapeMode = ({** 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);
//#define SDL_SHAPEMODEALPHA(mode) (mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha)
{** A union containing parameters for shaped windows. *}
TSDL_WindowShapeParams = record
case Integer of
{** a cutoff alpha value for binarization of the window shape's alpha channel. *}
0: (binarizationCutoff: UInt8;);
1: (colorKey: TSDL_Color;);
end;
{** A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. *}
PSDL_WindowShapeMode = ^TSDL_WindowShapeMode;
TSDL_WindowShapeMode = record
{** The mode of these window-shape parameters. *}
mode: TWindowShapeMode;
{** Window-shape parameters. *}
parameters: TSDL_WindowShapeParams;
end;