X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=src%2FRect.xs;h=e4b40dc0f4ccaee892c62f6feb461f7832478e4e;hb=05eb21df0d3c315f4fbd29b3d7b76016ddbc5e60;hp=cde0b7a93b621f9021ca8ac567c600c18984095e;hpb=718e13f9fd81f9a415afbc0fa653e3fc6fef4f78;p=sdlgit%2FSDL_perl.git diff --git a/src/Rect.xs b/src/Rect.xs index cde0b7a..e4b40dc 100644 --- a/src/Rect.xs +++ b/src/Rect.xs @@ -8,9 +8,18 @@ #include +MODULE = SDL::Rect PACKAGE = SDL::Rect PREFIX = rect_ +=for documentation -MODULE = SDL::Rect PACKAGE = SDL::Rect PREFIX = rect_ +SDL_Rect -- Defines a rectangular area + + typedef struct{ + Sint16 x, y; + Uint16 w, h; + } SDL_Rect; + +=cut SDL_Rect * rect_new (CLASS, x, y, w, h) @@ -28,22 +37,8 @@ rect_new (CLASS, x, y, w, h) OUTPUT: RETVAL -void -SetRect(rect, x, y, w, h) - SDL_Rect *rect - Sint16 x - Sint16 y - Uint16 w - Uint16 h - CODE: - rect->x = x; - rect->y = y; - rect->w = w; - rect->h = h; - - Sint16 -rect_RectX ( rect, ... ) +rect_x ( rect, ... ) SDL_Rect *rect CODE: if (items > 1 ) rect->x = SvIV(ST(1)); @@ -52,7 +47,7 @@ rect_RectX ( rect, ... ) RETVAL Sint16 -rect_RectY ( rect, ... ) +rect_y ( rect, ... ) SDL_Rect *rect CODE: if (items > 1 ) rect->y = SvIV(ST(1)); @@ -61,7 +56,7 @@ rect_RectY ( rect, ... ) RETVAL Uint16 -rect_RectW ( rect, ... ) +rect_w ( rect, ... ) SDL_Rect *rect CODE: if (items > 1 ) rect->w = SvIV(ST(1)); @@ -70,7 +65,7 @@ rect_RectW ( rect, ... ) RETVAL Uint16 -rect_RectH ( rect, ... ) +rect_h ( rect, ... ) SDL_Rect *rect CODE: if (items > 1 ) rect->h = SvIV(ST(1)); @@ -83,7 +78,4 @@ void rect_DESTROY(self) SDL_Rect *self CODE: - safefree( (char *)self ); - -