X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSDL%2FRect.pm;h=7cfb0a40c254f1f78d7b874d1568a488d35b9246;hb=6c315353155a6a779fc1797009d66ec9ffe8e800;hp=6c91762ff14ab2ec8d94b3135c89ae756cf828c2;hpb=a1b835c168ec184abc01edbc01862ffa15624c26;p=sdlgit%2FSDL_perl.git diff --git a/lib/SDL/Rect.pm b/lib/SDL/Rect.pm index 6c91762..7cfb0a4 100644 --- a/lib/SDL/Rect.pm +++ b/lib/SDL/Rect.pm @@ -1,70 +1,9 @@ -=pod -=cut package SDL::Rect; use strict; use warnings; require Exporter; require DynaLoader; - our @ISA = qw(Exporter DynaLoader); -# Items to export into callers namespace by default. Note: do not export -# names by default without a very good reason. Use EXPORT_OK instead. -# Do not simply export all your public functions/methods/constants. bootstrap SDL::Rect; -=head1 Perl binding to C stuct Rect -=cut - -# Preloaded methods go here. - -# TODO: mangle with the symbol table to create an alias -# to sub x. We could call x from inside the sub but that -# would be another call and rects are a time-critical object. -sub left { - my $self = shift; - RectX($self,@_); -} - -sub x { - my $self = shift; - RectX($self,@_); -} - -### TODO: see 'left' above (this is an 'alias' to sub y) -sub top { - my $self = shift; - RectY($self,@_); -} - -sub y { - my $self = shift; - RectY($self,@_); -} - -### TODO: see 'left' above (this is an 'alias' to sub width) -sub w { - my $self = shift; - RectW($self,@_); -} - -sub width { - my $self = shift; - RectW($self,@_); -} - -### TODO: see 'left' above (this is an 'alias' to sub height) -sub h { - my $self = shift; - RectH($self,@_); -} - -sub height { - my $self = shift; - RectH($self,@_); -} - - -# Autoload methods go after __END__, and are processed by the autosplit program. - 1; -__END__