Gtk2-ImageView-0.05/0000750000774200006240000000000011166325627012706 5ustar ra28145a400mcGtk2-ImageView-0.05/t/0000750000774200006240000000000011166325627013151 5ustar ra28145a400mcGtk2-ImageView-0.05/t/drawcache.t0000644000774200006240000000437211164575700015267 0ustar ra28145a400mc# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 01.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 19; BEGIN { use Glib qw/TRUE FALSE/; use Gtk2 -init; use_ok('Gtk2::ImageView'); }; ######################### # 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. my $cache = Gtk2::Gdk::Pixbuf::Draw::Cache->new; ok(defined $cache, 'new() works'); ok(defined $cache->{last_pixbuf}, '$cache{last_pixbuf} defined'); ok(defined $cache->{old}, '$cache{old} defined'); ok(defined $cache->{check_size}, '$cache{check_size} defined'); can_ok('Gtk2::Gdk::Pixbuf::Draw::Cache', 'new', 'free', 'invalidate', 'draw'); my $opts = $cache->{old}; ok(defined $opts->{zoom}, '$opts{zoom} defined'); ok(defined $opts->{zoom_rect}, '$opts{zoom_rect} defined'); ok(defined $opts->{widget_x}, '$opts{widget_x} defined'); ok(defined $opts->{widget_y}, '$opts{widget_y} defined'); ok(defined $opts->{interp}, '$opts{interp} defined'); ok(defined $opts->{pixbuf}, '$opts{pixbuf} defined'); ok(defined $opts->{check_color1}, '$opts{check_color1} defined'); ok(defined $opts->{check_color2}, '$opts{check_color2} defined'); my $method = Gtk2::Gdk::Pixbuf::Draw::Cache->get_method($opts, $opts); ok(($method eq 'contains' or $method eq 'scale' or $method eq 'scroll'), 'get_method'); eval{Gtk2::Gdk::Pixbuf::Draw::Cache->get_method(undef, undef)}; like($@, qr/Expected/, 'A TypeError is raised when get_method() is called with an argument that is not a PixbufDrawOpts object.'); eval{Gtk2::Gdk::Pixbuf::Draw::Cache->get_method($opts, undef)}; like($@, qr/Expected/, 'A TypeError is raised when get_method() is called with an argument that is not a PixbufDrawOpts object.'); eval{Gtk2::Gdk::Pixbuf::Draw::Cache->get_method(undef, $opts)}; like($@, qr/Expected/, 'A TypeError is raised when get_method() is called with an argument that is not a PixbufDrawOpts object.'); eval{Gtk2::Gdk::Pixbuf::Draw::Cache->get_method('Hello', 'Foo')}; like($@, qr/Expected/, 'A TypeError is raised when get_method() is called with an argument that is not a PixbufDrawOpts object.'); Gtk2-ImageView-0.05/t/imageview.t0000644000774200006240000000660111164575700015320 0ustar ra28145a400mc# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 01.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 29; BEGIN { use Glib qw/TRUE FALSE/; use Gtk2 -init; use_ok('Gtk2::ImageView'); }; ######################### # 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. my $version = Gtk2::ImageView->library_version; ok(defined $version, "library version $version"); $version = $Gtk2::ImageView::VERSION; ok(defined $version, "bindings version $version"); my $view = Gtk2::ImageView->new; ok(defined $view, 'new() works'); isa_ok($view, 'Gtk2::ImageView'); ok(defined $view->get_tool, 'get_tool() works'); # The default tool is Gtk2::ImageView::Tool::Dragger. isa_ok($view->get_tool, 'Gtk2::ImageView::Tool::Dragger'); $view->set_pixbuf(Gtk2::Gdk::Pixbuf->new_from_file ('t/gnome_logo.jpg'), TRUE); isa_ok($view->get_viewport, 'Gtk2::Gdk::Rectangle'); isa_ok($view->get_draw_rect, 'Gtk2::Gdk::Rectangle'); ok($view->get_check_colors, 'get_check_colors() works'); ok(defined $view->get_fitting, 'get_fitting() works'); ok(defined $view->get_pixbuf, 'get_pixbuf() works'); ok(defined $view->get_zoom, 'get_zoom() works'); ok(Gtk2::ImageView::Zoom->get_min_zoom < Gtk2::ImageView::Zoom->get_max_zoom, 'Ensure that the gtkimageview.zooms_* functions are present and work as expected.'); ok(defined $view->get_black_bg, 'get_black_bg() works'); ok(defined $view->get_show_frame, 'get_show_frame() works'); ok(defined $view->get_interpolation, 'get_interpolation() works'); ok(defined $view->get_show_cursor, 'get_show_cursor() works'); eval{$view->set_pixbuf('Hi mom!', TRUE)}; like($@, qr/type/, 'A TypeError is raised when set_pixbuf() is called with something that is not a pixbuf.'); $view->set_pixbuf(undef, TRUE); ok(! $view->get_pixbuf, 'correctly cleared pixbuf'); ok(! $view->get_viewport, 'correctly cleared viewport'); ok(! $view->get_draw_rect, 'correctly cleared draw rectangle'); $view->size_allocate(Gtk2::Gdk::Rectangle->new(0, 0, 100, 100)); $view->set_pixbuf(Gtk2::Gdk::Pixbuf->new(GDK_COLORSPACE_RGB, FALSE, 8, 50, 50)); my $rect = $view->get_viewport; ok(($rect->x == 0 and $rect->y == 0 and $rect->width == 50 and $rect->height == 50), 'Ensure that getting the viewport of the view works as expected.'); can_ok($view, qw(get_check_colors)); $rect = $view->get_draw_rect; ok(($rect->x == 25 and $rect->y == 25 and $rect->width == 50 and $rect->height == 50), 'Ensure that getting the draw rectangle works as expected.'); $view->set_pixbuf(Gtk2::Gdk::Pixbuf->new(GDK_COLORSPACE_RGB, FALSE, 8, 200, 200)); $view->set_zoom(1); $view->set_offset(0, 0); $rect = $view->get_viewport; ok(($rect->x == 0 and $rect->y == 0), 'Ensure that setting the offset works as expected.'); $view->set_offset(100, 100, TRUE); $rect = $view->get_viewport; ok(($rect->x == 100 and $rect->y == 100), 'Ensure that setting the offset works as expected.'); $view->set_transp('color', 0xff0000); my ($col1, $col2) = $view->get_check_colors; ok(($col1 == 0xff0000 and $col2 == 0xff0000), 'Ensure that setting the views transparency settings works as expected.'); $view->set_transp('grid'); ok(defined Glib::Type->list_values ('Gtk2::ImageView::Transp'), 'Check GtkImageTransp enum.'); Gtk2-ImageView-0.05/t/imagetoolpainter.t0000644000774200006240000000135011164575700016702 0ustar ra28145a400mc# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 01.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 2; BEGIN { use Glib qw/TRUE FALSE/; use Gtk2 -init; use_ok('Gtk2::ImageView'); }; ######################### # 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. my $imageview = Gtk2::ImageView->new; $imageview->set_pixbuf(Gtk2::Gdk::Pixbuf->new_from_file ('t/gnome_logo.jpg'), TRUE); my $iimagetool = Gtk2::ImageView::Tool::Painter->new($imageview); ok(defined $iimagetool, 'new() works'); Gtk2-ImageView-0.05/t/imagescrollwin.t0000644000774200006240000000144411164575700016362 0ustar ra28145a400mc# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 01.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 3; BEGIN { use Glib qw/TRUE FALSE/; use Gtk2 -init; use_ok('Gtk2::ImageView'); }; ######################### # 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. my $imageview = Gtk2::ImageView->new; $imageview->set_pixbuf(Gtk2::Gdk::Pixbuf->new_from_file ('t/gnome_logo.jpg'), TRUE); my $imagescrollwin = Gtk2::ImageView::ScrollWin->new($imageview); ok(defined $imagescrollwin, 'new() works'); isa_ok($imagescrollwin, 'Gtk2::ImageView::ScrollWin'); Gtk2-ImageView-0.05/t/imagetoolselector.t0000644000774200006240000000231011165054454017054 0ustar ra28145a400mc# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 01.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 7; BEGIN { use Glib qw/TRUE FALSE/; use Gtk2 -init; use_ok('Gtk2::ImageView'); }; ######################### # 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. my $imageview = Gtk2::ImageView->new; $imageview->set_pixbuf(Gtk2::Gdk::Pixbuf->new_from_file ('t/gnome_logo.jpg'), TRUE); my $selector = Gtk2::ImageView::Tool::Selector->new($imageview); ok(defined $selector, 'new() works'); isa_ok($selector, 'Gtk2::ImageView::Tool::Selector'); my $rectangle = $selector->get_selection; ok(! defined $rectangle, 'get_selection() initially undefined'); ok(! eval {$selector->set_selection(undef)}, '$selector->set_selection(undef) throws error' ); $rectangle = Gtk2::Gdk::Rectangle->new(0,0,10,10); $selector->set_selection($rectangle); $rectangle = $selector->get_selection; ok(defined $rectangle, 'get_selection() works'); isa_ok($rectangle, 'Gtk2::Gdk::Rectangle'); Gtk2-ImageView-0.05/t/gnome_logo.jpg0000644000774200006240000004454011164575700016011 0ustar ra28145a400mcJFIFHHCCx }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?+{_j[1F&ޯ~W?J?EAo$Qw"}G("RhQD;._aKjmkwүU95r? cʹ";ř8?r33B7ڽZF7=|R亞KO7׮K $ks #M;݊gZᩛB۩h<*M?^nSha\<"ߢ>9Xm{VcO_3ُLɃ{ciC7@?D?W|1즺Zޝ|se5/#ı#Ur83?º.kr;x4z$~$ץOk,15GSox H?EAo$Qw"}G([]x?Q. 7n>s>&эC+7z{Ac3*Ib^xSᆙtjG(!73̞cAq1Pfͽ0rnߵDÛWf;z)N˔),oci$Ws7 wVY(ՃTdhӷۄy+4?uiN[U eNzm-ncc| Җ]o|@%1uy+ v< n㿓4_$"ThbqT{W5)tVce c\GBo)έD]ۙig%¿Z'\=H$| upV=:݆<**;SS*r<[?COkj _W'׉2$xΜ "tiUK }?lu]1'Kۿ>s_QxE-> G/Q%og3Q✵[5ZO߰O22kZ}>1-VռbPd.KWf1xÑs/ %]2t#YQItگz>Q.U/XjR{l(mImow _x_<&эMXj@U &„'Z7#,>il{;XzUood$0cLnDEy"n2)Q\NwirCw6IVjIrmnMa_&hi?h[Y+˙)yI~ٝg[G-ɐ-$>;}$hd5\NcF_%K,<:~^~/)m`֯RHFnUIr48!RN#p `)9ng{]ޭ F"押)a-> K5K rG:R箭yNl{/ZyK\BDs 0 dܟwS_6Y*9KROHN|[+.fuK9yKI//S3^KwO丼[vMx8< s^u(WP5.?<<8٥CWk[ݴW7WM8|Y qq1#jl[:RTiJWrj-6Z^s7pcJ2uwV~\Eei|tGZMu~*iR265w\Z {MdB%5wۻv\ݽ,|¢IuW[˱Bo||!x|^Z:,2K vXvS4K)~O 1.x~T9N>r*Eܕk(At~JiVi)(JmiKyUkQrI(??A},rxwŖM}-}7_@|Ƿ@e]id= +P~7]U$lC~Ν,Tzw3upq5Vڷ+;/ 5|n]N4QRr?NVkIIk{|!~wZܲ/ƑˢA?]o'O"Iboޛs*elk.!ZeDrʎ/F*FJ5i˚a$ 'g5p0' 9BN%(IouenӦ_é[Eq2kغz}l>l>jڮz1߫Z@|MfӾxGVKeiw9i#A2 Xbk*ToOEEs;Z_z8dֿMhGmapQԣ_|vjsb%|f +p[qUkSzӦ goq]R8a/6 Na)Ůk:R6|u]kwˇ6nnI̧j~",o"pape9 Z/R5ҋ UYJ4hlshVi;a~KwW]U+i]lCo bhmcO!3p. vq.;I_~7sn G+dJ408<> q!z+SʨNvn[3)sC8gx[XejjIޥHuq漡 ;+1J_><m}k~7> Z;v:f#z\:˲L%\^?JaJINOK9jtsRMzg<=|::RԵxxʫ-4{$ӂ>UYd 9'+_RLN*yuZup0SVjm8Εh7 wO߯dnT0qxՅX˙JZQikiuI|?u 5s蚍&ga{9-k`lN&̾;eῈ&QR<*yV(`񲓞8*8G_cp؈GXY*Ѳ\ JVcz7K=oҵmgu͝}e֞3Yl@^7,ž|L:Tg?s)OyYFܪS?VWEpt׵N!㯴Vԥ⥽u?nۢ +Iosm$- 8èIW + U`NwKj8ԇ${בʬr:]cz7zڮz1߫Zu0\L>JAO_WF~>O;YkZzd$'288 ?ᜃ28JTc}+b% 5uj5cx+m`TDI/'w~tXG?ZVƑo xOr37c \X۹{i)RyQf4̰880b)VSSgjXS˕I-0ܟz~&SS6Ƶ+y*Tٛ}E 05 XdӤ?+\oqoާË[8Z5|;)Cii}_S9s{o:=އ X}CΏ5#v>ky|wK*ۍ3-،狧Pka2n\= 'ov6ϱfE丌,fJ U>YVq8J4=}F=_5OZh %?;{723̒)[ VU]V{Z|޷/epXl9*򧳕:MMt5Z6~i\ZEȬsyH#< ޳%.Z}y=]ދ_AGơ$>%7VsḎL@-&O&[8 xS4+)9Q߯RMv?x'+5bZ-g̗O~? iz-HGi1W?RMVhaQe~]:Mf.lY=27Hq5YnaʱL .ZJ>_ wBabp՗5:9.S^jVw%πZ.><|\дEmwmtDLvjM۠_qc09&N"JE;RK ӊ>h>nC1ʲ> FpˢKzۛXzT]y:?w?{s|@K{=U ;xw:eԋhܠ(5gڵyZMeKuM<<ˇ<:K+SN 3WkIMMR9TYgWq~iV3e˨ON.JJ% 9J/ݶ>~o__ҿFdz{[|ʚ]cyGEEv{܌{7?+ziK%Y-҆?ӷކ{j?V?Cx~ ̾v|í-֪ d*}˰x~8h[-q9'N\h 6r嚍R+M[~?k=q@]UOF57`|GaoV6< ۃ6L8~35 %Եe[lM4ﭝ+|= }s Iqk<~wyuY쑉[ȰW2ioO ga0ЏHІ!:08(QU^N}hbs$6)h00_\ܵZӴ1edz]I?\o.úޗ^o@[}Ɲmo-.ɣeajmQW=xs'WԌ%üpv硆 6q})Fͪ|쿓x&>׍փ}=w\!-ֿ5Kv^5/ yL|ȾҏOJKO[8ݑŇY?~}pOlߴόmAcLjIb߆2W2e s/x3¬/8(Tc }_,R2V+䍢yZ\{xTp8is?m"ݭ,u7ßKhS6MIQ񗊮˛[0c_;|T<59x^wgsgF5%rJ8z.VrCx/,_n1OV0Tn>2V@{"sܚo'ω*mGk> t#Mr%پE-̞T*IzOڹJHSWKKsHcԞNxjn+Vi^0WWz_?o.wJ- Z JϪhQ޿>y̰|gC<] 2ӓ)K?SzNJ#c ݯ˩|/ȖB̺U IihW-ɺJTO@}|M?;nřxs;qwu?Z3Gi~Ձy_?Kl~5TcxoK#>{Z#~q2ҝ0[cUo_oSӖtAQLWj[KzC;'ioh;)c9tGvYm||<4:Yi6U̹;?qQLACg|G\ W?eASUft#vy,f}}TB68OܡRqWvk#ß8Fh,(Һh~jaE__`o,.QV :=_^3%x!yS_Y_^8x^e+Y EJYx*9T?|feW}Jr'̑3<=:t^oh,62NVjٞWh?yRF-펽;A֬],pc[ճ{C 3寘 U{kѥ)M֧JڪN/m:k\NCO`5S}yE~GSmi ͜7y?Ez$5nǏ&r?{gю2|ero.鎦k?(qjgWog80{jn᭶^}:L%^GqנE{h~s>&эMX~z <[βg|B-y?iu=_O3|#BZiR?Sҿ_EG ,ѷ)Q^WoɦW.3A}ZNշOq~׫FI ZIݏzUpIYkqɪJ=~u_U7:|}7ZӋqjpj|n#fx+̇r 5},nIGxpx>L=xӄ'F{x&r<ƚVvtõJUcNTҔ2_f%IO{}_Du"xxny#Z$6c@ &~:mYwᗉ<7aUf9.keEt*s{ kOE½rV_pg3%zjJX|G#,fK|К'G^+=džO׌WrLV&KKo.c¨<ʺϊy#ad+  ҊT԰Vͧul?_ΕgO/Mԯ%^-&эMXڭ# {Ɩߨn~:hO [Jn<[ iy 1\H&o<|Op2\):x-J<_ëaꮫQnS+UbbiJ/N_cO?xWZuhu3VҬG帅VN6t#tS+e`?8 aNtU:ox-^iiEX/[EC8G'UR6_K~++u 5kh o=W|_ -~?~|F⿈:=bݡ|:n!K,5~xO|8,l6%Qn5^J)x4+ᜳ>ʰx˥<-lmoJOeZ1o[Ǹi~?.Sz?<-xC<=c:n^xN 𿉮4. #WD{k*1mSgX~ ;! &23'4(kbNJs`5#hck30oSt05VIGf|Nڿ\[-r7׭||+xNy+i?gT}:K V;I畕@q9Wి6xS.^a,t2CʇcUib?yPVHj._ 7sL]/zRztj}9k_>3+?&shSe|3<+i5[&/ վéZN;q|6aq]lVK/Ϋcx\W~S68\%U:՝߷GB-aX(Q˧V;  ^B'Ԧ]oOYEw'k_ EF"+M2MO—}f;-kH{GtX5;'$ ϣkc3l+3 ,&}ekb\[jK \6&1Nj[9qIm&#eJ:*U*ttSܯ(ENGOBi#ï:ZվN5Wa#.!X0Ȏ8jp_Y 'L\NOcR85}ݼns4VseJJ,D+K){9џ+Ri=]~: xVm,4%I1 m]n 8V𿄱|E!O RxJ \PY3x8'Q*!k Wk_O?r͠r> Y 6WWE|lRI+,8s<0s>&эMX)Hh_/ jvsGr'bt$h$C@kӍZn-tiזێ/~G¿O_ڿ_#/M16'Ww?ҧNeHu6'NO?G*`pa6.Պa%/8ke8XgU'/wO=Gϊ_ x oSOxSqr[mA;W$ݱ k8Fy/`y'O)`c+6n^L4io\ K82*t]Q/i֚ELM#5h?/5Om)huxY}wPzt x2)Ft n9<*FI+c18L&YPah R^ڇUѧ$~UFen'c ք#*1)ө_я#fά/ſ>2A_5]^|FMw7|᫟Pat:=WzUޛeoǧD[\+Cs8"Z7~oF麒X6<iQ8WҬlVmcx){,Nw_W<^I}bmEsE!k5_i^7KT|!/zMK?^3tnm{0Q4/8o h%fLu^5o }TxR{S^k"%dԵk+qi"Kj\i>q7HL1hxYe#*&|{jU⩺x'V߻:TTq^_p{,6i,S+ʃ [} ͅҵmu+ԂM8ڤ{KqGÉxt27߆ptɱC, 3Q:pOI4ӧ)SR\geXfU|eagQ|[yZ@ƗO:֭5ċE,V"H^5tL8[}}ץ,KN/ x^hϊ^ m+=NC}ujKFw,FiZ٧W^y|&]Q&IϲX'J>ƞԾF#JA˕Fߣ1jbk9xbj/fO9_?D~ 1g_t,a>W:>LOiNhl iEK%G/5gAS+`ia*ф+Ζ"6HT8F2R2>\&aͲΖ' fEJ2-Pt_ӛWv% Xsg'k=^?|LmfKKg5XFl5]Z,)u4-|z&#s瓎oYvErX\ӄSYT_4W*3/ yxbeR^b^7+TJg-Ϝd>#k&_D>?fhޟwǧiӶee{2aS"đFG?ү~%hСhch8zXU*J+ [UTU#.v/vrO-S*R UkTFIrTbڍ}OVGx'Oko▹On{MwiW#q 4ih Av >^#f95!.6pY6}F•h9kVN4# rIQ&pa˒crNRhԜJi'%'eyG!wjAĿ_⯋>0 Y-|8} Ҵz?D:@6T}MRO:Y]ؙc2=We7UZ䃩[ MuV2KdxYUV|F+݉iB1XGTҜ6I+lz~=|rm;WqkcǾ/đ6fn/.. ya d3,牒XnMaWJuj5$I-Y ldb,qVA%ť>cֿ臏rW#JQpb.Bue[)(ooRWY>ta֊!yG]O\oO :9\9 WNs̮3 *7HBQ|~wKYˊ7FwUoAhXrG9^ 7'1 7>{+=؈<;R=Ķ71_>,

