{
    package GCStyle;
    
###################################################
#
#  Copyright 2005 Tian
#
#  This file is part of GCfilms.
#
#  GCfilms 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.
#
#  GCfilms 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 GCfilms; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
###################################################

    use strict;
    
    use base 'Exporter';
	our @EXPORT = qw(%styles @lists $defaultList);

    use FindBin qw($RealBin);
    use File::Basename;
    our %styles;
    our @lists;
    our $defaultList;

    sub initStyles
    {
        use Cwd;
        my $oldCwd = getcwd;
        chdir $RealBin;
        foreach (glob "../share/gcfilms/style/*")
        {
            my $style = basename($_);
            next if $style eq 'CVS';
            my %tmpStyle;
            $tmpStyle{dir} = $RealBin.'/'.$_;
            $tmpStyle{rcFile} = $tmpStyle{dir}.'/gtkrc';
            $tmpStyle{name} = $style;
            $styles{$style} = \%tmpStyle;
        }
        foreach (glob "../share/gcfilms/list_bg/*")
        {
            my $bg = basename($_);
            next if $bg eq 'CVS';
            push @lists, $bg;
        }
        $defaultList = 'Wood';
        chdir $oldCwd;
    }
}

1;
