Gtk2-GladeXML-1.007/ 0000755 0001750 0001750 00000000000 11061032517 013675 5 ustar torsten torsten Gtk2-GladeXML-1.007/t/ 0000755 0001750 0001750 00000000000 11061032517 014140 5 ustar torsten torsten Gtk2-GladeXML-1.007/t/example.glade 0000644 0001750 0001750 00000041315 07663255611 016614 0 ustar torsten torsten
LibGlade Test
GTK_WINDOW_TOPLEVEL
yes
yes
GTK_WIN_POS_NONE
yes
no
0
yes
yes
0
no
yes
yes
yes
yes
GTK_POS_TOP
no
3
no
yes
yes
no
0
0
2
2
yes
GTK_ARROW_UP
GTK_SHADOW_OUT
0.5
0.5
0
0
yes
1
2
1
2
0
0
expand|fill
expand|fill
~
GTK_JUSTIFY_CENTER
0.5
0.5
0
0
yes
0
1
0
1
0
0
fill
fill
0
10
0
10
yes
0
1
1
2
0
0
fill
expand|fill
0
10
0
10
yes
1
2
0
1
0
0
expand|fill
fill
0
GTK_SHADOW_ETCHED_IN
yes
yes
yes
yes
GTK_POS_TOP
1
yes
0 0 100 1 10 10
no
0
yes
yes
0
yes
yes
yes
20 0 40 1 10 10
0
yes
yes
Gamma
GTK_JUSTIFY_CENTER
0.5
0.5
0
0
yes
tab
Rulers
GTK_JUSTIFY_CENTER
0.5
0.5
0
0
yes
tab
Ranges
GTK_JUSTIFY_CENTER
0.5
0.5
0
0
yes
tab
0
yes
yes
5
yes
0
no
yes
no
About
GTK_WINDOW_TOPLEVEL
yes
yes
GTK_WIN_POS_NONE
no
0
yes
5
0
GTK_SHADOW_ETCHED_IN
yes
LibGlade Example.
This interface (and the signals)
are all specified in XML.
GTK_JUSTIFY_CENTER
0.5
0.5
0
0
yes
0
yes
yes
10
yes
5
yes
yes
yes
yes
OK
20
yes
0
yes
yes
0
no
yes
GTK_PACK_END
Gtk2-GladeXML-1.007/t/more.t 0000644 0001750 0001750 00000010265 10121733561 015276 0 ustar torsten torsten #
# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glade/t/more.t,v 1.1 2004/09/15 03:30:57 muppetman Exp $
#
# we don't require Gtk2 any newer than 1.000, so don't assume we have
# Gtk2::TestHelper available.
#
# various tests for most of the API of the module.
#
# do as i say, not as i do. this code is trying to verify invariants
# and test that things work; you don't typically want to write app code
# that works like this.
#
use Test::More;
use Gtk2;
if (Gtk2->init_check) {
plan tests => 26;
} else {
plan skip_all => 'No DISPLAY';
}
use_ok ('Gtk2::GladeXML');
my $interface = '
yes
yes
yes
Clicky
';
my $glade = Gtk2::GladeXML->new_from_buffer ($interface);
isa_ok ($glade, 'Gtk2::GladeXML');
my $button = $glade->get_widget ('button');
isa_ok ($button, 'Gtk2::Button');
is ($button->get_name, 'button');
# harumph. glade_get_widget_name() is mapped to Gtk2::Widget::get_name.
is ($button->get_widget_name, $button->get_name);
# the glade-created widgets know to what tree they belong.
is ($button->get_widget_tree, $glade);
# get_widget_prefix() does name matching to fetch widgets.
# it looks like the list returned from libglade is backwards; we
# won't rely on that since it's easy to sort in perl.
my @foos = sort { $a->get_name cmp $b->get_name }
$glade->get_widget_prefix ('foo');
is (scalar (@foos), 4, 'expect 4 foo_* widgets');
is ($foos[0]->get_name, 'foo_1');
is ($foos[1]->get_name, 'foo_2');
is ($foos[2]->get_name, 'foo_3');
is ($foos[3]->get_name, 'foo_4');
# signal_autoconnect() uses a callback to do the actual connecting;
# we'll supply a dummy callback that doesn't actually do anything,
# just tests that it calls the callback the right number of times.
my @handlers = sort map {
s/^.*handler="//;
s/".*$//;
$_
} grep { /handler=/ } split /\n/, $interface;
use Data::Dumper;
my %handlers = ();
$glade->signal_autoconnect (sub {
$handlers{$_[0]} ++;
ok(1, "asked to connect $_[0] to $_[2] on ".$_[1]->get_name);
});
is_deeply ([sort keys %handlers], \@handlers);
# now test some actual connections. i want all of the handlers to do the
# same thing, so i'm creating the handlers on the fly; this is kinda evil
# and you should not try this at home.
my $package = 'FluffyBunny';
my @ran = ();
sub make_handler {
my $name = $_[0];
*{$name} = sub { ok(1, "$name called"); push @ran, $name; }
}
foreach (@handlers) {
make_handler ($_); # in package main
make_handler ($package."::".$_); # in $package
make_handler ($_."_all"); # for signal_autoconnect_all
}
$glade->signal_autoconnect_from_package ($package);
$glade->signal_autoconnect_from_package; # should default to main
# connect to specific handlers.
$glade->signal_autoconnect_all (
on_button_clicked => 'on_button_clicked_all',
after_button_clicked => 'after_button_clicked_all',
on_window_destroy => sub {ok(1, 'all-connected'); },
);
# this should result in all of the connected handlers running:
is(scalar(@ran), 0);
$button->clicked;
# this is to verify that the after ones ran after the non-after ones.
is_deeply (\@ran, [ qw(FluffyBunny::on_button_clicked
on_button_clicked
on_button_clicked_all
FluffyBunny::after_button_clicked
after_button_clicked
after_button_clicked_all)]);
$glade->get_widget ('window')->destroy;
Gtk2-GladeXML-1.007/t/custom.t 0000644 0001750 0001750 00000003214 10121733561 015642 0 ustar torsten torsten #
#
#
# regression test for custom widget handling.
use Test::More;
use Gtk2;
if (Gtk2->init_check) {
plan tests => 15;
} else {
plan skip_all => 'No DISPLAY';
}
use_ok ('Gtk2::GladeXML');
my $interface = '
yes
True
create_me
string1
string2, electric boogaloo
42
1138
';
sub create_me {
ok (1);
use Data::Dumper;
print Dumper(\@_);
my ($glade, $creator, $name, $string1, $string2, $int1, $int2, $data)
= @_;
isa_ok ($glade, 'Gtk2::GladeXML');
is ($creator, 'create_me', 'function name');
is ($name, 'custom1');
is ($string1, 'string1');
is ($string2, 'string2, electric boogaloo');
is ($int1, 42);
is ($int2, 1138);
# verify that complex user data made it through, alive
is (ref($data), 'HASH');
is ($data->{one}, 1);
is ($data->{two}, 2);
my $widget = Gtk2::Button->new;
$widget->{something} = 'special';
return $widget;
}
Gtk2::Glade->set_custom_handler (\&create_me, {one=>1, two=>2});
my $glade = Gtk2::GladeXML->new_from_buffer ($interface);
isa_ok ($glade, 'Gtk2::GladeXML');
my $custom1 = $glade->get_widget ('custom1');
isa_ok ($custom1, 'Gtk2::Button');
is ($custom1->{something}, 'special');
Gtk2-GladeXML-1.007/t/0.GladeXML.t 0000644 0001750 0001750 00000001427 10121733571 016070 0 ustar torsten torsten #
# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glade/t/0.GladeXML.t,v 1.6 2004/09/15 03:31:05 muppetman Exp $
#
#########################
# GladeXML Tests
# - rm
#########################
use Test::More;
use Gtk2;
if( Gtk2->init_check )
{
plan tests => 3;
require_ok('Gtk2::GladeXML');
}
else
{
plan skip_all =>
'Gtk2->init_check failed, probably unable to open DISPLAY';
}
#########################
sub gtk_main_quit
{
Gtk2->main_quit;
}
sub gtk_true
{
print STDERR "gtk_true: ".Dumper( @_ );
}
sub gtk_widget_hide
{
$_[1]->hide;
}
sub gtk_widget_show
{
$_[1]->show;
}
ok( $gld = Gtk2::GladeXML->new('t/example.glade') );
$gld->signal_autoconnect_from_package('main');
Glib::Idle->add( sub {
ok( $btn = $gld->get_widget("Quit") );
$btn->activate;
0;
});
Gtk2->main;
Gtk2-GladeXML-1.007/MANIFEST 0000644 0001750 0001750 00000001363 11061032517 015031 0 ustar torsten torsten AUTHORS
ChangeLog
GladeXML.pm
GladeXML.xs
LICENSE
MANIFEST This list of files
MANIFEST.SKIP
Makefile.PL
NEWS
README
examples/README
examples/TODO
examples/clipboard.glade
examples/clipboard.gladep
examples/clipboard.pl
examples/dnd.glade
examples/dnd.gladep
examples/dnd.pl
examples/fileman.glade
examples/fileman.gladep
examples/fileman.pl
examples/hello-world.glade
examples/hello-world.gladep
examples/hello-world.pl
examples/progress.glade
examples/progress.gladep
examples/progress.pl
examples/scribble.glade
examples/scribble.gladep
examples/scribble.pl
gladexmlperl.h
gladexmlperl.typemap
perl-Gtk2-GladeXML.spec.in
t/0.GladeXML.t
t/custom.t
t/example.glade
t/more.t
META.yml Module meta-data (added by MakeMaker)
Gtk2-GladeXML-1.007/examples/ 0000755 0001750 0001750 00000000000 11061032517 015513 5 ustar torsten torsten Gtk2-GladeXML-1.007/examples/clipboard.pl 0000755 0001750 0001750 00000004517 10473364160 020031 0 ustar torsten torsten #!/usr/bin/perl -w
#----------------------------------------------------------------------
# clipboard.pl
#
# A simple example of Gtk2/GladeXML Clipboard
#
# Copyright (C) 2004 Fabrice Duballet
#
# 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 2 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
#----------------------------------------------------------------------
use strict;
use warnings;
use Gtk2 '-init'; # auto-initializes Gtk2
use Gtk2::GladeXML;
# Load the UI from the Glade-2 file
my $glade = Gtk2::GladeXML->new("clipboard.glade");
# Connect the signal handlers
$glade->signal_autoconnect_from_package('main');
# Cache controls in perl-variables
my $editor = $glade->get_widget('textview1');
my $buffer = $editor->get_buffer();
my $clipboard = $editor->get_clipboard();
my $clipboard_buffer = $glade->get_widget('textview2')->get_buffer();
my $oldtext = '';
# Start it up
Gtk2->main;
exit 0;
#----------------------------------------------------------------------
# Signal handlers, connected to signals we defined using glade-2
# Handle cut
sub on_cut1_activate
{
$buffer->cut_clipboard($clipboard, 1);
}
# Handle copy
sub on_copy1_activate
{
$buffer->copy_clipboard($clipboard);
}
# Handle paste
sub on_paste1_activate
{
$buffer->paste_clipboard($clipboard, undef, 1);
}
# Handle expose-event
# Refresh textview buffer if the clipboard has a new content
sub on_textview2_expose_event
{
my $newtext = $clipboard->wait_for_text();
if ($newtext ne $oldtext)
{
$clipboard_buffer->set_text($newtext);
$oldtext = $newtext;
}
}
# Handles window-manager-quit: shuts down gtk2 lib
sub on_quit1_activate {Gtk2->main_quit;}
sub on_main_delete_event {Gtk2->main_quit;}
Gtk2-GladeXML-1.007/examples/TODO 0000644 0001750 0001750 00000000045 10473364355 016220 0 ustar torsten torsten To Add:
* PixBuf example (inline?)
Gtk2-GladeXML-1.007/examples/progress.pl 0000755 0001750 0001750 00000005400 07760164245 017735 0 ustar torsten torsten #!/usr/bin/perl -w
#----------------------------------------------------------------------
# progress.pl
#
# A simple example of Gtk2/GladeXML progress widgets
#
# Copyright (C) 2003 Bruce Alderson
#
# 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 2 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
#----------------------------------------------------------------------
use strict;
use warnings;
use Gtk2 '-init'; # auto-initializes Gtk2
use Gtk2::GladeXML;
my $glade;
my $window;
my @progress; # array of progress widgets
my $fract = 0;
# Load the UI from the Glade-2 file
$glade = Gtk2::GladeXML->new("progress.glade");
# Connect the signal handlers
$glade->signal_autoconnect_from_package('main');
# Cache controls in perl-variables
$window = $glade->get_widget('main');
push @progress, $glade->get_widget('nw_progressbar');
push @progress, $glade->get_widget('ne_progressbar');
push @progress, $glade->get_widget('w_progressbar');
push @progress, $glade->get_widget('e_progressbar');
push @progress, $glade->get_widget('sw_progressbar');
push @progress, $glade->get_widget('se_progressbar');
# Start it up
Gtk2->main;
exit 0;
# Helper to update all of the progress widgets in one swoop
sub update_progress {
foreach my $p (@progress) {
$p->set_fraction($fract/1000);
}
}
#----------------------------------------------------------------------
# Signal handlers, connected to signals we defined using glade-2
# Handle next-button click: show next message
sub on_decrement_button_clicked {
$fract -= 100; $fract %= 1001;
update_progress;
}
# Handle previous-button click: show prev message
sub on_increment_button_clicked {
$fract += 100; $fract %= 1001;
update_progress;
}
# Set the formatting of the text on the scale widget
sub on_scale_format_value {
my $pos = $_[1];
return "$pos%";
}
# Handle movement of the scale slider
sub on_scale_value_changed {
my $s = shift;
$fract = $s->get_value * 10;
update_progress;
}
# Handles window-manager-quit: shuts down gtk2 lib
sub on_main_delete_event {Gtk2->main_quit;}
# Handles close-button quit
sub on_quit_button_clicked {on_main_delete_event;}
Gtk2-GladeXML-1.007/examples/scribble.pl 0000755 0001750 0001750 00000010242 10077043351 017643 0 ustar torsten torsten #!/usr/bin/perl -w
#----------------------------------------------------------------------
# scribble.pl
#
# Muppet's Gtk2-perl example ported to use GladeXML
#
# 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 2 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
#----------------------------------------------------------------------
use strict;
use warnings;
use Gtk2 '-init'; # auto-initializes Gtk2
use Gtk2::GladeXML;
use Data::Dumper;
$Data::Dumper::Indent = 3;
use constant TRUE => 1;
use constant FALSE => 0;
my $glade;
my $window;
my $pixmap;
my $drawing_area;
# Load the UI from the Glade-2 file
$glade = Gtk2::GladeXML->new("scribble.glade");
# Connect the signal handlers
$glade->signal_autoconnect_from_package('main');
# Cache controls in perl-variables
$window = $glade->get_widget('main');
$drawing_area = $glade->get_widget('drawing_area');
$drawing_area->add_events ([qw/exposure-mask
leave-notify-mask
button-press-mask
button-release-mask
pointer-motion-mask
pointer-motion-hint-mask/]);
# Start it up
Gtk2->main;
exit 0;
#----------------------------------------------------------------------
# Signal handlers, connected to signals defined in the glade file
sub configure_event {
my $widget = shift; # GtkWidget *widget
my $event = shift; # GdkEventConfigure *event
$pixmap = Gtk2::Gdk::Pixmap->new ($widget->window,
$widget->allocation->width,
$widget->allocation->height,
-1);
$pixmap->draw_rectangle ($widget->style->white_gc,
TRUE,
0, 0,
$widget->allocation->width,
$widget->allocation->height);
return TRUE;
}
sub draw_brush {
my ($widget, $x, $y) = @_;
# this is not a real GdkRectangle structure; we don't actually need one.
my @update_rect;
$update_rect[0] = $x - 5;
$update_rect[1] = $y - 5;
$update_rect[2] = 10;
$update_rect[3] = 10;
$pixmap->draw_rectangle ($widget->style->black_gc,
TRUE, @update_rect);
$widget->queue_draw_area (@update_rect);
}
sub motion_notify_event {
my $widget = shift; # GtkWidget *widget
my $event = shift; # GdkEventMotion *event
my ($x, $y, $state);
if ($event->is_hint) {
(undef, $x, $y, $state) = $event->window->get_pointer;
} else {
$x = $event->x;
$y = $event->y;
$state = $event->state;
}
if ($state >= "button1-mask" && defined $pixmap) {
draw_brush ($widget, $x, $y);
}
return TRUE;
}
sub button_press_event {
my $widget = shift; # GtkWidget *widget
my $event = shift; # GdkEventButton *event
if ($event->button == 1 && defined $pixmap) {
draw_brush ($widget, $event->coords);
}
return TRUE;
}
sub expose_event {
my $widget = shift; # GtkWidget *widget
my $event = shift; # GdkEventButton *event
# for some reason, configure_event doesn't get called on this widget
# when the window is made visible in the glade file. let's force it.
configure_event($widget) if not defined $pixmap;
$drawing_area->window->draw_drawable (
$widget->style->fg_gc($widget->state),
$pixmap,
$event->area->x, $event->area->y,
$event->area->x, $event->area->y,
$event->area->width, $event->area->height);
return 0;
}
# Handles window-manager-quit: shuts down gtk2 lib
sub on_main_destroy_event {Gtk2->main_quit;}
# Handles close-button quit
sub quit_clicked {on_main_destroy_event;}
Gtk2-GladeXML-1.007/examples/dnd.pl 0000755 0001750 0001750 00000012370 10473364275 016642 0 ustar torsten torsten #!/usr/bin/perl -w
#----------------------------------------------------------------------
# dnd.pl
#
# A simple example of Gtk2/GladeXML Dnd
#
# Copyright (C) 2004 Fabrice Duballet
#
# 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 2 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
#----------------------------------------------------------------------
use strict;
use warnings;
use Gtk2 '-init'; # auto-initializes Gtk2
use Gtk2::GladeXML;
#----------------------------------------------------------------------
# GNU Licenses :
my @t = gmtime;
my $year = $t[5] + 1900;
my $author = "Name of Author";
my $copyright = " Copyright (C) $year ";
#GNU General Public License
my $gpl = "\n
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\n";
#GNU Lesser General Public License
my $lgpl = "\n
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 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\n";
#GNU Free Documentation License
my $fdl = "\n
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled \"GNU
Free Documentation License\".
\n";
sub gnulicense {return $copyright.$author.shift}
#----------------------------------------------------------------------
# Gtk2 Glade-2 :
# Load the UI from the Glade-2 file
my $glade = Gtk2::GladeXML->new("dnd.glade");
# Connect the signal handlers
$glade->signal_autoconnect_from_package('main');
use constant TARGET_STRING => 0;
my @target_table = (
{'target' => "STRING", 'flags' => [], 'info' => TARGET_STRING},
{'target' => "text/plain", 'flags' => [], 'info' => TARGET_STRING}
);
my $buttongpl = $glade->get_widget('buttongpl');
my $buttonlgpl = $glade->get_widget('buttonlgpl');
my $buttonfdl = $glade->get_widget('buttonfdl');
my $buttondrop = $glade->get_widget('buttondrop');
$buttongpl->drag_source_set (['button1_mask', 'button3_mask'], ['copy', 'move'], @target_table);
$buttonlgpl->drag_source_set (['button1_mask', 'button3_mask'], ['copy', 'move'], @target_table);
$buttonfdl->drag_source_set (['button1_mask', 'button3_mask'], ['copy', 'move'], @target_table);
$buttondrop->drag_dest_set('all', ['copy', 'move'], @target_table);
# Start it up
Gtk2->main;
exit 0;
#----------------------------------------------------------------------
# Signal handlers, connected to signals we defined using glade-2
sub on_buttongpl_drag_data_get
{
my ($widget, $context, $data, $info, $time) = @_;
$data->set($data->target, 8, gnulicense($gpl));
}
sub on_buttonlgpl_drag_data_get
{
my ($widget, $context, $data, $info, $time) = @_;
$data->set($data->target, 8, gnulicense($lgpl));
}
sub on_buttonfdl_drag_data_get
{
my ($widget, $context, $data, $info, $time) = @_;
$data->set($data->target, 8, gnulicense($fdl));
}
sub on_buttondrop_drag_data_received
{
my ($widget, $context, $x, $y, $data, $info, $time) = @_;
if (($data->length >= 0) && ($data->length < 80) && ($data->format == 8))
{
$author = $data->data;
$context->finish (1, 0, $time);
return;
}
$context->finish(0, 0, $time);
}
sub on_main_delete_event {Gtk2->main_quit;}
Gtk2-GladeXML-1.007/examples/clipboard.glade 0000644 0001750 0001750 00000020244 10473364047 020466 0 ustar torsten torsten
True
MyClipboard
GTK_WINDOW_TOPLEVEL
GTK_WIN_POS_NONE
False
600
400
True
False
True
False
0
0
False
False
True
True
True
True
GTK_POS_TOP
False
False
True
True
GTK_POLICY_ALWAYS
GTK_POLICY_ALWAYS
GTK_SHADOW_NONE
GTK_CORNER_TOP_LEFT
True
True
True
True
GTK_JUSTIFY_LEFT
GTK_WRAP_NONE
True
0
0
0
0
0
0
False
True
True
Editor
False
False
GTK_JUSTIFY_LEFT
False
False
0.5
0.5
0
0
tab
True
GTK_POLICY_ALWAYS
GTK_POLICY_ALWAYS
GTK_SHADOW_NONE
GTK_CORNER_TOP_LEFT
True
False
GDK_EXTENSION_EVENTS_ALL
False
GTK_JUSTIFY_LEFT
GTK_WRAP_NONE
False
0
0
0
0
0
0
False
True
True
Clipboard
False
False
GTK_JUSTIFY_LEFT
False
False
0.5
0.5
0
0
tab
0
True
True
Gtk2-GladeXML-1.007/examples/fileman.gladep 0000644 0001750 0001750 00000000423 07760164245 020322 0 ustar torsten torsten
fileman
fileman
FALSE
Gtk2-GladeXML-1.007/examples/README 0000644 0001750 0001750 00000001270 10122202575 016373 0 ustar torsten torsten =======================
GTK2::GladeXML Examples
=======================
fileman.pl
----------
A simple, but mostly-functional file-manager example.
* Shows how to connect a Glade treeview widget to a Simple-list
object
* Shows basic use of Gtk-timers
* Shows basic rendering of icons, and how to use in Simple-lists
hello-world.pl
--------------
The defacto hello-world sample
* Shows how to use a label with marked-up text
* Shows how to embedd a glade-xml file right in a perl-script
progress.pl
----------
A progress-bar demo
* Shows how to use progress bars and slider widgets
scribble.pl
-----------
The Gtk / Gtk-Perl scribble demo ported to GladeXML
Gtk2-GladeXML-1.007/examples/hello-world.pl 0000755 0001750 0001750 00000016326 07760164245 020332 0 ustar torsten torsten #!/usr/bin/perl -w
#----------------------------------------------------------------------
# hello-world.pl
#
# A simple exapmle of Gtk2/GladeXML
#
# Copyright (C) 2003 Bruce Alderson
#
# 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 2 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
#----------------------------------------------------------------------
use strict;
use warnings;
use Gtk2 '-init'; # auto-initializes Gtk2
use Gtk2::GladeXML;
my $glade;
my $window;
my $fortune;
# Some text to display in the label (notice the embedded pango-markup)
my @fortunes = (
"This is an example\nGtk2::GladeXML program.",
"Data-driven is good!",
"Blue text is fun!",
"Label-controls can handle simple1 markup2.",
"GladeXML is as simple as:\n\n\$glade = \nGtk2::GladeXML->new(\n\"hello-world.glade\");",
"42",
"A Glade-XML\nsample program\nby mx\@warpedvisions.org"
);
my $pos = -1;
# This example includes the Glade XML at the end of the script
# in the __DATA__ section.
# 'Load' glade-xml from DATA section
my $glade_data; {local $/ = undef; $glade_data = ;}
# Load the UI from xml definition
$glade = Gtk2::GladeXML->new_from_buffer($glade_data);
# Connect the signals
$glade->signal_autoconnect_from_package('main');
# Cache some controls in perl-variables
$window = $glade->get_widget('main');
$fortune = $glade->get_widget('fortune_label') or die;
# Start it up
Gtk2->main;
exit 0;
#----------------------------------------------------------------------
# Signal handlers, connected to signals we defined using glade-2
# Handle next-button click: show next message
sub on_next_button_clicked {
$pos++; $pos %= $#fortunes + 1;
$fortune->set_markup($fortunes[$pos]);
}
# Handle previous-button click: show prev message
sub on_back_button_clicked {
$pos--; $pos %= $#fortunes + 1;
$fortune->set_markup($fortunes[$pos]);
}
# Handles window-manager-quit: shuts down gtk2 lib
sub on_main_delete_event {Gtk2->main_quit;}
# Handles close-button quit
sub on_close_button_clicked {on_main_delete_event;}
#----------------------------------------------------------------------
# We can append the glade file here instead of loading from file
#----------------------------------------------------------------------
__DATA__
True
Gtk2::GladeXML-Power
GTK_WINDOW_TOPLEVEL
GTK_WIN_POS_NONE
False
True
False
True
False
0
300
225
True
True
<big><b>Hello World!</b></big>
True
True
GTK_JUSTIFY_CENTER
True
True
0.5
0.5
0
0
0
True
True
True
0
False
False
True
GTK_BUTTONBOX_DEFAULT_STYLE
0
True
True
True
gtk-go-back
True
GTK_RELIEF_NORMAL
True
True
True
gtk-close
True
GTK_RELIEF_NORMAL
True
True
True
gtk-go-forward
True
GTK_RELIEF_NORMAL
0
False
True
Gtk2-GladeXML-1.007/examples/progress.glade 0000644 0001750 0001750 00000021364 07760164245 020402 0 ustar torsten torsten
True
Progress Example
GTK_WINDOW_TOPLEVEL
GTK_WIN_POS_NONE
False
300
200
True
False
True
False
4
True
False
0
True
GTK_PROGRESS_BOTTOM_TO_TOP
0
0.1
8
True
True
True
GTK_PROGRESS_BOTTOM_TO_TOP
0
0.1
8
True
True
4
True
True
True
False
0
True
GTK_PROGRESS_LEFT_TO_RIGHT
0
0.1
8
True
True
True
GTK_PROGRESS_RIGHT_TO_LEFT
0
0.1
8
True
True
4
True
True
True
False
0
True
GTK_PROGRESS_TOP_TO_BOTTOM
0
0.1
8
True
True
True
GTK_PROGRESS_TOP_TO_BOTTOM
0
0.1
8
True
True
4
True
True
True
True
True
GTK_POS_BOTTOM
0
GTK_UPDATE_CONTINUOUS
False
0 0 110 1 10 10
0
True
True
True
0
False
False
True
GTK_BUTTONBOX_DEFAULT_STYLE
0
True
True
True
GTK_RELIEF_NORMAL
True
gtk-remove
4
0.5
0.5
0
0
True
True
True
gtk-quit
True
GTK_RELIEF_NORMAL
True
True
True
GTK_RELIEF_NORMAL
True
gtk-add
4
0.5
0.5
0
0
0
True
True
Gtk2-GladeXML-1.007/examples/progress.gladep 0000644 0001750 0001750 00000000425 07760164245 020555 0 ustar torsten torsten
progress
progress
FALSE
Gtk2-GladeXML-1.007/examples/dnd.glade 0000644 0001750 0001750 00000027327 10473364112 017276 0 ustar torsten torsten
True
MyDnd
GTK_WINDOW_TOPLEVEL
GTK_WIN_POS_NONE
False
False
False
True
True
0
True
False
0
True
True
GTK_RELIEF_NORMAL
True
0.5
0.5
0
0
True
False
2
True
gtk-jump-to
4
0.5
0.5
0
0
0
False
False
True
Name of Author
True
False
GTK_JUSTIFY_LEFT
False
False
0.5
0.5
0
0
0
False
False
0
False
False
True
Drop the Name of Author.
Drag one of these three GNU Licenses.
False
False
GTK_JUSTIFY_LEFT
False
False
0.5
0.5
0
0
0
False
False
0
True
True
True
GTK_BUTTONBOX_START
0
True
True
True
GTK_RELIEF_NORMAL
True
0.5
0.5
0
0
True
False
2
True
gtk-dnd-multiple
4
0.5
0.5
0
0
0
False
False
True
GNU General Public License
True
False
GTK_JUSTIFY_LEFT
False
False
0.5
0.5
0
0
30
False
False
True
True
True
GTK_RELIEF_NORMAL
True
0.5
0.5
0
0
True
False
2
True
gtk-dnd-multiple
4
0.5
0.5
0
0
0
False
False
True
GNU Lesser General Public License
True
False
GTK_JUSTIFY_LEFT
False
False
0.5
0.5
0
0
6
False
False
True
True
True
GTK_RELIEF_NORMAL
True
0.5
0.5
0
0
True
False
2
True
gtk-dnd-multiple
4
0.5
0.5
0
0
0
False
False
True
GNU Free Documentation License
True
False
GTK_JUSTIFY_LEFT
False
False
0.5
0.5
0
0
9
False
False
0
True
False
Gtk2-GladeXML-1.007/examples/clipboard.gladep 0000644 0001750 0001750 00000000427 10473364221 020641 0 ustar torsten torsten
clipboard
clipboard
FALSE
Gtk2-GladeXML-1.007/examples/fileman.glade 0000644 0001750 0001750 00000072463 07760164245 020157 0 ustar torsten torsten
True
FileMan
GTK_WINDOW_TOPLEVEL
GTK_WIN_POS_NONE
False
500
400
True
False
True
False
0
0
False
False
True
GTK_ORIENTATION_HORIZONTAL
GTK_TOOLBAR_ICONS
True
True
gtk-go-back
True
True
gtk-refresh
True
True
gtk-home
True
True
True
gtk-preferences
True
True
True
Icon size:
False
False
GTK_JUSTIFY_LEFT
False
False
0.5
0.5
8
0
True
0
False
False
4
True
False
0
True
Location:
False
False
GTK_JUSTIFY_LEFT
False
False
0.5
0.5
4
0
0
False
False
True
True
True
True
0
True
*
False
4
True
True
True
True
GTK_RELIEF_NORMAL
True
0.5
0.5
0
0
True
False
2
True
gtk-ok
4
0.5
0.5
0
0
0
False
False
True
Go!
True
False
GTK_JUSTIFY_LEFT
False
False
0.5
0.5
0
0
0
False
False
4
False
False
0
False
False
True
True
GTK_POLICY_AUTOMATIC
GTK_POLICY_AUTOMATIC
GTK_SHADOW_NONE
GTK_CORNER_TOP_LEFT
True
True
True
True
True
False
False
0
True
True
True
True
0
False
False
About FileMan
GTK_WINDOW_TOPLEVEL
GTK_WIN_POS_MOUSE
False
False
True
True
True
False
0
True
GTK_BUTTONBOX_END
True
True
True
gtk-ok
True
GTK_RELIEF_NORMAL
-5
0
False
True
GTK_PACK_END
4
True
False
0
True
True
<big><b>fileman.pl 0.0.1</b></big>
False
True
GTK_JUSTIFY_CENTER
False
True
0.5
0.5
0
7
0
False
False
True
Gkt2::GladeXML Example
False
False
GTK_JUSTIFY_LEFT
False
False
0.5
0.5
0
4
0
False
False
True
<small>Copyright ©2003 Bruce Alderson</small>
False
True
GTK_JUSTIFY_LEFT
False
False
0.5
0.5
0
4
0
False
False
0
True
True
Preferences
GTK_WINDOW_TOPLEVEL
GTK_WIN_POS_MOUSE
False
True
True
True
True
False
4
True
GTK_BUTTONBOX_END
True
True
True
gtk-cancel
True
GTK_RELIEF_NORMAL
-6
True
True
True
gtk-apply
True
GTK_RELIEF_NORMAL
-10
True
True
True
gtk-ok
True
GTK_RELIEF_NORMAL
-5
0
False
True
GTK_PACK_END
True
False
0
True
0
0.5
GTK_SHADOW_ETCHED_IN
4
True
False
0
True
Viewer
False
False
GTK_JUSTIFY_LEFT
False
False
0.5
0.5
8
0
0
False
False
True
True
True
True
True
0
usr/bin/gvim
True
*
False
8
True
True
True
Actions
False
False
GTK_JUSTIFY_LEFT
False
False
0.5
0.5
0
0
label_item
0
False
True
True
0
0.5
GTK_SHADOW_ETCHED_IN
4
True
False
2
True
True
Show hidden files
True
GTK_RELIEF_NORMAL
False
False
True
0
False
False
True
True
Show directories first
True
GTK_RELIEF_NORMAL
False
False
True
0
False
False
True
True
Show files owned by other users
True
GTK_RELIEF_NORMAL
False
False
True
0
False
False
True
View
False
False
GTK_JUSTIFY_LEFT
False
False
0.5
0.5
0
0
label_item
0
True
True
0
True
True
Gtk2-GladeXML-1.007/examples/hello-world.glade 0000644 0001750 0001750 00000010227 07760164245 020762 0 ustar torsten torsten
True
Gtk2::GladeXML-Power
GTK_WINDOW_TOPLEVEL
GTK_WIN_POS_NONE
False
True
False
True
False
0
300
225
True
True
<big><b>Hello World!</b></big>
True
True
GTK_JUSTIFY_CENTER
True
True
0.5
0.5
0
0
0
True
True
True
0
False
False
True
GTK_BUTTONBOX_DEFAULT_STYLE
0
True
True
True
gtk-go-back
True
GTK_RELIEF_NORMAL
True
True
True
gtk-close
True
GTK_RELIEF_NORMAL
True
True
True
gtk-go-forward
True
GTK_RELIEF_NORMAL
0
False
True
Gtk2-GladeXML-1.007/examples/dnd.gladep 0000644 0001750 0001750 00000000413 10473364242 017445 0 ustar torsten torsten
dnd
dnd
FALSE
Gtk2-GladeXML-1.007/examples/scribble.glade 0000644 0001750 0001750 00000005656 07760164245 020331 0 ustar torsten torsten
True
Scribble GladeXML
GTK_WINDOW_TOPLEVEL
GTK_WIN_POS_NONE
False
200
220
True
False
True
False
0
200
200
True
True
True
GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK
GDK_EXTENSION_EVENTS_CURSOR
0
True
True
True
True
gtk-quit
True
GTK_RELIEF_NORMAL
0
False
False
Gtk2-GladeXML-1.007/examples/scribble.gladep 0000644 0001750 0001750 00000000425 07760164245 020476 0 ustar torsten torsten
scribble
scribble
FALSE
Gtk2-GladeXML-1.007/examples/hello-world.gladep 0000644 0001750 0001750 00000000433 07760164245 021140 0 ustar torsten torsten
hello-world
hello-world
FALSE
Gtk2-GladeXML-1.007/examples/fileman.pl 0000755 0001750 0001750 00000021525 10077615724 017510 0 ustar torsten torsten #!/usr/bin/perl -w
#----------------------------------------------------------------------
# fileman.pl
#
# A file-manager example using GTK2::GladeXML.
#
# Copyright (C) 2003 Bruce Alderson
#
# 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 2 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
#----------------------------------------------------------------------
use strict;
use warnings;
use File::Spec; # portable path manipulations
use Gtk2 '-init'; # auto-initialize Gtk2
use Gtk2::GladeXML;
use Gtk2::SimpleList; # easy wrapper for list views
use Gtk2::Gdk::Keysyms; # keyboard code constants
# Globals to track directories
my $home = $ENV{HOME};
my $cwd = '';
my $upd = '';
my ($file_count, $total_bytes); # used in status bar text
# Cached windows and other widgets
my $glade;
my $mainwin;
my $status;
my $preferences;
my $about;
my $fileview;
my $location;
my $diricon;
my $fileicon;
#----------------------------------------------------------------------
# Main program
# Load the UI from the Glade-2 file
$glade = Gtk2::GladeXML->new("fileman.glade");
# Connect signals magically
$glade->signal_autoconnect_from_package('main');
init_gui();
Gtk2->main; # Start Gtk2 main loop
# that's it!
exit 0;
#----------------------------------------------------------------------
sub init_gui {
# connect a few widgets we'll access frequently
$mainwin = $glade->get_widget('main');
$location = $glade->get_widget('location_entry');
$status = $glade->get_widget('statusbar');
$preferences = $glade->get_widget('preferences');
$about = $glade->get_widget('about');
render_icons(2);
my $size_sel = $glade->get_widget('size_options');
$size_sel->set_history(2);
# Connect glade-fileview to Gtk2::SimpleList
my $widget = $glade->get_widget('fileview');
$fileview = Gtk2::SimpleList->new_from_treeview(
$widget,
'' => 'pixbuf',
'File Name' => 'text',
'Size' => 'text',
'Type' => 'text',
'Date' => 'text');
# set some useful SimpleList properties
$fileview->set_headers_clickable(1);
foreach ($fileview->get_columns()) {
$_->set_resizable(1);
$_->set_sizing('grow-only');
}
# change to initial directory
ch_dir($home);
# set up a 'refresh' timer to check for new files
Glib::Timeout->add(10000,
sub {
my $index = ($widget->get_selected_indices())[0];
refresh_fileview();
$fileview->select($index) if defined $index; # reset selection
1; #
});
}
#----------------------------------------------------------------------
sub render_icons {
my $sel = shift;
my $size;
$size = 'dialog' if $sel == 0;
$size = 'large-toolbar' if $sel == 1;
$size = 'button' if $sel == 2;
$size = 'small-toolbar' if $sel == 3;
$size = 'menu' if $sel == 4;
$diricon = $mainwin->render_icon('gtk-open', "$size");
$fileicon = $mainwin->render_icon('gtk-new', "$size");
}
#----------------------------------------------------------------------
# Refreshes the file-view
#
sub refresh_fileview {
@{$fileview->{data}} = ();
opendir DIR, $cwd;
my @all = readdir DIR;
closedir DIR;
my @files = grep { !/^\./ && -f "$cwd/$_"} @all;
my @dirs = grep { !/^\./ && -d "$cwd/$_"} @all;
$file_count = $#files + $#dirs + 2;
$total_bytes = 0;
# Add directories to view
foreach my $dir (@dirs) {
my $time = localtime((stat("$cwd/$dir"))[9]);
$total_bytes += 4096;
push @{$fileview->{data}}, [$diricon, "$dir", "4096", "Folder", "$time"];
}
# Add files to view
foreach my $file (@files) {
my ($s, $t) = (stat("$cwd/$file"))[7,9];
my $time = localtime($t);
my $type;
if ($file =~ m/.*\.(.*?)$/) {$type = $1}
else {$type = 'Unknown';}
$total_bytes += $s;
push @{$fileview->{data}}, [$fileicon, "$file", "$s", "$type", "$time"];
}
# set a decent default selection (makes keyboard nav easy)
$fileview->select(0);
# set up a 'refresh' timer to check for new files
Glib::Timeout->add(100,
sub {
my $context = $status->get_context_id('Main');
$status->push($context, "$file_count files with $total_bytes bytes");
0; # cancel timer
});
}
#----------------------------------------------------------------------
# Change to parent directory
#
sub up_dir {
my @dirs = File::Spec->splitdir ($cwd);
pop @dirs;
ch_dir(File::Spec->catdir(@dirs));
}
#----------------------------------------------------------------------
# Change the current working directory
# * Updates file-view, location, and selection
#
sub ch_dir {
my $newdir = File::Spec->canonpath (shift);
return 0 unless -d $newdir; # only if it exists
return 0 unless $newdir ne $cwd; # only on changes
$cwd = $newdir;
refresh_fileview();
$location->set_text($cwd);
1;
}
#----------------------------------------------------------------------
# Signal handlers to match signals defined using Glade-2
#----------------------------------------------------------------------
# Some very simple handlers
sub on_home_button_clicked {ch_dir($home);}
sub on_back_button_clicked {up_dir();}
sub on_location_go_button_clicked {ch_dir($location->get_text());}
sub on_refresh_button_clicked {refresh_fileview();}
sub on_quit_activate {Gtk2->main_quit;}
sub on_prefs_button_clicked {$preferences->show_all;}
sub on_preferences_activate {$preferences->show_all;}
sub on_about_activate {$about->show_all;}
sub on_main_delete_event {Gtk2->main_quit;}
sub on_prefs_cancelbutton_clicked {$preferences->hide;}
sub on_about_okbutton_clicked {$about->hide;}
#----------------------------------------------------------------------
# Handle dialog 'close' (window-decoration induced close)
# * Just hide the dialog, and tell Gtk not to do anything else
#
sub on_dialog_delete_event {
my $w = shift;
$w->hide;
1; # consume this event!
}
#----------------------------------------------------------------------
# Handle preferencess apply click
#
sub on_prefs_applybutton_clicked {
my $context = $status->get_context_id('Main');
$status->push($context, 'Preferences updated');
}
#----------------------------------------------------------------------
# Handle prefs ok click (apply/dismiss dialog)
#
sub on_prefs_okbutton_clicked {
on_prefs_applybutton_clicked();
$preferences->hide;
}
#----------------------------------------------------------------------
# Handle key presses in location text edit control
# * Translate a Return/Enter key into a 'Go' command
# * All other key presses left for GTK
#
sub on_location_entry_key_release_event {
my $widget = shift;
my $event = shift;
my $keypress = $event->keyval;
if ($keypress == $Gtk2::Gdk::Keysyms{KP_Enter} ||
$keypress == $Gtk2::Gdk::Keysyms{Return}) {
ch_dir($widget->get_text());
return 1; # consume keypress
}
return 0; # let gtk have the keypress
}
#----------------------------------------------------------------------
# Handle keypress in file-veiw
# * Translates backspace into a 'cd ..' command
# * All other key presses left for GTK
#
sub on_fileview_key_release_event {
my $widget = shift;
my $event = shift;
if ($event->keyval == $Gtk2::Gdk::Keysyms{BackSpace}) {
up_dir();
return 1; # eat keypress
}
return 0; # let gtk have keypress
}
#----------------------------------------------------------------------
# Handle double-click (or enter) on file-view
# * Translates into a 'cd ' command
#
sub on_fileview_row_activated {
my $widget = shift;
my $index = ($widget->get_selected_indices())[0];
ch_dir($cwd . '/' . $widget->{data}[$index][1]);
return 1; # consume event
}
#----------------------------------------------------------------------
sub on_size_options_changed {
my $widget = shift;
render_icons($widget->get_history);
return 0 unless defined $fileview;
refresh_fileview
$fileview->hide;
$fileview->show;
0;
}
Gtk2-GladeXML-1.007/perl-Gtk2-GladeXML.spec.in 0000644 0001750 0001750 00000004720 10136752627 020340 0 ustar torsten torsten Summary: Gtk2-GladeXML Perl module
Name: perl-Gtk2-GladeXML
Version: @VERSION@
Release: 1
Packager: gtk-perl-list@gnome.org
License: LGPL
Group: Development/Libraries
URL: http://search.cpan.org/dist/Gtk2-GladeXML/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: perl >= 2:5.8.0
BuildRequires: libglade2-devel => @GLADE@
BuildRequires: perl-ExtUtils-Depends >= @PERL_EXTUTILS_DEPENDS@
BuildRequires: perl-ExtUtils-PkgConfig >= @PERL_EXTUTILS_DEPENDS@
BuildRequires: perl-Glib >= @PERL_GLIB@
BuildRequires: perl-Gtk2 >= @PERL_GTK@
Requires: libglade2 => %(pkg-config --modversion libglade-2.0)
Requires: perl-Glib >= @PERL_GLIB@
Requires: perl-Gtk2 >= @PERL_GTK@
Requires: %(perl -MConfig -le 'if (defined $Config{useithreads}) { print "perl(:WITH_ITHREADS)" } else { print "perl(:WITHOUT_ITHREADS)" }')
Requires: %(perl -MConfig -le 'if (defined $Config{usethreads}) { print "perl(:WITH_THREADS)" } else { print "perl(:WITHOUT_THREADS)" }')
Requires: %(perl -MConfig -le 'if (defined $Config{uselargefiles}) { print "perl(:WITH_LARGEFILES)" } else { print "perl(:WITHOUT_LARGEFILES)" }')
Source0: @SOURCE@
%description
Glade is open source project that provides utilities for rapid user interface
development. After designing an application with glade-2 the layout and
configuration is saved in a XML formatted file. libglade is a library to load
and use files of this particular XML format at application run time. This
module is a set of mappings of libglade. More specifically the gladexml portion
of libglade. These mappings allow access to libglade from PERL code. Better
yet you can load a file's contents into a PERL scalar do a few magical regular
expressions to customize things and the load up the app. It doesn't get any
easier.
%prep
%setup -q -n Gtk2-GladeXML-%{version}
%build
CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL PREFIX=$RPM_BUILD_ROOT%{_prefix}
make OPTIMIZE="$RPM_OPT_FLAGS"
make test
%install
%makeinstall
[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;
find $RPM_BUILD_ROOT/usr -type f -print | \
sed "s@^$RPM_BUILD_ROOT@@g" | \
grep -v perllocal.pod | \
grep -v "\.packlist" > %{name}-%{version}-filelist
if [ "$(cat %{name}-%{version}-filelist)X" = "X" ] ; then
exit -1
fi
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{name}-%{version}-filelist
%defattr(-,root,root)
%changelog
* @DATE@ gtk-perl-list@gnome.org - @VERSION@
- Specfile autogenerated.
Gtk2-GladeXML-1.007/ChangeLog 0000644 0001750 0001750 00000017316 11061032450 015453 0 ustar torsten torsten 2008-09-07 Torsten Schoenfeld
* GladeXML.pm
* NEWS
* README: Stable release 1.007.
2008-09-07 Torsten Schoenfeld
* Makefile.PL: Depend on ExtUtils::Depends 0.300 so that we can
remove our custom find_extra_libs hack. Also play nice with CPAN
testers and exit with status 0 if we can't find libglade-2.0.
2006-09-04 kaffeetisch
* GladeXML.pm, NEWS, README: Stable release 1.006.
2006-09-04 kaffeetisch
* MANIFEST: Add the two new examples.
* MANIFEST, META.yml, Makefile.PL: Let EU::MM generate META.yml on
'make dist'.
2006-08-26 kaffeetisch
* AUTHORS, examples/TODO, examples/clipboard.glade,
examples/clipboard.gladep, examples/clipboard.pl,
examples/dnd.glade, examples/dnd.gladep, examples/dnd.pl: Add the
examples Fabrice added to the SourceForge tracker two ages ago.
2006/05/07 kaffeetisch
* GladeXML.xs: Hush a signedness warning.
2005/09/28 kaffeetisch
* GladeXML.pm: Add a link to Grant's TPR article.
2005/06/17 kaffeetisch
* GladeXML.pm, META.yml, NEWS, README: stable release 1.005.
2005/06/14 muppetman
* GladeXML.pm, AUTHORS: apply documentation patch from Marco
Antonio Manzo to demystify custom widget handling.
2005/06/14 muppetman
* GladeXML.pm, AUTHORS: apply documentation patch from Grant McLean.
2005/02/07 21:28 (-0500) muppetman
* Makefile.PL: Add a copy of the find_extra_libs hack from Gtk2's
Makefile.PL. This ought to go into ExtUtils::Depends, but i haven't
found a fully portable solution.
2005/02/07 21:22 (-0500) muppetman
* GladeXML.pm: Update docs to mention that the application is
responsible for calling Gnome2::Program::init in gnome apps.
2005/01/17 20:44 (-0500) rwmcfa1
* GladeXML.pm, NEWS, README: stable bugfix release 1.004
2005/01/11 21:33 (-0500) rwmcfa1
* GladeXML.pm, NEWS, README: stable bugfix release 1.003
2004/11/28 12:20 (-0500) rwmcfa1
* GladeXML.pm, NEWS, README: stable bugfix release 1.002
2004/11/28 12:20 (-0500) rwmcfa1
* GladeXML.xs: added _ornull's to new functions where appropriate.
default value of NULL on signal_connect_full. bug found by: Martin G.
http://bugzilla.gnome.org/show_bug.cgi?id=159184
2004/10/24 11:55 (-0400) rwmcfa1
* MANIFEST.SKIP: updates
* perl-Gtk2-GladeXML.spec.in: new scheme that addresses x86_64 problems
found by Carl Nygard
2004/09/15 23:14 (-0400) muppet
* GladeXML.pm, NEWS, README: stable bugfix release 1.001
* examples/README, examples/TODO: the 'after' bugfix seems to
have fixed the scribble sample.
2004/09/14 23:21 (-0400) muppet
* MANIFEST, t/custom.t, t/more.t: new regression tests should hit
quite a lot more of the API.
* GladeXML.pm: factor out common code into a helper function.
fix a few typos.
* t/0.GladeXML.t: the second Gtk2->init doesn't do anything,
removed.
2004/09/14 17:30 (-0500) rwmcfa1
* GladeXML.pm: fix for major bug where all signals were being
connected after. (muppet)
2004/07/21 21:41 (-0500) muppetman
* examples/fileman.pl: use File::Spec instead of manual path string
manipulation when changing directores. thanks to Fabrice, the
anonymous poster of #979248 in the sourceforge tracker.
http://sourceforge.net/tracker/index.php?func=detail&aid=979248&group_id=64773&atid=508620
2004/07/19 18:15 (-0500) muppetman
* examples/scribble.pl: fix the bad arg in expose bug. thanks to
Fabrice, the anonymous poster of #979266 in the sourceforge tracker.
http://sourceforge.net/tracker/index.php?func=detail&aid=979266&group_id=64773&atid=508620
2004/03/30 00:17 (-0500) muppetman
* README, NEWS, GladeXML.pm: stable release 1.00
* GladeXML.pm: add import version-checking, fix pod links.
* Makefile.PL: fix requirements. don't use postamble_docs, we don't
have any XS that needs documenting.
2004/03/19 03:10 (-0500) muppetman
* GladeXML.pm, README: beta release 0.96
A NEWS
* MANIFEST:
add a news file
* Makefile.PL: cleanup
2004/02/26 17:37 (-0500) muppetman
* README: fix the spelling of license; update the sandbox instructions.
2004/02/12 19:00 (-0500) muppetman
* Makefile.PL: add_headers is a noop in ExtUtils::Depends >= 0.2,
and doesn't do anything useful that install doesn't do in < 0.2,
so take it out. this avoids some noise on stderr as well.
2004/01/02 15:45 (-0500) rwmcfa1
* Makefile.PL: removed runtime_reqs stuff, replaced by the pkg-config
trick. use Glib::MakeHelper.
* perl-Gtk2-GladeXML.spec.in: use pkg-config for Requires version
2004/01/02 15:45 (-0500) rwmcfa1
* examples/README: initial import
* MANIFEST: updates
2004/01/09 00:10 (-0500) muppetman
* GladeXML.pm, README: release 0.95
* Makefile.PL: now strict-safe. remove unused stuff. actually create
the DATE subst that the specfile wants.
2004/01/07 14:58 pcg
* GladeXML.pm: fix typoe reported by Florian Ragwitz :).
2003/12/29 16:32 (-0500) rwmcfa1
* perl-Gtk2-GladeXML.spec.in: use the new DATE replacement in
conjunction with VERSION to create the changlog on the fly, which is
better.
2003/12/03 23:57 muppetman
* GladeXML.pm: update the docs.
2003/11/12 14:05 rwmcfa1
* examples/*: import of some excellent examples by Bruce Alderson.
2003/11/12 14:05 pcg
* GladeXML.xs: use GPerlFilename.
* GladeXML.pm: improve docs, add a convinience method, bump version.
2003/11/11 01:01 muppetman
* MANIFEST, debian/*: remove debian packaging files, since having
them in the upstream dist makes things difficult for the packagers
2003/10/09 23:52 muppetman
* Makefile.PL, GladeXML.pm, README, META.yml, debian/changelog:
require the freshly released 1.00 instead of release candidates,
and bump the version to 0.93.
2003/10/06 22:41 muppetman
* GladeXML.pm: fix a couple of minor bugs that appear to have sneaked
in during the port from gtk-perl.
2003/10/06 22:41 muppetman
* GladeXML.xs: chas' changes to make custom widgets work, and update
stuff to use GPerlCallbacks. (i'm committing because chas has no
'net access at home.)
2003/09/21 20:19 rwmcfa1
* Makefile.PL: fixed bug in specfile generation
2003/09/21 10:49 muppetman
* GladeXML.pm Makefile.PL README: updated for 0.92 release
2003/09/17 10:44 rwmcfa1
* Makefile.PL: ExtUtils::PkgConfig can now deal with version
requirements using pkg-config's interface, make use of it.
2003/09/16 23:50 rwmcfa1
* Makefile.PL, perl-*spec.in: somewhat automated versioning system
implemented for depenancy modules
2003/09/15 22:26 rwmcfa1
* Makefile.PL: spec file dependancies improved
2003/09/06 19:23 rwmcfa1
* Makefile.PL: dist-rpms build target added
* perl-Gtk2-GladeXML.spec.in: initial import
2003/08/15 11:16 muppetman
* debian/*, MANIDEST, AUTHORS: patch from James Curbo adds debian
packaging files.
* GladeXML.pm, README: we haven't changed in three weeks, so let's go
to 0.90 and try to get more bug reports.
2003/07/25 10:21 muppetman
* GladeXML.pm, README: bump version to 0.28
2003/07/05 07:13 rwmcfa1
* Makefile.PL: put in a pre-req. of Glib >= 0.90, due to using
gchar_own
2003/07/05 07:13 pcg
* META.xml: added.
* GladeXML.xs: use gchar_own to avoid memleak (untested).
2003/07/04 11:45 muppetman
* GladeXML.pm: bump to 0.26 for release
2003/06/30 21:15 rwmcfa1
* GladeXML.pm, GladeXML.xs, etc.: Got things ready for a beta
quality release. Added pod documentation...
2003/06/20 11:28 muppetman
* README: fix some of the info that looks like it was never touched
after copying from Gtk2-Perl
2003/05/27 20:36 rwmcfa1
* GladeXML.xs: a pass at the custom_handler stuff, very close to what's
in gtk-perl
2003/05/27 10:57 rwmcfa1
* GladeXML.pm: from what we can tell the method used to work around the
lack of signal_connect_object (which is irrelivent with gtk2-perl)
should be ok. this comments on the fact and cleans it up slightly.
2003/05/26 22:09 rwmcfa1
* : ChangeLog created
Gtk2-GladeXML-1.007/NEWS 0000644 0001750 0001750 00000002612 11061032264 014374 0 ustar torsten torsten Overview of changes in Gtk2::GladeXML 1.007
===========================================
* Depend on ExtUtils::Depends 0.300 for improved portability.
Overview of changes in Gtk2::GladeXML 1.006
===========================================
* Add two new examples from Fabrice.
* Add a link to Grant McLean's TPR article to the docs.
Overview of Changes in Gtk2::GladeXML 1.005
===========================================
* Multiple documentation fixes and additions.
* Win32 build fixes.
Overview of Changes in Gtk2::GladeXML 1.004
===========================================
* none, don't do make disttest dist or tarballs will be invalid
Overview of Changes in Gtk2::GladeXML 1.003
===========================================
* none, last rel tarballs had uncommited changes
Overview of Changes in Gtk2::GladeXML 1.002
===========================================
* allow undef/NULL in new functions where appropriate
Overview of Changes in Gtk2::GladeXML 1.001
===========================================
* Fixed a bug that resulted in all signals being connected with
signal_connect_after. The scribble example works now.
* Lots of new tests.
* Documentation and example code improvements.
Overview of Changes in 1.0
==========================
* Import version checking.
* Build improvements.
Overview of Changes in 0.96
===========================
* Build system fixes.
* Spec file improvements.
Gtk2-GladeXML-1.007/GladeXML.pm 0000644 0001750 0001750 00000024067 11061032510 015632 0 ustar torsten torsten #
# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glade/GladeXML.pm,v 1.32 2008/09/07 20:10:48 kaffeetisch Exp $
#
# Based strongly on gtk-perl's GladeXML
#
package Gtk2::GladeXML;
use 5.008;
use strict;
use warnings;
use Gtk2;
require DynaLoader;
our @ISA = qw(DynaLoader);
our $VERSION = '1.007';
sub import {
my $class = shift;
$class->VERSION (@_);
}
sub dl_load_flags { $^O eq 'darwin' ? 0x00 : 0x01 }
Gtk2::GladeXML->bootstrap ($VERSION);
sub _do_connect {
my ($object, $signal_name, $signal_data, $connect_object,
$after, $handler) = @_;
my $func = $after ? 'signal_connect_after' : 'signal_connect';
# we get connect_object when we're supposed to call
# signal_connect_object, which ensures that the data (an object)
# lives as long as the signal is connected. the bindings take
# care of that for us in all cases, so we only have signal_connect.
# if we get a connect_object, just use that instead of signal_data.
$object->$func($signal_name => $handler,
$connect_object ? $connect_object : $signal_data);
}
# XXX used only by handler_connect, which appears to be derelict code
sub _connect_helper
{
my $handler_name = shift;
my $object = shift;
my $signal_name = shift;
my $signal_data = shift;
my $connect_object = shift;
my $after = shift;
my $handler = shift;
_do_connect ($object, $signal_name, $signal_data, $connect_object,
$after, $handler);
}
sub _autoconnect_helper
{
my $handler_name = shift;
my $object = shift;
my $signal_name = shift;
my $signal_data = shift;
my $connect_object = shift;
my $after = shift;
my $package = shift;
no strict qw/refs/;
my $handler = $handler_name;
if (ref $package) {
$handler = sub { $package->$handler_name(@_) };
} else {
$handler = $package.'::'.$handler_name
if( $package && $handler !~ /::/ );
}
_do_connect ($object, $signal_name, $signal_data, $connect_object,
$after, $handler);
}
# XXX unused code?
sub handler_connect {
my ($self, $hname, @handler) = @_;
$self->signal_connect_full($hname, \&_connect_helper, @handler);
}
sub signal_autoconnect_from_package
{
my $self = shift;
my $package = shift;
($package, undef, undef) = caller() unless $package;
$self->signal_autoconnect(\&_autoconnect_helper, $package);
}
sub signal_autoconnect_all {
my ($self, %handler) = @_;
$self->signal_autoconnect(sub {
my $handler_name = shift;
my $object = shift;
my $signal_name = shift;
my $signal_data = shift;
my $connect_object = shift;
my $after = shift;
my $handler = $handler{$handler_name}
or return;
_do_connect ($object, $signal_name, $signal_data, $connect_object,
$after, $handler);
});
}
1;
__END__
=head1 NAME
Gtk2::GladeXML - Create user interfaces directly from Glade XML files.
=head1 SYNOPSIS
# for a pure gtk+ glade project
use Gtk2 -init;
use Gtk2::GladeXML;
$gladexml = Gtk2::GladeXML->new('example.glade');
$gladexml->signal_autoconnect_from_package('main');
$quitbtn = $gladexml->get_widget('Quit');
Gtk2->main;
# for glade files using gnome widgets, you must initialize Gnome2
# before loading the glade file.
use Gnome2;
use Gtk2::GladeXML;
# this call also initializes gtk+ for us
Gnome2::Program->init ($appname, $version);
$gladexml = Gtk2::GladeXML->new('gnomeapp.glade');
Gtk2->main;
=head1 ABSTRACT
Gtk2::GladeXML allows Perl programmers to use libglade, a C library which
generates graphical user interfaces directly from the XML output of the
Glade user interface designer.
=head1 DESCRIPTION
Glade is a free user interface builder for GTK+ and GNOME. After designing
a user interface with glade-2 the layout and configuration are saved in an
XML file. libglade is a library which knows how to build and hook up the
user interface described in the Glade XML file at application run time.
This extension module binds libglade to Perl so you can create and manipulate
user interfaces in Perl code in conjunction with Gtk2 and even Gnome2. Better
yet you can load a file's contents into a PERL scalar do a few magical regular
expressions to customize things and the load up the app. It doesn't get any
easier.
=head1 FUNCTIONS
=over
=item $gladexml = Gtk2::GladeXML->new(GLADE_FILE, [ROOT, DOMAIN])
Create a new GladeXML object by loading the data in GLADE_FILE. ROOT is an
optional parameter that specifies a point (widget node) from which to start
building. DOMAIN is an optional parameter that specifies the translation
domain for the xml file.
=item $gladexml = Gtk2::GladeXML->new_from_buffer(BUFFER, [ROOT, DOMAIN])
Create a new GladeXML object from the scalar string contained in BUFFER. ROOT
is an optional parameter that specifies a point (widget node) from which to
start building. DOMAIN is an optional parameter that specifies the translation
domain for the xml file.
=item $widget = $gladexml->get_widget(NAME)
Return the widget created by the XML file with NAME or undef if no such name
exists.
=item $gladexml->signal_autoconnect($callback[, $userdata])
Iterates over all signals and calls the given callback:
sub example_cb {
my ($name, $widget, $signal, $signal_data, $connect, $after, $userdata) = @_;
}
The following two convenience methods use this to provide a more
convenient interface.
=item $gladexml->signal_autoconnect_from_package([PACKAGE or OBJECT])
Sets up the signal handling callbacks as specified in the glade XML data.
The argument to this method can be a Perl package name or an object. If a
package name is used, each handler named in the Glade XML data will be called
as a subroutine in the named package. If an object is supplied each handler
will be called as a method of the object. If no argument is supplied, the name
of the calling package will be used. A user data argument cannot be supplied
however this is seldom necessary when an object is used.
The names of the subroutines or methods must exactly match the handler name in
the XML data. It is worth noting that callbacks you get for free in c such as
gtk_main_quit will not exist in perl and must always be defined, for example:
sub gtk_main_quit
{
Gtk2->main_quit;
}
Otherwise behavior should be exactly as expected with the use of libglade
from a C application.
=item $gladexml->signal_autoconnect_all (name => handler, ...)
Iterates over all named signals and tries to connect them to the handlers
specified as arguments (handlers not given as argument are being
ignored). This is very handy when implementing your own widgets, where you
can't use global callbacks.
=item $widget = Gtk2::Glade->set_custom_handler ($callback[, $userdata])
This method tells Gtk2::GladeXML how to create handlers for custom widgets.
You can specify a "custom" widget in a glade file, which allows you to
include in your interface widgets that Glade itself doesn't know how to
create. To tell libglade how to instantiate such widgets, you specify a
"custom widget handler", a function which returns a Gtk2:Widget object
for that custom widget. This handler needs to be installed sometime
before the instantiation of your Gtk2::GladeXML object, by calling
C.
my $widget = Gtk2::Glade->set_custom_handler( \&my_handler );
my $gladexml = Gtk2::GladeXML->new( 'MyApp.glade' );
The prototype for the custom handler is:
sub my_handler {
my ($xml, # The Gtk2::GladeXML object
# the remaining arguments are as specified in the glade file:
$func_name, # The function name
$name, # the name of the widget to be created
$str1, # the string1 property
$str2, # the string2 property
$int1, # the int1 property
$int2, # the int2 property
$userdata # the data passed to set_custom_handler
) = @_;
...
return $widget; # a new Gtk2::Widget; you must call ->show on it.
}
=back
=head1 FAQ
=over
=item Where is the option to generate Perl source in Glade?
Glade itself only creates the XML description, and relies on extra converter
programs to write source code; only a few converters are widely popular.
In general, however, you don't want to generate source code for a variety of
reasons, mostly to do with maintainability. This message on the glade-devel
list explains it best:
http://lists.ximian.com/archives/public/glade-devel/2003-February/000015.html
=item Why does my program crash on startup?
Does your glade file use Gnome widgets? If so, you must initialize Gnome
manually; libglade can knows how to create gnome widgets, but can't know how
you want to initialize the app. This is usually sufficient:
use Gnome2;
Gnome2::Program->init ($app_name, $version_string);
Libglade's API reference mentions this:
http://developer.gnome.org/doc/API/2.0/libglade/libglade-modules.html
=back
=head1 SEE ALSO
L(1), L(3pm), L(3pm)
The Libglade Reference Manual at
L
An introductory article that originally appeared in The Perl Review:
L
=head1 AUTHOR
Ross McFarland , Marc Lehmann ,
muppet . Bruce Alderson provided several examples.
Grant McClean and Marco Antonio Manzo
contributed documentation.
=head1 COPYRIGHT AND LICENSE
Copyright 2003-2006 by the gtk2-perl team.
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 2 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 Library General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307 USA.
=cut
Gtk2-GladeXML-1.007/GladeXML.xs 0000644 0001750 0001750 00000015776 10427401072 015667 0 ustar torsten torsten /*
* $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glade/GladeXML.xs,v 1.14 2006/05/07 14:20:42 kaffeetisch Exp $
*
*/
#include "gladexmlperl.h"
static GPerlCallback *
create_connect_func_handler_callback (SV * func, SV * data)
{
GType param_types[] = {
G_TYPE_STRING,
G_TYPE_OBJECT,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_OBJECT,
G_TYPE_BOOLEAN
};
return gperl_callback_new (func, data,
G_N_ELEMENTS (param_types),
param_types,
G_TYPE_NONE);
}
static void
connect_func_handler (const gchar *handler_name,
GObject *object,
const gchar *signal_name,
const gchar *signal_data,
GObject *connect_object,
gboolean after,
gpointer user_data)
{
#define IF_NULL_SET_EMPTY(var) \
if( !(var) ) \
(var) = "";
IF_NULL_SET_EMPTY(handler_name);
IF_NULL_SET_EMPTY(signal_name);
IF_NULL_SET_EMPTY(signal_data);
#undef IF_NULL_SET_EMPTY
gperl_callback_invoke ((GPerlCallback*) user_data,
NULL,
handler_name,
object,
signal_name,
signal_data,
connect_object,
after,
user_data);
}
static GtkWidget*
glade_custom_widget(
GladeXML * xml,
gchar * func_name,
char * name,
char * string1,
char * string2,
int int1,
int int2,
gpointer data
) {
GPerlCallback * callback = (GPerlCallback*)data;
GValue return_value = {0,};
GtkWidget* retval;
g_value_init(&return_value, callback->return_type);
gperl_callback_invoke(
callback, /*the perl subroutine*/
&return_value, /*to catch the return value*/
xml, /*the calling gladexml object*/
func_name, /*the widget creation function name*/
name, /*this widget's name for use with get_widget*/
string1, /*the four args from the xml file*/
string2,
int1,
int2
);
/* dup refs, unset unrefs. */
retval = (GtkWidget *)g_value_dup_object(&return_value);
g_value_unset(&return_value);
return retval;
}
MODULE = Gtk2::GladeXML PACKAGE = Gtk2::GladeXML PREFIX = glade_xml_
BOOT:
gperl_register_object (GLADE_TYPE_XML, "Gtk2::GladeXML");
## GladeXML *glade_xml_new (const char *fname, const char *root, const char *domain)
GladeXML_ornull *
glade_xml_new (class, filename, root=NULL, domain=NULL)
GPerlFilename filename
const char_ornull *root
const char_ornull *domain
C_ARGS:
filename, root, domain
## GladeXML *glade_xml_new_from_buffer (const char *buffer, int size, const char *root, const char *domain)
GladeXML_ornull *
glade_xml_new_from_buffer (class, buffer, root=NULL, domain=NULL)
SV *buffer
const char_ornull *root
const char_ornull *domain
PREINIT:
STRLEN len;
char *p;
CODE:
p = SvPV(buffer, len);
RETVAL = glade_xml_new_from_buffer(p, len, root, domain);
OUTPUT:
RETVAL
## gboolean glade_xml_construct (GladeXML *self, const char *fname, const char *root, const char *domain)
#gboolean
#glade_xml_construct (self, fname, root, domain)
# GladeXML *self
# const char *fname
# const char *root
# const char *domain
## void glade_xml_signal_connect (GladeXML *self, const char *handlername, GCallback func)
#void
#glade_xml_signal_connect (self, handlername, func)
# GladeXML *self
# const char *handlername
# GCallback func
## void glade_xml_signal_connect_data (GladeXML *self, const char *handlername, GCallback func, gpointer user_data)
#void
#glade_xml_signal_connect_data (self, handlername, func, user_data)
# GladeXML *self
# const char *handlername
# GCallback func
# gpointer user_data
## void glade_xml_signal_autoconnect (GladeXML *self)
## void glade_xml_signal_autoconnect_full (GladeXML *self, GladeXMLConnectFunc func, gpointer user_data)
void
glade_xml_signal_autoconnect (self, func, user_data=NULL)
GladeXML *self
SV *func
SV *user_data
PREINIT:
GPerlCallback * real_callback;
CODE:
real_callback = create_connect_func_handler_callback (func, user_data);
glade_xml_signal_autoconnect_full (self,
connect_func_handler,
real_callback);
gperl_callback_destroy (real_callback);
## probably shouldn't use this unless you know what you're doing
## void glade_xml_signal_connect_full (GladeXML *self, const gchar *handler_name, GladeXMLConnectFunc func, gpointer user_data)
void
glade_xml_signal_connect_full (self, handler_name, func, user_data=NULL)
GladeXML *self
const gchar *handler_name
SV *func
SV *user_data
PREINIT:
GPerlCallback * real_callback;
CODE:
real_callback = create_connect_func_handler_callback (func, user_data);
glade_xml_signal_connect_full (self, handler_name, connect_func_handler,
real_callback);
gperl_callback_destroy (real_callback);
## GtkWidget *glade_xml_get_widget (GladeXML *self, const char *name)
GtkWidget_ornull *
glade_xml_get_widget (self, name)
GladeXML *self
const char *name
## GList *glade_xml_get_widget_prefix (GladeXML *self, const char *name)
void
glade_xml_get_widget_prefix (self, name)
GladeXML *self
const char *name
PREINIT:
GList * widgets = NULL;
GList * i = NULL;
PPCODE:
widgets = glade_xml_get_widget_prefix(self, name);
if( !widgets )
XSRETURN_EMPTY;
for( i = widgets; i != NULL; i = i->next )
XPUSHs(sv_2mortal(newSVGtkWidget(i->data)));
g_list_free(widgets);
## probably shouldn't use this unless you know what you're doing
## gchar *glade_xml_relative_file (GladeXML *self, const gchar *filename)
gchar_own *
glade_xml_relative_file (self, filename)
GladeXML *self
GPerlFilename filename
MODULE = Gtk2::GladeXML PACKAGE = Gtk2::Glade PREFIX = glade_
## custom widget support
## void glade_set_custom_handler(GladeXMLCustomWidgetHandler handler, gpointer user_data)
void
glade_set_custom_handler (class, callback, callback_data=NULL)
SV * callback
SV * callback_data
PREINIT:
static GPerlCallback * real_callback = NULL;
GType param_types [] = {
GLADE_TYPE_XML, /*gladexml object*/
G_TYPE_STRING, /*creation function name*/
G_TYPE_STRING, /*widget name*/
G_TYPE_STRING, /*string 1*/
G_TYPE_STRING, /*string 2*/
G_TYPE_INT, /*integer 1*/
G_TYPE_INT /*integer 2*/
};
CODE:
if (real_callback)
/* we're being called again... */
gperl_callback_destroy (real_callback);
real_callback = gperl_callback_new(
callback, /*perl function to treat as a callback*/
callback_data, /*extra data to pass to callback*/
7, /*number of parameters*/
param_types, /*list of parameters*/
GTK_TYPE_WIDGET /*return type*/
);
glade_set_custom_handler (glade_custom_widget, real_callback);
MODULE = Gtk2::GladeXML PACKAGE = Gtk2::Widget PREFIX = glade_
## const char *glade_get_widget_name (GtkWidget *widget);
const char *
glade_get_widget_name (widget)
GtkWidget *widget
## GladeXML *glade_get_widget_tree (GtkWidget *widget)
GladeXML *
glade_get_widget_tree (widget)
GtkWidget *widget
Gtk2-GladeXML-1.007/gladexmlperl.h 0000644 0001750 0001750 00000001463 07662010011 016527 0 ustar torsten torsten /*
* $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glade/gladexmlperl.h,v 1.2 2003/05/18 22:58:17 rwmcfa1 Exp $
*/
#ifndef _GLADEXMLPERL_H_
#define _GLADEXMLPERL_H_
#include
#include
#ifdef GLADE_TYPE_XML
/* GObject derivative GladeXML */
# define SvGladeXML(sv) ((GladeXML*)gperl_get_object_check (sv, GLADE_TYPE_XML))
# define newSVGladeXML(val) (gperl_new_object (G_OBJECT (val), FALSE))
typedef GladeXML GladeXML_ornull;
# define SvGladeXML_ornull(sv) (((sv) && SvTRUE (sv)) ? SvGladeXML(sv) : NULL)
# define newSVGladeXML_ornull(val) (((val) == NULL) ? &PL_sv_undef : gperl_new_object (G_OBJECT (val), FALSE))
typedef GladeXML GladeXML_noinc;
#define newSVGladeXML_noinc(val) (gperl_new_object (G_OBJECT (val), TRUE))
#endif /* GLADE_TYPE_XML */
#endif /* _GLADEXMLPERL_H_ */
Gtk2-GladeXML-1.007/MANIFEST.SKIP 0000644 0001750 0001750 00000000151 10136752627 015605 0 ustar torsten torsten ~$
\.bak$
blib
\.bs$
build
\.c$
CVS
\.cvsignore$
Makefile$
Makefile\.old$
\.o$
\.spec$
\.sw.$
\.tar\.gz$
Gtk2-GladeXML-1.007/AUTHORS 0000644 0001750 0001750 00000001342 10474111356 014753 0 ustar torsten torsten The Gtk2-Perl Team - contact us at gtk-perl-list@gnome.org
================================================================
muppet scott at asofyet dot org
Ross McFarland rwmcfa1 at neces dot com
Goran Thyni goran at kirra dot net
Joern Reder joern at zyn dot de
Chas Owens alas at wilma dot widomaker dot com
Guillaume Cottenceau gc at mandrakesoft dot com
Contributors - the people who sent us patches
=============================================
James Curbo hannibal at adtrw dot org
Grant McLean grant at mclean dot net dot nz
Bruce Alderson
Marco Antonio Manzo amnesiac at perl dot org dot mx
Fabrice fabrice dot dub at free dot fr
Gtk2-GladeXML-1.007/gladexmlperl.typemap 0000644 0001750 0001750 00000001004 07662041350 017760 0 ustar torsten torsten #
# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glade/gladexmlperl.typemap,v 1.1 2003/05/19 02:35:20 rwmcfa1 Exp $
#
TYPEMAP
GladeXML * T_GLADE_TYPE_XML
GladeXML_ornull * T_GLADE_TYPE_XML_NULLOK
GladeXML_noinc * T_GLADE_TYPE_XML_NOINC
INPUT
T_GLADE_TYPE_XML
$var = SvGladeXML($arg);
T_GLADE_TYPE_XML_NULLOK
$var = SvGladeXML_ornull($arg);
OUTPUT
T_GLADE_TYPE_XML
$arg = newSVGladeXML($var);
T_GLADE_TYPE_XML_NULLOK
$arg = newSVGladeXML_ornull($var);
T_GLADE_TYPE_XML_NOINC
$arg = newSVGladeXML_noinc($var);
Gtk2-GladeXML-1.007/README 0000644 0001750 0001750 00000005050 11061032510 014546 0 ustar torsten torsten Gtk2::GladeXML version 1.007
============================
This package adds perl support for Glade 2.x to Gtk2-Perl.
To discuss gtk2-perl, ask questions and flame/praise the authors,
join gtk-perl-list@gnome.org at lists.gnome.org.
Also have a look at the gtk2-perl website and sourceforge project page,
http://gtk2-perl.sourceforge.net
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:
perl >= 5.8.0
Glib >= 1.02 (perl module)
Gtk2 >= 1.00 (perl module)
libglade-2.0 (C library)
In order to build it from source, you'll also need
ExtUtils::Depends >= 0.300
ExtUtils::PkgConfig >= 1.000
BUG REPORTS
-----------
Please report bugs to the gnome-perl product in GNOME's Bugzilla:
COPYRIGHT AND LICENSE
---------------------
Copyright (C) 2003-2006 by rwmcfa1 at neces dot com and the gtk2-perl team.
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 2 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 Library General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307 USA.
# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glade/README,v 1.20 2008/09/07 20:10:48 kaffeetisch Exp $
Gtk2-GladeXML-1.007/LICENSE 0000644 0001750 0001750 00000061314 07664546346 014737 0 ustar torsten torsten GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. 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 not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library 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
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
Copyright (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 2 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 Library General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307 USA.
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
Gtk2-GladeXML-1.007/Makefile.PL 0000644 0001750 0001750 00000005300 11061032036 015641 0 ustar torsten torsten #
# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glade/Makefile.PL,v 1.21 2008/09/07 20:05:50 kaffeetisch Exp $
#
use strict;
use 5.008;
use Cwd;
use File::Spec;
use ExtUtils::MakeMaker;
# minimum required version of dependancies we need to build
our %build_reqs = (
'perl-ExtUtils-Depends' => '0.300',
'perl-ExtUtils-PkgConfig' => '1.000',
'perl-Glib' => '1.020', # for Glib::MakeHelper
'perl-Gtk2' => '1.000',
'Glade' => '2.0.0',
);
our %pre_reqs = (
Glib:: => $build_reqs{'perl-Glib'},
Gtk2:: => $build_reqs{'perl-Gtk2'},
ExtUtils::Depends:: => $build_reqs{'perl-ExtUtils-Depends'},
ExtUtils::PkgConfig:: => $build_reqs{'perl-ExtUtils-PkgConfig'},
);
# Writing a fake Makefile ensures that CPAN will pick up the correct
# dependencies and install them.
unless (eval "use ExtUtils::Depends '$build_reqs{'perl-ExtUtils-Depends'}';"
. "use ExtUtils::PkgConfig '$build_reqs{'perl-ExtUtils-PkgConfig'}';"
. "use Glib::MakeHelper;"
# just seeing if Glib is available isn't enough, make sure
# it's recent enough, too
. "use Glib '$build_reqs{'perl-Glib'}';"
. "use Gtk2 '$build_reqs{'perl-Gtk2'}';"
. "1") {
warn "$@\n";
WriteMakefile(
PREREQ_FATAL => 1,
PREREQ_PM => \%pre_reqs,
);
exit 1; # not reached
}
# If the package can't be found, warn and exit with status 0 to indicate to
# CPAN testers that their system is not supported.
our %pkgcfg;
unless (eval { %pkgcfg = ExtUtils::PkgConfig->find ('libglade-2.0 >= '.$build_reqs{Glade});
1; })
{
warn $@;
exit 0;
}
mkdir 'build', 0777;
my $gladexml = ExtUtils::Depends->new ('GladeXML', 'Gtk2', 'Glib');
$gladexml->set_inc ($pkgcfg{cflags});
$gladexml->set_libs ($pkgcfg{libs});
$gladexml->add_pm ('GladeXML.pm' => '$(INST_LIBDIR)/GladeXML.pm');
$gladexml->add_xs ('GladeXML.xs');
my $cwd = cwd();
$gladexml->add_typemaps (map {File::Spec->catfile($cwd,$_)} 'gladexmlperl.typemap');
$gladexml->install ('gladexmlperl.h');
$gladexml->save_config ('build/IFiles.pm');
WriteMakefile(
NAME => 'Gtk2::GladeXML',
VERSION_FROM => 'GladeXML.pm',
ABSTRACT_FROM => 'GladeXML.pm',
PREREQ_PM => \%pre_reqs,
XSPROTOARG => '-noprototypes',
$gladexml->get_makefile_vars,
);
sub MY::postamble
{
return Glib::MakeHelper->postamble_clean ()
. Glib::MakeHelper->postamble_rpms (
'GLADE' => $build_reqs{'Glade'},
'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'},
);
}
Gtk2-GladeXML-1.007/META.yml 0000644 0001750 0001750 00000001053 11061032517 015145 0 ustar torsten torsten --- #YAML:1.0
name: Gtk2-GladeXML
version: 1.007
abstract: Create user interfaces directly from Glade XML files.
license: ~
author: ~
generated_by: ExtUtils::MakeMaker version 6.44
distribution_type: module
requires:
ExtUtils::Depends: 0.300
ExtUtils::PkgConfig: 1.000
Glib: 1.020
Gtk2: 1.000
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.3.html
version: 1.3