Added set_colors. Started testing it. Made a percentage completed counter
[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 Uint8
31 pixelformat_BitsPerPixel( pixelformat )
32         SDL_PixelFormat *pixelformat
33         CODE:
34                 RETVAL = pixelformat->BitsPerPixel;
35         OUTPUT:
36                 RETVAL
37
38 Uint8
39 pixelformat_BytesPerPixel( pixelformat )
40         SDL_PixelFormat *pixelformat
41         CODE:
42                 RETVAL = pixelformat->BytesPerPixel;
43         OUTPUT:
44                 RETVAL
45
46 Uint8
47 pixelformat_Rloss( pixelformat )
48         SDL_PixelFormat *pixelformat
49         CODE:
50                 RETVAL = pixelformat->Rloss;
51         OUTPUT:
52                 RETVAL
53
54 Uint8
55 pixelformat_Bloss( pixelformat )
56         SDL_PixelFormat *pixelformat
57         CODE:
58                 RETVAL = pixelformat->Bloss;
59         OUTPUT:
60                 RETVAL
61
62 Uint8
63 pixelformat_Gloss( pixelformat )
64         SDL_PixelFormat *pixelformat
65         CODE:
66                 RETVAL = pixelformat->Gloss;
67         OUTPUT:
68                 RETVAL
69
70 Uint8
71 pixelformat_Aloss( pixelformat )
72         SDL_PixelFormat *pixelformat
73         CODE:
74                 RETVAL = pixelformat->Aloss;
75         OUTPUT:
76                 RETVAL
77
78 Uint8
79 pixelformat_Rshift( pixelformat )
80         SDL_PixelFormat *pixelformat
81         CODE:
82                 RETVAL = pixelformat->Rshift;
83         OUTPUT:
84                 RETVAL
85
86 Uint8
87 pixelformat_Bshift( pixelformat )
88         SDL_PixelFormat *pixelformat
89         CODE:
90                 RETVAL = pixelformat->Bshift;
91         OUTPUT:
92                 RETVAL
93
94 Uint8
95 pixelformat_Gshift( pixelformat )
96         SDL_PixelFormat *pixelformat
97         CODE:
98                 RETVAL = pixelformat->Gshift;
99         OUTPUT:
100                 RETVAL
101
102 Uint8
103 pixelformat_Ashift( pixelformat )
104         SDL_PixelFormat *pixelformat
105         CODE:
106                 RETVAL = pixelformat->Ashift;
107         OUTPUT:
108                 RETVAL
109
110 Uint32
111 pixelformat_Rmask( pixelformat )
112         SDL_PixelFormat *pixelformat
113         CODE:
114                 RETVAL = pixelformat->Rmask;
115         OUTPUT:
116                 RETVAL
117
118 Uint32
119 pixelformat_Bmask( pixelformat )
120         SDL_PixelFormat *pixelformat
121         CODE:
122                 RETVAL = pixelformat->Bmask;
123         OUTPUT:
124                 RETVAL
125
126 Uint32
127 pixelformat_Gmask( pixelformat )
128         SDL_PixelFormat *pixelformat
129         CODE:
130                 RETVAL = pixelformat->Gmask;
131         OUTPUT:
132                 RETVAL
133
134 Uint32
135 pixelformat_Amask( pixelformat )
136         SDL_PixelFormat *pixelformat
137         CODE:
138                 RETVAL = pixelformat->Amask;
139         OUTPUT:
140                 RETVAL
141
142 Uint32
143 pixelformat_colorkey( pixelformat )
144         SDL_PixelFormat *pixelformat
145         CODE:
146                 RETVAL = pixelformat->colorkey;
147         OUTPUT:
148                 RETVAL
149
150 Uint8
151 pixelformat_alpha( pixelformat )
152         SDL_PixelFormat *pixelformat
153         CODE:
154                 RETVAL = pixelformat->alpha;
155         OUTPUT:
156                 RETVAL