Moved old SDL::Palette to SDL::Game::Palette.
[sdlgit/SDL_perl.git] / src / Core / objects / PixelFormat.xs
1 #include "EXTERN.h"
2 #include "perl.h"
3 #include "XSUB.h"
4
5 #ifndef aTHX_
6 #define aTHX_
7 #endif
8
9 #include <SDL.h>
10
11 MODULE = SDL::PixelFormat       PACKAGE = SDL::PixelFormat    PREFIX = pixelformat_
12
13 =for documentation
14
15 SDL_PixelFormat -- Stores surface format information
16
17   typedef struct SDL_PixelFormat {
18     SDL_Palette *palette;
19     Uint8  BitsPerPixel;
20     Uint8  BytesPerPixel;
21     Uint8  Rloss, Gloss, Bloss, Aloss;
22     Uint8  Rshift, Gshift, Bshift, Ashift;
23     Uint32 Rmask, Gmask, Bmask, Amask;
24     Uint32 colorkey;
25     Uint8  alpha;
26   } SDL_PixelFormat;
27
28 =cut
29
30 SDL_Palette*
31 pixelformat_palette( pixelformat )
32         SDL_PixelFormat *pixelformat
33         PREINIT:
34                 char* CLASS = "SDL::Palette";
35         CODE:
36                 RETVAL = pixelformat->palette;
37         OUTPUT:
38                 RETVAL
39
40
41 Uint8
42 pixelformat_BitsPerPixel( pixelformat )
43         SDL_PixelFormat *pixelformat
44         CODE:
45                 RETVAL = pixelformat->BitsPerPixel;
46         OUTPUT:
47                 RETVAL
48
49 Uint8
50 pixelformat_BytesPerPixel( pixelformat )
51         SDL_PixelFormat *pixelformat
52         CODE:
53                 RETVAL = pixelformat->BytesPerPixel;
54         OUTPUT:
55                 RETVAL
56
57 Uint8
58 pixelformat_Rloss( pixelformat )
59         SDL_PixelFormat *pixelformat
60         CODE:
61                 RETVAL = pixelformat->Rloss;
62         OUTPUT:
63                 RETVAL
64
65 Uint8
66 pixelformat_Bloss( pixelformat )
67         SDL_PixelFormat *pixelformat
68         CODE:
69                 RETVAL = pixelformat->Bloss;
70         OUTPUT:
71                 RETVAL
72
73 Uint8
74 pixelformat_Gloss( pixelformat )
75         SDL_PixelFormat *pixelformat
76         CODE:
77                 RETVAL = pixelformat->Gloss;
78         OUTPUT:
79                 RETVAL
80
81 Uint8
82 pixelformat_Aloss( pixelformat )
83         SDL_PixelFormat *pixelformat
84         CODE:
85                 RETVAL = pixelformat->Aloss;
86         OUTPUT:
87                 RETVAL
88
89 Uint8
90 pixelformat_Rshift( pixelformat )
91         SDL_PixelFormat *pixelformat
92         CODE:
93                 RETVAL = pixelformat->Rshift;
94         OUTPUT:
95                 RETVAL
96
97 Uint8
98 pixelformat_Bshift( pixelformat )
99         SDL_PixelFormat *pixelformat
100         CODE:
101                 RETVAL = pixelformat->Bshift;
102         OUTPUT:
103                 RETVAL
104
105 Uint8
106 pixelformat_Gshift( pixelformat )
107         SDL_PixelFormat *pixelformat
108         CODE:
109                 RETVAL = pixelformat->Gshift;
110         OUTPUT:
111                 RETVAL
112
113 Uint8
114 pixelformat_Ashift( pixelformat )
115         SDL_PixelFormat *pixelformat
116         CODE:
117                 RETVAL = pixelformat->Ashift;
118         OUTPUT:
119                 RETVAL
120
121 Uint32
122 pixelformat_Rmask( pixelformat )
123         SDL_PixelFormat *pixelformat
124         CODE:
125                 RETVAL = pixelformat->Rmask;
126         OUTPUT:
127                 RETVAL
128
129 Uint32
130 pixelformat_Bmask( pixelformat )
131         SDL_PixelFormat *pixelformat
132         CODE:
133                 RETVAL = pixelformat->Bmask;
134         OUTPUT:
135                 RETVAL
136
137 Uint32
138 pixelformat_Gmask( pixelformat )
139         SDL_PixelFormat *pixelformat
140         CODE:
141                 RETVAL = pixelformat->Gmask;
142         OUTPUT:
143                 RETVAL
144
145 Uint32
146 pixelformat_Amask( pixelformat )
147         SDL_PixelFormat *pixelformat
148         CODE:
149                 RETVAL = pixelformat->Amask;
150         OUTPUT:
151                 RETVAL
152
153 Uint32
154 pixelformat_colorkey( pixelformat )
155         SDL_PixelFormat *pixelformat
156         CODE:
157                 RETVAL = pixelformat->colorkey;
158         OUTPUT:
159                 RETVAL
160
161 Uint8
162 pixelformat_alpha( pixelformat )
163         SDL_PixelFormat *pixelformat
164         CODE:
165                 RETVAL = pixelformat->alpha;
166         OUTPUT:
167                 RETVAL