rest-0.7.vapi \
rest-extras-0.7.deps \
rest-extras-0.7.vapi \
- sdl.vapi \
- sdl-gfx.vapi \
- sdl-gfx.deps \
- sdl-image.vapi \
- sdl-image.deps \
- sdl-mixer.vapi \
- sdl-mixer.deps \
- sdl-net.vapi \
- sdl-net.deps \
- sdl-ttf.vapi \
- sdl-ttf.deps \
sqlite3.vapi \
taglib_c.vapi \
tiff.vapi \
+++ /dev/null
-namespace SDLGraphics {
- [CCode (cheader_filename="SDL_gfxPrimitives.h")]
- [Compact]
- public class Pixel {
- [CCode (cname="pixelColor")]
- public static int color(SDL.Surface dst, int16 x, int16 y, uint32 color);
-
- [CCode (cname="pixelRGBA")]
- public static int rgba(SDL.Surface dst, int16 x, int16 y,
- uchar r, uchar g, uchar b, uchar a);
- }// Pixel
-
- [CCode (cheader_filename="SDL_gfxPrimitives.h")]
- [Compact]
- public class Line {
- [CCode (cname="hlineColor")]
- public static int color_h(SDL.Surface dst, int16 x1, int16 x2,
- int16 y, uint32 color);
-
- [CCode (cname="hlineRGBA")]
- public static int rgba_h(SDL.Surface dst, int16 x1, int16 x2,
- int16 y, uchar r, uchar g, uchar b, uchar a);
-
- [CCode (cname="vlineColor")]
- public static int color_v(SDL.Surface dst, int16 x, int16 y1,
- int16 y2, uint32 color);
-
- [CCode (cname="vlineRGBA")]
- public static int rgba_v(SDL.Surface dst, int16 x, int16 y1,
- int16 y2, uchar r, uchar g, uchar b, uchar a);
-
- [CCode (cname="lineColor")]
- public static int color(SDL.Surface dst, int16 x1, int16 y1,
- int16 x2, int16 y2, uint32 color);
-
- [CCode (cname="lineRGBA")]
- public static int rgba(SDL.Surface dst, int16 x1, int16 y1,
- int16 x2, int16 y2, uchar r, uchar g, uchar b, uchar a);
-
- [CCode (cname="aalineColor")]
- public static int color_aa(SDL.Surface dst, int16 x1, int16 y1,
- int16 x2, int16 y2, uint32 color);
-
- [CCode (cname="aalineRGBA")]
- public static int rgba_aa(SDL.Surface dst, int16 x1, int16 y1,
- int16 x2, int16 y2, uchar r, uchar g, uchar b, uchar a);
- }// Line
-
- [CCode (cheader_filename="SDL_gfxPrimitives.h")]
- [Compact]
- public class Rectangle {
- [CCode (cname="rectangleColor")]
- public static int outline_color(SDL.Surface dst, int16 x1, int16 y1,
- int16 x2, int16 y2, uint32 color);
-
- [CCode (cname="rectangleRGBA")]
- public static int outline_rgba(SDL.Surface dst, int16 x1, int16 y1,
- int16 x2, int16 y2, uchar r, uchar g, uchar b, uchar a);
-
- [CCode (cname="boxColor")]
- public static int fill_color(SDL.Surface dst, int16 x1, int16 y1,
- int16 x2, int16 y2, uint32 color);
-
- [CCode (cname="boxRGBA")]
- public static int fill_rgba(SDL.Surface dst, int16 x1, int16 y1,
- int16 x2, int16 y2, uchar r, uchar g, uchar b, uchar a);
- }// Rectangle
-
- [CCode (cheader_filename="SDL_gfxPrimitives.h")]
- [Compact]
- public class Circle {
- [CCode (cname="circleColor")]
- public static int outline_color(SDL.Surface dst, int16 x, int16 y,
- int16 radius, uint32 color);
-
- [CCode (cname="circleRGBA")]
- public static int outline_rgba(SDL.Surface dst, int16 x, int16 y, int16 radius,
- uchar r, uchar g, uchar b, uchar a);
-
- [CCode (cname="aacircleColor")]
- public static int outline_color_aa(SDL.Surface dst, int16 x, int16 y,
- int16 radius, uint32 color);
-
- [CCode (cname="aacircleRGBA")]
- public static int outline_rgba_aa(SDL.Surface dst, int16 x, int16 y, int16 radius,
- uchar r, uchar g, uchar b, uchar a);
-
- [CCode (cname="filledCircleColor")]
- public static int fill_color(SDL.Surface dst, int16 x, int16 y,
- int16 radius, uint32 color);
-
- [CCode (cname="filledCircleRGBA")]
- public static int fill_rgba(SDL.Surface dst, int16 x, int16 y, int16 radius,
- uchar r, uchar g, uchar b, uchar a);
- }// Circle
-
- [CCode (cheader_filename="SDL_gfxPrimitives.h")]
- [Compact]
- public class Ellipse {
- [CCode (cname="ellipseColor")]
- public static int outline_color(SDL.Surface dst, int16 xc, int16 yc,
- int16 rx, int16 ry, uint32 color);
-
- [CCode (cname="ellipseRGBA")]
- public static int outline_rgba(SDL.Surface dst, int16 xc, int16 yc,
- int16 rx, int16 ry, uchar r, uchar g, uchar b, uchar a);
-
- [CCode (cname="aaellipseColor")]
- public static int outline_color_aa(SDL.Surface dst, int16 xc, int16 yc,
- int16 rx, int16 ry, uint32 color);
-
- [CCode (cname="aaellipseRGBA")]
- public static int outline_rgba_aa(SDL.Surface dst, int16 xc, int16 yc,
- int16 rx, int16 ry, uchar r, uchar g, uchar b, uchar a);
-
- [CCode (cname="filledEllipseColor")]
- public static int fill_color(SDL.Surface dst, int16 xc, int16 yc,
- int16 rx, int16 ry, uint32 color);
-
- [CCode (cname="filledEllipseRGBA")]
- public static int fill_rgba(SDL.Surface dst, int16 xc, int16 yc,
- int16 rx, int16 ry, uchar r, uchar g, uchar b, uchar a);
- }// Ellipse
-
- [CCode (cheader_filename="SDL_gfxPrimitives.h")]
- [Compact]
- public class Arc {
- [CCode (cname="pieColor")]
- public static int outline_color(SDL.Surface dst, int16 x, int16 y, int16 radius,
- int16 start, int16 end, uint32 color);
-
- [CCode (cname="pieRGBA")]
- public static int outline_rgba(SDL.Surface dst, int16 x, int16 y, int16 radius,
- int16 start, int16 end, uchar r, uchar g, uchar b, uchar a);
-
- [CCode (cname="filledPieColor")]
- public static int fill_color(SDL.Surface dst, int16 x, int16 y, int16 radius,
- int16 start, int16 end, uint32 color);
-
- [CCode (cname="filledPieRGBA")]
- public static int fill_rgba(SDL.Surface dst, int16 x, int16 y, int16 radius,
- int16 start, int16 end, uchar r, uchar g, uchar b, uchar a);
- }// Arc
-
- [CCode (cheader_filename="SDL_gfxPrimitives.h")]
- [Compact]
- public class Trigon {
- [CCode (cname="trigonColor")]
- public static int outline_color(SDL.Surface dst, int16 x1, int16 y1,
- int16 x2, int16 y2, int16 x3, int16 y3, uint32 color);
-
- [CCode (cname="trigonRGBA")]
- public static int outline_rgba(SDL.Surface dst, int16 x1, int16 y1,
- int16 x2, int16 y2, int16 x3, int16 y3,
- uchar r, uchar g, uchar b, uchar a);
-
- [CCode (cname="aatrigonColor")]
- public static int outline_color_aa(SDL.Surface dst, int16 x1, int16 y1,
- int16 x2, int16 y2, int16 x3, int16 y3, uint32 color);
-
- [CCode (cname="aatrigonRGBA")]
- public static int outline_rgba_aa(SDL.Surface dst, int16 x1, int16 y1,
- int16 x2, int16 y2, int16 x3, int16 y3,
- uchar r, uchar g, uchar b, uchar a);
-
- [CCode (cname="filledTrigonColor")]
- public static int fill_color(SDL.Surface dst, int16 x1, int16 y1,
- int16 x2, int16 y2, int16 x3, int16 y3, uint32 color);
-
- [CCode (cname="filledTrigonRGBA")]
- public static int fill_rgba(SDL.Surface dst, int16 x1, int16 y1,
- int16 x2, int16 y2, int16 x3, int16 y3,
- uchar r, uchar g, uchar b, uchar a);
- }// Trigon
-
- [CCode (cheader_filename="SDL_gfxPrimitives.h")]
- [Compact]
- public class Polygon {
- [CCode (cname="polygonColor")]
- public static int outline_color(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
- int n, uint32 color);
-
- [CCode (cname="polygonRGBA")]
- public static int outline_rgba(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
- int n, uchar r, uchar g, uchar b, uchar a);
-
- [CCode (cname="aapolygonColor")]
- public static int outline_color_aa(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
- int n, uint32 color);
-
- [CCode (cname="aapolygonRGBA")]
- public static int outline_rgba_aa(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
- int n, uchar r, uchar g, uchar b, uchar a);
-
- [CCode (cname="filledPolygonColor")]
- public static int fill_color(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
- int n, uint32 color);
-
- [CCode (cname="filledPolygonRGBA")]
- public static int fill_rgba(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
- int n, uchar r, uchar g, uchar b, uchar a);
- }// Polygon
-
- [CCode (cheader_filename="SDL_gfxPrimitives.h")]
- [Compact]
- public class BezierCurve {
- [CCode (cname="bezierColor")]
- public static int color(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
- int vertices, int steps, uint32 color);
-
- [CCode (cname="bezierRGBA")]
- public static int rgba(SDL.Surface dst, [CCode (array_length = false)] int16[] vx, [CCode (array_length = false)] int16[] vy,
- int vertices, int steps, uchar r, uchar g, uchar b, uchar a);
- }// BezierCurve
-
- [CCode (cheader_filename="SDL_gfxPrimitives.h")]
- [Compact]
- public class Text {
- [CCode (cname="stringColor")]
- public static int color(SDL.Surface dst, int16 x, int16 y, string s, uint32 color);
-
- [CCode (cname="stringRGBA")]
- public static int rgba(SDL.Surface dst, int16 x, int16 y, string s,
- uchar r, uchar g, uchar b, uchar a);
-
- [CCode (cname="gfxPrimitivesSetFont")]
- public static int set_font(void* fontdata, int cw, int ch);
- }// Text
-
- [CCode (cheader_filename="SDL_rotozoom.h")]
- [Compact]
- public class RotoZoom {
- [CCode (cname="rotozoomSurface")]
- public static SDL.Surface rotozoom(SDL.Surface src, double degrees,
- double zoom, int smooth);
-
- [CCode (cname="rotozoomSurfaceXY")]
- public static SDL.Surface rotozoom_xy(SDL.Surface src, double degrees,
- double zoomx, double zoomy, int smooth);
-
- [CCode (cname="rotozoomSurfaceSize")]
- public static void rotozoom_size(int width, int height, double degrees,
- double zoom, ref int dstwidth, ref int dstheight);
-
- [CCode (cname="rotozoomSurfaceSizeXY")]
- public static void rotozoom_size_xy(int width, int height, double degrees,
- double zoomx, double zoomy, ref int dstwidth, ref int dstheight);
-
- [CCode (cname="zoomSurface")]
- public static SDL.Surface zoom(SDL.Surface src, double zoomx,
- double zoomy, int smooth);
-
- [CCode (cname="zoomSurfaceSize")]
- public static void zoom_size(int width, int height, double zoomx,
- double zoomy, ref int dstwidth, ref int dstheight);
- }// RotoZoom
-
- [CCode (cheader_filename="SDL_framerate.h", cname="FPSmanager", free_function="g_free", has_type_id = false)]
- public struct FramerateManager {
- [CCode (cname="SDL_initFramerate")]
- public void init();
-
- [CCode (cname="SDL_setFramerate")]
- public int set_rate(int rate);
-
- [CCode (cname="SDL_getFramerate")]
- public int get_rate();
-
- [CCode (cname="SDL_framerateDelay")]
- public void run();
- }// FramerateManager
-
- [CCode (cheader_filename="SDL_imageFilter.h")]
- [Compact]
- public class Filter {
- [CCode (cname="SDL_imageFilterMMXdetect")]
- public static int have_mmx();
-
- [CCode (cname="SDL_imageFilterMMXon")]
- public static void enable_mmx();
-
- [CCode (cname="SDL_imageFilterMMXoff")]
- public static void disable_mmx();
-
- [CCode (cname="SDL_imageFilterAdd")]
- public static int add([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
-
- [CCode (cname="SDL_imageFilterMean")]
- public static int mean([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
-
- [CCode (cname="SDL_imageFilterSub")]
- public static int subtract([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
-
- [CCode (cname="SDL_imageFilterAbsDiff")]
- public static int absolute_difference([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
-
- [CCode (cname="SDL_imageFilterMult")]
- public static int multiply([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
-
- [CCode (cname="SDL_imageFilterMultNor")]
- public static int multiply_normalized([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
-
- [CCode (cname="SDL_imageFilterMultDivby2")]
- public static int multiply_half([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
-
- [CCode (cname="SDL_imageFilterMultDivby4")]
- public static int multiply_quarter([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
-
- [CCode (cname="SDL_imageFilterBitAnd")]
- public static int and([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
-
- [CCode (cname="SDL_imageFilterBitOr")]
- public static int or([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
-
- [CCode (cname="SDL_imageFilterDiv")]
- public static int divide([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] src2, [CCode (array_length = false)] uchar[] dst, int length);
-
- [CCode (cname="SDL_imageFilterBitNegation")]
- public static int negate([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length);
-
- [CCode (cname="SDL_imageFilterAddByte")]
- public static int add_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar addend);
-
- [CCode (cname="SDL_imageFilterAddUint")]
- public static int add_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint addend);
-
- [CCode (cname="SDL_imageFilterAddByteToHalf")]
- public static int halve_add_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar addend);
-
- [CCode (cname="SDL_imageFilterSubByte")]
- public static int subtract_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar subtrahend);
-
- [CCode (cname="SDL_imageFilterSubUint")]
- public static int subtract_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint subtrahend);
-
- [CCode (cname="SDL_imageFilterShiftRight")]
- public static int shift_right_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar shiftcount);
-
- [CCode (cname="SDL_imageFilterShiftRightUint")]
- public static int shift_right_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint shiftcount);
-
- [CCode (cname="SDL_imageFilterMultByByte")]
- public static int multiply_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar multiplicand);
-
- [CCode (cname="SDL_imageFilterShiftRightAndMultByByte")]
- public static int shift_right_multiply_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar shiftcount, uchar multiplicand);
-
- [CCode (cname="SDL_imageFilterShiftLeftByte")]
- public static int shift_left_uchar([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar shiftcount);
-
- [CCode (cname="SDL_imageFilterShiftLeftUint")]
- public static int shift_left_uint([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uint shiftcount);
-
- [CCode (cname="SDL_imageFilterBinarizeUsingThreshold")]
- public static int binarize([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar threshold);
-
- [CCode (cname="SDL_imageFilterClipToRange")]
- public static int clip([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, uchar min, uchar max);
-
- [CCode (cname="SDL_imageFilterNormalize")]
- public static int normalize([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int length, int cmin, int cmax, int nmin, int nmax);
-
- [CCode (cname="SDL_imageFilterConvolveKernel3x3Divide")]
- public static int convolve_3x3_divide([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar divisor);
-
- [CCode (cname="SDL_imageFilterConvolveKernel5x5Divide")]
- public static int convolve_5x5_divide([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar divisor);
-
- [CCode (cname="SDL_imageFilterConvolveKernel7x7Divide")]
- public static int convolve_7x7_divide([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar divisor);
-
- [CCode (cname="SDL_imageFilterConvolveKernel9x9Divide")]
- public static int convolve_9x9_divide([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar divisor);
-
- [CCode (cname="SDL_imageFilterConvolveKernel3x3ShiftRight")]
- public static int convolve_3x3_shift([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar shiftcount);
-
- [CCode (cname="SDL_imageFilterConvolveKernel5x5ShiftRight")]
- public static int convolve_5x5_shift([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar shiftcount);
-
- [CCode (cname="SDL_imageFilterConvolveKernel7x7ShiftRight")]
- public static int convolve_7x7_shift([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar shiftcount);
-
- [CCode (cname="SDL_imageFilterConvolveKernel9x9ShiftRight")]
- public static int convolve_9x9_shift([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, [CCode (array_length = false)] int16[] kernel, uchar shiftcount);
-
- [CCode (cname="SDL_imageFilterSobelX")]
- public static int sobel([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns);
-
- [CCode (cname="SDL_imageFilterSobelXShiftRight")]
- public static int sobel_shift([CCode (array_length = false)] uchar[] src1, [CCode (array_length = false)] uchar[] dst, int rows, int columns, uchar shiftcount);
- }// Filter
-}// SDLGraphics
+++ /dev/null
-
-[CCode (cheader_filename = "SDL_image.h")]
-namespace SDLImage {
- //! Defines
-
- [CCode (cname = "int", cprefix = "IMG_INIT_", has_type_id = false)]
- public enum InitFlags {
- JPG,
- PNG,
- TIF
- }
-
- //! General
-
- [CCode (cname = "IMG_Linked_Version")]
- public static unowned SDL.Version linked();
-
- [CCode (cname = "IMG_Init")]
- public static int init(int flags);
-
- [CCode (cname = "IMG_Quit")]
- public static void quit();
-
- //! Loading
-
- [CCode (cname = "IMG_Load")]
- public static SDL.Surface? load(string file);
-
- [CCode (cname = "IMG_Load_RW")]
- public static SDL.Surface? load_rw(SDL.RWops src, bool freesrc = false);
-
- [CCode (cname = "IMG_LoadTyped_RW")]
- public static SDL.Surface? load_rw_typed(SDL.RWops src, bool freesrc, string type);
-
- [CCode (cname = "IMG_LoadCUR_RW")]
- public static SDL.Surface? load_cur(SDL.RWops src);
-
- [CCode (cname = "IMG_LoadICO_RW")]
- public static SDL.Surface? load_ico(SDL.RWops src);
-
- [CCode (cname = "IMG_LoadBMP_RW")]
- public static SDL.Surface? load_bmp(SDL.RWops src);
-
- [CCode (cname = "IMG_LoadPNM_RW")]
- public static SDL.Surface? load_pnm(SDL.RWops src);
-
- [CCode (cname = "IMG_LoadXPM_RW")]
- public static SDL.Surface? load_xpm(SDL.RWops src);
-
- [CCode (cname = "IMG_LoadXCF_RW")]
- public static SDL.Surface? load_xcf(SDL.RWops src);
-
- [CCode (cname = "IMG_LoadPCX_RW")]
- public static SDL.Surface? load_pcx(SDL.RWops src);
-
- [CCode (cname = "IMG_LoadGIF_RW")]
- public static SDL.Surface? load_gif(SDL.RWops src);
-
- [CCode (cname = "IMG_LoadJPG_RW")]
- public static SDL.Surface? load_jpg(SDL.RWops src);
-
- [CCode (cname = "IMG_LoadTIF_RW")]
- public static SDL.Surface? load_tif(SDL.RWops src);
-
- [CCode (cname = "IMG_LoadPNG_RW")]
- public static SDL.Surface? load_png(SDL.RWops src);
-
- [CCode (cname = "IMG_LoadTGA_RW")]
- public static SDL.Surface? load_tga(SDL.RWops src);
-
- [CCode (cname = "IMG_LoadLBM_RW")]
- public static SDL.Surface? load_lbm(SDL.RWops src);
-
- [CCode (cname = "IMG_LoadXV_RW")]
- public static SDL.Surface? load_xv(SDL.RWops src);
-
- [CCode (cname = "IMG_ReadXPMFromArray")]
- public static SDL.Surface? read_xpm(char** xpmdata);
-
- //!Info
-
- [CCode (cname = "IMG_isCUR")]
- public static bool is_cur(SDL.RWops src);
-
- [CCode (cname = "IMG_isICO")]
- public static bool is_ico(SDL.RWops src);
-
- [CCode (cname = "IMG_isBMP")]
- public static bool is_bmp(SDL.RWops src);
-
- [CCode (cname = "IMG_isPNM")]
- public static bool is_pnm(SDL.RWops src);
-
- [CCode (cname = "IMG_isXPM")]
- public static bool is_xpm(SDL.RWops src);
-
- [CCode (cname = "IMG_isXCF")]
- public static bool is_xcf(SDL.RWops src);
-
- [CCode (cname = "IMG_isPCX")]
- public static bool is_pcx(SDL.RWops src);
-
- [CCode (cname = "IMG_isGIF")]
- public static bool is_gif(SDL.RWops src);
-
- [CCode (cname = "IMG_isJPG")]
- public static bool is_jpg(SDL.RWops src);
-
- [CCode (cname = "IMG_isTIF")]
- public static bool is_tif(SDL.RWops src);
-
- [CCode (cname = "IMG_isPNG")]
- public static bool is_png(SDL.RWops src);
-
- [CCode (cname = "IMG_isLBM")]
- public static bool is_lbm(SDL.RWops src);
-
- [CCode (cname = "IMG_isXV")]
- public static bool is_xv(SDL.RWops src);
-
- //! Errors
-
- [CCode (cname="IMG_SetError")]
- public static void set_error(string format, ...);
-
- [CCode (cname="IMG_GetError")]
- public static unowned string get_error();
-} // SDLImage
+++ /dev/null
-[CCode (cheader_filename="SDL_mixer.h")]
-namespace SDLMixer {
- [CCode (cname="Mix_Linked_Version")]
- public static unowned SDL.Version linked();
-
- [CCode (cname="Mix_OpenAudio")]
- public static int open(int frequency, uint16 format, int channels, int chunksize);
-
- [CCode (cname="Mix_CloseAudio")]
- public static void close();
-
- [CCode (cname="Mix_QuerySpec")]
- public static int query(ref int frequency, ref uint16 format, ref int channels);
-
- [CCode (cname="Mix_SetPostMix")]
- public static void set_post_mixer(MixFunction f, void* arg);
-
- [CCode (cname="Mix_SetSynchroValue")]
- public static int set_synchro_value(int value);
-
- [CCode (cname="Mix_GetSynchroValue")]
- public static int get_synchro_value();
-
- public delegate void MixFunction(void* udata, uchar[] stream);
- public delegate void MusicFinishedCallback();
- public delegate void ChannelFinishedCallback(int channel);
- public delegate void EffectCallback(int chan, void* stream, int len, void* udata);
- public delegate void EffectDoneCallback(int chan, void* udata);
-
- [CCode (cname="int", cprefix="MIX_", has_type_id = false)]
- public enum FadeStatus {
- NO_FADING, FADING_OUT, FADING_IN
- }// FadeStatus
-
- [CCode (cname="int", cprefix="MUS_", has_type_id = false)]
- public enum MusicType {
- NONE, CMD, WAV, MOD, MID, OGG, MP3, MP3_MAD
- }// MusicType
-
- [CCode (cname="Mix_Chunk", free_function="Mix_FreeChunk")]
- [Compact]
- public class Chunk {
- [CCode (cname="Mix_LoadWAV_RW")]
- public Chunk.WAV(SDL.RWops src, int freesrc=0);
-
- [CCode (cname="Mix_QuickLoad_WAV")]
- public Chunk.QuickWAV([CCode (array_length = false)] uchar[] mem);
-
- [CCode (cname="Mix_QuickLoad_RAW")]
- public Chunk.QuickRAW(uchar[] mem);
-
- [CCode (cname="Mix_VolumeChunk")]
- public int volume(int num);
- }// Chunk
-
- [CCode (cname="Mix_Music", free_function="Mix_FreeMusic")]
- [Compact]
- public class Music {
- [CCode (cname="Mix_GetMusicHookData")]
- public static void* get_hook_data();
-
- [CCode (cname="Mix_HookMusic")]
- public static void hook_mixer(MixFunction? f, void* arg);
-
- [CCode (cname="Mix_HookMusicFinished")]
- public static void hook_finished(MusicFinishedCallback cb);
-
- [CCode (cname="Mix_FadeOutMusic")]
- public static int fade_out(int ms);
-
- [CCode (cname="Mix_FadingMusic")]
- public static FadeStatus is_fading();
-
- [CCode (cname="Mix_VolumeMusic")]
- public static int volume(int num);
-
- [CCode (cname="Mix_HaltMusic")]
- public static int halt();
-
- [CCode (cname="Mix_PauseMusic")]
- public static void pause();
-
- [CCode (cname="Mix_ResumeMusic")]
- public static void resume();
-
- [CCode (cname="Mix_RewindMusic")]
- public static void rewind();
-
- [CCode (cname="Mix_PausedMusic")]
- public static int is_paused();
-
- [CCode (cname="Mix_SetMusicPosition")]
- public static int position(double position);
-
- [CCode (cname="Mix_PlayingMusic")]
- public static int is_playing();
-
- [CCode (cname="Mix_SetMusicCMD")]
- public static int set_play_command(string command);
-
- [CCode (cname="Mix_LoadMUS")]
- public Music(string file);
-
- [CCode (cname="Mix_LoadMUS_RW")]
- public Music.RW(SDL.RWops rw);
-
- [CCode (cname="Mix_GetMusicType")]
- public MusicType type();
-
- [CCode (cname="Mix_PlayMusic")]
- public int play(int loops);
-
- [CCode (cname="Mix_FadeInMusicPos")]
- public int fade_in(int loops, int ms, double position=0.0);
- }// Music
-
- [Compact]
- public class Effect {
- [CCode (cname="Mix_RegisterEffect")]
- public static int register(int chan, EffectCallback f,
- EffectDoneCallback? d, void* arg);
-
- [CCode (cname="Mix_UnregisterEffect")]
- public static int unregister(int chan, EffectCallback f);
-
- [CCode (cname="Mix_UnregisterAllEffects")]
- public static int unregister_all(int channel);
- }// Effect
-
- [CCode (cname="int", has_type_id = false)]
- [SimpleType]
- public struct Channel: int {
- [CCode (cname="Mix_AllocateChannels")]
- public static int allocate(int num_channels);
-
- [CCode (cname="Mix_ReserveChannels")]
- public static int reserve(int num_channels);
-
- [CCode (cname="Mix_ChannelFinished")]
- public static void hook_finished(ChannelFinishedCallback? cb);
-
- [CCode (cname="Mix_SetPanning")]
- public int pan(uchar left, uchar right);
-
- [CCode (cname="Mix_SetPosition")]
- public int position(int16 degrees, uchar distance);
-
- [CCode (cname="Mix_SetDistance")]
- public int distance(uchar distance);
-
- [CCode (cname="Mix_SetReverseStereo")]
- public int reverse_stereo(int flip);
-
- [CCode (cname="Mix_PlayChannelTimed")]
- public int play(Chunk chunk, int loops, int ticks=-1);
-
- [CCode (cname="Mix_FadeInChannelTimed")]
- public int fade_in(Chunk chunk, int loops, int ms, int ticks=-1);
-
- [CCode (cname="Mix_FadeOutChannelTimed")]
- public int fade_out(int ms);
-
- [CCode (cname="Mix_FadingChannel")]
- public FadeStatus is_fading();
-
- [CCode (cname="Mix_Volume")]
- public int volume(int num);
-
- [CCode (cname="Mix_HaltChannel")]
- public int halt();
-
- [CCode (cname="Mix_ExpireChannel")]
- public int expire(int ticks);
-
- [CCode (cname="Mix_Pause")]
- public void pause();
-
- [CCode (cname="Mix_Paused")]
- public int is_paused();
-
- [CCode (cname="Mix_Resume")]
- public void resume();
-
- [CCode (cname="Mix_Playing")]
- public int is_playing();
-
- [CCode (cname="Mix_GetChunk")]
- public Chunk? get_chunk();
- }// Channel
-
- [CCode (cname="int", has_type_id = false)]
- [SimpleType]
- public struct ChannelGroup: int {
- [CCode (cname="Mix_GroupChannel")]
- public static int add(int channel, int group);
-
- [CCode (cname="Mix_GroupChannels")]
- public static int add_range(int from_channel, int to_channel, int group);
-
- [CCode (cname="Mix_GroupAvailable")]
- public int first_available();
-
- [CCode (cname="Mix_GroupCount")]
- public int count();
-
- [CCode (cname="Mix_GroupOldest")]
- public int oldest();
-
- [CCode (cname="Mix_GroupNewer")]
- public int newest();
-
- [CCode (cname="Mix_HaltGroup")]
- public int halt();
-
- [CCode (cname="Mix_FadeOutGroup")]
- public int fade_out(int ms);
- }// ChannelGroup
-
-}// SDLMixer
+++ /dev/null
-[CCode (cprefix="SDLNet_", cheader_filename="SDL_net.h")]
-namespace SDLNet {
- [CCode (cname="SDLNet_Linked_Version")]
- public static SDL.Version linked();
-
- [CCode (cname="SDLNet_Init")]
- public static int init();
-
- [CCode (cname="SDLNet_Quit")]
- public static void quit();
-
- [CCode (cname="SDLNet_Write16")]
- public static void write16(uint16 value, void *area);
-
- [CCode (cname="SDLNet_Write32")]
- public static void write32(uint value, void *area);
-
- [CCode (cname="SDLNet_Read16")]
- public static uint16 read16(void *area);
-
- [CCode (cname="SDLNet_Read32")]
- public static uint read32(void *area);
-
-
-
-
- [CCode (cname="IPaddress", free_function="g_free", has_type_id=false)]
- public struct IPAddress {
- public uint host;
- public uint16 port;
-
- [CCode (cname="INADDR_ANY")]
- public const uint ANY;
-
- [CCode (cname="INADDR_NONE")]
- public const uint NONE;
-
- [CCode (cname="SDLNet_ResolveHost")]
- public static int from_host(out IPAddress address, string? host, uint16 port);
-
- [CCode (cname="SDLNet_ResolveIP")]
- public unowned string? lookup();
- }// IPAddress
-
- [CCode (cname="UDPpacket", free_function="SDLNet_FreePacket")]
- [Compact]
- public class UDPPacket {
- public int channel;
- public uchar *data;
- public int len;
- public int maxlen;
- public int status;
- public IPAddress address;
-
- [CCode (cname="SDLNet_AllocPacket")]
- public UDPPacket(int size);
-
- [CCode (cname="SDLNet_ResizePacket")]
- public int resize(int newsize);
- }// UDPPacket
-
- [CCode (cname="void")]
- [Compact]
- public class Socket {
- public int ready;
- }// Socket
-
- [CCode (cname="struct _TCPsocket", free_function="SDLNet_TCP_Close")]
- [Compact]
- public class TCPSocket: Socket {
- [CCode (cname="SDLNet_TCP_Open")]
- public TCPSocket(IPAddress ip);
-
- [CCode (cname="SDLNet_TCP_Accept")]
- public TCPSocket? accept();
-
- [CCode (cname="SDLNet_TCP_GetPeerAddress")]
- public IPAddress? get_address();
-
- [CCode (cname="SDLNet_TCP_Send")]
- public int send(uchar[] data);
-
- [CCode (cname="SDLNet_TCP_Recv")]
- public int receive(uchar[] data);
- }// TCPSocket
-
- [CCode (cname="struct _UDPsocket", free_function="SDLNet_UDP_Close")]
- [Compact]
- public class UDPSocket: Socket {
- [CCode (cname="SDLNet_UDP_Open")]
- public UDPSocket(uint16 port);
-
- [CCode (cname="SDLNet_UDP_Bind")]
- public int bind(int channel, IPAddress address);
-
- [CCode (cname="SDLNet_UDP_Unbind")]
- public void unbind(int channel);
-
- [CCode (cname="SDLNet_UDP_GetPeerAddress")]
- public IPAddress? get_address(int channel);
-
- [CCode (cname="SDLNet_UDP_Send")]
- public int send(int channel, UDPPacket packet);
-
- [CCode (cname="SDLNet_UDP_Recv")]
- public int receive(UDPPacket packet);
-
- [CCode (cname="SDLNet_UDP_SendV")]
- public int send_many(UDPPacket[] packets);
-
- [CCode (cname="SDLNet_UDP_RecvV")]
- public int receive_many([CCode (array_length = false)] UDPPacket[] packets);
- }// UDPSocket
-
- [CCode (cname="struct _SDLNet_SocketSet", free_function="SDLNet_FreeSocketSet")]
- [Compact]
- public class SocketSet {
- [CCode (cname="SDLNet_AllocSocketSet")]
- public SocketSet(int maxsockets);
-
- [CCode (cname="SDLNet_AddSocket")]
- public int add(Socket socket);
-
- [CCode (cname="SDLNet_DelSocket")]
- public int remove(Socket socket);
-
- [CCode (cname="SDLNet_CheckSockets")]
- public int has_data(uint timeout);
- }// SocketSet
-}// SDL
+++ /dev/null
-[CCode (cheader_filename="SDL_ttf.h")]
-namespace SDLTTF {
- [CCode (cname="TTF_Linked_Version")]
- public static unowned SDL.Version linked();
-
- [CCode (cname="TTF_ByteSwappedUNICODE")]
- public static void byteswap_unicode(int swapped);
-
- [CCode (cname="TTF_Init")]
- public static int init();
-
- [CCode (cname="TTF_WasInit")]
- public static int get_initialized();
-
- [CCode (cname="TTF_Quit")]
- public static void quit();
-
- [CCode (cname="int", cprefix="TTF_STYLE_", has_type_id = false)]
- public enum FontStyle {
- NORMAL, BOLD, ITALIC, UNDERLINE
- }// FontStyle
-
- [CCode (cname="TTF_Font", free_function="TTF_CloseFont")]
- [Compact]
- public class Font {
- [CCode (cname="TTF_OpenFont")]
- public Font(string file, int ptsize);
-
- [CCode (cname="TTF_OpenFontIndex")]
- public Font.index(string file, int ptsize, long index);
-
- [CCode (cname="TTF_OpenFontRW")]
- public Font.RW(SDL.RWops src, int freesrc=0, int ptsize);
-
- [CCode (cname="TTF_OpenFontIndexRW")]
- public Font.RWindex(SDL.RWops src, int freesrc=0, int ptsize, long index);
-
- [CCode (cname="TTF_GetFontStyle")]
- public FontStyle get_style();
-
- [CCode (cname="TTF_SetFontStyle")]
- public FontStyle set_style(FontStyle style);
-
- [CCode (cname="TTF_FontHeight")]
- public int height();
-
- [CCode (cname="TTF_FontAscent")]
- public int ascent();
-
- [CCode (cname="TTF_FontDescent")]
- public int descent();
-
- [CCode (cname="TTF_FontLineSkip")]
- public int lineskip();
-
- [CCode (cname="TTF_FontFaces")]
- public long faces();
-
- [CCode (cname="TTF_FontFaceIsFixedWidth")]
- public int is_fixed_width();
-
- [CCode (cname="TTF_FontFaceFamilyName")]
- public string family();
-
- [CCode (cname="TTF_FontFaceStyleName")]
- public string style();
-
- [CCode (cname="TTF_GlyphMetrics")]
- public int metrics(uint16 ch, ref int minx, ref int maxx,
- ref int miny, ref int maxy, ref int advance);
-
- [CCode (cname="TTF_SizeText")]
- public int size(string text, ref int w, ref int h);
-
- [CCode (cname="TTF_SizeUTF8")]
- public int size_utf8(string text, ref int w, ref int h);
-
- [CCode (cname="TTF_SizeUNICODE")]
- public int size_unicode([CCode (array_length = false)] uint16[] text, ref int w, ref int h);
-
- [CCode (cname="TTF_RenderText_Solid")]
- public SDL.Surface? render(string text, SDL.Color fg);
-
- [CCode (cname="TTF_RenderUTF8_Solid")]
- public SDL.Surface? render_utf8(string text, SDL.Color fg);
-
- [CCode (cname="TTF_RenderUNICODE_Solid")]
- public SDL.Surface? render_unicode([CCode (array_length = false)] uint16[] text, SDL.Color fg);
-
- [CCode (cname="TTF_RenderText_Shaded")]
- public SDL.Surface? render_shaded(string text, SDL.Color fg, SDL.Color bg);
-
- [CCode (cname="TTF_RenderUTF8_Shaded")]
- public SDL.Surface? render_shaded_utf8(string text, SDL.Color fg, SDL.Color bg);
-
- [CCode (cname="TTF_RenderUNICODE_Shaded")]
- public SDL.Surface? render_shaded_unicode([CCode (array_length = false)] uint16[] text, SDL.Color fg, SDL.Color bg);
-
- [CCode (cname="TTF_RenderText_Blended")]
- public SDL.Surface? render_blended(string text, SDL.Color fg);
-
- [CCode (cname="TTF_RenderUTF8_Blended")]
- public SDL.Surface? render_blended_utf8(string text, SDL.Color fg);
-
- [CCode (cname="TTF_RenderUNICODE_Blended")]
- public SDL.Surface? render_blended_unicode([CCode (array_length = false)] uint16[] text, SDL.Color fg);
- }// Font
-}// SDLTTF
+++ /dev/null
-[CCode (cprefix="SDL_", cheader_filename="SDL.h")]
-namespace SDL {
- ///
- /// Initialization
- ///
- [Flags, CCode (cname="int", cprefix="SDL_INIT_", has_type_id = false)]
- public enum InitFlag {
- TIMER, AUDIO, VIDEO, CDROM, JOYSTICK,
- NOPARACHUTE, EVENTTHREAD, EVERYTHING
- }// InitFlag
-
- [CCode (cname="SDL_Init")]
- public static int init(uint32 flags = SDL.InitFlag.EVERYTHING);
-
- [CCode (cname="SDL_InitSubSystem")]
- public static int init_subsystem(uint32 flags);
-
- [CCode (cname="SDL_WasInit")]
- public static uint32 get_initialized(uint32 flags);
-
- [CCode (cname="SDL_Quit")]
- public static void quit();
-
- [CCode (cname="SDL_QuitSubSystem")]
- public static void quit_subsystem(uint32 flags);
-
- [CCode (type_id="SDL_version", cheader_filename="SDL_version.h", cname="SDL_version")]
- public class Version {
- public uchar major;
- public uchar minor;
- public uchar patch;
-
- [CCode (cheader_filename="SDL_version.h", cname="SDL_Linked_Version")]
- public static unowned Version linked();
- }// Version
-
-
- ///
- /// Error
- ///
- [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
- public enum Error {
- ENOMEM, EFREAD, EFWRITE, EFSEEK,
- UNSUPPORTED, LASTERROR
- }// Error
-
- [CCode (cname="SDL_SetError")]
- public static void set_error(string format, ...);
-
- [CCode (cname="SDL_GetError")]
- public static unowned string get_error();
-
- [CCode (cname="SDL_ClearError")]
- public static void clear_error();
-
- [CCode (cname="SDL_Error")]
- public static void error(Error code);
-
-
- ///
- /// Video
- ///
- [CCode (cname="int", cprefix="SDL_ALPHA_", has_type_id = false)]
- public enum Opacity {
- OPAQUE, TRANSPARENT
- }// Opacity
-
- [Compact]
- public class Video {
- [CCode (cname="SDL_VideoDriverName")]
- public static unowned string? driver_name(string namebuf, int maxlen);
-
- [CCode (cname="SDL_SetGamma")]
- public static int set_gamma(float red, float green, float blue);
-
- [CCode (cname="SDL_SetGammaRamp")]
- public static int set_gamma_ramp(uint16* red, uint16* green, uint16* blue);
-
- [CCode (cname="SDL_GetGammaRamp")]
- public static int get_gamma_ramp(uint16* red, uint16* green, uint16* blue);
-
- [CCode (cname="SDL_ListModes")]
- public static void* _list_modes(PixelFormat? format, uint32 flags);
-
- [CCode (array_length = false, array_null_terminated = true)]
- public static unowned SDL.Rect*[]? list_modes(SDL.PixelFormat? format, uint32 flags, out bool any) {
- var p = SDL.Video._list_modes (format, flags);
- any = ((int) p == -1);
- return any ? null : (SDL.Rect*[]?) p;
- }
- }// Video
-
- [Flags, CCode (cname="int", cprefix="SDL_", has_type_id = false)]
- public enum SurfaceFlag {
- SWSURFACE, HWSURFACE, ASYNCBLIT, ANYFORMAT, HWPALETTE, DOUBLEBUF,
- FULLSCREEN, OPENGL, OPENGLBLIT, RESIZABLE, NOFRAME, HWACCEL,
- SRCCOLORKEY, RLEACCEL, SRCALPHA
- }// SurfaceFlag
-
- [CCode (cname="SDL_Surface", free_function="SDL_FreeSurface", copy_function="SDL_DisplayFormat")]
- [Compact]
- public class Surface {
- public uint32 flags;
- public PixelFormat? format;
- public int w;
- public int h;
- public uint16 pitch;
- public void* pixels;
- public int ref_count;
-
- [CCode (cname="SDL_CreateRGBSurface")]
- public Surface.RGB(uint32 flags, int width, int height, int depth,
- uint32 rmask, uint32 gmask, uint32 bmask, uint32 amask);
-
- [CCode (cname="SDL_CreateRGBSurfaceFrom")]
- public Surface.from_RGB(void* pixels, int width, int height, int depth,
- int pitch, uint32 rmask, uint32 gmask, uint32 bmask, uint32 amask);
-
- [CCode (cname="SDL_LoadBMP_RW")]
- public static Surface.load(RWops src, int freesrc=0);
-
- // Instance methods
- [CCode (cname="SDL_UpdateRects")]
- public void update_rects ([CCode (array_length_pos=0.9)] Rect[] rects);
-
- [CCode (cname="SDL_UpdateRect")]
- public void update_rect (int32 x, int32 y, uint32 w, uint32 h);
-
- [CCode (cname="SDL_Flip")]
- public int flip();
-
- [CCode (cname="SDL_SetColors")]
- public int set_colors ([CCode (array_length_pos=-1)] Color[] colors, int firstcolor = 0);
-
- [CCode (cname="SDL_SetPalette")]
- public int set_palette (PaletteFlags flags, [CCode (array_length_pos=-1)] Color[] colors, int firstcolor = 0);
-
- [CCode (cname="SDL_LockSurface")]
- public int do_lock();
-
- [CCode (cname="SDL_UnlockSurface")]
- public void unlock();
-
- [CCode (cname="SDL_SaveBMP_RW")]
- public int save(RWops dst, int freedst=0);
-
- [CCode (cname="SDL_SetColorKey")]
- public int set_colorkey(uint32 flag, uint32 key);
-
- [CCode (cname="SDL_SetAlpha")]
- public int set_alpha(uint32 flag, uchar alpha);
-
- [CCode (cname="SDL_SetClipRect")]
- public bool set_cliprect(Rect? rect);
-
- [CCode (cname="SDL_GetClipRect")]
- public void get_cliprect(out Rect rect);
-
- [CCode (cname="SDL_ConvertSurface")]
- public Surface? convert(PixelFormat? fmt, uint32 flags);
-
- [CCode (cname="SDL_UpperBlit")]
- public int blit(Rect? srcrect, Surface dst, Rect? dstrect);
-
- [CCode (cname="SDL_FillRect")]
- public int fill(Rect? dst, uint32 color);
- }// Surface
-
- [CCode (cname="SDL_Surface")]
- [Compact]
- public class Screen : Surface {
- [CCode (cname="SDL_GetVideoSurface")]
- public static unowned Screen instance();
-
- [CCode (cname="SDL_SetVideoMode")]
- public static unowned Screen? set_video_mode(int width, int height, int bpp, uint32 flags);
-
- [CCode (cname="SDL_VideoModeOK")]
- public static int check_video_mode(int width, int height, int bpp, uint32 flags);
- }// Screen
-
- [CCode (cname="SDL_PixelFormat", has_copy_function = false, has_destroy_function = false, has_type_id = false)]
- public struct PixelFormat {
- public Palette? palette;
- public uchar BitsPerPixel;
- public uchar BytesPerPixel;
- public uchar Rloss;
- public uchar Gloss;
- public uchar Bloss;
- public uchar Aloss;
- public uchar Rshift;
- public uchar Gshift;
- public uchar Bshift;
- public uchar Ashift;
- public uint32 Rmask;
- public uint32 Gmask;
- public uint32 Bmask;
- public uint32 Amask;
-
- public uint32 colorkey;
- public uchar alpha;
-
- [CCode (cname="SDL_MapRGB")]
- public uint32 map_rgb(uchar r, uchar g, uchar b);
-
- [CCode (cname="SDL_MapRGBA")]
- public uint32 map_rgba(uchar r, uchar g, uchar b, uchar a);
-
- [CCode (cname="SDL_GetRGB", instance_pos=1.2)]
- public void get_rgb (uint32 pixel, ref uchar r, ref uchar g, ref uchar b);
-
- [CCode (cname="SDL_GetRGBA", instance_pos=1.2)]
- public void get_rgba (uint32 pixel, ref uchar r, ref uchar g, ref uchar b, ref uchar a);
- }// PixelFormat
-
- [CCode (cname="SDL_Rect", has_type_id=false)]
- public struct Rect {
- public int16 x;
- public int16 y;
- public uint16 w;
- public uint16 h;
- }// Rect
-
- [CCode (cname="SDL_Color", has_type_id=false)]
- [SimpleType]
- public struct Color {
- public uchar r;
- public uchar g;
- public uchar b;
- public uchar unused;
- }// Color
-
- [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
- public enum PaletteFlags {
- LOGPAL, PHYSPAL
- }// PaletteFlags
-
- [CCode (cname="SDL_Palette", has_copy_function = false, has_destroy_function = false, has_type_id = false)]
- public struct Palette {
- [CCode (array_length_cname="ncolors")]
- public Color[] colors;
- }// Palette
-
- [CCode (cname="SDL_VideoInfo")]
- [Compact]
- public class VideoInfo {
- public uint32 hw_available ;
- public uint32 wm_available ;
- public uint32 UnusedBits1 ;
- public uint32 UnusedBits2 ;
- public uint32 blit_hw ;
- public uint32 bliw_hw_CC ;
- public uint32 blit_hw_A ;
- public uint32 blit_sw ;
- public uint32 blit_sw_CC ;
- public uint32 blit_sw_A ;
- public uint32 blit_fill ;
- public uint32 UnusedBits3 ;
-
- public uint32 video_mem;
- public PixelFormat? vfmt;
- public int current_w;
- public int current_h;
-
- [CCode (cname="SDL_GetVideoInfo")]
- public static unowned VideoInfo get();
- }// VideoInfo
-
- [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
- public enum OverlayFormat {
- YV12_OVERLAY, IYUV_OVERLAY, YUY2_OVERLAY,
- UYVY_OVERLAY, YVYU_OVERLAY
- }// OverlayFormat
-
- [CCode (cname="SDL_Overlay", free_function="SDL_FreeYUVOverlay")]
- [Compact]
- public class Overlay {
- public uint32 format;
- public int w;
- public int h;
- public int planes;
- uint16* pitches;
- uchar** pixels;
-
- uint32 hw_overlay;
- uint32 UnusedBits;
-
- [CCode (cname="SDL_CreateYUVOverlay")]
- public Overlay(int width, int height, OverlayFormat format, Surface display);
-
- [CCode (cname="SDL_LockYUVOverlay")]
- public int do_lock();
-
- [CCode (cname="SDL_UnlockYUVOverlay")]
- public void unlock();
-
- [CCode (cname="SDL_DisplayYUVOverlay")]
- public void display(Rect dst);
- }// Overlay
-
-
- ///
- /// RWops
- ///
- [CCode (cname="SDL_RWops", free_function="SDL_FreeRW")]
- [Compact]
- public class RWops {
- [CCode (cname="SDL_RWFromFile")]
- public RWops.from_file(string file, string mode);
-
- [CCode (cname="SDL_RWFromMem")]
- public RWops.from_mem(void* mem, int size);
- }// RWops
-
-
- ///
- /// OpenGL
- ///
- [CCode (cname="int", cprefix="SDL_GL_", has_type_id = false)]
- public enum GLattr {
- RED_SIZE, GREEN_SIZE, BLUE_SIZE, ALPHA_SIZE,
- BUFFER_SIZE, DOUBLEBUFFER, DEPTH_SIZE, STENCIL_SIZE,
- ACCUM_RED_SIZE, ACCUM_GREEN_SIZE, ACCUM_BLUE_SIZE,
- ACCUM_ALPHA_SIZE, STEREO, MULTISAMPLEBUFFERS,
- MULTISAMPLESAMPLES, ACCELERATED_VISUAL, SWAP_CONTROL
- }// GLattr
-
- [CCode (cprefix="SDL_GL_", cheader_filename="SDL.h")]
- [Compact]
- public class GL {
- [CCode (cname="SDL_GL_LoadLibrary")]
- public static int load_library(string path);
-
- [CCode (cname="SDL_GL_GetProcAddress")]
- public static void* get_proc_address(string proc);
-
- [CCode (cname="SDL_GL_SetAttribute")]
- public static int set_attribute(GLattr attr, int val);
-
- [CCode (cname="SDL_GL_GetAttribute")]
- public static int get_attribute(GLattr attr, ref int val);
-
- [CCode (cname="SDL_GL_SwapBuffers")]
- public static void swap_buffers();
- }// GL
-
-
- ///
- /// Window manager
- ///
- [CCode (cname="int", cprefix="SDL_GRAB_", has_type_id = false)]
- public enum GrabMode {
- QUERY, OFF, ON
- }// GrabMode
-
- [CCode (cprefix="SDL_WM_", cheader_filename="SDL.h")]
- [Compact]
- public class WindowManager {
- [CCode (cname="SDL_WM_SetCaption")]
- public static void set_caption(string title, string icon);
-
- [CCode (cname="SDL_WM_GetCaption")]
- public static void get_caption(out string title, out string icon);
-
- [CCode (cname="SDL_WM_SetIcon")]
- public static void set_icon(Surface icon, uchar* mask);
-
- [CCode (cname="SDL_WM_IconifyWindow")]
- public static int iconify();
-
- [CCode (cname="SDL_WM_ToggleFullScreen")]
- public static int toggle_fullscreen(Surface surface);
-
- [CCode (cname="SDL_WM_GrabInput")]
- public static GrabMode grab_input(GrabMode mode);
- }// WindowManager
-
-
- ///
- /// Events
- ///
- [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
- public enum EventType {
- NOEVENT, ACTIVEEVENT, KEYDOWN, KEYUP, MOUSEMOTION,
- MOUSEBUTTONDOWN, MOUSEBUTTONUP, JOYAXISMOTION,
- JOYBALLMOTION, JOYHATMOTION, JOYBUTTONDOWN, JOYBUTTONUP,
- QUIT, SYSWMEVENT, VIDEORESIZE, VIDEOEXPOSE, USEREVENT,
- NUMEVENTS
- }// EventType
-
- [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
- public enum EventMask {
- ACTIVEEVENTMASK, KEYDOWNMASK, KEYUPMASK, KEYEVENTMASK,
- MOUSEMOTIONMASK, MOUSEBUTTONDOWNMASK, MOUSEBUTTONUPMASK,
- MOUSEEVENTMASK, JOYAXISMOTIONMASK, JOYBALLMOTIONMASK,
- JOYHATMOTIONMASK, JOYBUTTONDOWNMASK, JOYBUTTONUPMASK,
- JOYEVENTMASK, VIDEORESIZEMASK, VIDEOEXPOSEMASK, QUITMASK,
- SYSWMEVENTMASK
- }// EventMask
-
- [CCode (cname="SDL_MouseButtonEvent", has_type_id=false)]
- public struct MouseButtonEvent {
- public uchar type;
- public uchar which;
- public uchar button;
- public uchar state;
- public uint16 x;
- public uint16 y;
- }// MouseButtonEvent
-
- [CCode (cheader_filename="SDL_active.h", cname="int", cprefix="SDL_APP", has_type_id = false)]
- public enum ActiveState {
- MOUSEFOCUS,
- INPUTFOCUS,
- ACTIVE
- }// ActiveState
-
- [CCode (cname="SDL_ActiveEvent", has_type_id=false)]
- public struct ActiveEvent {
- public uchar type;
- public uchar gain;
- public uchar state;
- }// ActiveEvent
-
- [CCode (cname="SDL_KeyboardEvent", has_type_id=false)]
- public struct KeyboardEvent {
- public uchar type;
- public uchar which;
- public uchar state;
- public Key keysym;
- }// KeyboardEvent
-
- [CCode (cname="SDL_MouseMotionEvent", has_type_id=false)]
- public struct MouseMotionEvent {
- public uchar type;
- public uchar which;
- public uchar state;
- public uint16 x;
- public uint16 y;
- public int16 xrel;
- public int16 yrel;
- }// MouseMotionEvent
-
- [CCode (cname="SDL_JoyAxisEvent", has_type_id=false)]
- public struct JoyAxisEvent {
- public uchar type;
- public uchar which;
- public uchar axis;
- public uint16 @value;
- }// JoyAxisEvent
-
- [CCode (cname="SDL_JoyBallEvent", has_type_id=false)]
- public struct JoyBallEvent {
- public uchar type;
- public uchar which;
- public uchar ball;
- public int16 xrel;
- public int16 yrel;
- }// JoyBallEvent
-
- [CCode (cname="SDL_JoyHatEvent", has_type_id=false)]
- public struct JoyHatEvent {
- public uchar type;
- public uchar which;
- public uchar hat;
- public uchar @value;
- }// JoyHatEvent
-
- [CCode (cname="SDL_JoyButtonEvent", has_type_id=false)]
- public struct JoyButtonEvent {
- public uchar type;
- public uchar which;
- public uchar button;
- public uchar state;
- }// JoyButtonEvent
-
- [CCode (cname="SDL_ResizeEvent", has_type_id=false)]
- public struct ResizeEvent {
- public uchar type;
- public int w;
- public int h;
- }// ResizeEvent
-
- [CCode (cname="SDL_ExposeEvent", has_type_id=false)]
- public struct ExposeEvent {
- public uchar type;
- }// ExposeEvent
-
- [CCode (cname="SDL_QuitEvent", has_type_id=false)]
- public struct QuitEvent {
- public uchar type;
- }// QuitEvent
-
- [CCode (cname="SDL_UserEvent", has_type_id=false)]
- public struct UserEvent {
- public uchar type;
- public int code;
- public void* data1;
- public void* data2;
- }// UserEvent
-
- [CCode (cname="SDL_SysWMEvent", has_type_id=false)]
- public struct SysWMEvent {
- public uchar type;
- public weak SysWMmsg msg;
- }// WMEvent
-
- [CCode (cname="SDL_SysWMmsg", cheader_filename="SDL_syswm.h")]
- public class SysWMmsg {
- }// SysWMmsg
-
- [CCode (cname="SDL_Event", has_type_id=false)]
- public struct Event {
- public uchar type;
- public ActiveEvent active;
- public KeyboardEvent key;
- public MouseMotionEvent motion;
- public MouseButtonEvent button;
- public JoyAxisEvent jaxis;
- public JoyBallEvent jball;
- public JoyHatEvent jhat;
- public JoyButtonEvent jbutton;
- public ResizeEvent resize;
- public ExposeEvent expose;
- public QuitEvent quit;
- public UserEvent user;
- public SysWMEvent syswm;
-
- [CCode (cname="SDL_PumpEvents")]
- public static void pump();
-
- [CCode (cname="SDL_PeepEvents")]
- public static void peep(Event* events, int numevents,
- EventAction action, EventMask mask);
-
- [CCode (cname="SDL_PollEvent")]
- public static int poll(out Event ev);
-
- [CCode (cname="SDL_WaitEvent")]
- public static int wait(out Event ev);
-
- [CCode (cname="SDL_PushEvent")]
- public static int push(Event ev);
-
- [CCode (cname="SDL_EventState")]
- public static uchar state(uchar type, EventState state);
- }// Event
-
- [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
- public enum EventAction {
- ADDEVENT, PEEKEVENT, GETEVENT
- }// EventAction
-
- [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
- public enum EventState {
- QUERY, IGNORE, DISABLE, ENABLE
- }// EventState
-
-
- ///
- /// Input
- ///
- [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
- public enum ButtonState {
- RELEASED, PRESSED
- }// ButtonState
-
- [CCode (cname="SDL_keysym", has_type_id=false)]
- public struct Key {
- public uchar scancode;
- public KeySymbol sym;
- public KeyModifier mod;
- public uint16 unicode;
-
- [CCode (cname="SDL_EnableUNICODE")]
- public static int enable_unicode(int enable);
-
- [CCode (cname="SDL_EnableKeyRepeat")]
- public static int set_repeat(int delay, int interval);
-
- [CCode (cname="SDL_GetKeyRepeat")]
- public static void get_repeat(ref int delay, ref int interval);
-
- [CCode (cname="SDL_GetKeyState")]
- public static unowned uchar[] get_keys();
-
- [CCode (cname="SDL_GetModState")]
- public static KeyModifier get_modifiers();
-
- [CCode (cname="SDL_SetModState")]
- public static void set_modifiers(KeyModifier modstate);
-
- [CCode (cname="SDL_GetKeyName")]
- public static unowned string get_name(KeySymbol key);
- }// Key
-
- [CCode (cname="int", cprefix="SDLK_", cheader_filename="SDL_keysym.h", has_type_id = false)]
- public enum KeySymbol {
- UNKNOWN,
- FIRST,
- BACKSPACE,
- TAB,
- CLEAR,
- RETURN,
- PAUSE,
- ESCAPE,
- SPACE,
- EXCLAIM,
- QUOTEDBL,
- HASH,
- DOLLAR,
- AMPERSAND,
- QUOTE,
- LEFTPAREN,
- RIGHTPAREN,
- ASTERISK,
- PLUS,
- COMMA,
- MINUS,
- PERIOD,
- SLASH,
- ZERO = 48,
- ONE = 49,
- TWO = 50,
- THREE = 51,
- FOUR = 52,
- FIVE = 53,
- SIX = 54,
- SEVEN = 55,
- EIGHT = 56,
- NINE = 57,
- COLON,
- SEMICOLON,
- LESS,
- EQUALS,
- GREATER,
- QUESTION,
- AT,
- /*
- Skip uppercase letters
- */
- LEFTBRACKET,
- BACKSLASH,
- RIGHTBRACKET,
- CARET,
- UNDERSCORE,
- BACKQUOTE,
- a,
- b,
- c,
- d,
- e,
- f,
- g,
- h,
- i,
- j,
- k,
- l,
- m,
- n,
- o,
- p,
- q,
- r,
- s,
- t,
- u,
- v,
- w,
- x,
- y,
- z,
- DELETE,
- /* End of ASCII mapped keysyms */
-
- /* International keyboard syms */
- WORLD_0, /* 0xA0 */
- WORLD_1,
- WORLD_2,
- WORLD_3,
- WORLD_4,
- WORLD_5,
- WORLD_6,
- WORLD_7,
- WORLD_8,
- WORLD_9,
- WORLD_10,
- WORLD_11,
- WORLD_12,
- WORLD_13,
- WORLD_14,
- WORLD_15,
- WORLD_16,
- WORLD_17,
- WORLD_18,
- WORLD_19,
- WORLD_20,
- WORLD_21,
- WORLD_22,
- WORLD_23,
- WORLD_24,
- WORLD_25,
- WORLD_26,
- WORLD_27,
- WORLD_28,
- WORLD_29,
- WORLD_30,
- WORLD_31,
- WORLD_32,
- WORLD_33,
- WORLD_34,
- WORLD_35,
- WORLD_36,
- WORLD_37,
- WORLD_38,
- WORLD_39,
- WORLD_40,
- WORLD_41,
- WORLD_42,
- WORLD_43,
- WORLD_44,
- WORLD_45,
- WORLD_46,
- WORLD_47,
- WORLD_48,
- WORLD_49,
- WORLD_50,
- WORLD_51,
- WORLD_52,
- WORLD_53,
- WORLD_54,
- WORLD_55,
- WORLD_56,
- WORLD_57,
- WORLD_58,
- WORLD_59,
- WORLD_60,
- WORLD_61,
- WORLD_62,
- WORLD_63,
- WORLD_64,
- WORLD_65,
- WORLD_66,
- WORLD_67,
- WORLD_68,
- WORLD_69,
- WORLD_70,
- WORLD_71,
- WORLD_72,
- WORLD_73,
- WORLD_74,
- WORLD_75,
- WORLD_76,
- WORLD_77,
- WORLD_78,
- WORLD_79,
- WORLD_80,
- WORLD_81,
- WORLD_82,
- WORLD_83,
- WORLD_84,
- WORLD_85,
- WORLD_86,
- WORLD_87,
- WORLD_88,
- WORLD_89,
- WORLD_90,
- WORLD_91,
- WORLD_92,
- WORLD_93,
- WORLD_94,
- WORLD_95, /* 0xFF */
-
- /* Numeric keypad */
- KP0,
- KP1,
- KP2,
- KP3,
- KP4,
- KP5,
- KP6,
- KP7,
- KP8,
- KP9,
- KP_PERIOD,
- KP_DIVIDE,
- KP_MULTIPLY,
- KP_MINUS,
- KP_PLUS,
- KP_ENTER,
- KP_EQUALS,
-
- /* Arrows + Home/End pad */
- UP,
- DOWN,
- RIGHT,
- LEFT,
- INSERT,
- HOME,
- END,
- PAGEUP,
- PAGEDOWN,
-
- /* Function keys */
- F1,
- F2,
- F3,
- F4,
- F5,
- F6,
- F7,
- F8,
- F9,
- F10,
- F11,
- F12,
- F13,
- F14,
- F15,
-
- /* Key state modifier keys */
- NUMLOCK,
- CAPSLOCK,
- SCROLLOCK,
- RSHIFT,
- LSHIFT,
- RCTRL,
- LCTRL,
- RALT,
- LALT,
- RMETA,
- LMETA,
- LSUPER, /* Left "Windows" key */
- RSUPER, /* Right "Windows" key */
- MODE, /* "Alt Gr" key */
- COMPOSE, /* Multi-key compose key */
-
- /* Miscellaneous function keys */
- HELP,
- PRINT,
- SYSREQ,
- BREAK,
- MENU,
- POWER, /* Power Macintosh power key */
- EURO, /* Some european keyboards */
- UNDO, /* Atari keyboard has Undo */
-
- /* Add any other keys here */
-
- LAST
- }// KeySymbol
-
- [CCode (cname="int", cprefix="KMOD_", cheader_filename="SDL_keysym.h", has_type_id = false)]
- public enum KeyModifier {
- NONE,
- LSHIFT,
- RSHIFT,
- LCTRL,
- RCTRL,
- LALT,
- RALT,
- LMETA,
- RMETA,
- NUM,
- CAPS,
- MODE,
- RESERVED,
- CTRL,
- SHIFT,
- ALT,
- META
- }// KeyModifier
-
- [CCode (cname="int", cprefix="SDL_BUTTON_", has_type_id = false)]
- public enum MouseButton {
- LEFT, MIDDLE, RIGHT, WHEELUP, WHEELDOWN
- }// Buttons
-
- [CCode (cname="SDL_Cursor", free_function="SDL_FreeCursor")]
- [Compact]
- public class Cursor {
- public Rect area;
- public int16 hot_x;
- public int16 hot_y;
- public uchar* data;
- public uchar* mask;
- public uchar** save;
-
- [CCode (cname="SDL_GetMouseState")]
- public static uchar get_state(ref int x, ref int y);
-
- [CCode (cname="SDL_GetRelativeMouseState")]
- public static uchar get_relative_state(ref int x, ref int y);
-
- [CCode (cname="SDL_WarpMouse")]
- public static void warp(uint16 x, uint16 y);
-
- [CCode (cname="SDL_CreateCursor")]
- public Cursor(uchar* data, uchar* mask, int w, int h,
- int hot_x, int hot_y);
-
- [CCode (cname="SDL_GetCursor")]
- public static Cursor get();
-
- [CCode (cname="SDL_SetCursor")]
- public static void set(Cursor cursor);
-
- [CCode (cname="SDL_ShowCursor")]
- public static int show(int toggle);
- }// Cursor
-
- [CCode (cname="int", cprefix="SDL_HAT_", has_type_id = false)]
- public enum HatValue {
- CENTERED, UP, RIGHT, DOWN, LEFT,
- RIGHTUP, RIGHTDOWN, LEFTUP, LEFTDOWN
- }// HatValue
-
- [CCode (cname="SDL_Joystick", free_function="SDL_JoystickClose")]
- [Compact]
- public class Joystick {
- [CCode (cname="SDL_JoystickName")]
- public static unowned string get_name(int device_index);
-
- [CCode (cname="SDL_JoystickOpened")]
- public static int is_open(int device_index);
-
- [CCode (cname="SDL_JoystickUpdate")]
- public static void update_all();
-
- [CCode (cname="SDL_JoystickEventState")]
- public static int event_state(EventState state);
-
- [CCode (cname="SDL_NumJoysticks")]
- public static int count();
-
- [CCode (cname="SDL_JoystickOpen")]
- public Joystick(int device_index);
-
- [CCode (cname="SDL_JoystickIndex")]
- public int index();
-
- [CCode (cname="SDL_JoystickNumAxes")]
- public int num_axes();
-
- [CCode (cname="SDL_JoystickNumBalls")]
- public int num_balls();
-
- [CCode (cname="SDL_JoystickNumHats")]
- public int num_hats();
-
- [CCode (cname="SDL_JoystickNumButtons")]
- public int num_buttons();
-
- [CCode (cname="SDL_JoystickGetAxis")]
- public int16 get_axis(int axis);
-
- [CCode (cname="SDL_JoystickGetHat")]
- public HatValue get_hat(int hat);
-
- [CCode (cname="SDL_JoystickGetBall")]
- public HatValue get_ball(int ball, ref int dx, ref int dy);
-
- [CCode (cname="SDL_JoystickGetButton")]
- public ButtonState get_button(int button);
- }// Joystick
-
-
- ///
- /// Audio
- ///
- [CCode (cname="int", cprefix="AUDIO_", has_type_id = false)]
- public enum AudioFormat {
- U8, S8, U16LSB, S16LSB, U16MSB, S16MSB, U16, S16,
- U16SYS, S16SYS
- }// AudioFormat
-
- [CCode (cname="int", cprefix="SDL_AUDIO_", has_type_id = false)]
- public enum AudioStatus {
- STOPPED, PLAYING, PAUSED
- }// AudioStatus
-
- [CCode (instance_pos = 0.1)]
- public delegate void AudioCallback(uint8[] stream);
-
- [CCode (cname="SDL_AudioSpec", has_type_id = false)]
- public struct AudioSpec {
- public int freq;
- public AudioFormat format;
- public uchar channels;
- public uchar silence;
- public uint16 samples;
- public uint16 padding;
- public uint32 size;
- [CCode (delegate_target_cname = "userdata")]
- public unowned AudioCallback callback;
- }// AudioSpec
-
- [CCode (cname="SDL_AudioCVT")]
- [Compact]
- public class AudioConverter {
- public int needed;
- public AudioFormat src_format;
- public AudioFormat dst_format;
- public double rate_incr;
-
- public uchar* buf;
- public int len;
- public int len_cvt;
- public int len_mult;
- public double len_ratio;
- public int filter_index;
-
- [CCode (cname="SDL_BuildAudioCVT")]
- public static int build(AudioConverter cvt, AudioFormat src_format,
- uchar src_channels, int src_rate, AudioFormat dst_format,
- uchar dst_channels, int dst_rate);
-
- [CCode (cname="SDL_ConvertAudio")]
- public int convert();
- }// AudioConverter
-
- [Compact]
- public class Audio {
- [CCode (cname="SDL_MIX_MAXVOLUME")]
- public const int MIX_MAXVOLUME;
-
- [CCode (cname="SDL_AudioDriverName")]
- public static unowned string driver_name(string namebuf, int maxlen);
-
- [CCode (cname="SDL_OpenAudio")]
- public static int open(AudioSpec desired, out AudioSpec obtained);
-
- [CCode (cname="SDL_GetAudioStatus")]
- public static AudioStatus status();
-
- [CCode (cname="SDL_PauseAudio")]
- public static void pause(int pause_on);
-
- [CCode (cname="SDL_LoadWAV_RW")]
- public static unowned AudioSpec? load(RWops src, int freesrc, ref AudioSpec spec, out uint8[] audio_buf);
-
- [CCode (cname="SDL_FreeWAV")]
- public static void free(uchar* audio_buf);
-
- [CCode (cname="SDL_MixAudio")]
- public static void mix([CCode (array_length = false)] uchar[] dst, [CCode (array_length = false)] uchar[] src, uint32 len, int volume);
-
- [CCode (cname="SDL_LockAudio")]
- public static void do_lock();
-
- [CCode (cname="SDL_UnlockAudio")]
- public static void unlock();
-
- [CCode (cname="SDL_CloseAudio")]
- public static void close();
- }// Audio
-
-
- ///
- /// Threading
- ///
- public delegate int ThreadFunc ();
-
- [CCode (cname="SDL_Thread", ref_function="", unref_function="")]
- [Compact]
- public class Thread {
- [CCode (cname="SDL_ThreadID")]
- public static uint32 id();
-
- [CCode (cname="SDL_CreateThread")]
- public Thread (ThreadFunc f);
-
- [CCode (cname="SDL_WaitThread")]
- public void wait (out int status = null);
- }// Thread
-
- [CCode (cname="SDL_mutex", free_function="SDL_DestroyMutex")]
- [Compact]
- public class Mutex {
- [CCode (cname="SDL_CreateMutex")]
- public Mutex();
-
- [CCode (cname="SDL_mutexP")]
- public int do_lock();
-
- [CCode (cname="SDL_mutexV")]
- public int unlock();
- }// Mutex
-
- [CCode (cname="SDL_sem", free_function="SDL_DestroySemaphore")]
- [Compact]
- public class Semaphore {
- [CCode (cname="SDL_CreateSemaphore")]
- public Semaphore(uint32 initial_value);
-
- [CCode (cname="SDL_SemWait")]
- public int wait();
-
- [CCode (cname="SDL_SemTryWait")]
- public int try_wait();
-
- [CCode (cname="SDL_SemWaitTimeout")]
- public int wait_timeout(uint32 ms);
-
- [CCode (cname="SDL_SemPost")]
- public int post();
-
- [CCode (cname="SDL_SemValue")]
- public uint32 count();
- }// Semaphore
-
- [CCode (cname="SDL_cond", free_function="SDL_DestroyCond")]
- [Compact]
- public class Condition {
- [CCode (cname="SDL_CreateCond")]
- public Condition();
-
- [CCode (cname="SDL_CondSignal")]
- public int @signal();
-
- [CCode (cname="SDL_CondBroadcast")]
- public int broadcast();
-
- [CCode (cname="SDL_CondWait")]
- public int wait(Mutex mut);
-
- [CCode (cname="SDL_CondWaitTimeout")]
- public int wait_timeout(Mutex mut, uint32 ms);
- }// Condition
-
-
- ///
- /// Timers
- ///
- public delegate uint32 TimerCallback (uint32 interval);
-
- [CCode (cname="struct _SDL_TimerID", ref_function="", unref_function="")]
- [Compact]
- public class Timer {
- [CCode (cname="SDL_RemoveTimer")]
- public bool remove ();
-
- [CCode (cname="SDL_GetTicks")]
- public static uint32 get_ticks();
-
- [CCode (cname="SDL_Delay")]
- public static void delay(uint32 ms);
-
- [CCode (cname="SDL_AddTimer")]
- public Timer (uint32 interval, TimerCallback callback);
- }// Timer
-}// SDL