Skip to content

Commit

Permalink
Merge 379b166 into d15d602
Browse files Browse the repository at this point in the history
  • Loading branch information
zmughal committed Oct 3, 2020
2 parents d15d602 + 379b166 commit 7aff518
Show file tree
Hide file tree
Showing 20 changed files with 84 additions and 84 deletions.
2 changes: 1 addition & 1 deletion lib/Renard/Curie/App.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package Renard::Curie::App;

use Moo 2.001001;

use Renard::API::Gtk3::Helper;
use Intertangle::API::Gtk3::Helper;

use File::Spec;
use File::Basename;
Expand Down
2 changes: 1 addition & 1 deletion lib/Renard/Curie/Component/AccelMap.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package Renard::Curie::Component::AccelMap;
# ABSTRACT: Set up the accelerator map (global keybindings)

use Moo;
use Renard::API::Gtk3::Helper;
use Intertangle::API::Gtk3::Helper;

=method BUILD
Expand Down
6 changes: 3 additions & 3 deletions lib/Renard/Curie/Component/DocumentPropertiesWindow.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package Renard::Curie::Component::DocumentPropertiesWindow;

use Moo;
use Glib 'TRUE', 'FALSE';
use Renard::API::Gtk3::Helper;
use Intertangle::API::Gtk3::Helper;
use Renard::Incunabula::Common::Types qw(InstanceOf);
use Renard::Incunabula::Document::Types qw(DocumentModel);
use Renard::Block::Format::PDF::InformationDictionary;
Expand Down Expand Up @@ -100,8 +100,8 @@ method show_all() {


with qw(
Renard::API::Gtk3::Component::Role::FromBuilder
Renard::API::Gtk3::Component::Role::UIFileFromPackageName
Intertangle::API::Gtk3::Component::Role::FromBuilder
Intertangle::API::Gtk3::Component::Role::UIFileFromPackageName
);


Expand Down
2 changes: 1 addition & 1 deletion lib/Renard/Curie/Component/FileChooser.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package Renard::Curie::Component::FileChooser;
# ABSTRACT: Component that implements a file chooser dialog

use Moo;
use Renard::API::Gtk3::Helper;
use Intertangle::API::Gtk3::Helper;
use Renard::Incunabula::Common::Types qw(InstanceOf);

=attr all_filter
Expand Down
16 changes: 8 additions & 8 deletions lib/Renard/Curie/Component/JacquardCanvas.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package Renard::Curie::Component::JacquardCanvas;

use Role::Tiny::With;

use Renard::API::Gtk3::Helper;
use Intertangle::API::Gtk3::Helper;
use Glib qw(TRUE FALSE);

use feature qw(current_sub);
Expand Down Expand Up @@ -33,15 +33,15 @@ use Glib::Object::Subclass
use Glib qw(TRUE FALSE);
use List::AllUtils qw(first);

use Renard::Yarn::Types qw(Point Size);
use Intertangle::Yarn::Types qw(Point Size);

my $_EmptyGraph = Moo::Role->create_class_with_roles(
'Renard::Jacquard::Actor' => qw(
Renard::Jacquard::Role::Geometry::Position2D
Renard::Jacquard::Role::Geometry::Size2D
Renard::Jacquard::Role::Render::QnD::Cairo::Group
Renard::Jacquard::Role::Render::QnD::Size::Direct
Renard::Jacquard::Role::Render::QnD::Bounds::Direct
'Intertangle::Jacquard::Actor' => qw(
Intertangle::Jacquard::Role::Geometry::Position2D
Intertangle::Jacquard::Role::Geometry::Size2D
Intertangle::Jacquard::Role::Render::QnD::Cairo::Group
Intertangle::Jacquard::Role::Render::QnD::Size::Direct
Intertangle::Jacquard::Role::Render::QnD::Bounds::Direct
));

use constant HIGHLIGHT_BOUNDS => $ENV{T_GRID_HIGHLIGHT_BOUNDS} // 0;
Expand Down
4 changes: 2 additions & 2 deletions lib/Renard/Curie/Component/JacquardCanvas/Role/Mouse.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use Role::Tiny;

use Glib qw(TRUE FALSE);
use Scalar::Util qw(refaddr);
use Renard::Yarn::Types qw(Point Size);
use Intertangle::Yarn::Types qw(Point Size);

around new => sub {
my $orig = shift;
Expand Down Expand Up @@ -38,7 +38,7 @@ sub _get_data_for_pointer {
$self->get_hadjustment,
$self->get_vadjustment,
);
my $matrix = Renard::Yarn::Graphene::Matrix->new;
my $matrix = Intertangle::Yarn::Graphene::Matrix->new;
$matrix->init_from_2d( 1, 0 , 0 , 1, $h->get_value, $v->get_value );

my $point = $matrix * $event_point;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package Renard::Curie::Component::JacquardCanvas::Role::MouseSelection;
# ABSTRACT: Role for selecting text

use Role::Tiny;
use Renard::API::Gtk3::Helper;
use Intertangle::API::Gtk3::Helper;
use Glib qw(TRUE FALSE);
use Renard::Yarn::Types qw(Point Size);
use Intertangle::Yarn::Types qw(Point Size);

after set_data => sub {
my ($self, %data) = @_;
Expand Down
18 changes: 9 additions & 9 deletions lib/Renard/Curie/Component/JacquardCanvas/Role/Scroll.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use Role::Tiny;
use feature qw(current_sub);

use Object::Util magic => 0;
use Renard::Yarn::Types qw(Point Size);
use Intertangle::Yarn::Types qw(Point Size);

use constant STEP_SIZE_RATIO => (1 / 20.0);

Expand Down Expand Up @@ -83,16 +83,16 @@ sub cb_on_scroll {
my $vp_origin = Point->coerce([ $h->get_value, $v->get_value ]);
my $vp_size = Size->coerce([ $h->get_page_size, $v->get_page_size ]);

my $vp_bounds = Renard::Yarn::Graphene::Rect->new(
my $vp_bounds = Intertangle::Yarn::Graphene::Rect->new(
origin => $vp_origin,
size => $vp_size,
);

my @views;
my $vp_is_visible = sub {
my ($g, $g_matrix) = @_;
my $t_matrix = Renard::Yarn::Graphene::Matrix->new;
if( $g->does('Renard::Jacquard::Role::Render::QnD::Layout') ) {
my $t_matrix = Intertangle::Yarn::Graphene::Matrix->new;
if( $g->does('Intertangle::Jacquard::Role::Render::QnD::Layout') ) {
$t_matrix->init_from_2d( 1, 0 , 0 , 1, $g->x->value, $g->y->value );
} else {
# position translation is already incorporated into bounds of non-layout
Expand All @@ -115,7 +115,7 @@ sub cb_on_scroll {
__SUB__->($_, $matrix) for @{ $g->children };
};

my $matrix = Renard::Yarn::Graphene::Matrix->new;
my $matrix = Intertangle::Yarn::Graphene::Matrix->new;
$matrix->init_scale($self->{scale}, $self->{scale}, 1);
$vp_is_visible->($self->{sg}, $matrix);

Expand All @@ -141,12 +141,12 @@ sub scroll_to_page {
my $origin = $page_actor->origin_point;

my $actor = $page_actor;
my $matrix = Renard::Yarn::Graphene::Matrix->new;
my $matrix = Intertangle::Yarn::Graphene::Matrix->new;
$matrix->init_identity;
do {
my $g = $actor;
my $t_matrix = Renard::Yarn::Graphene::Matrix->new;
if( $g->does('Renard::Jacquard::Role::Render::QnD::Layout') ) {
my $t_matrix = Intertangle::Yarn::Graphene::Matrix->new;
if( $g->does('Intertangle::Jacquard::Role::Render::QnD::Layout') ) {
$t_matrix->init_from_2d( 1, 0 , 0 , 1, $g->x->value, $g->y->value );
} else {
# position translation is already incorporated into bounds of non-layout
Expand All @@ -158,7 +158,7 @@ sub scroll_to_page {
$actor = $actor->parent;
} while( $actor );

my $scale_matrix = Renard::Yarn::Graphene::Matrix->new;
my $scale_matrix = Intertangle::Yarn::Graphene::Matrix->new;
$scale_matrix->init_scale($self->{scale}, $self->{scale}, 1);

$matrix = $matrix x $scale_matrix;
Expand Down
6 changes: 3 additions & 3 deletions lib/Renard/Curie/Component/LogWindow.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package Renard::Curie::Component::LogWindow;
# ABSTRACT: Component that collects log messages

use Moo;
use Renard::API::Gtk3::Helper;
use Intertangle::API::Gtk3::Helper;
use MooX::HandlesVia;
use Glib 'TRUE', 'FALSE';
use Renard::Incunabula::Common::Types qw(ArrayRef HashRef Str);
Expand Down Expand Up @@ -130,8 +130,8 @@ callback on_clicked_button_clear_cb( $event, $self ) {
}

with qw(
Renard::API::Gtk3::Component::Role::FromBuilder
Renard::API::Gtk3::Component::Role::UIFileFromPackageName
Intertangle::API::Gtk3::Component::Role::FromBuilder
Intertangle::API::Gtk3::Component::Role::UIFileFromPackageName
);

1;
6 changes: 3 additions & 3 deletions lib/Renard/Curie/Component/MainWindow.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use Renard::Incunabula::Common::Setup;
package Renard::Curie::Component::MainWindow;
# ABSTRACT: Main window of the application

use Renard::API::Gtk3::Helper;
use Intertangle::API::Gtk3::Helper;

use Gtk3;
use Cairo;
Expand Down Expand Up @@ -113,8 +113,8 @@ callback on_application_quit_cb( $event, $self ) {
# }}}

with qw(
Renard::API::Gtk3::Component::Role::FromBuilder
Renard::API::Gtk3::Component::Role::UIFileFromPackageName
Intertangle::API::Gtk3::Component::Role::FromBuilder
Intertangle::API::Gtk3::Component::Role::UIFileFromPackageName
MooX::Role::Logger
Renard::Curie::Component::MainWindow::Role::PageDrawingArea
Expand Down
12 changes: 6 additions & 6 deletions lib/Renard/Curie/Component/MenuBar.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package Renard::Curie::Component::MenuBar;
# ABSTRACT: Component that provides a menu bar for the application

use Moo;
use Renard::API::Gtk3::Helper;
use Intertangle::API::Gtk3::Helper;
use URI;
use Glib 'TRUE', 'FALSE';
use Renard::Incunabula::Common::Types qw(InstanceOf);
Expand Down Expand Up @@ -175,7 +175,7 @@ Callback for the C<< File -> Open >> menu item.
=cut
callback on_menu_file_open_activate_cb($event, $self) {
Renard::API::Gtk3::Helper->callback( $self->main_window, on_open_file_dialog_cb => $event );
Intertangle::API::Gtk3::Helper->callback( $self->main_window, on_open_file_dialog_cb => $event );
}

=callback on_menu_file_properties_activate_cb
Expand All @@ -186,7 +186,7 @@ Callback for the C<< File -> Properties >> menu item.
=cut
callback on_menu_file_properties_activate_cb($event, $self) {
Renard::API::Gtk3::Helper->callback( $self->main_window, on_document_properties_dialog_cb => $event );
Intertangle::API::Gtk3::Helper->callback( $self->main_window, on_document_properties_dialog_cb => $event );
}

=callback on_menu_file_quit_activate_cb
Expand All @@ -197,7 +197,7 @@ Callback for the C<< File -> Quit >> menu item.
=cut
callback on_menu_file_quit_activate_cb($event, $self) {
Renard::API::Gtk3::Helper->callback( $self->main_window, on_application_quit_cb => $event );
Intertangle::API::Gtk3::Helper->callback( $self->main_window, on_application_quit_cb => $event );
}

=callback on_menu_file_recentfiles_item_activated_cb
Expand Down Expand Up @@ -284,8 +284,8 @@ callback on_menu_view_column_item_activate_cb($event, $data) {


with qw(
Renard::API::Gtk3::Component::Role::FromBuilder
Renard::API::Gtk3::Component::Role::UIFileFromPackageName
Intertangle::API::Gtk3::Component::Role::FromBuilder
Intertangle::API::Gtk3::Component::Role::UIFileFromPackageName
Renard::Curie::Component::Role::HasParentMainWindow
);

Expand Down
2 changes: 1 addition & 1 deletion lib/Renard/Curie/Component/Outline.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package Renard::Curie::Component::Outline;
# ABSTRACT: Component that provides a list of headings for navigating

use Moo;
use Renard::API::Gtk3::Helper;
use Intertangle::API::Gtk3::Helper;
use Glib 'TRUE', 'FALSE';
use Renard::Incunabula::Common::Types qw(InstanceOf);
use Renard::Incunabula::Document::Types qw(PageNumber);
Expand Down
6 changes: 3 additions & 3 deletions lib/Renard/Curie/Component/PageDrawingArea.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package Renard::Curie::Component::PageDrawingArea;

use Moo;

use Renard::API::Gtk3::Helper;
use Intertangle::API::Gtk3::Helper;
use Glib 'TRUE', 'FALSE';
use Glib::Object::Subclass
'Gtk3::Bin',
Expand Down Expand Up @@ -193,8 +193,8 @@ method update_view($new_view) {
}

with qw(
Renard::API::Gtk3::Component::Role::FromBuilder
Renard::API::Gtk3::Component::Role::UIFileFromPackageName
Intertangle::API::Gtk3::Component::Role::FromBuilder
Intertangle::API::Gtk3::Component::Role::UIFileFromPackageName
Renard::Curie::Component::PageDrawingArea::Role::KeyBindings
Renard::Curie::Component::PageDrawingArea::Role::MouseScrollBindings
Expand Down
4 changes: 2 additions & 2 deletions lib/Renard/Curie/Component/TTSWindow.pm
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ sub _build_synth_function {


with qw(
Renard::API::Gtk3::Component::Role::FromBuilder
Renard::API::Gtk3::Component::Role::UIFileFromPackageName
Intertangle::API::Gtk3::Component::Role::FromBuilder
Intertangle::API::Gtk3::Component::Role::UIFileFromPackageName
Renard::Curie::Component::Role::HasParentMainWindow
);

Expand Down
2 changes: 1 addition & 1 deletion lib/Renard/Curie/Model/View/Grid.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package Renard::Curie::Model::View::Grid;
use Moo;

use Renard::Incunabula::Common::Types qw(InstanceOf ArrayRef);
use Renard::API::Gtk3::Types qw(SizeRequest);
use Intertangle::API::Gtk3::Types qw(SizeRequest);
use POSIX qw(ceil);
use List::AllUtils qw(part first);
use Glib qw(TRUE FALSE);
Expand Down
30 changes: 15 additions & 15 deletions lib/Renard/Curie/Model/View/Grid/PageActor.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ package Renard::Curie::Model::View::Grid::PageActor;

use Mu;
use Renard::Block::Format::Cairo::Types qw(RenderableDocumentModel);
use Renard::Taffeta::Graphics::Image::PNG;
use Renard::Taffeta::Graphics::Image::CairoImageSurface;
use Renard::Yarn::Graphene;
use Renard::Yarn::Types qw(Point Size);
use Intertangle::Taffeta::Graphics::Image::PNG;
use Intertangle::Taffeta::Graphics::Image::CairoImageSurface;
use Intertangle::Yarn::Graphene;
use Intertangle::Yarn::Types qw(Point Size);
use List::AllUtils qw(pairmap);

extends qw(Renard::Jacquard::Actor);
extends qw(Intertangle::Jacquard::Actor);

ro document => (
isa => RenderableDocumentModel,
Expand All @@ -32,12 +32,12 @@ lazy _taffeta => method() {
my $rp = $self->_rendered_page;
my $taffeta;
if( $rp->can('png_data') ) {
$taffeta = Renard::Taffeta::Graphics::Image::PNG->new(
$taffeta = Intertangle::Taffeta::Graphics::Image::PNG->new(
data => $rp->png_data,
origin => $self->origin_point,
);
} else {
$taffeta = Renard::Taffeta::Graphics::Image::CairoImageSurface->new(
$taffeta = Intertangle::Taffeta::Graphics::Image::CairoImageSurface->new(
cairo_image_surface => $rp->cairo_image_surface,
origin => $self->origin_point,
);
Expand All @@ -64,7 +64,7 @@ lazy _textual_page => method() {
};

lazy _page_transform => method() {
my $page_transform = Renard::Yarn::Graphene::Matrix->new;
my $page_transform = Intertangle::Yarn::Graphene::Matrix->new;
$page_transform->init_from_2d( 1, 0 , 0 , 1,
$self->x->value,
$self->y->value );
Expand All @@ -74,7 +74,7 @@ lazy _page_transform => method() {
method _bbox_to_rect($bbox) {
my ($x0, $y0, $x1, $y1) = split ' ', $bbox;
$self->_page_transform->transform_bounds(
Renard::Yarn::Graphene::Rect->new(
Intertangle::Yarn::Graphene::Rect->new(
origin => Point->coerce([$x0, $y0]),
size => Size->coerce([$x1-$x0, $y1-$y0]),
)
Expand All @@ -84,7 +84,7 @@ method _bbox_to_rect($bbox) {
method _m_quad_to_rect($quad) {
my @points = pairmap { Point->coerce([$a, $b]) } split ' ', $quad;
$self->_page_transform->transform_bounds(
Renard::Yarn::Graphene::Quad->alloc
Intertangle::Yarn::Graphene::Quad->alloc
->init_from_points( \@points )
->bounds
);
Expand Down Expand Up @@ -229,11 +229,11 @@ method text_at_point( (Point) $point) {
}

with qw(
Renard::Jacquard::Role::Render::QnD::SVG
Renard::Jacquard::Role::Render::QnD::Cairo
Renard::Jacquard::Role::Geometry::Position2D
Renard::Jacquard::Role::Render::QnD::Size::Direct
Renard::Jacquard::Role::Render::QnD::Bounds::Direct
Intertangle::Jacquard::Role::Render::QnD::SVG
Intertangle::Jacquard::Role::Render::QnD::Cairo
Intertangle::Jacquard::Role::Geometry::Position2D
Intertangle::Jacquard::Role::Render::QnD::Size::Direct
Intertangle::Jacquard::Role::Render::QnD::Bounds::Direct
);

1;

0 comments on commit 7aff518

Please sign in to comment.