[vala] sdl-image: various nullability and type fixes, add some missing items
- From: Evan Nemerson <evann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] sdl-image: various nullability and type fixes, add some missing items
- Date: Fri, 18 Jun 2010 22:36:21 +0000 (UTC)
commit 12dbb22fde4c14c361c1a08033115c39d4f09401
Author: Aaron Andersen <aaron fosslib net>
Date: Fri Jun 18 15:33:04 2010 -0700
sdl-image: various nullability and type fixes, add some missing items
Fixes bug 619319.
vapi/sdl-image.vapi | 154 +++++++++++++++++++++++++++++++++------------------
1 files changed, 99 insertions(+), 55 deletions(-)
---
diff --git a/vapi/sdl-image.vapi b/vapi/sdl-image.vapi
index a31c119..55a27e0 100644
--- a/vapi/sdl-image.vapi
+++ b/vapi/sdl-image.vapi
@@ -1,84 +1,128 @@
-[CCode (cheader_filename="SDL_image.h")]
+
+[CCode (cheader_filename = "SDL_image.h")]
namespace SDLImage {
- [CCode (cname="IMG_Linked_Version")]
+ //! Defines
+
+ [CCode (cname = "int", cprefix = "IMG_INIT_")]
+ public enum InitFlags {
+ JPG,
+ PNG,
+ TIF
+ }
+
+ //! General
+
+ [CCode (cname = "IMG_Linked_Version")]
public static unowned SDL.Version linked();
- [CCode (cname="IMG_LoadTyped_RW")]
- public static SDL.Surface load_rw_typed(SDL.RWops src, int freesrc=0, string type);
+ [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 = false, 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_Load_RW")]
- public static SDL.Surface load_rw(SDL.RWops src, int freesrc=0);
+ [CCode (cname = "IMG_LoadPCX_RW")]
+ public static SDL.Surface? load_pcx(SDL.RWops src);
- [CCode (cname="IMG_Load")]
- public static SDL.Surface load(string file);
+ [CCode (cname = "IMG_LoadGIF_RW")]
+ public static SDL.Surface? load_gif(SDL.RWops src);
- [CCode (cname="IMG_isBMP")]
- public static int is_bmp(SDL.RWops src);
+ [CCode (cname = "IMG_LoadJPG_RW")]
+ public static SDL.Surface? load_jpg(SDL.RWops src);
- [CCode (cname="IMG_isGIF")]
- public static int is_gif(SDL.RWops src);
+ [CCode (cname = "IMG_LoadTIF_RW")]
+ public static SDL.Surface? load_tif(SDL.RWops src);
- [CCode (cname="IMG_isJPG")]
- public static int is_jpg(SDL.RWops src);
+ [CCode (cname = "IMG_LoadPNG_RW")]
+ public static SDL.Surface? load_png(SDL.RWops src);
- [CCode (cname="IMG_isLBM")]
- public static int is_lbm(SDL.RWops src);
+ [CCode (cname = "IMG_LoadTGA_RW")]
+ public static SDL.Surface? load_tga(SDL.RWops src);
- [CCode (cname="IMG_isPCX")]
- public static int is_pcx(SDL.RWops src);
+ [CCode (cname = "IMG_LoadLBM_RW")]
+ public static SDL.Surface? load_lbm(SDL.RWops src);
- [CCode (cname="IMG_isPNG")]
- public static int is_png(SDL.RWops src);
+ [CCode (cname = "IMG_LoadXV_RW")]
+ public static SDL.Surface? load_xv(SDL.RWops src);
- [CCode (cname="IMG_isPNM")]
- public static int is_pnm(SDL.RWops src);
+ [CCode (cname = "IMG_ReadXPMFromArray")]
+ public static SDL.Surface? read_xpm(char** xpmdata);
- [CCode (cname="IMG_isTIF")]
- public static int is_tif(SDL.RWops src);
+ //!Info
- [CCode (cname="IMG_isXCF")]
- public static int is_xcf(SDL.RWops src);
+ [CCode (cname = "IMG_isCUR")]
+ public static bool is_cur(SDL.RWops src);
- [CCode (cname="IMG_isXPM")]
- public static int is_xpm(SDL.RWops src);
+ [CCode (cname = "IMG_isICO")]
+ public static bool is_ico(SDL.RWops src);
- [CCode (cname="IMG_isXV")]
- public static int is_xv(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_LoadBMP_RW")]
- public static SDL.Surface load_bmp(SDL.RWops src);
+ [CCode (cname = "IMG_isXPM")]
+ public static bool is_xpm(SDL.RWops src);
- [CCode (cname="IMG_LoadGIF_RW")]
- public static SDL.Surface load_gif(SDL.RWops src);
+ [CCode (cname = "IMG_isXCF")]
+ public static bool is_xcf(SDL.RWops src);
- [CCode (cname="IMG_LoadJPG_RW")]
- public static SDL.Surface load_jpg(SDL.RWops src);
+ [CCode (cname = "IMG_isPCX")]
+ public static bool is_pcx(SDL.RWops src);
- [CCode (cname="IMG_LoadLBM_RW")]
- public static SDL.Surface load_lbm(SDL.RWops src);
+ [CCode (cname = "IMG_isGIF")]
+ public static bool is_gif(SDL.RWops src);
- [CCode (cname="IMG_LoadPCX_RW")]
- public static SDL.Surface load_pcx(SDL.RWops src);
+ [CCode (cname = "IMG_isJPG")]
+ public static bool is_jpg(SDL.RWops src);
- [CCode (cname="IMG_LoadPNG_RW")]
- public static SDL.Surface load_png(SDL.RWops src);
+ [CCode (cname = "IMG_isTIF")]
+ public static bool is_tif(SDL.RWops src);
- [CCode (cname="IMG_LoadPNM_RW")]
- public static SDL.Surface load_pnm(SDL.RWops src);
+ [CCode (cname = "IMG_isPNG")]
+ public static bool is_png(SDL.RWops src);
- [CCode (cname="IMG_LoadTIF_RW")]
- public static SDL.Surface load_tif(SDL.RWops src);
+ [CCode (cname = "IMG_isLBM")]
+ public static bool is_lbm(SDL.RWops src);
- [CCode (cname="IMG_LoadXCF_RW")]
- public static SDL.Surface load_xcf(SDL.RWops src);
+ [CCode (cname = "IMG_isXV")]
+ public static bool is_xv(SDL.RWops src);
- [CCode (cname="IMG_LoadXPM_RW")]
- public static SDL.Surface load_xpm(SDL.RWops src);
+ //! Errors
- [CCode (cname="IMG_ReadXPMFromArray")]
- public static SDL.Surface read_xpm(char** xpmdata);
+ [CCode (cname="IMG_SetError")]
+ public static void set_error(string format, ...);
- [CCode (cname="IMG_LoadXV_RW")]
- public static SDL.Surface load_xv(SDL.RWops src);
-}// SDLImage
+ [CCode (cname="IMG_GetError")]
+ public static unowned string get_error();
+} // SDLImage
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]