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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct SDL_BlendMode(pub u32);
pub const SDL_BLENDMODE_NONE: SDL_BlendMode = SDL_BlendMode(0x00000000);
pub const SDL_BLENDMODE_BLEND: SDL_BlendMode = SDL_BlendMode(0x00000001);
pub const SDL_BLENDMODE_ADD: SDL_BlendMode = SDL_BlendMode(0x00000002);
pub const SDL_BLENDMODE_MOD: SDL_BlendMode = SDL_BlendMode(0x00000004);
pub const SDL_BLENDMODE_MUL: SDL_BlendMode = SDL_BlendMode(0x00000008);
pub const SDL_BLENDMODE_INVALID: SDL_BlendMode = SDL_BlendMode(0x7FFFFFFF);
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct SDL_BlendOperation(pub u32);
pub const SDL_BLENDOPERATION_ADD: SDL_BlendOperation = SDL_BlendOperation(0x1);
pub const SDL_BLENDOPERATION_SUBTRACT: SDL_BlendOperation =
SDL_BlendOperation(0x2);
pub const SDL_BLENDOPERATION_REV_SUBTRACT: SDL_BlendOperation =
SDL_BlendOperation(0x3);
pub const SDL_BLENDOPERATION_MINIMUM: SDL_BlendOperation =
SDL_BlendOperation(0x4);
pub const SDL_BLENDOPERATION_MAXIMUM: SDL_BlendOperation =
SDL_BlendOperation(0x5);
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)]
pub struct SDL_BlendFactor(pub u32);
pub const SDL_BLENDFACTOR_ZERO: SDL_BlendFactor = SDL_BlendFactor(0x1);
pub const SDL_BLENDFACTOR_ONE: SDL_BlendFactor = SDL_BlendFactor(0x2);
pub const SDL_BLENDFACTOR_SRC_COLOR: SDL_BlendFactor = SDL_BlendFactor(0x3);
pub const SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR: SDL_BlendFactor =
SDL_BlendFactor(0x4);
pub const SDL_BLENDFACTOR_SRC_ALPHA: SDL_BlendFactor = SDL_BlendFactor(0x5);
pub const SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA: SDL_BlendFactor =
SDL_BlendFactor(0x6);
pub const SDL_BLENDFACTOR_DST_COLOR: SDL_BlendFactor = SDL_BlendFactor(0x7);
pub const SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR: SDL_BlendFactor =
SDL_BlendFactor(0x8);
pub const SDL_BLENDFACTOR_DST_ALPHA: SDL_BlendFactor = SDL_BlendFactor(0x9);
pub const SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA: SDL_BlendFactor =
SDL_BlendFactor(0xA);
extern "C" {
pub fn SDL_ComposeCustomBlendMode(
srcColorFactor: SDL_BlendFactor, dstColorFactor: SDL_BlendFactor,
colorOperation: SDL_BlendOperation, srcAlphaFactor: SDL_BlendFactor,
dstAlphaFactor: SDL_BlendFactor, alphaOperation: SDL_BlendOperation,
) -> SDL_BlendMode;
}