need to return values of Rect* and so on
[sdlgit/SDL_perl.git] / lib / SDL / Rect.pm
1 =pod
2 =cut
3 package SDL::Rect;
4 use strict;
5 use warnings;
6 require Exporter;
7 require DynaLoader;
8
9 our @ISA = qw(Exporter DynaLoader);
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.
13 bootstrap SDL::Rect;
14
15 =head1 Perl binding to C stuct Rect
16 =cut
17
18 # Preloaded methods go here.
19
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.
23 sub left {
24         my $self = shift;
25         return RectX($self,@_);
26 }
27
28 sub x {
29         my $self = shift;
30         return RectX($self,@_);
31 }
32
33 ### TODO: see 'left' above (this is an 'alias' to sub y)
34 sub top {
35         my $self = shift;
36         return RectY($self,@_);
37 }
38
39 sub y {
40         my $self = shift;
41         return RectY($self,@_);
42 }
43
44 ### TODO: see 'left' above (this is an 'alias' to sub width)
45 sub w {
46         my $self = shift;
47         return RectW($self,@_);
48 }
49
50 sub width {
51         my $self = shift;
52         return RectW($self,@_);
53 }
54
55 ### TODO: see 'left' above (this is an 'alias' to sub height)
56 sub h {
57         my $self = shift;
58         return RectH($self,@_);
59 }
60
61 sub height {
62         my $self = shift;
63         return RectH($self,@_);
64 }
65
66
67 # Autoload methods go after __END__, and are processed by the autosplit program.
68
69 1;
70 __END__