update for use with non-null types, patch by Levi Bard, fixes bug 528097
authorJuerg Billeter <j@bitron.ch>
Mon, 14 Apr 2008 20:35:59 +0000 (20:35 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Mon, 14 Apr 2008 20:35:59 +0000 (20:35 +0000)
2008-04-14  Juerg 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

svn path=/trunk/; revision=1232

ChangeLog
vapi/sdl-mixer.vapi
vapi/sdl-ttf.vapi
vapi/sdl.vapi

index cd462e9..13f8ee0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 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
 
index 0f17bcc..a966b0b 100644 (file)
@@ -62,7 +62,7 @@ namespace SDLMixer {
                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);
@@ -119,7 +119,7 @@ namespace SDLMixer {
        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);
@@ -138,7 +138,7 @@ namespace SDLMixer {
                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);
@@ -186,7 +186,7 @@ namespace SDLMixer {
                public int is_playing();
 
                [CCode (cname="Mix_GetChunk")]
-               public Chunk get_chunk();
+               public Chunk? get_chunk();
        }// Channel
 
        [CCode (cname="int")]
index fb6019a..e6ee15d 100644 (file)
@@ -82,33 +82,33 @@ namespace SDLTTF {
                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
index 8053d12..92d7636 100644 (file)
@@ -69,22 +69,22 @@ namespace SDL {
 
        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_")]
@@ -150,19 +150,19 @@ namespace 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")]
@@ -171,7 +171,7 @@ namespace SDL {
                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);
@@ -359,7 +359,7 @@ namespace SDL {
 
                [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();