| 1 | package X11::XRandR::Geometry; | ||
| 2 | |||
| 3 | # ABSTRACT: A Screen or output geometry | ||
| 4 | |||
| 5 | 1 | ▶ | use Types::Standard qw[ InstanceOf ]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | ▶ | use X11::XRandR::Dimension; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 1 | ▶ | use X11::XRandR::Offset; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 1 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 1 | ▶ | use namespace::clean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 1 | ▶ | use MooX::StrictConstructor; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 1 | our $VERSION = '0.01'; | |
| 15 | |||
| 16 | 1 | ▶ | use overload '""' => \&to_string; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | |||
| 18 | #pod =attr dimension | ||
| 19 | #pod | ||
| 20 | #pod An instance of L<X11::XRandR::Dimension>. | ||
| 21 | #pod | ||
| 22 | #pod =cut | ||
| 23 | |||
| 24 | |||
| 25 | 1 | has dimension => ( | |
| 26 | is => 'rw', | ||
| 27 | isa => InstanceOf ['X11::XRandR::Dimension'], | ||
| 28 | required => 1, | ||
| 29 | ); | ||
| 30 | |||
| 31 | #pod =attr dimension | ||
| 32 | #pod | ||
| 33 | #pod An instance of L<X11::XRandR::Offset>. | ||
| 34 | #pod | ||
| 35 | #pod =cut | ||
| 36 | |||
| 37 | has offset => ( | ||
| 38 | is => 'rw', | ||
| 39 | isa => InstanceOf ['X11::XRandR::Offset'], | ||
| 40 | 0 | ▶ | default => sub { X11::XRandR::Offset->new }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 41 | 1 | ); | |
| 42 | |||
| 43 | #pod =method to_string | ||
| 44 | #pod | ||
| 45 | #pod Return a string rendition of the object just as B<xrandr> would. | ||
| 46 | #pod | ||
| 47 | #pod =cut | ||
| 48 | |||
| 49 | 0 | ▶ | sub to_string { |
|
Subroutine
to_string: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 50 | 0 | $_[0]->dimension->to_string . $_[0]->offset->to_string; | |
| 51 | } | ||
| 52 | |||
| 53 | 1 | 1; | |
| 54 | |||
| 55 | # | ||
| 56 | # This file is part of X11-XRandR | ||
| 57 | # | ||
| 58 | # This software is Copyright (c) 2018 by Diab Jerius. | ||
| 59 | # | ||
| 60 | # This is free software, licensed under: | ||
| 61 | # | ||
| 62 | # The GNU General Public License, Version 3, June 2007 | ||
| 63 | # | ||
| 64 | |||
| 65 | __END__ | ||