/*
** Lua binding: rsvg
** Generated automatically by tolua++-1.0.92.
*/

#ifndef __cplusplus
#include "stdlib.h"
#endif
#include "string.h"

#include "tolua++.h"

/* Exported function */
TOLUA_API int  tolua_rsvg_open (lua_State* tolua_S);

#include <glib.h>
#include <librsvg/rsvg.h>
#include "librsvg-helper.h"

/* function to release collected object via destructor */
#ifdef __cplusplus

static int tolua_collect_gboolean (lua_State* tolua_S)
{
 gboolean* self = (gboolean*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}
#endif


/* function to register type */
static void tolua_reg_types (lua_State* tolua_S)
{
 tolua_usertype(tolua_S,"guint8");
 tolua_usertype(tolua_S,"gsize");
 tolua_usertype(tolua_S,"gpointer");
 tolua_usertype(tolua_S,"gdouble");
 tolua_usertype(tolua_S,"gchar");
 tolua_usertype(tolua_S,"gboolean");
 tolua_usertype(tolua_S,"cairo_t");
 tolua_usertype(tolua_S,"_RsvgHandle");
 tolua_usertype(tolua_S,"RsvgRectangle");
 tolua_usertype(tolua_S,"RsvgHandleFlags");
 tolua_usertype(tolua_S,"RsvgDimensionData");
 tolua_usertype(tolua_S,"GInputStream");
 tolua_usertype(tolua_S,"GFile");
 tolua_usertype(tolua_S,"GError");
 tolua_usertype(tolua_S,"GCancellable");
}

/* get function: width of class  RsvgDimensionData */
#ifndef TOLUA_DISABLE_tolua_get_RsvgDimensionData_width
static int tolua_get_RsvgDimensionData_width(lua_State* tolua_S)
{
  RsvgDimensionData* self = (RsvgDimensionData*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'width'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->width);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: width of class  RsvgDimensionData */
#ifndef TOLUA_DISABLE_tolua_set_RsvgDimensionData_width
static int tolua_set_RsvgDimensionData_width(lua_State* tolua_S)
{
  RsvgDimensionData* self = (RsvgDimensionData*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'width'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->width = ((int)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: height of class  RsvgDimensionData */
#ifndef TOLUA_DISABLE_tolua_get_RsvgDimensionData_height
static int tolua_get_RsvgDimensionData_height(lua_State* tolua_S)
{
  RsvgDimensionData* self = (RsvgDimensionData*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'height'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->height);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: height of class  RsvgDimensionData */
#ifndef TOLUA_DISABLE_tolua_set_RsvgDimensionData_height
static int tolua_set_RsvgDimensionData_height(lua_State* tolua_S)
{
  RsvgDimensionData* self = (RsvgDimensionData*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'height'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->height = ((int)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: em of class  RsvgDimensionData */
#ifndef TOLUA_DISABLE_tolua_get_RsvgDimensionData_em
static int tolua_get_RsvgDimensionData_em(lua_State* tolua_S)
{
  RsvgDimensionData* self = (RsvgDimensionData*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'em'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->em);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: em of class  RsvgDimensionData */
#ifndef TOLUA_DISABLE_tolua_set_RsvgDimensionData_em
static int tolua_set_RsvgDimensionData_em(lua_State* tolua_S)
{
  RsvgDimensionData* self = (RsvgDimensionData*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'em'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->em = ((double)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: ex of class  RsvgDimensionData */
#ifndef TOLUA_DISABLE_tolua_get_RsvgDimensionData_ex
static int tolua_get_RsvgDimensionData_ex(lua_State* tolua_S)
{
  RsvgDimensionData* self = (RsvgDimensionData*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ex'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->ex);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: ex of class  RsvgDimensionData */
#ifndef TOLUA_DISABLE_tolua_set_RsvgDimensionData_ex
static int tolua_set_RsvgDimensionData_ex(lua_State* tolua_S)
{
  RsvgDimensionData* self = (RsvgDimensionData*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ex'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->ex = ((double)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* method: rsvg_dimension_data_create of class  RsvgDimensionData */
#ifndef TOLUA_DISABLE_tolua_rsvg_RsvgDimensionData_create00
static int tolua_rsvg_RsvgDimensionData_create00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"RsvgDimensionData",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   tolua_outside RsvgDimensionData* tolua_ret = (tolua_outside RsvgDimensionData*)  rsvg_dimension_data_create();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"RsvgDimensionData");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'create'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: rsvg_dimension_data_destroy of class  RsvgDimensionData */
#ifndef TOLUA_DISABLE_tolua_rsvg_RsvgDimensionData_destroy00
static int tolua_rsvg_RsvgDimensionData_destroy00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"RsvgDimensionData",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"RsvgDimensionData",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  RsvgDimensionData* tolua_var_1 = ((RsvgDimensionData*)  tolua_tousertype(tolua_S,2,0));
  {
   rsvg_dimension_data_destroy(tolua_var_1);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'destroy'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: rsvg_dimension_data_get of class  RsvgDimensionData */
#ifndef TOLUA_DISABLE_tolua_rsvg_RsvgDimensionData_get00
static int tolua_rsvg_RsvgDimensionData_get00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"RsvgDimensionData",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,6,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  RsvgDimensionData* self = (RsvgDimensionData*)  tolua_tousertype(tolua_S,1,0);
  int width = ((int)  tolua_tonumber(tolua_S,2,0));
  int height = ((int)  tolua_tonumber(tolua_S,3,0));
  double em = ((double)  tolua_tonumber(tolua_S,4,0));
  double ex = ((double)  tolua_tonumber(tolua_S,5,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'rsvg_dimension_data_get'", NULL);
#endif
  {
   rsvg_dimension_data_get(self,&width,&height,&em,&ex);
   tolua_pushnumber(tolua_S,(lua_Number)width);
   tolua_pushnumber(tolua_S,(lua_Number)height);
   tolua_pushnumber(tolua_S,(lua_Number)em);
   tolua_pushnumber(tolua_S,(lua_Number)ex);
  }
 }
 return 4;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'get'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: rsvg_dimension_data_set of class  RsvgDimensionData */
#ifndef TOLUA_DISABLE_tolua_rsvg_RsvgDimensionData_get01
static int tolua_rsvg_RsvgDimensionData_get01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"RsvgDimensionData",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,6,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  RsvgDimensionData* self = (RsvgDimensionData*)  tolua_tousertype(tolua_S,1,0);
  int width = ((int)  tolua_tonumber(tolua_S,2,0));
  int height = ((int)  tolua_tonumber(tolua_S,3,0));
  double em = ((double)  tolua_tonumber(tolua_S,4,0));
  double ex = ((double)  tolua_tonumber(tolua_S,5,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'rsvg_dimension_data_set'", NULL);
#endif
  {
   rsvg_dimension_data_set(self,width,height,em,ex);
  }
 }
 return 0;
tolua_lerror:
 return tolua_rsvg_RsvgDimensionData_get00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* get function: x of class  RsvgRectangle */
#ifndef TOLUA_DISABLE_tolua_get_RsvgRectangle_x
static int tolua_get_RsvgRectangle_x(lua_State* tolua_S)
{
  RsvgRectangle* self = (RsvgRectangle*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->x);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: x of class  RsvgRectangle */
#ifndef TOLUA_DISABLE_tolua_set_RsvgRectangle_x
static int tolua_set_RsvgRectangle_x(lua_State* tolua_S)
{
  RsvgRectangle* self = (RsvgRectangle*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->x = ((double)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: y of class  RsvgRectangle */
#ifndef TOLUA_DISABLE_tolua_get_RsvgRectangle_y
static int tolua_get_RsvgRectangle_y(lua_State* tolua_S)
{
  RsvgRectangle* self = (RsvgRectangle*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->y);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: y of class  RsvgRectangle */
#ifndef TOLUA_DISABLE_tolua_set_RsvgRectangle_y
static int tolua_set_RsvgRectangle_y(lua_State* tolua_S)
{
  RsvgRectangle* self = (RsvgRectangle*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->y = ((double)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: width of class  RsvgRectangle */
#ifndef TOLUA_DISABLE_tolua_get_RsvgRectangle_width
static int tolua_get_RsvgRectangle_width(lua_State* tolua_S)
{
  RsvgRectangle* self = (RsvgRectangle*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'width'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->width);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: width of class  RsvgRectangle */
#ifndef TOLUA_DISABLE_tolua_set_RsvgRectangle_width
static int tolua_set_RsvgRectangle_width(lua_State* tolua_S)
{
  RsvgRectangle* self = (RsvgRectangle*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'width'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->width = ((double)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: height of class  RsvgRectangle */
#ifndef TOLUA_DISABLE_tolua_get_RsvgRectangle_height
static int tolua_get_RsvgRectangle_height(lua_State* tolua_S)
{
  RsvgRectangle* self = (RsvgRectangle*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'height'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->height);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: height of class  RsvgRectangle */
#ifndef TOLUA_DISABLE_tolua_set_RsvgRectangle_height
static int tolua_set_RsvgRectangle_height(lua_State* tolua_S)
{
  RsvgRectangle* self = (RsvgRectangle*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'height'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->height = ((double)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* method: rsvg_rectangle_create of class  RsvgRectangle */
#ifndef TOLUA_DISABLE_tolua_rsvg_RsvgRectangle_create00
static int tolua_rsvg_RsvgRectangle_create00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"RsvgRectangle",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   tolua_outside RsvgRectangle* tolua_ret = (tolua_outside RsvgRectangle*)  rsvg_rectangle_create();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"RsvgRectangle");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'create'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: rsvg_rectangle_destroy of class  RsvgRectangle */
#ifndef TOLUA_DISABLE_tolua_rsvg_RsvgRectangle_destroy00
static int tolua_rsvg_RsvgRectangle_destroy00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"RsvgRectangle",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"RsvgRectangle",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  RsvgRectangle* pointer = ((RsvgRectangle*)  tolua_tousertype(tolua_S,2,0));
  {
   rsvg_rectangle_destroy(pointer);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'destroy'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: rsvg_rectangle_set of class  RsvgRectangle */
#ifndef TOLUA_DISABLE_tolua_rsvg_RsvgRectangle_set00
static int tolua_rsvg_RsvgRectangle_set00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"RsvgRectangle",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,6,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  RsvgRectangle* self = (RsvgRectangle*)  tolua_tousertype(tolua_S,1,0);
  double x = ((double)  tolua_tonumber(tolua_S,2,0));
  double y = ((double)  tolua_tonumber(tolua_S,3,0));
  double width = ((double)  tolua_tonumber(tolua_S,4,0));
  double height = ((double)  tolua_tonumber(tolua_S,5,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'rsvg_rectangle_set'", NULL);
#endif
  {
   rsvg_rectangle_set(self,x,y,width,height);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'set'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: rsvg_rectangle_get of class  RsvgRectangle */
#ifndef TOLUA_DISABLE_tolua_rsvg_RsvgRectangle_get00
static int tolua_rsvg_RsvgRectangle_get00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"RsvgRectangle",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,6,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  RsvgRectangle* self = (RsvgRectangle*)  tolua_tousertype(tolua_S,1,0);
  double x = ((double)  tolua_tonumber(tolua_S,2,0));
  double y = ((double)  tolua_tonumber(tolua_S,3,0));
  double width = ((double)  tolua_tonumber(tolua_S,4,0));
  double height = ((double)  tolua_tonumber(tolua_S,5,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'rsvg_rectangle_get'", NULL);
#endif
  {
   rsvg_rectangle_get(self,&x,&y,&width,&height);
   tolua_pushnumber(tolua_S,(lua_Number)x);
   tolua_pushnumber(tolua_S,(lua_Number)y);
   tolua_pushnumber(tolua_S,(lua_Number)width);
   tolua_pushnumber(tolua_S,(lua_Number)height);
  }
 }
 return 4;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'get'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_get_base_uri */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_get_base_uri00
static int tolua_rsvg_rsvg_handle_get_base_uri00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"_RsvgHandle",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  struct _RsvgHandle* handle = (( struct _RsvgHandle*)  tolua_tousertype(tolua_S,1,0));
  {
   const char* tolua_ret = (const char*)  rsvg_handle_get_base_uri(handle);
   tolua_pushstring(tolua_S,(const char*)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_handle_get_base_uri'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_set_base_uri */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_set_base_uri00
static int tolua_rsvg_rsvg_handle_set_base_uri00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"_RsvgHandle",0,&tolua_err) ||
     !tolua_isstring(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  struct _RsvgHandle* handle = (( struct _RsvgHandle*)  tolua_tousertype(tolua_S,1,0));
  const char* base_uri = ((const char*)  tolua_tostring(tolua_S,2,0));
  {
   rsvg_handle_set_base_uri(handle,base_uri);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_handle_set_base_uri'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_get_intrinsic_size_in_pixels */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_get_intrinsic_size_in_pixels00
static int tolua_rsvg_rsvg_handle_get_intrinsic_size_in_pixels00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"_RsvgHandle",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"gdouble",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,3,"gdouble",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  struct _RsvgHandle* handle = (( struct _RsvgHandle*)  tolua_tousertype(tolua_S,1,0));
  gdouble* out_width = ((gdouble*)  tolua_tousertype(tolua_S,2,0));
  gdouble* out_height = ((gdouble*)  tolua_tousertype(tolua_S,3,0));
  {
   gboolean tolua_ret = (gboolean)  rsvg_handle_get_intrinsic_size_in_pixels(handle,out_width,out_height);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((gboolean)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"gboolean");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(gboolean));
     tolua_pushusertype(tolua_S,tolua_obj,"gboolean");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_handle_get_intrinsic_size_in_pixels'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_get_geometry_for_layer */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_get_geometry_for_layer00
static int tolua_rsvg_rsvg_handle_get_geometry_for_layer00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"_RsvgHandle",0,&tolua_err) ||
     !tolua_isstring(tolua_S,2,0,&tolua_err) ||
     !tolua_isusertype(tolua_S,3,"const RsvgRectangle",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,4,"RsvgRectangle",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,5,"RsvgRectangle",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,6,"GError",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,7,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  struct _RsvgHandle* handle = (( struct _RsvgHandle*)  tolua_tousertype(tolua_S,1,0));
  const char* id = ((const char*)  tolua_tostring(tolua_S,2,0));
  const RsvgRectangle* viewport = ((const RsvgRectangle*)  tolua_tousertype(tolua_S,3,0));
  RsvgRectangle* out_ink_rect = ((RsvgRectangle*)  tolua_tousertype(tolua_S,4,0));
  RsvgRectangle* out_logical_rect = ((RsvgRectangle*)  tolua_tousertype(tolua_S,5,0));
  GError* error = ((GError*)  tolua_tousertype(tolua_S,6,0));
  {
   gboolean tolua_ret = (gboolean)  rsvg_handle_get_geometry_for_layer(handle,id,viewport,out_ink_rect,out_logical_rect,&error);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((gboolean)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"gboolean");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(gboolean));
     tolua_pushusertype(tolua_S,tolua_obj,"gboolean");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
    tolua_pushusertype(tolua_S,(void*)error,"GError");
  }
 }
 return 2;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_handle_get_geometry_for_layer'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_has_sub */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_has_sub00
static int tolua_rsvg_rsvg_handle_has_sub00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"_RsvgHandle",0,&tolua_err) ||
     !tolua_isstring(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  struct _RsvgHandle* handle = (( struct _RsvgHandle*)  tolua_tousertype(tolua_S,1,0));
  const char* id = ((const char*)  tolua_tostring(tolua_S,2,0));
  {
   int tolua_ret = (int)  rsvg_handle_has_sub(handle,id);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_handle_has_sub'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_new_with_flags */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_new_with_flags00
static int tolua_rsvg_rsvg_handle_new_with_flags00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"RsvgHandleFlags",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  RsvgHandleFlags flags = *((RsvgHandleFlags*)  tolua_tousertype(tolua_S,1,0));
  {
   struct _RsvgHandle* tolua_ret = ( struct _RsvgHandle*)  rsvg_handle_new_with_flags(flags);
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"_RsvgHandle");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_handle_new_with_flags'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_new_from_data */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_new_from_data00
static int tolua_rsvg_rsvg_handle_new_from_data00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isusertype(tolua_S,3,"GError",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  unsigned const char* data = ((unsigned const char*)  tolua_tostring(tolua_S,1,0));
  unsigned long data_len = ((unsigned long)  tolua_tonumber(tolua_S,2,0));
  GError* error = ((GError*)  tolua_tousertype(tolua_S,3,0));
  {
   struct _RsvgHandle* tolua_ret = ( struct _RsvgHandle*)  rsvg_handle_new_from_data(data,data_len,&error);
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"_RsvgHandle");
    tolua_pushusertype(tolua_S,(void*)error,"GError");
  }
 }
 return 2;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_handle_new_from_data'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_new_from_file */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_new_from_file00
static int tolua_rsvg_rsvg_handle_new_from_file00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"GError",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const char* file_name = ((const char*)  tolua_tostring(tolua_S,1,0));
  GError* error = ((GError*)  tolua_tousertype(tolua_S,2,0));
  {
   struct _RsvgHandle* tolua_ret = ( struct _RsvgHandle*)  rsvg_handle_new_from_file(file_name,&error);
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"_RsvgHandle");
    tolua_pushusertype(tolua_S,(void*)error,"GError");
  }
 }
 return 2;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_handle_new_from_file'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_render_document */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_render_document00
static int tolua_rsvg_rsvg_handle_render_document00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"_RsvgHandle",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"cairo_t",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,3,"const RsvgRectangle",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,4,"GError",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,5,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  struct _RsvgHandle* handle = (( struct _RsvgHandle*)  tolua_tousertype(tolua_S,1,0));
  cairo_t* cr = ((cairo_t*)  tolua_tousertype(tolua_S,2,0));
  const RsvgRectangle* viewport = ((const RsvgRectangle*)  tolua_tousertype(tolua_S,3,0));
  GError* error = ((GError*)  tolua_tousertype(tolua_S,4,0));
  {
   gboolean tolua_ret = (gboolean)  rsvg_handle_render_document(handle,cr,viewport,&error);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((gboolean)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"gboolean");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(gboolean));
     tolua_pushusertype(tolua_S,tolua_obj,"gboolean");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
    tolua_pushusertype(tolua_S,(void*)error,"GError");
  }
 }
 return 2;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_handle_render_document'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_render_layer */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_render_layer00
static int tolua_rsvg_rsvg_handle_render_layer00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"_RsvgHandle",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"cairo_t",0,&tolua_err) ||
     !tolua_isstring(tolua_S,3,0,&tolua_err) ||
     !tolua_isusertype(tolua_S,4,"const RsvgRectangle",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,5,"GError",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,6,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  struct _RsvgHandle* handle = (( struct _RsvgHandle*)  tolua_tousertype(tolua_S,1,0));
  cairo_t* cr = ((cairo_t*)  tolua_tousertype(tolua_S,2,0));
  const char* id = ((const char*)  tolua_tostring(tolua_S,3,0));
  const RsvgRectangle* viewport = ((const RsvgRectangle*)  tolua_tousertype(tolua_S,4,0));
  GError* error = ((GError*)  tolua_tousertype(tolua_S,5,0));
  {
   gboolean tolua_ret = (gboolean)  rsvg_handle_render_layer(handle,cr,id,viewport,&error);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((gboolean)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"gboolean");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(gboolean));
     tolua_pushusertype(tolua_S,tolua_obj,"gboolean");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
    tolua_pushusertype(tolua_S,(void*)error,"GError");
  }
 }
 return 2;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_handle_render_layer'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: g_object_unref */
#ifndef TOLUA_DISABLE_tolua_rsvg_g_object_unref00
static int tolua_rsvg_g_object_unref00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"gpointer",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  gpointer object = *((gpointer*)  tolua_tousertype(tolua_S,1,0));
  {
   g_object_unref(object);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'g_object_unref'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_create_handle_from_file */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_create_handle_from_file00
static int tolua_rsvg_rsvg_create_handle_from_file00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isstring(tolua_S,1,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const char* tolua_var_2 = ((const char*)  tolua_tostring(tolua_S,1,0));
  {
   struct _RsvgHandle* tolua_ret = ( struct _RsvgHandle*)  rsvg_create_handle_from_file(tolua_var_2);
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"_RsvgHandle");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_create_handle_from_file'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_destroy_handle */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_destroy_handle00
static int tolua_rsvg_rsvg_destroy_handle00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"_RsvgHandle",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  struct _RsvgHandle* tolua_var_3 = (( struct _RsvgHandle*)  tolua_tousertype(tolua_S,1,0));
  {
   int tolua_ret = (int)  rsvg_destroy_handle(tolua_var_3);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_destroy_handle'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_new_with_flags */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_new_with_flags01
static int tolua_rsvg_rsvg_handle_new_with_flags01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"RsvgHandleFlags",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  RsvgHandleFlags flags = *((RsvgHandleFlags*)  tolua_tousertype(tolua_S,1,0));
  {
   struct _RsvgHandle* tolua_ret = ( struct _RsvgHandle*)  rsvg_handle_new_with_flags(flags);
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"_RsvgHandle");
  }
 }
 return 1;
tolua_lerror:
 return tolua_rsvg_rsvg_handle_new_with_flags00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_set_base_gfile */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_set_base_gfile00
static int tolua_rsvg_rsvg_handle_set_base_gfile00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"_RsvgHandle",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"GFile",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  struct _RsvgHandle* handle = (( struct _RsvgHandle*)  tolua_tousertype(tolua_S,1,0));
  GFile* base_file = ((GFile*)  tolua_tousertype(tolua_S,2,0));
  {
   rsvg_handle_set_base_gfile(handle,base_file);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_handle_set_base_gfile'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_read_stream_sync */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_read_stream_sync00
static int tolua_rsvg_rsvg_handle_read_stream_sync00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"_RsvgHandle",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"GInputStream",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,3,"GCancellable",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,4,"GError",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,5,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  struct _RsvgHandle* handle = (( struct _RsvgHandle*)  tolua_tousertype(tolua_S,1,0));
  GInputStream* stream = ((GInputStream*)  tolua_tousertype(tolua_S,2,0));
  GCancellable* cancellable = ((GCancellable*)  tolua_tousertype(tolua_S,3,0));
  GError* error = ((GError*)  tolua_tousertype(tolua_S,4,0));
  {
   gboolean tolua_ret = (gboolean)  rsvg_handle_read_stream_sync(handle,stream,cancellable,&error);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((gboolean)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"gboolean");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(gboolean));
     tolua_pushusertype(tolua_S,tolua_obj,"gboolean");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
    tolua_pushusertype(tolua_S,(void*)error,"GError");
  }
 }
 return 2;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_handle_read_stream_sync'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_new_from_gfile_sync */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_new_from_gfile_sync00
static int tolua_rsvg_rsvg_handle_new_from_gfile_sync00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"GFile",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"RsvgHandleFlags",0,&tolua_err)) ||
     !tolua_isusertype(tolua_S,3,"GCancellable",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,4,"GError",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,5,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  GFile* file = ((GFile*)  tolua_tousertype(tolua_S,1,0));
  RsvgHandleFlags flags = *((RsvgHandleFlags*)  tolua_tousertype(tolua_S,2,0));
  GCancellable* cancellable = ((GCancellable*)  tolua_tousertype(tolua_S,3,0));
  GError* error = ((GError*)  tolua_tousertype(tolua_S,4,0));
  {
   struct _RsvgHandle* tolua_ret = ( struct _RsvgHandle*)  rsvg_handle_new_from_gfile_sync(file,flags,cancellable,&error);
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"_RsvgHandle");
    tolua_pushusertype(tolua_S,(void*)error,"GError");
  }
 }
 return 2;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_handle_new_from_gfile_sync'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_new_from_stream_sync */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_new_from_stream_sync00
static int tolua_rsvg_rsvg_handle_new_from_stream_sync00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"GInputStream",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"GFile",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"RsvgHandleFlags",0,&tolua_err)) ||
     !tolua_isusertype(tolua_S,4,"GCancellable",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,5,"GError",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,6,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  GInputStream* input_stream = ((GInputStream*)  tolua_tousertype(tolua_S,1,0));
  GFile* base_file = ((GFile*)  tolua_tousertype(tolua_S,2,0));
  RsvgHandleFlags flags = *((RsvgHandleFlags*)  tolua_tousertype(tolua_S,3,0));
  GCancellable* cancellable = ((GCancellable*)  tolua_tousertype(tolua_S,4,0));
  GError* error = ((GError*)  tolua_tousertype(tolua_S,5,0));
  {
   struct _RsvgHandle* tolua_ret = ( struct _RsvgHandle*)  rsvg_handle_new_from_stream_sync(input_stream,base_file,flags,cancellable,&error);
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"_RsvgHandle");
    tolua_pushusertype(tolua_S,(void*)error,"GError");
  }
 }
 return 2;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'rsvg_handle_new_from_stream_sync'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_new_from_data */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_new_from_data01
static int tolua_rsvg_rsvg_handle_new_from_data01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const guint8",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"gsize",0,&tolua_err)) ||
     !tolua_isusertype(tolua_S,3,"GError",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const guint8* data = ((const guint8*)  tolua_tousertype(tolua_S,1,0));
  gsize data_len = *((gsize*)  tolua_tousertype(tolua_S,2,0));
  GError* error = ((GError*)  tolua_tousertype(tolua_S,3,0));
  {
   struct _RsvgHandle* tolua_ret = ( struct _RsvgHandle*)  rsvg_handle_new_from_data(data,data_len,&error);
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"_RsvgHandle");
    tolua_pushusertype(tolua_S,(void*)error,"GError");
  }
 }
 return 2;
tolua_lerror:
 return tolua_rsvg_rsvg_handle_new_from_data00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* function: rsvg_handle_new_from_file */
#ifndef TOLUA_DISABLE_tolua_rsvg_rsvg_handle_new_from_file01
static int tolua_rsvg_rsvg_handle_new_from_file01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const gchar",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"GError",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const gchar* filename = ((const gchar*)  tolua_tousertype(tolua_S,1,0));
  GError* error = ((GError*)  tolua_tousertype(tolua_S,2,0));
  {
   struct _RsvgHandle* tolua_ret = ( struct _RsvgHandle*)  rsvg_handle_new_from_file(filename,&error);
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"_RsvgHandle");
    tolua_pushusertype(tolua_S,(void*)error,"GError");
  }
 }
 return 2;
tolua_lerror:
 return tolua_rsvg_rsvg_handle_new_from_file00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* Open function */
TOLUA_API int tolua_rsvg_open (lua_State* tolua_S)
{
 tolua_open(tolua_S);
 tolua_reg_types(tolua_S);
 tolua_module(tolua_S,NULL,0);
 tolua_beginmodule(tolua_S,NULL);
  tolua_cclass(tolua_S,"RsvgDimensionData","RsvgDimensionData","",NULL);
  tolua_beginmodule(tolua_S,"RsvgDimensionData");
   tolua_variable(tolua_S,"width",tolua_get_RsvgDimensionData_width,tolua_set_RsvgDimensionData_width);
   tolua_variable(tolua_S,"height",tolua_get_RsvgDimensionData_height,tolua_set_RsvgDimensionData_height);
   tolua_variable(tolua_S,"em",tolua_get_RsvgDimensionData_em,tolua_set_RsvgDimensionData_em);
   tolua_variable(tolua_S,"ex",tolua_get_RsvgDimensionData_ex,tolua_set_RsvgDimensionData_ex);
   tolua_function(tolua_S,"create",tolua_rsvg_RsvgDimensionData_create00);
   tolua_function(tolua_S,"destroy",tolua_rsvg_RsvgDimensionData_destroy00);
   tolua_function(tolua_S,"get",tolua_rsvg_RsvgDimensionData_get00);
   tolua_function(tolua_S,"get",tolua_rsvg_RsvgDimensionData_get01);
  tolua_endmodule(tolua_S);
  tolua_cclass(tolua_S,"RsvgRectangle","RsvgRectangle","",NULL);
  tolua_beginmodule(tolua_S,"RsvgRectangle");
   tolua_variable(tolua_S,"x",tolua_get_RsvgRectangle_x,tolua_set_RsvgRectangle_x);
   tolua_variable(tolua_S,"y",tolua_get_RsvgRectangle_y,tolua_set_RsvgRectangle_y);
   tolua_variable(tolua_S,"width",tolua_get_RsvgRectangle_width,tolua_set_RsvgRectangle_width);
   tolua_variable(tolua_S,"height",tolua_get_RsvgRectangle_height,tolua_set_RsvgRectangle_height);
   tolua_function(tolua_S,"create",tolua_rsvg_RsvgRectangle_create00);
   tolua_function(tolua_S,"destroy",tolua_rsvg_RsvgRectangle_destroy00);
   tolua_function(tolua_S,"set",tolua_rsvg_RsvgRectangle_set00);
   tolua_function(tolua_S,"get",tolua_rsvg_RsvgRectangle_get00);
  tolua_endmodule(tolua_S);
  tolua_function(tolua_S,"rsvg_handle_get_base_uri",tolua_rsvg_rsvg_handle_get_base_uri00);
  tolua_function(tolua_S,"rsvg_handle_set_base_uri",tolua_rsvg_rsvg_handle_set_base_uri00);
  tolua_function(tolua_S,"rsvg_handle_get_intrinsic_size_in_pixels",tolua_rsvg_rsvg_handle_get_intrinsic_size_in_pixels00);
  tolua_function(tolua_S,"rsvg_handle_get_geometry_for_layer",tolua_rsvg_rsvg_handle_get_geometry_for_layer00);
  tolua_function(tolua_S,"rsvg_handle_has_sub",tolua_rsvg_rsvg_handle_has_sub00);
  tolua_function(tolua_S,"rsvg_handle_new_with_flags",tolua_rsvg_rsvg_handle_new_with_flags00);
  tolua_function(tolua_S,"rsvg_handle_new_from_data",tolua_rsvg_rsvg_handle_new_from_data00);
  tolua_function(tolua_S,"rsvg_handle_new_from_file",tolua_rsvg_rsvg_handle_new_from_file00);
  tolua_function(tolua_S,"rsvg_handle_render_document",tolua_rsvg_rsvg_handle_render_document00);
  tolua_function(tolua_S,"rsvg_handle_render_layer",tolua_rsvg_rsvg_handle_render_layer00);
  tolua_function(tolua_S,"g_object_unref",tolua_rsvg_g_object_unref00);
  tolua_function(tolua_S,"rsvg_create_handle_from_file",tolua_rsvg_rsvg_create_handle_from_file00);
  tolua_function(tolua_S,"rsvg_destroy_handle",tolua_rsvg_rsvg_destroy_handle00);
  tolua_function(tolua_S,"rsvg_handle_new_with_flags",tolua_rsvg_rsvg_handle_new_with_flags01);
  tolua_function(tolua_S,"rsvg_handle_set_base_gfile",tolua_rsvg_rsvg_handle_set_base_gfile00);
  tolua_function(tolua_S,"rsvg_handle_read_stream_sync",tolua_rsvg_rsvg_handle_read_stream_sync00);
  tolua_function(tolua_S,"rsvg_handle_new_from_gfile_sync",tolua_rsvg_rsvg_handle_new_from_gfile_sync00);
  tolua_function(tolua_S,"rsvg_handle_new_from_stream_sync",tolua_rsvg_rsvg_handle_new_from_stream_sync00);
  tolua_function(tolua_S,"rsvg_handle_new_from_data",tolua_rsvg_rsvg_handle_new_from_data01);
  tolua_function(tolua_S,"rsvg_handle_new_from_file",tolua_rsvg_rsvg_handle_new_from_file01);
 tolua_endmodule(tolua_S);
 return 1;
}


#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
 TOLUA_API int luaopen_rsvg (lua_State* tolua_S) {
 return tolua_rsvg_open(tolua_S);
}
#endif

