-MODULE = SDL::Rect PACKAGE = SDL::Rect
+MODULE = SDL::Rect PACKAGE = SDL::Rect PREFIX = rect_
SDL_Rect *
-new (CLASS)
+rect_new (CLASS, x, y, w, h)
char* CLASS
+ Sint16 x
+ Sint16 y
+ Uint16 w
+ Uint16 h
CODE:
RETVAL = (SDL_Rect *) safemalloc (sizeof(SDL_Rect));
- RETVAL->x = 0;
- RETVAL->y = 0;
- RETVAL->w = 0;
- RETVAL->h = 0;
+ RETVAL->x = x;
+ RETVAL->y = y;
+ RETVAL->w = w;
+ RETVAL->h = h;
OUTPUT:
RETVAL
Sint16
-RectX ( rect, ... )
+rect_RectX ( rect, ... )
SDL_Rect *rect
CODE:
if (items > 1 ) rect->x = SvIV(ST(1));
RETVAL
Sint16
-RectY ( rect, ... )
+rect_RectY ( rect, ... )
SDL_Rect *rect
CODE:
if (items > 1 ) rect->y = SvIV(ST(1));
RETVAL
Uint16
-RectW ( rect, ... )
+rect_RectW ( rect, ... )
SDL_Rect *rect
CODE:
if (items > 1 ) rect->w = SvIV(ST(1));
RETVAL
Uint16
-RectH ( rect, ... )
+rect_RectH ( rect, ... )
SDL_Rect *rect
CODE:
if (items > 1 ) rect->h = SvIV(ST(1));
void
-DESTROY(self)
+rect_DESTROY(self)
SDL_Rect *self
CODE:
- printf("RectPtr::DESTROY\n");
+
safefree( (char *)self );