mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-12 01:26:31 +01:00
Re-add glibmm2 properly.
git-svn-id: svn://localhost/ardour2/trunk@2644 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
89f1f09c04
commit
a313924b77
335 changed files with 139518 additions and 0 deletions
72
libs/glibmm2/tools/pm/Object.pm
Normal file
72
libs/glibmm2/tools/pm/Object.pm
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
package Object;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
BEGIN {
|
||||
use Exporter ();
|
||||
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
|
||||
|
||||
# set the version for version checking
|
||||
$VERSION = 1.00;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = ( );
|
||||
%EXPORT_TAGS = ( );
|
||||
|
||||
# your exported package globals go here,
|
||||
# as well as any optionally exported functions
|
||||
@EXPORT_OK = ( );
|
||||
}
|
||||
our @EXPORT_OK;
|
||||
|
||||
# class Object
|
||||
# {
|
||||
# string name;
|
||||
# string module;
|
||||
# string parent;
|
||||
# string c_name;
|
||||
# string gtype_id;
|
||||
# }
|
||||
|
||||
|
||||
sub new
|
||||
{
|
||||
my ($def) = @_;
|
||||
|
||||
my $self = {};
|
||||
bless $self;
|
||||
|
||||
$def =~ s/^\(//;
|
||||
$def =~ s/\)$//;
|
||||
|
||||
# snarf down the fields
|
||||
$$self{name} = $1 if($def =~ s/^define-object (\S+)//);
|
||||
$$self{module} = $1 if($def =~ s/\(in-module "(\S+)"\)//);
|
||||
$$self{parent} = $1 if($def =~ s/\(parent "(\S+)"\)//);
|
||||
$$self{c_name} = $1 if($def =~ s/\(c-name "(\S+)"\)//);
|
||||
$$self{gtype_id} = $1 if($def =~ s/\(gtype-id "(\S+)"\)//);
|
||||
|
||||
if($def !~ /^\s*$/)
|
||||
{
|
||||
GtkDefs::error("Unhandled object def ($def) in $$self{module}\::$$self{name}\n")
|
||||
}
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
||||
sub dump($)
|
||||
{
|
||||
my ($self) = @_;
|
||||
|
||||
print "<object>\n";
|
||||
|
||||
foreach(keys %$self)
|
||||
{ print " <$_ value=\"$$self{$_}\"/>\n"; }
|
||||
|
||||
print "</object>\n\n";
|
||||
}
|
||||
|
||||
|
||||
1; # indicate proper module load.
|
||||
Loading…
Add table
Add a link
Reference in a new issue