of5iƎK}pO3/$d:/?3?QogWO&*Iq8ZvgĊ௢qVxzhetus!¶%uas4],3J؅hAƃ}?}Ww+&[޸_u_&-6iss&}n f 4z/| Sࣉ[CN= )TV^C 8sGv%̖5OϿg_ 4a R~Yu.nfu[{$c#@~G Vu]~grq} Ca*:Wa@@@@o_Ձ_H@€#@Ʒ\㼵0?yARz;k߲G 1' to 'tests => last_test_to_print'; use Test::More tests => 3; BEGIN { use Glib qw/TRUE FALSE/; use Gtk2 -init; use_ok('Gtk2::ImageView'); }; ######################### # 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. my $imageview = Gtk2::ImageView->new; $imageview->set_pixbuf(Gtk2::Gdk::Pixbuf->new_from_file ('t/gnome_logo.jpg'), TRUE); my $iimagetool = Gtk2::ImageView::Tool::Dragger->new($imageview); ok(defined $iimagetool, 'new() works'); isa_ok($iimagetool, 'Gtk2::ImageView::Tool::Dragger'); Gtk2-ImageView-0.05/t/pod.t0000644000774200006240000000020111165054422014105 0ustar ra28145a400mcuse Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); Gtk2-ImageView-0.05/t/animview.t0000644000774200006240000000130011164575700015151 0ustar ra28145a400mc# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 01.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 4; BEGIN { use Glib qw/TRUE FALSE/; use Gtk2 -init; use_ok('Gtk2::ImageView'); }; ######################### # 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. my $animview = Gtk2::ImageView::Anim->new; ok(defined $animview, 'new() works'); isa_ok($animview, 'Gtk2::ImageView::Anim'); ok(defined $animview->get_is_playing, 'get_is_playing() works'); Gtk2-ImageView-0.05/ImageToolPainter.xs0000644000774200006240000000053511165054421016463 0ustar ra28145a400mc#include "gtkimageviewperl.h" MODULE = Gtk2::ImageView::Tool::Painter PACKAGE = Gtk2::ImageView::Tool::Painter PREFIX = gtk_image_tool_painter_ =for object Gtk2::ImageView::Tool::Painter Demo image tool for painting on a Gtk2::ImageView =cut GtkIImageTool_noinc * gtk_image_tool_painter_new (class, view) GtkImageView * view C_ARGS: view Gtk2-ImageView-0.05/maps0000644000774200006240000000173311164575700013577 0ustar ra28145a400mcGTK_TYPE_IMAGE_VIEW GtkImageView GObject Gtk2::ImageView GTK_TYPE_ANIM_VIEW GtkAnimView GObject Gtk2::ImageView::Anim GTK_TYPE_IMAGE_NAV GtkImageNav GObject Gtk2::ImageView::Nav GTK_TYPE_IMAGE_SCROLL_WIN GtkImageScrollWin GObject Gtk2::ImageView::ScrollWin GTK_TYPE_IIMAGE_TOOL GtkIImageTool GObject Gtk2::ImageView::Tool GTK_TYPE_IMAGE_TOOL_DRAGGER GtkImageToolDragger GObject Gtk2::ImageView::Tool::Dragger GTK_TYPE_IMAGE_TOOL_PAINTER GtkImageToolPainter GObject Gtk2::ImageView::Tool::Painter GTK_TYPE_IMAGE_TOOL_SELECTOR GtkImageToolSelector GObject Gtk2::ImageView::Tool::Selector GTK_TYPE_IMAGE_TRANSP GtkImageTransp GEnum Gtk2::ImageView::Transp GTK_TYPE_TYPE HotspotType GEnum Gtk2::ImageView::Hotspot GDK_TYPE_PIXBUF_DRAW_METHOD GdkPixbufDrawMethod GEnum Gtk2::Gdk::Pixbuf::Draw::Method GDK_TYPE_PIXBUF_DRAW_OPTS GdkPixbufDrawOpts GBoxed Gtk2::Gdk::Pixbuf::Draw::Opts GDK_TYPE_PIXBUF_DRAW_CACHE GdkPixbufDrawCache GBoxed Gtk2::Gdk::Pixbuf::Draw::Cache Gtk2-ImageView-0.05/ImageToolSelector.xs0000644000774200006240000001013611165054454016645 0ustar ra28145a400mc#include "gtkimageviewperl.h" MODULE = Gtk2::ImageView::Tool::Selector PACKAGE = Gtk2::ImageView::Tool::Selector PREFIX = gtk_image_tool_selector_ =for object Gtk2::ImageView::Tool::Selector Image tool for selecting rectangular regions =head1 DESCRIPTION Gtk2::ImageView::Tool::Selector is a tool for selecting areas of an image. It is useful for cropping an image, for example. The tool is an implementor of the Gtk2::ImageView::Tool inteface which means that it can be plugged into a Gtk2::ImageView by using the Gtk2::ImageView::Tool::set_tool() method. Gtk2::ImageView::Tool::Selector changes the default display of the Gtk2::ImageView. It darkens down the unselected region of the image which provides a nice effect and makes it clearer what part of the image that is currently selected. Unfortunately, this effect is somewhat incompatible with how Gtk2::ImageView::Nav behaves because that widget will show the image without darkening it. The tool also changes the default behaviour of the mouse. When a Gtk2::ImageView::Tool::Selector is set on a Gtk2::ImageView, mouse presses do not "grab" the image and you cannot scroll by dragging. Instead mouse presses and dragging is used to resize and move the selection rectangle. When the mouse drags the selection rectangle to the border of the widget, the view autoscrolls which is a convenient way for a user to position the selection. Please note that Gtk2::ImageView::Tool::Selector draws the image in two layers. One darkened and the selection rectangle in normal luminosity. Because it uses two draw operations instead one one like Gtk2::ImageView::Tool::Dragger does, it is significantly slower than that tool. Therefore, it makes sense for a user of this library to set the interpolation to GDK_INTERP_NEAREST when using this tool to ensure that performance is acceptable to the users of the program. =head2 Zoom bug There is a small bug in Gtk2::ImageView::Tool::Selector that becomes apparent when the zoom factor is greater than about 30. The edge of the selection rectangle may in that case intersect a pixel. The bug is caused by bug 389832 in gdk-pixbuf. There is no way to solve this bug on Gtk2::ImageView's level (but if someone knows how, I'd really like to know). =cut =for apidoc Returns a new selector tool for the specified view with the following default values: =over =item selection : (0, 0) - [0, 0] =back =cut GtkIImageTool_noinc * gtk_image_tool_selector_new (class, view) GtkImageView * view C_ARGS: view =for apidoc Returns a Gtk2::Gdk::Rectangle with the current selection. If either the width or the height of the selection is zero, then nothing is selected and undef is returned. See "selection-changed" for an example. =cut ## call as $rectangle = $selector->get_selection ## void gtk_image_tool_selector_get_selection (GtkImageToolSelector *selector, GdkRectangle *rect); GdkRectangle_copy * gtk_image_tool_selector_get_selection (selector) GtkImageToolSelector * selector PREINIT: GdkRectangle rect = { 0, }; CODE: gtk_image_tool_selector_get_selection(selector, &rect); if (!rect.width || !rect.height) XSRETURN_UNDEF; RETVAL = ▭ OUTPUT: RETVAL =for apidoc Sets the selection rectangle for the tool. Setting this attribute will cause the widget to immidiately repaint itself if its view is realized. This method does nothing under the following circumstances: =over =item If the views pixbuf is undef. =item If rect is wider or taller than the size of the pixbuf =item If rect equals the current selection rectangle. =back If the selection falls outside the pixbufs area, its position is moved so that it is within the pixbuf. Calling this method causes the ::selection-changed signal to be emitted. The default selection is (0,0) - [0,0]. =over =item selector : a Gtk2::ImageView::Tool::Selector =item rect : Selection rectangle in image space coordinates. =back =cut ## call as $selector->set_selection($rectangle) ## void gtk_image_tool_selector_set_selection (GtkImageToolSelector *selector, GdkRectangle *rect); void gtk_image_tool_selector_set_selection (selector, rect) GtkImageToolSelector * selector GdkRectangle * rect Gtk2-ImageView-0.05/MANIFEST0000644000774200006240000000077511166325630014047 0ustar ra28145a400mcgtkimageviewperl.h ImageView.pm AnimView.xs DrawCache.xs IImageTool.xs ImageNav.xs ImageScrollWin.xs ImageToolDragger.xs ImageToolPainter.xs ImageToolSelector.xs ImageView.xs Zoom.xs Makefile.PL AUTHORS COPYING.LESSER README MANIFEST INSTALL maps examples/interactive.pl t/animview.t t/drawcache.t t/gnome_logo.jpg t/imageview.t t/imagescrollwin.t t/imagetooldragger.t t/imagetoolpainter.t t/imagetoolselector.t t/pod.t style.css META.yml Module meta-data (added by MakeMaker) Gtk2-ImageView-0.05/AnimView.xs0000644000774200006240000000466611165054422015011 0ustar ra28145a400mc#include "gtkimageviewperl.h" MODULE = Gtk2::ImageView::Anim PACKAGE = Gtk2::ImageView::Anim PREFIX = gtk_anim_view_ =for object Gtk2::ImageView::Anim Subclass of Gtk2::ImageView capable of playing GIF animations. =cut =for position DESCRIPTION =head1 DESCRIPTION Gtk2::ImageView::Anim is a subclass of Gtk2::ImageView that provies facilities for displaying and controlling an animation. =cut =for apidoc Returns a new Gtk2::ImageView::Anim with the following default values: =over =item anim : NULL =item is_playing : FALSE =back =cut ## call as $widget = Gtk2::AnimView->new GtkWidget_ornull * gtk_anim_view_new (class) C_ARGS: /*void*/ =for apidoc Returns the current animation of the view. =cut ## call as $anim = $animview->get_anim GdkPixbufAnimation_ornull * gtk_anim_view_get_anim (aview) GtkAnimView * aview =for apidoc Sets the pixbuf animation to play, or NULL to not play any animation. The effect of this method is analoguous to Gtk2::ImageView::set_pixbuf(). Fit mode is reset to GTK_FIT_SIZE_IF_LARGER so that the whole area of the animation fits in the view. Three signals are emitted, first the Gtk2::ImageView will emit zoom-changed and then pixbuf-changed, second, Gtk2::ImageView::Anim itself will emit anim-changed. The default pixbuf animation is NULL. =over =item aview : a Gtk2::ImageView::Anim. =item anim : A pixbuf animation to play. =back =cut ## call as $animview->set_anim($anim) void gtk_anim_view_set_anim (aview, anim) GtkAnimView * aview GdkPixbufAnimation * anim =for apidoc Sets whether the animation should play or not. If there is no current animation this method does not have any effect. =over =item aview : a Gtk2::ImageView::Anim. =item playing : TRUE to play the animation, FALSE otherwise =back =cut ## call as $animview->set_is_playing($boolean) void gtk_anim_view_set_is_playing (aview, playing) GtkAnimView * aview gboolean playing =for apidoc Returns TRUE if the animation is playing, FALSE otherwise. If there is no current animation, this method will always return FALSE. =cut ## call as $boolean = $animview->get_is_playing gboolean gtk_anim_view_get_is_playing (aview) GtkAnimView * aview =for apidoc Steps the animation one frame forward. If the animation is playing it will be stopped. Will it wrap around if the animation is at its last frame? =over =item aview : a Gtk2::ImageView::Anim. =back =cut ## call as $animview->step void gtk_anim_view_step (aview) GtkAnimView * aview Gtk2-ImageView-0.05/ImageNav.xs0000644000774200006240000000306111165054422014745 0ustar ra28145a400mc#include "gtkimageviewperl.h" MODULE = Gtk2::ImageView::Nav PACKAGE = Gtk2::ImageView::Nav PREFIX = gtk_image_nav_ =for object Gtk2::ImageView::Nav Navigation window showing a thumbnailed overview of a Gtk2::ImageView. =head1 DESCRIPTION Gtk2::ImageView::Nav is a popup window that shows a downscaled preview of the pixbuf that Gtk2::ImageView is showing. The user can drag around a rectangle which indicates the current view of the image. This class is used by Gtk2::ImageView::ScrollWin itself. It is probably not very useful for clients of this library. Gtk2::ImageView::Nav has the same keybindings that Gtk2::ImageView has. All keypresses that it receives are passed along to the view. =cut =for apidoc Returns a new Gtk2::ImageView::Nav for showing thumbnails of the view. The pixbuf is by default undef. =cut GtkWidget * gtk_image_nav_new (view) GtkImageView * view =for apidoc Returns the downscaled pixbuf of the views pixbuf that this Gtk2::ImageView::Nav shows, or undef if that pixbuf has not been created yet. The pixbuf is by default undef. =cut GdkPixbuf * gtk_image_nav_get_pixbuf (nav) GtkImageNav * nav void gtk_image_nav_grab (nav) GtkImageNav * nav void gtk_image_nav_release (nav) GtkImageNav * nav =for apidoc Returns the Gtk2::ImageView::Nav centered around the point (center_x, center_y) and grab mouse and keyboard events. The grab continues until a button release event is received which causes the widget to hide. =cut void gtk_image_nav_show_and_grab (nav, center_x, center_y) GtkImageNav * nav int center_x int center_y Gtk2-ImageView-0.05/COPYING.LESSER0000644000774200006240000001673011165054420014736 0ustar ra28145a400mc GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. Gtk2-ImageView-0.05/gtkimageviewperl.h0000644000774200006240000000426511164575700016436 0ustar ra28145a400mc/* * Copyright (c) 2007 by Jeffrey Ratcliffe * see AUTHORS for complete list of contributors * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef _GTKIMAGEVIEWPERL_H_ #define _GTKIMAGEVIEWPERL_H_ /* Include all of gtkimageview's headers for internal consistency */ #include #include #include #include #include #include #include #include #include #include #include #include /* Get important stuff from gtk2-perl */ #include /* Binding definitions -- order is important */ #include "gtkimageviewperl-autogen.h" #define GDK_TYPE_PIXBUF_DRAW_OPTS (gdk_pixbuf_draw_opts_get_type ()) GType gdk_pixbuf_draw_opts_get_type (void) G_GNUC_CONST; #define GDK_TYPE_PIXBUF_DRAW_CACHE (gdk_pixbuf_draw_cache_get_type ()) GType gdk_pixbuf_draw_cache_get_type (void) G_GNUC_CONST; /* Only in very new versions of Glib-Perl */ #ifndef gperl_sv_is_hash_ref #define gperl_sv_is_hash_ref(sv) \ ((sv) && SvOK (sv) && SvROK (sv) && SvTYPE (SvRV (sv)) == SVt_PVHV) #endif /* need a prototype for this as it is used in several places */ GdkPixbufDrawOpts * SvGdkPixbufDrawOpts (SV * sv); SV * newSVGdkPixbufDrawOpts (GdkPixbufDrawOpts * opts); #endif /* _GTKIMAGEVIEWPERL_H_ */ Gtk2-ImageView-0.05/style.css0000644000774200006240000000013511165054421014552 0ustar ra28145a400mc/** * Same stylesheet as for gtk2-perl. **/ h2 { font-size: 14pt; font-weight: normal; } Gtk2-ImageView-0.05/IImageTool.xs0000644000774200006240000000527211165054422015255 0ustar ra28145a400mc#include "gtkimageviewperl.h" MODULE = Gtk2::ImageView::Tool PACKAGE = Gtk2::ImageView::Tool PREFIX = gtk_iimage_tool_ =for object Gtk2::ImageView::Tool Interface for objects capable of being used as tools by Gtk2::ImageView =cut =for position DESCRIPTION =head1 DESCRIPTION Gtk2::ImageView::Tool is an interface that defines how Gtk2::ImageView interacts with objects that acts as tools. Gtk2::ImageView delegates many of its most important tasks (such as drawing) to its tool which carries out all the hard work. The Gtk2::ImageView package comes with two tools; Gtk2::ImageView::Tool::Dragger and Gtk2::ImageView::Tool::Selector, but by implementing your own tool it is possible to extend Gtk2::ImageView to do stuff its author didn't imagine. Gtk2::ImageView uses Gtk2::ImageView::Tool::Dragger by default, as that tool is he most generally useful one. However, it is trivial to make it use another tool. my $view = Gtk2::ImageView->new; my $tool = Gtk2::ImageView::Tool::Selector ($view); $view->set_tool ($tool); Using the above code makes the view use the selector tool instead of the default dragger tool. =cut gboolean gtk_iimage_tool_button_press (tool, ev) GtkIImageTool * tool GdkEvent * ev C_ARGS: tool, (GdkEventButton *) ev gboolean gtk_iimage_tool_button_release (tool, ev) GtkIImageTool * tool GdkEvent * ev C_ARGS: tool, (GdkEventButton *) ev gboolean gtk_iimage_tool_motion_notify (tool, ev) GtkIImageTool * tool GdkEvent * ev C_ARGS: tool, (GdkEventMotion *) ev =for apidoc Indicate to the tool that either a part of, or the whole pixbuf that the image view shows has changed. This method is called by the view whenever its pixbuf or its tool changes. That is, when any of the following methods are used: =over =item Gtk2::ImageView::set_pixbuf() =item Gtk2::ImageView::set_tool() =item Gtk2::ImageView::damage_pixels() =back If the reset_fit parameter is TRUE, it means that a new pixbuf has been loaded into the view. =over =item tool : the tool =item reset_fit : whether the view is resetting its fit mode or not =item rect : rectangle containing the changed area or NULL =back =cut void gtk_iimage_tool_pixbuf_changed (tool, reset_fit, rect) GtkIImageTool * tool gboolean reset_fit GdkRectangle * rect =for apidoc Called whenever the image view decides that any part of the image it shows needs to be redrawn. =cut void gtk_iimage_tool_paint_image (tool, opts, drawable) GtkIImageTool * tool GdkPixbufDrawOpts * opts GdkDrawable * drawable =for apidoc Returns the cursor to display at the given coordinates. =cut GdkCursor * gtk_iimage_tool_cursor_at_point (tool, x, y) GtkIImageTool * tool int x int y Gtk2-ImageView-0.05/ImageScrollWin.xs0000644000774200006240000000151511165054422016137 0ustar ra28145a400mc#include "gtkimageviewperl.h" MODULE = Gtk2::ImageView::ScrollWin PACKAGE = Gtk2::ImageView::ScrollWin PREFIX = gtk_image_scroll_win_ =for object Gtk2::ImageView::ScrollWin Scrollable window suitable for Gtk2::ImageView. =head1 DESCRIPTION Gtk2::ImageView::ScrollWin provides a widget similar in appearance to Gtk2::ScrollWin that is more suitable for displaying Gtk2::ImageView's. =cut =for apidoc Returns a new Gtk2::ImageView::ScrollWin containing the Gtk2::ImageView. The widget is built using four subwidgets arranged inside a Gtk2::Table with two columns and two rows. Two scrollbars, one navigator button (the decorations) and one Gtk2::ImageView. When the Gtk2::ImageView fits inside the window, the decorations are hidden. =cut GtkWidget_ornull * gtk_image_scroll_win_new (class, view) GtkImageView * view C_ARGS: view Gtk2-ImageView-0.05/ImageView.pm0000644000774200006240000000215011165054421015112 0ustar ra28145a400mcpackage Gtk2::ImageView; use Gtk2; require DynaLoader; our @ISA = qw(DynaLoader); our $VERSION = '0.05'; sub dl_load_flags {0x01}; bootstrap Gtk2::ImageView $VERSION; 1; __END__ =head1 NAME Gtk2::ImageView - Perl bindings to the GtkImageView image viewer widget =head1 SYNOPSIS use Gtk2::ImageView; Gtk2->init; $window = Gtk2::Window->new(); $view = Gtk2::ImageView->new; $view->set_pixbuf($pixbuf, TRUE); $window->add($view); $window->show_all; =head1 ABSTRACT Perl bindings to the GtkImageView image viewer widget Find out more about GtkImageView at http://trac.bjourne.webfactional.com/. The Perl bindings follow the C API very closely, and the C reference should be considered the canonical documentation. Be sure to check out the example programs in the "examples" directory. =head1 DESCRIPTION The Gtk2::ImageView module allows a Perl developer to use the GtkImageView image viewer widget. Find out more about GtkImageView at http://trac.bjourne.webfactional.com/. To discuss Gtk2::ImageView or gtk2-perl, ask questions and flame/praise the authors, join gtk-perl-list@gnome.org at lists.gnome.org. Gtk2-ImageView-0.05/Zoom.xs0000644000774200006240000000324511165054422014206 0ustar ra28145a400mc#include "gtkimageviewperl.h" MODULE = Gtk2::ImageView::Zoom PACKAGE = Gtk2::ImageView::Zoom PREFIX = gtk_zooms_ =for object Gtk2::ImageView::Zoom Functions for dealing with zoom factors =cut =for position DESCRIPTION =head1 DESCRIPTION GtkImageView uses a discrete amount of zoom factors for determining which zoom to set. Using these functions, it is possible to retrieve information and manipulate a zoom factor. =cut =for apidoc Returns the zoom factor that is one step larger than the supplied zoom factor. =cut ## call as $zoom = Gtk2::ImageView::Zoom->get_zoom_in($zoom) ## gdouble gtk_zooms_get_zoom_in(gdouble zoom); gdouble gtk_zooms_get_zoom_in (class, zoom) gdouble zoom C_ARGS: zoom =for apidoc Returns the zoom factor that is one step smaller than the supplied zoom factor. =cut ## call as $zoom = Gtk2::ImageView::Zoom->get_zoom_out($zoom) ## gdouble gtk_zooms_get_zoom_out(gdouble zoom); gdouble gtk_zooms_get_zoom_out (class, zoom) gdouble zoom C_ARGS: zoom =for apidoc Returns the minimum allowed zoom factor. =cut ## call as $zoom = Gtk2::ImageView::Zoom->get_min_zoom ## gdouble gtk_zooms_get_min_zoom(void); gdouble gtk_zooms_get_min_zoom (class) C_ARGS: /*void*/ =for apidoc Returns the maximum allowed zoom factor. =cut ## call as $zoom = Gtk2::ImageView::Zoom->get_max_zoom ## gdouble gtk_zooms_get_max_zoom(void); gdouble gtk_zooms_get_max_zoom (class) C_ARGS: /*void*/ =for apidoc Returns the zoom factor clamped to the minumum and maximum allowed values. =cut ## call as $zoom = Gtk2::ImageView::Zoom->clamp_zoom($zoom) ## gdouble gtk_zooms_clamp_zoom(gdouble zoom; gdouble gtk_zooms_clamp_zoom (class, zoom) gdouble zoom C_ARGS: zoom Gtk2-ImageView-0.05/examples/0000750000774200006240000000000011166325627014524 5ustar ra28145a400mcGtk2-ImageView-0.05/examples/interactive.pl0000755000774200006240000004130611164575700017407 0ustar ra28145a400mc#!/usr/bin/perl -w # Copyright (c) 2007 by Muppet # based on the original gtkimageview/tests/interactive.c # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 3 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -*- Mode: perl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- # vim: set expandtab softtabstop=4 shiftwidth=4 : use strict; # Library under test. use Gtk2::ImageView; use Glib ':constants'; # ////////////////////////////////////////////////////////////////////// # ///// Global data //////////////////////////////////////////////////// # ////////////////////////////////////////////////////////////////////// my $open_dialog; my $view; my $main_window; my $default_group; my $image_group; my $transform_group; my $is_fullscreen; my $statusbar; # Label that displays the active selection. my $sel_info_label; # Tools my $dragger; my $selector; my $painter; # Context ID:s for the Statusbar my $help_msg_cid; my $image_info_cid; # ////////////////////////////////////////////////////////////////////// # ///// Opener dialog ////////////////////////////////////////////////// # ////////////////////////////////////////////////////////////////////// sub init_open_dialog { $open_dialog = Gtk2::FileChooserDialog->new ("Open Image", $main_window, 'open', 'gtk-cancel' => 'cancel', 'gtk-open' => 'accept'); } # ////////////////////////////////////////////////////////////////////// # ///// ImageViewerApp ///////////////////////////////////////////////// # ////////////////////////////////////////////////////////////////////// sub push_image_info { my ($basename, $anim) = @_; $statusbar->push ($image_info_cid, sprintf ("%s, %d x %d pixels", $basename, $anim->get_width, $anim->get_height)); } sub load_filename { my ($path) = @_; eval { my $anim = Gtk2::Gdk::PixbufAnimation->new_from_file ($path); $view->set_anim ($anim); my $basename = Glib::filename_display_basename ($path); $main_window->set_title ($basename); push_image_info ($basename, $anim); $image_group->set_sensitive (TRUE); # Only active the transform_group if the loaded object is a single # image -- transformations cannot be applied to animations. $transform_group->set_sensitive ($anim->is_static_image); }; if ($@) { print "No anim! $@\n"; } } sub gdk_rectangle_to_str { my $r = shift; sprintf "(%d, %d)-[%d, %d]", $r->x, $r->y, $r->width, $r->height; } sub get_enum_nick { my ($package, $value) = @_; my @v = Glib::Type->list_values ($package); return $v[$value]{nick}; } sub get_enum_value { my ($package, $string) = @_; my @v = Glib::Type->list_values ($package); for (my $i = 0 ; $i < @v ; $i++) { return $i if $v[$i]{name} eq $string or $v[$i]{nick} eq $string; } } sub GTK_IMAGE_TRANSP_COLOR { get_enum_value ('Gtk2::ImageView::Transp', 'color') } sub GTK_IMAGE_TRANSP_BACKGROUND { get_enum_value 'Gtk2::ImageView::Transp', 'background' } sub GTK_IMAGE_TRANSP_GRID { get_enum_value 'Gtk2::ImageView::Transp', 'grid' } #sub GTK_IMAGE_TRANSP_COLOR { 0 } #sub GTK_IMAGE_TRANSP_BACKGROUND { 1 } #sub GTK_IMAGE_TRANSP_GRID { 2 } # ////////////////////////////////////////////////////////////////////// # ///// Callbacks ////////////////////////////////////////////////////// # ////////////////////////////////////////////////////////////////////// sub sel_changed_cb { my ($selector, $label) = @_; my $sel = $selector->get_selection; if (defined $sel) { $label->set_text (gdk_rectangle_to_str($sel)); } else { $label->set_text (""); } } sub change_image_tool_cb { my ($action, $current) = @_; my $value = $current->get_current_value (); my $tool = $selector; if ($value == 10) { $tool = $dragger; } elsif ($value == 30) { $tool = $painter; } $view->set_tool ($tool); if ($value == 20) { sel_changed_cb ($selector, $sel_info_label); } else { $sel_info_label->set_text (""); } } sub zoom_in_cb { $view->zoom_in (); } sub zoom_out_cb { $view->zoom_out (); } sub zoom_100_cb { $view->set_zoom (1.0); } sub zoom_to_fit_cb { $view->set_fitting (TRUE); } sub open_image_cb { my ($action) = @_; if (!$open_dialog) { init_open_dialog (); } if ($open_dialog->run () eq 'accept') { load_filename ($open_dialog->get_filename ()); } $open_dialog->hide (); } sub fullscreen_cb { # I do not have the patience to implement all things you do to # fullscreen for real. This is a faked approximation. $is_fullscreen = !$is_fullscreen; if ($is_fullscreen) { $main_window->fullscreen (); } else { $main_window->unfullscreen (); } $view->set_show_cursor (!$is_fullscreen); $view->set_show_frame (!$is_fullscreen); $view->set_black_bg ($is_fullscreen); } sub transform_cb { my $pixbuf = $view->get_pixbuf (); # Not doing this just now, as perl is very inefficient for such things # my $pixels = $pixbuf->get_pixels (); # my $rowstride = $pixbuf->get_rowstride (); # my $n_channels = $pixbuf->get_n_channels (); # for (int y = 0; y < $pixbuf->get_height (); y++) # for (int x = 0; x < $pixbuf->get_width (); x++) # { # guchar *p = pixels + y * rowstride + x * n_channels; # for (int n = 0; n < 3; n++) # p[n] ^= 0xff; # } $view->set_pixbuf ($pixbuf, FALSE); } sub change_zoom_quality_cb { my ($action, $current) = @_; $view->set_interpolation ($current->get_current_value () ? 'bilinear' : 'nearest'); } sub change_transp_type_cb { my ($action, $current) = @_; my $color = 0; my $transp = $current->get_current_value; if ($transp == GTK_IMAGE_TRANSP_COLOR) { $color = 0x000000; } $view->set_transp (get_enum_nick('Gtk2::ImageView::Transp', $transp), $color); } sub menu_item_select_cb { my ($proxy) = @_; # GtkAction *action = g_object_get_data (G_OBJECT (proxy), "gtk-action"); my $action = Glib::Object->new_from_pointer ($proxy->get_data ('gtk-action')); my $msg = $action->get ('tooltip'); $statusbar->push ($help_msg_cid, $msg) if $msg; } sub menu_item_deselect_cb { my ($item) = @_; $statusbar->pop ($help_msg_cid); } sub connect_proxy_cb { my ($ui, $action, $proxy) = @_; return unless $proxy->isa ('Gtk2::MenuItem'); $proxy->signal_connect (select => \&menu_item_select_cb); $proxy->signal_connect (deselect => \&menu_item_deselect_cb); } sub disconnect_proxy_cb { my ($ui, $action, $proxy) = @_; return unless $proxy->isa ('Gtk2::MenuItem'); $proxy->signal_handlers_disconnect_by_func (\&menu_item_select_cb); $proxy->signal_handlers_disconnect_by_func (\&menu_item_deselect_cb); } sub zoom_changed_cb { my ($view, $label) = @_; $label->set_text (sprintf "%d%%", int ($view->get_zoom () * 100.0)); } # ////////////////////////////////////////////////////////////////////// # ///// MainWindow ///////////////////////////////////////////////////// # ////////////////////////////////////////////////////////////////////// sub main_window_new { my ($widget, $width, $height) = @_; my $window = Gtk2::Window->new (); $window->set_default_size ($width, $height); $window->add ($widget); $window->signal_connect (delete_event => sub { Gtk2->main_quit } ); return $window; } # ////////////////////////////////////////////////////////////////////// # ///// UI Setup /////////////////////////////////////////////////////// # ////////////////////////////////////////////////////////////////////// my @default_actions = ( [ "FileMenu", undef, "_File" ], [ "Open", 'gtk-open', "_Open image", undef, "Open an image", \&open_image_cb ], [ "Quit", 'gtk-quit', "_Quit me!", undef, "Quit the program", sub { Gtk2->main_quit }, ], ["EditMenu", undef, "_Edit"], ["ViewMenu", undef, "_View"], ["TranspMenu", undef, "_Transparency"] ); my @quality_actions = ( [ "QualityHigh", undef, "_High Quality", undef, "Use high quality zoom", TRUE ], [ "QualityLow", undef, "_Low Quality", undef, "Use low quality zoom", FALSE ] ); my @transp_actions = ( [ "TranspGrid", undef, "Square _Grid", undef, "Draw a grid on transparent parts", GTK_IMAGE_TRANSP_GRID ], [ "TranspBackground", undef, "_Background", undef, "Draw background color on transparent parts", GTK_IMAGE_TRANSP_BACKGROUND ], [ "TranspBlack", undef, "_Black", undef, "Draw black color on transparent parts", GTK_IMAGE_TRANSP_COLOR ] ); my @image_actions = ( [ "ZoomIn", 'gtk-zoom-in', "Zoom _In", "plus", "Zoom in one step", \&zoom_in_cb ], [ "ZoomOut", 'gtk-zoom-out', "Zoom _Out", "minus", "Zoom out one step", \&zoom_out_cb ], [ "ZoomNormal", 'gtk-zoom-100', "_Normal Size", "0", "Set zoom to natural size of the image", \&zoom_100_cb ], [ "ZoomFit", 'gtk-zoom-fit', "Best _Fit", undef, "Adapt zoom to fit image", \&zoom_to_fit_cb ], [ "Fullscreen", 'gtk-fullscreen', "_Fullscreen Mode", "F11", "View image in fullscreen", \&fullscreen_cb ] ); my @image_tools = ( [ "DraggerTool", 'gtk-refresh', "_Drag", undef, "Use the hand tool", 10 ], [ "SelectorTool", 'gtk-media-pause', "_Select", undef, "Use the rectangular selection tool", 20 ], [ "PainterTool", 'gtk-media-play', "_Paint", undef, "Use the painter tool", 30 ] ); my @transform_actions = ( [ "Transform", undef, "_Transform", "T", "Apply an XOR transformation to the image", \&transform_cb ] ); my $ui_info = "

"; sub parse_ui { my $uimanager = shift; eval { $uimanager->add_ui_from_string ($ui_info) }; if ($@) { die "Unable to create menus: $@\n"; } } sub add_action_groups { my $uimanager = shift; # Setup the default group. $default_group = Gtk2::ActionGroup->new ("default"); $default_group->add_actions (\@default_actions); $default_group->add_radio_actions (\@image_tools, 10, \&change_image_tool_cb); $uimanager->insert_action_group ($default_group, 0); # Setup the image group. $image_group = Gtk2::ActionGroup->new ("image"); $image_group->add_actions (\@image_actions); $image_group->add_radio_actions (\@quality_actions, TRUE, \&change_zoom_quality_cb); $image_group->add_radio_actions (\@transp_actions, GTK_IMAGE_TRANSP_GRID, \&change_transp_type_cb); $image_group->set_sensitive (FALSE); $uimanager->insert_action_group ($image_group, 0); # Transform group $transform_group = Gtk2::ActionGroup->new ("transform"); if ($transform_group) { $transform_group->add_actions (\@transform_actions); $transform_group->set_sensitive (FALSE); $uimanager->insert_action_group ($transform_group, 0); } } sub setup_layout { my $uimanager = shift; my $box = Gtk2::VBox->new (FALSE, 0); my $menu = $uimanager->get_widget ("/MenuBar"); $box->pack_start ($menu, FALSE, FALSE, 0); my $toolbar = $uimanager->get_widget ("/ToolBar"); $box->pack_start ($toolbar, FALSE, FALSE, 0); my $scroll_win = Gtk2::ImageView::ScrollWin->new ($view); $box->pack_start ($scroll_win, TRUE, TRUE, 0); $statusbar = Gtk2::Statusbar->new (); # A label in the statusbar that displays the current selection if # there is one. my $sel_info_frame = Gtk2::Frame->new (); $sel_info_frame->set_shadow_type ('in'); $sel_info_label = Gtk2::Label->new (""); $sel_info_frame->add ($sel_info_label); $selector->signal_connect (selection_changed => \&sel_changed_cb, $sel_info_label); $statusbar->pack_start ($sel_info_frame, FALSE, FALSE, 0); # A label in the statusbar that displays the current zoom. It # updates its text when the zoom-changed signal is fired from the # view. my $zoom_info_frame = Gtk2::Frame->new (); $zoom_info_frame->set_shadow_type ('in'); my $zoom_info_label = Gtk2::Label->new ("100%"); $zoom_info_frame->add ($zoom_info_label); $view->signal_connect (zoom_changed => \&zoom_changed_cb, $zoom_info_label); $statusbar->pack_start ($zoom_info_frame, FALSE, FALSE, 0); $box->pack_end ($statusbar, FALSE, FALSE, 0); return $box; } sub setup_main_window { my $uimanager = Gtk2::UIManager->new (); $uimanager->signal_connect (connect_proxy => \&connect_proxy_cb); $uimanager->signal_connect (disconnect_proxy => \&disconnect_proxy_cb); add_action_groups ($uimanager); parse_ui ($uimanager); my $accels = $uimanager->get_accel_group (); die "no accels!" unless $accels; my $vbox = setup_layout ($uimanager); $main_window = main_window_new ($vbox, 700, 500); $main_window->add_accel_group ($accels); $view->grab_focus (); # Setup context ID:s $help_msg_cid = $statusbar->get_context_id ("help_msg"); $image_info_cid = $statusbar->get_context_id ("image_info"); } # char **filenames = NULL; # GOptionEntry options[] = { # { # G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, # &filenames, NULL, "[FILE...]" # }, # {NULL} # }; # GOptionContext *ctx = g_option_context_new ("Sample image viewer"); # g_option_context_add_main_entries (ctx, options, "example1"); # g_option_context_parse (ctx, &argc, &argv, NULL); # g_option_context_free (ctx); Gtk2->init; $view = Gtk2::ImageView::Anim->new (); print "Using GtkImageView version ", $view->library_version, "\n"; $dragger = Gtk2::ImageView::Tool::Dragger->new ($view); $selector = Gtk2::ImageView::Tool::Selector->new ($view); $painter = Gtk2::ImageView::Tool::Painter->new ($view); setup_main_window (); load_filename ($ARGV[0]) if @ARGV; $main_window->show_all (); Gtk2->main (); Gtk2-ImageView-0.05/DrawCache.xs0000644000774200006240000001374611165054422015112 0ustar ra28145a400mc#include "gtkimageviewperl.h" GType gdk_pixbuf_draw_opts_get_type(void) { static GType t = 0; if (!t) { t = g_boxed_type_register_static("GdkPixbufDrawOpts", (GBoxedCopyFunc) g_boxed_copy, (GBoxedFreeFunc) g_boxed_free); } return t; } /* struct _GdkPixbufDrawOpts { gdouble zoom; GdkRectangle zoom_rect; int widget_x; int widget_y; GdkInterpType interp; GdkPixbuf *pixbuf; int check_color1; int check_color2; }; */ SV * newSVGdkPixbufDrawOpts (GdkPixbufDrawOpts * opts) { HV * hv = newHV(); hv_store (hv, "zoom", 4, newSVnv (opts->zoom), 0); hv_store (hv, "zoom_rect", 9, newSVGdkRectangle (&opts->zoom_rect), 0); hv_store (hv, "widget_x", 8, newSViv (opts->widget_x), 0); hv_store (hv, "widget_y", 8, newSViv (opts->widget_y), 0); hv_store (hv, "interp", 6, newSVGdkInterpType (opts->interp), 0); hv_store (hv, "pixbuf", 6, newSVGdkPixbuf (opts->pixbuf), 0); hv_store (hv, "check_color1", 12, newSViv (opts->check_color1), 0); hv_store (hv, "check_color2", 12, newSViv (opts->check_color2), 0); return newRV_noinc ((SV *) hv); } /* * returns a pointer to a GdkPixbufDrawOpts you can use until control returns * to perl. */ GdkPixbufDrawOpts * SvGdkPixbufDrawOpts (SV * sv) { HV * hv; SV ** svp; GdkPixbufDrawOpts * opts; /* Make sure it is what we think it is before we try to dereference and parse it */ if (! gperl_sv_is_hash_ref (sv)) croak ("Expected a hash reference for Gtk2::Gdk::Pixbuf::Draw::Opts"); hv = (HV*) SvRV (sv); opts = gperl_alloc_temp (sizeof (GdkPixbufDrawOpts)); svp = hv_fetch (hv, "zoom", 4, FALSE); if (svp) opts->zoom = SvNV (*svp); svp = hv_fetch (hv, "zoom_rect", 9, FALSE); if (svp) opts->zoom_rect = * (GdkRectangle *) SvGdkRectangle (*svp); svp = hv_fetch (hv, "widget_x", 8, FALSE); if (svp) opts->widget_x = SvIV (*svp); svp = hv_fetch (hv, "widget_y", 8, FALSE); if (svp) opts->widget_y = SvIV (*svp); svp = hv_fetch (hv, "interp", 6, FALSE); if (svp) opts->interp = SvGdkInterpType (*svp); svp = hv_fetch (hv, "pixbuf", 6, FALSE); if (svp) opts->pixbuf = (GdkPixbuf *) SvGdkPixbuf (*svp); svp = hv_fetch (hv, "check_color1", 12, FALSE); if (svp) opts->check_color1 = SvIV (*svp); svp = hv_fetch (hv, "check_color2", 12, FALSE); if (svp) opts->check_color2 = SvIV (*svp); return opts; } GType gdk_pixbuf_draw_cache_get_type(void) { static GType t = 0; if (!t) { t = g_boxed_type_register_static("GdkPixbufDrawCache", (GBoxedCopyFunc) g_boxed_copy, (GBoxedFreeFunc) g_boxed_free); } return t; } /* struct _GdkPixbufDrawCache { GdkPixbuf *last_pixbuf; GdkPixbufDrawOpts old; int check_size; }; */ static SV * newSVGdkPixbufDrawCache (GdkPixbufDrawCache * cache) { HV * hv = newHV(); hv_store (hv, "last_pixbuf", 11, newSVGdkPixbuf (cache->last_pixbuf), 0); hv_store (hv, "old", 3, newSVGdkPixbufDrawOpts (&cache->old), 0); hv_store (hv, "check_size", 10, newSViv (cache->check_size), 0); return newRV_noinc ((SV *) hv); } /* * returns a pointer to a GdkPixbufDrawCache you can use until control returns * to perl. */ static GdkPixbufDrawCache * SvGdkPixbufDrawCache (SV * sv) { HV * hv; SV ** svp; GdkPixbufDrawCache * cache; /* Make sure it is what we think it is before we try to dereference and parse it */ if (! gperl_sv_is_hash_ref (sv)) croak ("Expected a hash reference for Gtk2::Gdk::Pixbuf::Draw::Cache"); hv = (HV*) SvRV (sv); cache = gperl_alloc_temp (sizeof (GdkPixbufDrawCache)); svp = hv_fetch (hv, "last_pixbuf", 11, FALSE); if (svp) cache->last_pixbuf = (GdkPixbuf *) SvGdkPixbuf (*svp); svp = hv_fetch (hv, "old", 3, FALSE); if (svp) cache->old = * (GdkPixbufDrawOpts *) SvGdkPixbufDrawOpts (*svp); svp = hv_fetch (hv, "check_size", 10, FALSE); if (svp) cache->check_size = SvIV (*svp); return cache; } MODULE = Gtk2::Gdk::Pixbuf::Draw::Cache PACKAGE = Gtk2::Gdk::Pixbuf::Draw::Cache PREFIX = gdk_pixbuf_draw_cache_ =for object Gtk2::Gdk::Pixbuf::Draw::Cache Cache for drawing scaled pixbufs =cut =for position DESCRIPTION =head1 DESCRIPTION Gtk2::Gdk::Pixbuf::Draw::Cache provides a cache that should be used by the Gtk2::ImageView::Tool when redrawing the Gtk2::ImageView. =cut =for apidoc Returns a new pixbuf draw cache. =cut GdkPixbufDrawCache * gdk_pixbuf_draw_cache_new (class) C_ARGS: /*void*/ =for apidoc Deallocates a pixbuf draw cache and all its data. =cut void gdk_pixbuf_draw_cache_free (cache) GdkPixbufDrawCache * cache =for apidoc Force the pixbuf draw cache to scale the pixbuf at the next draw. Gtk2::Gdk::Pixbuf::Draw::Cache tries to minimize the number of scale operations needed by caching the last drawn pixbuf. It would be inefficient to check the individual pixels inside the pixbuf so it assumes that if the memory address of the pixbuf has not changed, then the cache is good to use. However, when the image data is modified, this assumtion breaks, which is why this method must be used to tell draw cache about it. =cut void gdk_pixbuf_draw_cache_invalidate (cache) GdkPixbufDrawCache * cache =for apidoc Redraws the area specified in the pixbuf draw options in an efficient way by using caching. =over =item cache : a GdkPixbufDrawCache =item opts : the Gtk2::Gdk::Pixbuf::Draw::Opts to use in this draw =item drawable : a GdkDrawable to draw on =back =cut void gdk_pixbuf_draw_cache_draw (cache, opts, drawable) GdkPixbufDrawCache * cache GdkPixbufDrawOpts * opts GdkDrawable * drawable =for apidoc Gets the fastest method to draw the specified draw options. old is assumed to be the last PixbufDrawOpts used and new is the one to use this time. =cut GdkPixbufDrawMethod gdk_pixbuf_draw_cache_get_method (class, old, new) GdkPixbufDrawOpts * old GdkPixbufDrawOpts * new C_ARGS: old, new Gtk2-ImageView-0.05/INSTALL0000644000774200006240000000440111165054420013730 0ustar ra28145a400mcGtk2::ImageView =============== Perl bindings to the GtkImageView image viewer widget Find out more about GtkImageView at http://trac.bjourne.webfactional.com/. The Perl bindings follow the C API very closely, and the C reference should be considered the canonical documentation. Be sure to check out the example programs in the "examples" directory. INSTALLATION ------------ To install this module type the following: perl Makefile.PL make make test make install To avoid installing to a system directory, since this is a beta release, you can change the installation prefix at Makefile.PL time with perl Makefile.PL PREFIX=/some/other/place This will install the module to the subdirectory lib/perl5 under the given prefix. If this is not already in perl's include path, you'll need to tell perl how to get to this library directory so you can use it; there are three ways: in your environment (the easiest): # assuming a bourne-style shell PERL5LIB=/some/other/place/lib/perl5/site_perl export PERL5LIB on the perl command line: perl -I /some/other/place/lib/perl5/site_perl yourscript in the code of your perl script: use lib '/some/other/place/lib/perl5/site_perl'; DEPENDENCIES ------------ This module requires these other modules and libraries: Gtk2 >= 1.140 (Perl module) GtkImageView >= 1.5.0 (C library) In order to build it from source, you'll also need ExtUtils::Depends >= 0.2 ExtUtils::PkgConfig >= 1.03 COPYRIGHT AND LICENSE --------------------- Copyright (c) 2007 -- 2008 by Jeffrey Ratcliffe see AUTHORS for complete list of contributors This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . Gtk2-ImageView-0.05/AUTHORS0000644000774200006240000000061211165054421013750 0ustar ra28145a400mcAuthor ============================================= Jeffrey Ratcliffe jeffrey dot ratcliffe at gmail dot com Patches gratefully received from ============================================= muppet scott at asofyet dot org Torsten Schoenfeld kaffeetisch at web dot de Emmanuele Bassi ebassi at gmail dot com Kevin Ryde user42 at zip.com.au Gtk2-ImageView-0.05/ImageToolDragger.xs0000644000774200006240000000103611165054422016432 0ustar ra28145a400mc#include "gtkimageviewperl.h" MODULE = Gtk2::ImageView::Tool::Dragger PACKAGE = Gtk2::ImageView::Tool::Dragger PREFIX = gtk_image_tool_dragger_ =for object Gtk2::ImageView::Tool::Dragger Default image tool for panning the image. =head1 DESCRIPTION Gtk2::ImageView::Tool::Dragger is the default image tool for Gtk2::ImageView. Its only feature is that it can drag the image around. =cut =for apidoc Returns a new dragger tool. =cut GtkIImageTool_noinc * gtk_image_tool_dragger_new (class, view) GtkImageView * view C_ARGS: view Gtk2-ImageView-0.05/ImageView.xs0000644000774200006240000003606611165054422015146 0ustar ra28145a400mc#include "gtkimageviewperl.h" MODULE = Gtk2::ImageView PACKAGE = Gtk2::ImageView PREFIX = gtk_image_view_ BOOT: #include "register.xsh" #include "boot.xsh" =for object Gtk2::ImageView General purpose image viewer for Gtk+ =cut =for position SYNOPSIS =head1 SYNOPSIS use Gtk2::ImageView; Gtk2->init; $window = Gtk2::Window->new(); $view = Gtk2::ImageView->new; $view->set_pixbuf($pixbuf, TRUE); $window->add($view); $window->show_all; =cut =for position DESCRIPTION =head1 DESCRIPTION GtkImageView is a full-featured general purpose image viewer widget for GTK. It provides a scrollable, zoomable pane in which a pixbuf can be displayed. The Gtk2::ImageView module allows a perl developer to use the GtkImageView Widget. =cut =for position SEE_ALSO =head1 SEE ALSO GtkImageView Reference Manual at http://trac.bjourne.webfactional.com/ perl(1), Glib(3pm), Gtk2(3pm), Gtk2::ImageViewer - an alternative image viewer widget. =for position AUTHOR =head1 AUTHOR Jeffrey Ratcliffe , with patches from muppet , Torsten Schoenfeld and Emanuele Bassi Kevin Ryde The DESCRIPTION section of this page is adapted from the documentation of GtkImageView. =for position COPYRIGHT AND LICENSE =head1 COPYRIGHT AND LICENSE Copyright (c) 2007 -- 2008 by Jeffrey Ratcliffe see AUTHORS for complete list of contributors This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . =cut =for apidoc Returns a new Gtk2::ImageView with the following default values. =over =item black bg : FALSE =item fitting : TRUE =item image tool : a Gtk2::ImageView::Tool::Dragger instance =item interpolation mode : GDK_INTERP_BILINEAR =item offset : (0, 0) =item pixbuf : NULL =item show cursor: TRUE =item show frame : TRUE =item transp : GTK_IMAGE_TRANSP_GRID =item zoom : 1.0 =back =cut ## call as $widget = Gtk2::ImageView->new GtkWidget_ornull * gtk_image_view_new (class) C_ARGS: /*void*/ =for apidoc Returns a rectangle with the current viewport. If pixbuf is NULL or there is no viewport, undef is returned. The current viewport is defined as the rectangle, in zoomspace coordinates as the area of the loaded pixbuf the Gtk2::ImageView is currently showing. =cut ## call as $viewport = $view->get_viewport ## gboolean gtk_image_view_get_viewport (GtkImageView *view, GdkRectangle *rect); GdkRectangle_copy * gtk_image_view_get_viewport (view) GtkImageView * view PREINIT: GdkRectangle rect; CODE: if (!gtk_image_view_get_viewport(view, &rect)) XSRETURN_UNDEF; RETVAL = ▭ OUTPUT: RETVAL =for apidoc Get the rectangle in the widget where the pixbuf is painted, or undef if the view is not allocated or has no pixbuf. For example, if the widgets allocated size is 100, 100 and the pixbufs size is 50, 50 and the zoom factor is 1.0, then the pixbuf will be drawn centered on the widget. rect will then be (25,25)-[50,50]. This method is useful when converting from widget to image or zoom space coordinates. =cut ## call as $rectangle = $view->get_draw_rect GdkRectangle_copy * gtk_image_view_get_draw_rect (view); GtkImageView * view PREINIT: GdkRectangle rect; CODE: if (!gtk_image_view_get_draw_rect(view, &rect)) XSRETURN_UNDEF; RETVAL = ▭ OUTPUT: RETVAL =for apidoc Reads the two colors used to draw transparent parts of images with an alpha channel. Note that if the transp setting of the view is GTK_IMAGE_TRANSP_BACKGROUND or GTK_IMAGE_TRANSP_COLOR, then both colors will be equal. =cut ## call as @check_colors = $view->get_check_colors void gtk_image_view_get_check_colors (view) GtkImageView * view PREINIT: int check_color1; int check_color2; PPCODE: gtk_image_view_get_check_colors (view, &check_color1, &check_color2); XPUSHs(sv_2mortal(newSViv(check_color1))); XPUSHs(sv_2mortal(newSViv(check_color2))); =for apidoc Converts a rectangle in image space coordinates to widget space coordinates. If the view is not realized, or if it contains no pixbuf, then the conversion was unsuccessful, FALSE is returned and rect_out is left unmodified. Note that this function may return a rectangle that is not visible on the widget. =cut ## call as $rect_out = $view->image_to_widget_rect($rect_in) ## gboolean gtk_image_view_image_to_widget_rect (GtkImageView *view, GdkRectangle *rect_in, GdkRectangle *rect_out); GdkRectangle_copy * gtk_image_view_image_to_widget_rect (view, rect_in) GtkImageView * view GdkRectangle * rect_in PREINIT: GdkRectangle rect_out; CODE: if (!gtk_image_view_image_to_widget_rect(view, rect_in, &rect_out)) XSRETURN_UNDEF; RETVAL = &rect_out; OUTPUT: RETVAL =for apidoc Sets the offset of where in the image the GtkImageView should begin displaying image data. The offset is clamped so that it will never cause the GtkImageView to display pixels outside the pixbuf. Setting this attribute causes the widget to repaint itself if it is realized. If invalidate is TRUE, the views entire area will be invalidated instead of redrawn immidiately. The view is then queued for redraw, which means that additional operations can be performed on it before it is redrawn. The difference can sometimes be important like when you are overlaying data and get flicker or artifacts when setting the offset. If that happens, setting invalidate to TRUE could fix the problem. See the source code to GtkImageToolSelector for an example. Normally, invalidate should always be FALSE because it is much faster to repaint immidately than invalidating. =over =item view : a Gtk2::ImageView =item x : X-component of the offset in zoom space coordinates. =item y : Y-component of the offset in zoom space coordinates. =item invalidate : whether to invalidate the view or redraw immediately, default=FALSE. =back =cut ## call as $view->set_offset($x, $y, $invalidate) void gtk_image_view_set_offset (view, x, y, invalidate=FALSE) GtkImageView * view gdouble x gdouble y gboolean invalidate CODE: gtk_image_view_set_offset (view, x, y, invalidate); =for apidoc Sets how the view should draw transparent parts of images with an alpha channel. If transp is GTK_IMAGE_TRANSP_COLOR, the specified color will be used. Otherwise the transp_color argument is ignored. If it is GTK_IMAGE_TRANSP_BACKGROUND, the background color of the widget will be used. If it is GTK_IMAGE_TRANSP_GRID, then a grid with light and dark gray boxes will be drawn on the transparent parts. Calling this method causes the widget to immediately repaint. It also causes the pixbuf-changed signal to be emitted. This is done so that other widgets (such as GtkImageNav) will have a chance to render a view of the pixbuf with the new transparency settings. =over =item view : a Gtk2::ImageView =item transp : The Gtk2::ImageView::Transp to use when drawing transparent images, default GTK_IMAGE_TRANSP_GRID. =item transp_color : Color to use when drawing transparent images, default 0x000000. =back =cut ## call as $view->set_transp($transp, $transp_color) void gtk_image_view_set_transp (view, transp, transp_color=0x000000) GtkImageView * view GtkImageTransp transp int transp_color CODE: gtk_image_view_set_transp (view, transp, transp_color); =for apidoc Returns TRUE if the view fits the image, FALSE otherwise. =cut ## call as $boolean = $view->get_fitting gboolean gtk_image_view_get_fitting (view) GtkImageView * view =for apidoc Sets whether to fit or not. If TRUE, then the view will adapt the zoom so that the whole pixbuf is visible. Setting the fitting causes the widget to immediately repaint itself. Fitting is by default TRUE. =over =item view : a Gtk2::ImageView =item fitting : whether to fit the image or not =back =cut ## call as $view->set_fitting($boolean) void gtk_image_view_set_fitting (view, fitting) GtkImageView * view gboolean fitting =for apidoc Returns the pixbuf this view shows. =cut ## call as $pixbuf = $view->get_pixbuf GdkPixbuf_ornull * gtk_image_view_get_pixbuf (view) GtkImageView * view =for apidoc Sets the pixbuf to display, or NULL to not display any pixbuf. Normally, reset_fit should be TRUE which enables fitting. Which means that, initially, the whole pixbuf will be shown. Sometimes, the fit mode should not be reset. For example, if GtkImageView is showing an animation, it would be bad to reset the fit mode for each new frame. The parameter should then be FALSE which leaves the fit mode of the view untouched. This method should not be used if merely the contents of the pixbuf has changed. See gtk_image_view_damage_pixels() for that. If reset_fit is TRUE, the zoom-changed signal is emitted, otherwise not. The pixbuf-changed signal is also emitted. The default pixbuf is NULL. =over =item view : a Gtk2::ImageView =item pixbuf : The pixbuf to display. =item reset_fit : Whether to reset fitting or not. =back =cut ## call as $view->set_pixbuf($pixbuf, $reset_fit) void gtk_image_view_set_pixbuf (view, pixbuf, reset_fit=TRUE) GtkImageView * view GdkPixbuf_ornull * pixbuf gboolean reset_fit CODE: gtk_image_view_set_pixbuf (view, pixbuf, reset_fit); =for apidoc Get the current zoom factor of the view. =cut ## call as $zoom = $view->get_zoom gdouble gtk_image_view_get_zoom (view) GtkImageView * view =for apidoc Sets the zoom of the view. Fitting is always disabled after this method has run. The zoom-changed signal is unconditionally emitted. =over =item view : a Gtk2::ImageView =item zoom : the new zoom factor =back =cut ## call as $view->set_zoom($zoom) void gtk_image_view_set_zoom (view, zoom) GtkImageView * view gdouble zoom =for apidoc If TRUE, the view uses a black background. If FALSE, the view uses the default (normally gray) background. The default value is FALSE. =cut ## call as $view->set_black_bg($boolean) void gtk_image_view_set_black_bg (view, black_bg) GtkImageView * view gboolean black_bg =for apidoc Returns TRUE if the view renders the widget on a black background, otherwise FALSE. =cut ## call as $boolean = $view->get_black_bg gboolean gtk_image_view_get_black_bg (view) GtkImageView * view =for apidoc Sets whether to draw a frame around the image or not. When TRUE, a one pixel wide frame is shown around the image. Setting this attribute causes the widget to immediately repaint itself. The default value is TRUE. =cut ## call as $view->set_show_frame($boolean) void gtk_image_view_set_show_frame (view, show_frame) GtkImageView * view gboolean show_frame =for apidoc Returns TRUE if a one pixel frame is drawn around the pixbuf, otherwise FALSE. =cut ## call as $boolean = $view->get_show_frame gboolean gtk_image_view_get_show_frame (view) GtkImageView * view =for apidoc Sets the interpolation mode of how the view. GDK_INTERP_HYPER is the slowest, but produces the best results. GDK_INTERP_NEAREST is the fastest, but provides bad rendering quality. GDK_INTERP_BILINEAR is a good compromise. Setting the interpolation mode causes the widget to immidiately repaint itself. The default interpolation mode is GDK_INTERP_BILINEAR. =over =item view : a Gtk2::ImageView =item interp : The Gtk2::Gdk::InterpType to use. One of GDK_INTERP_NEAREST, GDK_INTERP_BILINEAR and GDK_INTERP_HYPER. =back =cut ## call as $view->set_interpolation($interp) void gtk_image_view_set_interpolation (view, interp) GtkImageView * view GdkInterpType interp =for apidoc Returns the current interpolation mode of the view. =cut ## call as $interp = $view->get_interpolation GdkInterpType gtk_image_view_get_interpolation (view) GtkImageView * view =for apidoc Sets whether to show the mouse cursor when the mouse is over the widget or not. Hiding the cursor is useful when the widget is fullscreened. The default value is TRUE. =over =item view : a Gtk2::ImageView =item show_cursor : whether to show the cursor or not =back =cut ## call as $view->set_show_cursor($boolean) void gtk_image_view_set_show_cursor (view, show_cursor) GtkImageView * view gboolean show_cursor =for apidoc Returns TRUE if the cursor is shown when the mouse is over the widget, otherwise FALSE. =cut ## call as $boolean = $view->get_show_cursor gboolean gtk_image_view_get_show_cursor (view) GtkImageView * view =for apidoc Set the image tool to use. If the new tool is the same as the current tool, then nothing will be done. Otherwise Gtk2::ImageView::Tool::pixbuf_changed() is called so that the tool has a chance to generate initial data for the pixbuf. Setting the tool causes the widget to immediately repaint itself. The default image tool is a Gtk2::ImageView::Tool::Dragger instance. See also Gtk2::ImageView::Tool. =over =item view : a Gtk2::ImageView =item tool : The image tool to use (must not be NULL) =back =cut ## call as $view->set_tool($tool) void gtk_image_view_set_tool (view, tool) GtkImageView * view GtkIImageTool * tool =for apidoc Returns the currently bound image tool =cut ## call as $tool = $view->get_tool GtkIImageTool * gtk_image_view_get_tool (view) GtkImageView * view =for apidoc Zoom in the view one step. Calling this method causes the widget to immediately repaint itself. =over =item view : a Gtk2::ImageView =back =cut ## call as $view->zoom_in void gtk_image_view_zoom_in (view) GtkImageView * view =for apidoc Zoom out the view one step. Calling this method causes the widget to immediately repaint itself. =over =item view : a Gtk2::ImageView =back =cut ## call as $view->zoom_out void gtk_image_view_zoom_out (view) GtkImageView * view =for apidoc Mark the pixels in the rectangle as damaged. That the pixels are damaged means that they have been modified and that the view must redraw them to ensure that the visible part of the image corresponds to the pixels in that image. Calling this method emits the ::pixbuf-changed signal. This method must be used when modifying the image data: // Drawing something cool in the area 20,20 - 60,60 here... ... // And force an update $view->damage_pixels (Gtk2::Gdk::Rectangle->new(20, 20, 40, 40); If the whole pixbuf has been modified then rect should be NULL to indicate that a total update is needed. See also gtk_image_view_set_pixbuf(). =over =item view : a Gtk2::ImageView =item view : a Gtk2::Gdk::Rectangle in image space coordinates to mark as damaged or NULL, to mark the whole pixbuf as damaged. =back =cut ## call as $view->damage_pixels($rect) void gtk_image_view_damage_pixels (view, rect); GtkImageView * view GdkRectangle * rect =for apidoc Returns the version of the underlying GtkImageView C library =cut ## call as $view->library_version const char * gtk_image_view_library_version (class) C_ARGS: /*void*/ Gtk2-ImageView-0.05/Makefile.PL0000644000774200006240000001235311165054421014657 0ustar ra28145a400mcuse 5.008; use ExtUtils::MakeMaker; use Cwd; use File::Spec; # minimum required version of dependancies we need to build our %build_reqs = ( 'perl-ExtUtils-Depends' => '0.2', 'perl-ExtUtils-PkgConfig' => '1.03', 'perl-Glib' => '1.140', 'perl-Gtk2' => '1.140', 'GtkImageView' => '1.6.0', ); # minimum required version of dependancies we need to run our %runtime_reqs = ( 'GtkImageView' => undef, ); our %PREREQ_PM = ( 'ExtUtils::Depends' => $build_reqs{'perl-ExtUtils-Depends'}, 'ExtUtils::PkgConfig' => $build_reqs{'perl-ExtUtils-PkgConfig'}, 'Glib' => $build_reqs{'perl-Glib'}, 'Gtk2' => $build_reqs{'perl-Gtk2'}, ); # Writing a fake Makefile ensures that CPAN will pick up the correct # dependencies and install them. unless (eval "use ExtUtils::Depends;" . "use ExtUtils::PkgConfig;" # just seeing if Glib is available isn't enough, make sure # it's recent enough, too . "use Glib '$build_reqs{'perl-Glib'}';" . "use Glib::MakeHelper;" . "use Gtk2 '$build_reqs{'perl-Gtk2'}';" . "use Gtk2::CodeGen;" . "1") { warn "$@\n"; WriteMakefile( PREREQ_FATAL => 1, PREREQ_PM => \%PREREQ_PM, ); exit 1; # not reached } %pkgcfg = ExtUtils::PkgConfig->find ('gtkimageview >= ' . $build_reqs{GtkImageView}); $runtime_reqs{GtkImageView} = $pkgcfg{modversion}; mkdir 'build', 0777; chomp(my $includes = `pkg-config --variable includedir gtkimageview`); my @headers = glob($includes . "/gtkimageview/*.h"); # # autogeneration # Gtk2::CodeGen->parse_maps('gtkimageviewperl'); Gtk2::CodeGen->write_boot(glob => '*.xs', ignore => '^Gtk2::ImageView$'); our @xs_files = <*.xs>; our %pm_files = ('ImageView.pm' => '$(INST_LIBDIR)/ImageView.pm',); our %pod_files = Glib::MakeHelper->do_pod_files (@xs_files); our @typemaps = qw(build/gtkimageviewperl.typemap); our @headers = qw(gtkimageviewperl.h build/gtkimageviewperl-autogen.h); # now we're ready to start creating the makefile. # we need to use ExtUtils::Depends to get relevant information out of # the Glib extension, and to save config information for other modules which # will chain from this one. my $depends = ExtUtils::Depends->new ('Gtk2::ImageView', 'Gtk2', 'Glib'); $depends->set_inc ($pkgcfg{cflags}); $depends->set_libs ($pkgcfg{libs}); $depends->add_xs (@xs_files); $depends->add_pm (%pm_files); my $cwd = cwd(); $depends->add_typemaps (map {File::Spec->catfile($cwd,$_)} @typemaps); $depends->install (@headers); $depends->save_config ('build/IFiles.pm'); # As soon as a stable release with Glib::MakeHelper->get_configure_requires_yaml # hits Sid, change use it, and take out the sub below. # my $configure_requires = # Glib::MakeHelper->get_configure_requires_yaml(%PREREQ_PM); my $configure_requires = get_configure_requires_yaml(%PREREQ_PM); WriteMakefile( NAME => 'Gtk2::ImageView', VERSION_FROM => 'ImageView.pm', # finds $VERSION ABSTRACT => 'Perl bindings for the GtkImageView widget', AUTHOR => 'Jeffrey Ratcliffe', LICENSE => 'lgpl', PREREQ_PM => \%PREREQ_PM, XSPROTOARG => '-noprototypes', MAN3PODS => \%pod_files, $depends->get_makefile_vars, EXTRA_META => qq/ $configure_requires /, ); # Stolen from Glib-Perl HEAD # Generates YAML code that lists every module found in I<%module_to_version> # under the C key. This can be used with # I's C parameter to specify which modules are # needed at I time. sub get_configure_requires_yaml { # shift; # package name my %prereqs = @_; my $yaml = "configure_requires:\n"; while (my ($module, $version) = each %prereqs) { $yaml .= " $module: $version\n"; } return $yaml; } package MY; sub postamble { my $postamble = <<'END'; realclean :: -rm -Rf build html : blib/lib/Gtk2/ mpod2html blib/lib/Gtk2/ \ -nowarnings -noverbose \ -dir "html" -nobanner \ -idxname "idx" -tocname "index" \ -toctitle "Gtk2-ImageView Table of Contents" \ -idxtitle "Gtk2-ImageView Index" \ -stylesheet "style.css" perl -ni -e'print unless m/^(Cannot find page|Warning:)/;' \ `find html -name "*.html"` find html -type d -exec cp style.css {} \; END return Glib::MakeHelper->postamble_clean () . Glib::MakeHelper->postamble_docs_full ( DEPENDS => $depends, COPYRIGHT => "Copyright (C) 2007 by Jeffrey Ratcliffe.\n\nThis software is licensed under the GPL-3; see L for a full notice.", ) . Glib::MakeHelper->postamble_rpms ( 'GTK_IMAGE_VIEW' => $build_reqs{'GtkImageView'}, 'PERL_EXTUTILS_DEPENDS' => $build_reqs{'perl-ExtUtils-Depends'}, 'PERL_EXTUTILS_PKGCONFIG' => $build_reqs{'perl-ExtUtils-PkgConfig'}, 'PERL_GLIB' => $build_reqs{'perl-Glib'}, 'PERL_GTK' => $build_reqs{'perl-Gtk2'}, ) .$postamble; } package MAIN; Gtk2-ImageView-0.05/README0000644000774200006240000000541211165054421013563 0ustar ra28145a400mcGtk2::ImageView =============== Perl bindings to the GtkImageView image viewer widget Find out more about GtkImageView at http://trac.bjourne.webfactional.com/. The Perl bindings follow the C API very closely, and the C reference should be considered the canonical documentation. Be sure to check out the example programs in the "examples" directory. To discuss Gtk2::ImageView or gtk2-perl, ask questions and flame/praise the authors, join gtk-perl-list@gnome.org at lists.gnome.org. INSTALLATION ------------ To install this module type the following: perl Makefile.PL make make test make install To avoid installing to a system directory, since this is a beta release, you can change the installation prefix at Makefile.PL time with perl Makefile.PL PREFIX=/some/other/place This will install the module to the subdirectory lib/perl5 under the given prefix. If this is not already in perl's include path, you'll need to tell perl how to get to this library directory so you can use it; there are three ways: in your environment (the easiest): # assuming a bourne-style shell PERL5LIB=/some/other/place/lib/perl5/site_perl export PERL5LIB on the perl command line: perl -I /some/other/place/lib/perl5/site_perl yourscript in the code of your perl script: use lib '/some/other/place/lib/perl5/site_perl'; To build the documentation as html, run: make html Note that the bindings must first have been built and that the mpod2html script must be installed. DEPENDENCIES ------------ This module requires these other modules and libraries: perl >= 5.8.0 Glib >= 1.163 (Perl module) GTK+ > 2.x (C library) GtkImageView >= 1.6.0 If GTK+ is as new or newer as 2.8, the Cairo module is also required: Cairo >= 1.00 (Perl module) In order to build it from source, you'll also need ExtUtils::Depends >= 0.2 ExtUtils::PkgConfig >= 1.03 BUG REPORTS ----------- Please submit bug reports top http://trac.bjourne.webfactional.com/newticket/. COPYRIGHT AND LICENSE --------------------- Copyright (c) 2007 -- 2008 by Jeffrey Ratcliffe see AUTHORS for complete list of contributors This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . Gtk2-ImageView-0.05/META.yml0000640000774200006240000000124011166325627014155 0ustar ra28145a400mc--- #YAML:1.0 name: Gtk2-ImageView version: 0.05 abstract: Perl bindings for the GtkImageView widget license: lgpl author: - Jeffrey Ratcliffe generated_by: ExtUtils::MakeMaker version 6.42 distribution_type: module requires: ExtUtils::Depends: 0.2 ExtUtils::PkgConfig: 1.03 Glib: 1.140 Gtk2: 1.140 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.3.html version: 1.3 configure_requires: ExtUtils::Depends: 0.2 Glib: 1.140 Gtk2: 1.140 ExtUtils::PkgConfig: 1.03