« blib/lib/Term/Fabulous/ThemeEditor/ValueDialog.pm
↑ Summary
blib/lib/Term/Fabulous/Chart/Surface.pm »
| 1 | package Term::Fabulous::Termbox; | ||||||||||
| 2 | |||||||||||
| 3 | 12 | ▶ | use v5.32; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 12 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 12 | ▶ | use feature 'signatures'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 12 | ▶ | no warnings 'experimental::signatures'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 12 | our $VERSION = '0.05'; | |||||||||
| 9 | |||||||||||
| 10 | 12 | ▶ | use Exporter 'import'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 12 | ▶ | use XSLoader; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 12 | our ( @EXPORT_OK, %EXPORT_TAGS ); | |||||||||
| 14 | |||||||||||
| 15 | # The constants and their tags (:keys :colors :event :return) are installed | ||||||||||
| 16 | # by the XS BOOT code; the functions are listed here. | ||||||||||
| 17 | 12 | XSLoader::load( __PACKAGE__, $VERSION ); | |||||||||
| 18 | |||||||||||
| 19 | $EXPORT_TAGS{api} = [ | ||||||||||
| 20 | 12 | qw( | |||||||||
| 21 | tb_init tb_init_file tb_init_fd tb_init_rwfd tf_init_inline tf_init_inline_rwfd tb_shutdown | ||||||||||
| 22 | tb_width tb_height tb_set_input_mode tb_set_output_mode | ||||||||||
| 23 | tb_clear tb_set_clear_attrs tb_present tb_invalidate tb_set_cursor tb_hide_cursor | ||||||||||
| 24 | tb_set_cell tb_set_cell_ex tb_extend_cell tb_get_cell tb_print tb_send tf_reset_attrs tf_flush | ||||||||||
| 25 | tf_cells_differ tf_invalidate_cells | ||||||||||
| 26 | tb_peek_event tb_poll_event tb_get_fds tf_install_input_parser tf_cursor_position tf_kitty_keyboard_query | ||||||||||
| 27 | tf_sixel_query tf_input_ended | ||||||||||
| 28 | tb_last_errno tb_strerror tb_has_truecolor tb_has_egc tb_attr_width tb_version | ||||||||||
| 29 | ) | ||||||||||
| 30 | ]; | ||||||||||
| 31 | 12 | $EXPORT_TAGS{width} = [qw(tb_iswprint tb_wcwidth tb_cluster_width)]; | |||||||||
| 32 | |||||||||||
| 33 | { | ||||||||||
| 34 | 12 | my %seen; | |||||||||
| 35 | 12 | @EXPORT_OK = grep { !$seen{$_}++ } map { @$_ } values %EXPORT_TAGS; | |||||||||
| 36 | } | ||||||||||
| 37 | 12 | $EXPORT_TAGS{all} = [@EXPORT_OK]; | |||||||||
| 38 | |||||||||||
| 39 | 67 | ▶ | sub tb_peek_event ( $event, $timeout_ms ) { | ||||||||
|
Subroutine
tb_peek_event: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 40 | 67 | my ( $status, %fields ) = _peek_event($timeout_ms); | |||||||||
| 41 | 67 | ▶ | _fill_event( $event, %fields ) if $status == TB_OK(); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 42 | 67 | return $status; | |||||||||
| 43 | } | ||||||||||
| 44 | |||||||||||
| 45 | 0 | ▶ | sub tb_poll_event ($event) { | ||||||||
|
Subroutine
tb_poll_event: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 46 | 0 | my ( $status, %fields ) = _poll_event(); | |||||||||
| 47 | 0 | ▶ | _fill_event( $event, %fields ) if $status == TB_OK(); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 48 | 0 | return $status; | |||||||||
| 49 | } | ||||||||||
| 50 | |||||||||||
| 51 | 35 | ▶ | sub _fill_event ( $event, %fields ) { | ||||||||
|
Subroutine
_fill_event: called CC=2 SCAR=6.9
| |||||||||||
| 52 | 35 | $event->$_( $fields{$_} ) foreach keys %fields; | |||||||||
| 53 | 35 | return; | |||||||||
| 54 | } | ||||||||||
| 55 | |||||||||||
| 56 | 12 | 1; | |||||||||
| 57 | |||||||||||
| 58 | __END__ | ||||||||||