Zane C. Bowers-Hadley > Icon-Theme-Index-Parse-0.0.1 > Icon::Theme::Index::Parse

Download:
Icon-Theme-Index-Parse-0.0.1.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.0.1   Source  

NAME ^

Icon::Theme::Index::Parse - Parse the index file for Freedesktop compatible icon themes.

VERSION ^

Version 0.0.1

SYNOPSIS ^

Information for index file specification can be found at the URL below.

http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html

    use Icon::Theme::Index::Parse;

    my $themeindex = Icon::Theme::Index::Parse->new_from_file('/usr/local/share/icons/hicolor/index.theme');
    if($themeindex->{error}){
        print "Error!\n";
    }

METHOD ^

new_from_data

This forms a new object from the raw data.

One arguement is accepted and it is the raw data from a index file.

    my $themeindex=Icon::Theme::Index::Parse->new_from_data($data);
    if($themeindex->{error}){
        print "Error!\n";
    }

new_from_file

This creates a new object from the specified index file.

One arguement is accepted and it is the path to the file.

    my $themeindex=Icon::Theme::Index::Parse->new_from_file('/usr/local/share/icons/hicolor/index.theme');
    if($themeindex->{error}){
        print "Error!\n";
    }

comment

This fetches a description for the theme.

If the comment setting is not defined 'false' is returned.

    my $hidden=$themeindex->hidden;

directories

This gets a list of directories for the theme.

    my @directories=$themeindex->directories;

dirContext

This gets the context for icons in the directory.

    my $context=$themeindex->dirContext('48x48/mimetypes');

dirExists

This checks if the specified directory exists in the index.

    my $returned=$themeindex->dirExists('48x48/mimetypes');
    if($returned){
        print "It exists.\n";
    }

dirMaxSize

This gets the maximum size for icons in the directory.

    my $maxsize=$themeindex->dirMaxSize('48x48/mimetypes');

dirMinSize

This gets the minimum size for icons in the directory.

    my $minsize=$themeindex->dirMinSize('48x48/mimetypes');

dirSize

This gets the nominal size for icons in the directory.

    my $size=$themeindex->dirSize('48x48/mimetypes');

dirThreshold

The icons in this directory can be used if the size differ at most this much from the desired size.

Returns 2 if not present.

    my $threshold=$themeindex->dirThreshold('48x48/mimetypes');

dirType

This gets the type of icon size for icons in the directory.

    my $type=$themeindex->dirType('48x48/mimetypes');

example

This fetches a icon to use for a example for the theme.

If the comment setting is not defined 'false' is returned.

    my $example=$themeindex->example;

hidden

This gets if a it should be displayed or note.

The value returned should most likely match /[Ff][Aa][Ll][Ss][Ee]/ or /[Tt][Rr][Uu][Ee]/.

If the hidden setting is not defined 'false' is returned.

    my $hidden=$themeindex->hidden;

inherits

This gets a list of themes the theme inherits from.

    my @dinherits=$themeindex->inherits;

name

This fetches a name for the theme.

If the comment setting is not defined 'false' is returned.

    my $name=$themeindex->name;

errorblank

This is a internal function that blanks any previous errors.

ERROR CODES ^

1

No file name specified.

2

The file does not exist.

3

Failed to open the index file.

4

No data specified.

5

No directory specified.

6

The dir queries does not exist.

AUTHOR ^

Zane C. Bowers, <vvelox at vvelox.net>

BUGS ^

Please report any bugs or feature requests to bug-icon-theme-index-parse at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Icon-Theme-Index-Parse. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Icon::Theme::Index::Parse

You can also look for information at:

ACKNOWLEDGEMENTS ^

COPYRIGHT & LICENSE ^

Copyright 2009 Zane C. Bowers, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: