| 1 | package Neovim::Ext::Window; | ||||||||||
| 2 | 55 | $Neovim::Ext::Window::VERSION = '0.01'; | |||||||||
| 3 | 55 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 55 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 55 | ▶ | use Carp qw/croak/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 55 | ▶ | use base qw/Neovim::Ext::Remote/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | |||||||||||
| 9 | sub new | ||||||||||
| 10 | { | ||||||||||
| 11 | 0 | ▶ | my ($this, $session, $code_data) = @_; | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 12 | |||||||||||
| 13 | 0 | return $this->SUPER::new ($session, 'nvim_win_', $code_data); | |||||||||
| 14 | } | ||||||||||
| 15 | |||||||||||
| 16 | |||||||||||
| 17 | |||||||||||
| 18 | sub buffer | ||||||||||
| 19 | { | ||||||||||
| 20 | 0 | ▶ | my $this = shift; | ||||||||
|
Subroutine
buffer: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 21 | 0 | $this->request ('nvim_win_get_buf'); | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | |||||||||||
| 25 | |||||||||||
| 26 | sub cursor | ||||||||||
| 27 | { | ||||||||||
| 28 | 0 | ▶ | my $this = shift; | ||||||||
|
Subroutine
cursor: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 29 | |||||||||||
| 30 | 0 | ▶ | $this->request ('nvim_win_set_cursor', @_) if (@_); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 31 | 0 | $this->request ('nvim_win_get_cursor'); | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | |||||||||||
| 35 | |||||||||||
| 36 | sub height | ||||||||||
| 37 | { | ||||||||||
| 38 | 0 | ▶ | my $this = shift; | ||||||||
|
Subroutine
height: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 39 | |||||||||||
| 40 | 0 | ▶ | $this->request ('nvim_win_set_height', @_) if (@_); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 41 | 0 | $this->request ('nvim_win_get_height'); | |||||||||
| 42 | } | ||||||||||
| 43 | |||||||||||
| 44 | |||||||||||
| 45 | |||||||||||
| 46 | sub width | ||||||||||
| 47 | { | ||||||||||
| 48 | 0 | ▶ | my $this = shift; | ||||||||
|
Subroutine
width: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 49 | |||||||||||
| 50 | 0 | ▶ | $this->request ('nvim_win_set_width', @_) if (@_); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 51 | 0 | $this->request ('nvim_win_get_width'); | |||||||||
| 52 | } | ||||||||||
| 53 | |||||||||||
| 54 | |||||||||||
| 55 | |||||||||||
| 56 | sub row | ||||||||||
| 57 | { | ||||||||||
| 58 | 0 | ▶ | my $this = shift; | ||||||||
|
Subroutine
row: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 59 | 0 | $this->request ('nvim_win_get_position')->[0]; | |||||||||
| 60 | } | ||||||||||
| 61 | |||||||||||
| 62 | |||||||||||
| 63 | |||||||||||
| 64 | sub col | ||||||||||
| 65 | { | ||||||||||
| 66 | 0 | ▶ | my $this = shift; | ||||||||
|
Subroutine
col: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 67 | 0 | $this->request ('nvim_win_get_position')->[1]; | |||||||||
| 68 | } | ||||||||||
| 69 | |||||||||||
| 70 | |||||||||||
| 71 | |||||||||||
| 72 | sub tabpage | ||||||||||
| 73 | { | ||||||||||
| 74 | 0 | ▶ | my $this = shift; | ||||||||
|
Subroutine
tabpage: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 75 | 0 | $this->request ('nvim_win_get_tabpage'); | |||||||||
| 76 | } | ||||||||||
| 77 | |||||||||||
| 78 | |||||||||||
| 79 | |||||||||||
| 80 | sub valid | ||||||||||
| 81 | { | ||||||||||
| 82 | 0 | ▶ | my $this = shift; | ||||||||
|
Subroutine
valid: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 83 | 0 | $this->request ('nvim_win_is_valid'); | |||||||||
| 84 | } | ||||||||||
| 85 | |||||||||||
| 86 | |||||||||||
| 87 | |||||||||||
| 88 | sub number | ||||||||||
| 89 | { | ||||||||||
| 90 | 0 | ▶ | my $this = shift; | ||||||||
|
Subroutine
number: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 91 | 0 | $this->request ('nvim_win_get_number'); | |||||||||
| 92 | } | ||||||||||
| 93 | |||||||||||
| 94 | |||||||||||
| 95 | =head1 NAME | ||||||||||
| 96 | |||||||||||
| 97 | Neovim::Ext::Window - Neovim Window class | ||||||||||
| 98 | |||||||||||
| 99 | =head1 VERSION | ||||||||||
| 100 | |||||||||||
| 101 | version 0.01 | ||||||||||
| 102 | |||||||||||
| 103 | =head2 SYNOPSIS | ||||||||||
| 104 | |||||||||||
| 105 | use Neovim::Ext; | ||||||||||
| 106 | |||||||||||
| 107 | =head2 METHODS | ||||||||||
| 108 | |||||||||||
| 109 | =head2 buffer( ) | ||||||||||
| 110 | |||||||||||
| 111 | Get the buffer currently displayed by the window | ||||||||||
| 112 | |||||||||||
| 113 | =head2 tabpage( ) | ||||||||||
| 114 | |||||||||||
| 115 | Get the tabpage that contains the window. | ||||||||||
| 116 | |||||||||||
| 117 | =head2 row( ) | ||||||||||
| 118 | |||||||||||
| 119 | Get the 0-indexed on-screen window row position in display cells. | ||||||||||
| 120 | |||||||||||
| 121 | =head2 col( ) | ||||||||||
| 122 | |||||||||||
| 123 | Get the 0-indexed on-screen window column position in display cells. | ||||||||||
| 124 | |||||||||||
| 125 | =head2 cursor( [$row, $col] ) | ||||||||||
| 126 | |||||||||||
| 127 | Get or set the row and column of the cursor. | ||||||||||
| 128 | |||||||||||
| 129 | =head2 height( [$height] ) | ||||||||||
| 130 | |||||||||||
| 131 | Get or set the window height (in rows). | ||||||||||
| 132 | |||||||||||
| 133 | =head2 width( [$width] ) | ||||||||||
| 134 | |||||||||||
| 135 | Get or set the window width (in columns). | ||||||||||
| 136 | |||||||||||
| 137 | =head2 number( ) | ||||||||||
| 138 | |||||||||||
| 139 | Get the window number. | ||||||||||
| 140 | |||||||||||
| 141 | =head2 valid( ) | ||||||||||
| 142 | |||||||||||
| 143 | Check if the window still exists. | ||||||||||
| 144 | |||||||||||
| 145 | =cut | ||||||||||
| 146 | |||||||||||
| 147 | 55 | 1; | |||||||||