need to return values of Rect* and so on
[sdlgit/SDL_perl.git] / lib / SDL / Rect.pm
CommitLineData
a1b835c1 1=pod
2=cut
bfd90409 3package SDL::Rect;
a1b835c1 4use strict;
5use warnings;
e4ab5b2e 6require Exporter;
7require DynaLoader;
bfd90409 8
a1b835c1 9our @ISA = qw(Exporter DynaLoader);
e4ab5b2e 10# Items to export into callers namespace by default. Note: do not export
11# names by default without a very good reason. Use EXPORT_OK instead.
12# Do not simply export all your public functions/methods/constants.
e4ab5b2e 13bootstrap SDL::Rect;
14
a1b835c1 15=head1 Perl binding to C stuct Rect
16=cut
17
e4ab5b2e 18# Preloaded methods go here.
bfd90409 19
96493475 20# TODO: mangle with the symbol table to create an alias
21# to sub x. We could call x from inside the sub but that
22# would be another call and rects are a time-critical object.
23sub left {
24 my $self = shift;
4447e116 25 return RectX($self,@_);
96493475 26}
27
bfd90409 28sub x {
29 my $self = shift;
4447e116 30 return RectX($self,@_);
bfd90409 31}
32
69e6e191 33### TODO: see 'left' above (this is an 'alias' to sub y)
96493475 34sub top {
35 my $self = shift;
4447e116 36 return RectY($self,@_);
96493475 37}
38
bfd90409 39sub y {
40 my $self = shift;
4447e116 41 return RectY($self,@_);
bfd90409 42}
43
69e6e191 44### TODO: see 'left' above (this is an 'alias' to sub width)
96493475 45sub w {
46 my $self = shift;
4447e116 47 return RectW($self,@_);
96493475 48}
49
bfd90409 50sub width {
51 my $self = shift;
4447e116 52 return RectW($self,@_);
bfd90409 53}
54
69e6e191 55### TODO: see 'left' above (this is an 'alias' to sub height)
96493475 56sub h {
57 my $self = shift;
4447e116 58 return RectH($self,@_);
96493475 59}
60
bfd90409 61sub height {
62 my $self = shift;
4447e116 63 return RectH($self,@_);
bfd90409 64}
65
bfd90409 66
e4ab5b2e 67# Autoload methods go after __END__, and are processed by the autosplit program.
23dbccd4 68
e4ab5b2e 691;
70__END__