GooCanvas2-0.06/0000755000175000017500000000000013121671056014445 5ustar maximilianmaximilianGooCanvas2-0.06/t/0000755000175000017500000000000013121671056014710 5ustar maximilianmaximilianGooCanvas2-0.06/t/GooCanvas2.t0000644000175000017500000000102713121670646017043 0ustar maximilianmaximilian# Before 'make install' is performed this script should be runnable with # 'make test'. After 'make install' it should work as 'perl Goo-Canvas2.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use strict; use warnings; use Test; BEGIN { plan tests => 1 }; use GooCanvas2; ok(1); # If we made it this far, we're ok. ######################### # Insert your test code below, the Test::More module is use()ed here so read # its man page ( perldoc Test::More ) for help writing this test script. GooCanvas2-0.06/lib/0000755000175000017500000000000013121671056015213 5ustar maximilianmaximilianGooCanvas2-0.06/lib/GooCanvas2.pm0000644000175000017500000001616313121671046017521 0ustar maximilianmaximilianpackage GooCanvas2; use 5.006000; use strict; use warnings; use Glib::Object::Introspection; our $VERSION = '0.06'; # customization ------------------------------------------------------- # my %_NAME_CORRECTIONS = ( ); my @_CLASS_STATIC_METHODS = qw/ /; my @_FLATTEN_ARRAY_REF_RETURN_FOR = qw/ GooCanvas2::Canvas::get_items_at GooCanvas2::Canvas::get_items_in_area GooCanvas2::CanvasItem::get_items_at GooCanvas2::CanvasItem::class_list_child_properties GooCanvas2::CanvasItemModel::class_list_child_properties /; # HANDLE SENTINAL BOOLEAN FOR # Unsicher bin ich mir bei GooCanvas2::CanvasItem::get_transform # GooCanvas2::CanvasItem::get_simple_transform ist an sich eine Funktion, die ein # bool'sches und weitere out-Argumente zurückgibt. Allerdings sind diese nicht NULL # wenn die Funktion unwahr zurückgibt (sd. bspw. undef, 0, 0, 1, 0). Daher lass ich es raus. # Das selbe gilt für die entsprechenden Funktionen in CanvasItem (get_transform # und get_simple_transform) my @_HANDLE_SENTINEL_BOOLEAN_FOR = qw/ /; my @_USE_GENERIC_SIGNAL_MARSHALLER_FOR = ( ); sub import { Glib::Object::Introspection->setup( basename => 'GooCanvas', version => '2.0', package => 'GooCanvas2', name_corrections => \%_NAME_CORRECTIONS, class_static_methods =>\@_CLASS_STATIC_METHODS, flatten_array_ref_return_for =>\@_FLATTEN_ARRAY_REF_RETURN_FOR, handle_sentinel_boolean_for => \@_HANDLE_SENTINEL_BOOLEAN_FOR); } # Preloaded methods go here. 1; __END__ # Below is stub documentation for your module. You'd better edit it! =head1 NAME GooCanvas2 - Perl binding for GooCanvas2 widget using Glib::Object::Introspection =head1 SYNOPSIS #!/usr/bin/perl -w use strict; use warnings; use Gtk3 -init; use GooCanvas2; my $window = Gtk3::Window->new(); $window->set_default_size(640, 600); $window->signal_connect('destroy' => sub {Gtk3->main_quit()}); my $scrolled_win = Gtk3::ScrolledWindow->new(); $scrolled_win->set_shadow_type('in'); my $canvas = GooCanvas2::Canvas->new(); $canvas->set_size_request(600,450); $canvas->set_bounds(0,0,1000,1000); $scrolled_win->add($canvas); my $root = $canvas->get_root_item(); # Add a few simple items my $rect_item = GooCanvas2::CanvasRect->new('parent' => $root, 'x' => 100, 'y' => 100, 'width' => 300, 'height' => 300, 'line_width' => 10.0, 'radius-x' => 20.0, 'radius-y' => 10.0, 'stroke-color' => 'yellow', 'fill-color' => 'red'); my $text_item = GooCanvas2::CanvasText->new('parent' => $root, 'text' => 'Hello World', 'x' => 300, 'y' => 300, 'width' => -1, 'anchor' => 'center', 'font' => 'Sans 24'); $text_item->rotate(45, 300, 300); # Connect a signal handler for the rectangle item. $rect_item->signal_connect('button_press_event' => \&on_rect_button_press); $window->add($scrolled_win); $window->show_all; # Pass control to the Gtk3 main event loop Gtk3->main(); # This handles button presses in item views. #We simply output a message to the console sub on_rect_button_press { my ($item, $target, $event) = @_; print "rect item received button press event \n"; return 1; } =head1 INSTALLATION You need to install the typelib file for GooCanvas-2.0. For example on Debian/Ubuntu it should be necessary to install the following package: sudo apt-get install gir1.2-goocanvas-2.0 On Mageia for example you have to install: urpmi lib64goocanvas-gir2.0 =head1 DESCRIPTION GooCanvas2 is a new canvas widget for use with Gtk3 that uses the Cairo 2d library for drawing. This is a simple and basic implementation of this wonderful Canvas widget. For more informations see L For instructions, how to use GooCanvas2, please study the API reference at L for now. A perl-specific documentation will perhaps come in later versions. But applying the C documentation should be no problem. =head2 OBJECTS, ITEMS, MODELS The GooCanvas2 module provides the following objects, items and models. For more details see L. =head3 Core Objects =over =item * GooCanvas2::Canvas - the main canvas widget =item * GooCanvas2::CanvasItem - the interface for canvas items =item * GooCanvas2::CanvasItemModel - the interface for canvas item models. =item * GooCanvas2::CanvasItemSimple - the base class for the standard canvas items. =item * GooCanvas2::CanvasItemModelSimple - the base class for the standard canvas item models. =item * GooCanvas2::CanvasStyle - support for cascading style properties for canvas items. =back =head3 Standard Canvas Items =over =item * GooCanvas2::CanvasGroup - a group of items. =item * GooCanvas2::CanvasEllipse - an ellipse item. =item * GooCanvas2::CanvasGrid - a grid item. =item * GooCanvas2::CanvasImage - an image item. =item * GooCanvas2::CanvasPath - a path item (a series of lines and curves). =item * GooCanvas2::CanvasPolyline - a polyline item (a series of lines with optional arrows). =item * GooCanvas2::CanvasRect - a rectangle item. =item * GooCanvas2::CanvasText - a text item. =item * GooCanvas2::CanvasWidget - an embedded widget item. =item * GooCanvas2::CanvasTable - a table container to layout items. =back =head3 Standard Canvas Item Models =over =item * GooCanvas2::CanvasGroupModel - a model for a group of items. =item * GooCanvas2::CanvasEllipseModel - a model for ellipse items. =item * GooCanvas2::CanvasGridModel - a model for grid items. =item * GooCanvas2::CanvasImageModel - a model for image items. =item * GooCanvas2::CanvasPathModel - a model for path items (a series of lines and curves). =item * GooCanvas2::CanvasPolylineModel - a model for polyline items (a series of lines with optional arrows). =item * GooCanvas2::CanvasRectModel - a model for rectangle items. =item * GooCanvas2::CanvasTextModel - a model for text items. =item * GooCanvas2::CanvasTableModel - a model for a table container to layout items. =back =head2 Development status and informations =head3 Customizations and overrides In order to make things more Perlish, GooCanvas2 customizes the API generated by L in a few spots: =over =item * The array ref normally returned by the following functions is flattened into a list: =over =item GooCanvas2::Canvas::get_items_at =item GooCanvas2::Canvas::get_items_in_area =item GooCanvas2::CanvasItem::get_items_at =item GooCanvas2::CanvasItem::class_list_child_properties =item GooCanvas2::CanvasItemModell::class_list_child_properties =back =back =head1 SEE ALSO =over =item * GooCanvas Homepage at L =item * GooCanvas2 API Reference L =item * L =item * L =back =head1 AUTHOR Maximilian Lika, EMaximilian-Lika@gmx.deE =head1 COPYRIGHT AND LICENSE Copyright (C) 2017 by Maximilian Lika This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.22.3 or, at your option, any later version of Perl 5 you may have available. =cut GooCanvas2-0.06/MANIFEST0000644000175000017500000000035513121671056015601 0ustar maximilianmaximilianChanges lib/GooCanvas2.pm Makefile.PL MANIFEST README t/GooCanvas2.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) GooCanvas2-0.06/Changes0000644000175000017500000000145313121671004015734 0ustar maximilianmaximilianRevision history for Perl extension Goo::Canvas2. 0.05 Mo Jun 19 08:40:00 2017 - Fix 0.05 https://rt.cpan.org/Public/Bug/Display.html?id=122129 0.05 Mo Jun 19 07:35:00 2017 - Fix POD errors 0.04 Sun Jun 18 23:35:00 2017 - Add GooCanvas2::CanvasItem(Model)::class_list_child_properties to @_FLATTEN_ARRAY_REF_RETURN_FOR - Add POD documentation - first release on CPAN 0.03 Sun Jun 18 17:52:00 2017 - Add the functions, that returns an array ref which shall be flattened, so that they return plain lists, into @_FLATTEN_ARRAY_REF_RETURN_FOR 0.02 Sun Jun 18 15:24:10 2017 - Renamed to GooCanvas2 - Added simple example to POD 0.01 Sun Jun 18 09:38:10 2017 - create the basic Glib::Object::Introspection setup - original version; created by h2xs 1.23 with options -b 5.6.0 -XA -n Goo::Canvas2 GooCanvas2-0.06/META.yml0000644000175000017500000000105313121671056015715 0ustar maximilianmaximilian--- abstract: 'Perl binding for GooCanvas2 widget using Glib::Object::Introspection' author: - 'Maximilian Lika ' build_requires: ExtUtils::MakeMaker: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.0402, CPAN::Meta::Converter version 2.150001' license: unknown meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: GooCanvas2 no_index: directory: - t - inc requires: Gtk3: '0' Test: '0' version: '0.06' GooCanvas2-0.06/Makefile.PL0000644000175000017500000000127713121477707016435 0ustar maximilianmaximilianuse 5.006000; use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( NAME => 'GooCanvas2', VERSION_FROM => 'lib/GooCanvas2.pm', # finds $VERSION, requires EU::MM from perl >= 5.5 PREREQ_PM => {'Test' => 0, 'Gtk3' => 0, }, # e.g., Module::Name => 1.1 ABSTRACT_FROM => 'lib/GooCanvas2.pm', # retrieve abstract from module AUTHOR => 'Maximilian Lika ', #LICENSE => 'perl', #Value must be from legacy list of licenses here #http://search.cpan.org/perldoc?Module%3A%3ABuild%3A%3AAPI ); GooCanvas2-0.06/README0000644000175000017500000000155413121572541015331 0ustar maximilianmaximilianGooCanvas2 version 0.04 ======================== GooCanvas2 is a new canvas widget for use with Gtk3 that uses the Cairo 2d library for drawing. This is a simple and basic implementation of this wonderful Canvas widget. INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules and libraries: Gtk3 Furthermore you need to install the typelib file for GooCanvas-2.0 on Debian try: "sudo apt-get install gir1.2-goocanvas-2.0" on Mageia "urpmi lib64goocanvas-gir2.0" should work COPYRIGHT AND LICENCE Copyright (C) 2017 by Maximilian Lika This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.22.3 or, at your option, any later version of Perl 5 you may have available. GooCanvas2-0.06/META.json0000644000175000017500000000166113121671056016072 0ustar maximilianmaximilian{ "abstract" : "Perl binding for GooCanvas2 widget using Glib::Object::Introspection", "author" : [ "Maximilian Lika " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.0402, CPAN::Meta::Converter version 2.150001", "license" : [ "unknown" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "GooCanvas2", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "Gtk3" : "0", "Test" : "0" } } }, "release_status" : "stable", "version" : "0.06" }