2008-04-14 Jürg Billeter <j@bitron.ch>
+ * vapi/sdl-mixer.vapi, vapi/sdl-ttf.vapi, vapi/sdl.vapi: update for
+ use with non-null types, patch by Levi Bard, fixes bug 528097
+
+2008-04-14 Jürg Billeter <j@bitron.ch>
+
* vala/valaparser.vala, vala/valapointertype.vala,
vala/valasymbolresolver.vala: mark pointers as nullable
public static pointer get_hook_data();
[CCode (cname="Mix_HookMusic")]
- public static void hook_mixer(MixFunction f, pointer arg);
+ public static void hook_mixer(MixFunction? f, pointer arg);
[CCode (cname="Mix_HookMusicFinished")]
public static void hook_finished(MusicFinishedCallback cb);
public class Effect {
[CCode (cname="Mix_RegisterEffect")]
public static int register(int chan, EffectCallback f,
- EffectDoneCallback d, pointer arg);
+ EffectDoneCallback? d, pointer arg);
[CCode (cname="Mix_UnregisterEffect")]
public static int unregister(int chan, EffectCallback f);
public static int reserve(int num_channels);
[CCode (cname="Mix_ChannelFinished")]
- public static void hook_finished(ChannelFinishedCallback cb);
+ public static void hook_finished(ChannelFinishedCallback? cb);
[CCode (cname="Mix_SetPanning")]
public int pan(uchar left, uchar right);
public int is_playing();
[CCode (cname="Mix_GetChunk")]
- public Chunk get_chunk();
+ public Chunk? get_chunk();
}// Channel
[CCode (cname="int")]
public int size_unicode(uint16[] text, ref int w, ref int h);
[CCode (cname="TTF_RenderText_Solid")]
- public Surface render(string text, Color fg);
+ public Surface? render(string text, Color fg);
[CCode (cname="TTF_RenderUTF8_Solid")]
- public Surface render_utf8(string text, Color fg);
+ public Surface? render_utf8(string text, Color fg);
[CCode (cname="TTF_RenderUNICODE_Solid")]
[NoArrayLength]
- public Surface render_unicode(uint16[] text, Color fg);
+ public Surface? render_unicode(uint16[] text, Color fg);
[CCode (cname="TTF_RenderText_Shaded")]
- public Surface render_shaded(string text, Color fg, Color bg);
+ public Surface? render_shaded(string text, Color fg, Color bg);
[CCode (cname="TTF_RenderUTF8_Shaded")]
- public Surface render_shaded_utf8(string text, Color fg, Color bg);
+ public Surface? render_shaded_utf8(string text, Color fg, Color bg);
[CCode (cname="TTF_RenderUNICODE_Shaded")]
[NoArrayLength]
- public Surface render_shaded_unicode(uint16[] text, Color fg, Color bg);
+ public Surface? render_shaded_unicode(uint16[] text, Color fg, Color bg);
[CCode (cname="TTF_RenderText_Blended")]
- public Surface render_blended(string text, Color fg);
+ public Surface? render_blended(string text, Color fg);
[CCode (cname="TTF_RenderUTF8_Blended")]
- public Surface render_blended_utf8(string text, Color fg);
+ public Surface? render_blended_utf8(string text, Color fg);
[CCode (cname="TTF_RenderUNICODE_Blended")]
[NoArrayLength]
- public Surface render_blended_unicode(uint16[] text, Color fg);
+ public Surface? render_blended_unicode(uint16[] text, Color fg);
}// Font
}// SDLTTF
public class Video {
[CCode (cname="SDL_VideoDriverName")]
- public static weak string driver_name(string namebuf, int maxlen);
+ public static weak 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")]
[NoArrayLength]
- public static int set_gamma_ramp(weak uint16[] red, weak uint16[] green, weak uint16[] blue);
+ public static int set_gamma_ramp(weak uint16[]? red, weak uint16[]? green, weak uint16[]? blue);
[CCode (cname="SDL_GetGammaRamp")]
[NoArrayLength]
- public static int get_gamma_ramp(ref uint16[] red, ref uint16[] green, ref uint16[] blue);
+ public static int get_gamma_ramp(ref uint16[]? red, ref uint16[]? green, ref uint16[]? blue);
[CCode (cname="SDL_ListModes")]
[NoArrayLength]
- public static pointer list_modes(PixelFormat format, uint32 flags);
+ public static pointer list_modes(PixelFormat? format, uint32 flags);
}// Video
[CCode (cprefix="SDL_")]
public int set_alpha(uint32 flag, uchar alpha);
[CCode (cname="SDL_SetClipRect")]
- public bool set_cliprect(Rect rect);
+ public bool set_cliprect(Rect? rect);
[CCode (cname="SDL_GetClipRect")]
public void get_cliprect(Rect rect);
[CCode (cname="SDL_ConvertSurface")]
- public Surface convert(PixelFormat fmt, uint32 flags);
+ public Surface? convert(PixelFormat? fmt, uint32 flags);
[CCode (cname="SDL_UpperBlit")]
- public int blit(Rect srcrect, Surface dst, Rect dstrect);
+ public int blit(Rect? srcrect, Surface dst, Rect? dstrect);
[CCode (cname="SDL_FillRect")]
- public int fill(Rect dst, uint32 color);
+ public int fill(Rect? dst, uint32 color);
}// Surface
[CCode (cname="SDL_Surface")]
public static weak Screen instance();
[CCode (cname="SDL_SetVideoMode")]
- public static weak Screen set_video_mode(int width, int height, int bpp, uint32 flags);
+ public static weak 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);
[CCode (cname="SDL_WM_SetIcon")]
[NoArrayLength]
- public static void set_icon(Surface icon, uchar[] mask);
+ public static void set_icon(Surface icon, uchar[]? mask);
[CCode (cname="SDL_WM_IconifyWindow")]
public static int iconify();