1Glib::Utils(3)        User Contributed Perl Documentation       Glib::Utils(3)
2
3
4

NAME

6       Glib::Utils -  Miscellaneous utility functions
7

SYNOPSIS

9         use Glib;
10         Glib::set_application_name (Glib::get_real_name."'s Cool Program");
11
12         print "app name is ".Glib::get_application_name()."\n";
13

DESCRIPTION

15       Here are some useful miscellaneous utilities.  GLib is a portability
16       library, providing portable utility functions for C programs.  As such,
17       most of these functions seem to violate the Glib binding principle of
18       not duplicating functionality that Perl already provides, but there's a
19       distinction for each one, i swear.  The functions for dealing with user
20       information are provided on all GLib-supported platforms, not just
21       where POSIX (which provides similar information) is available, and even
22       work on platforms where %ENV may not include the expected information.
23       Also, the "application name" referred to by (set⎪get)_application_name
24       is a human readable name, distinct from the actual program name pro‐
25       vided by Perl's own $0.
26

METHODS

28       string = Glib::get_application_name
29
30           Get the human-readable application name set by "set_applica‐
31           tion_name".
32
33       Glib::set_application_name ($application_name)
34
35           * $application_name (string)
36
37           Set the human-readable application name.
38
39       string = Glib::get_home_dir
40
41           Find the current user's home directory, by system-dependent/appro‐
42           priate means.
43
44       list = Glib::get_language_names
45
46           Computes a list of applicable locale names, which can be used to
47           e.g. construct locale-dependent filenames or search paths. The
48           returned list is sorted from most desirable to least desirable and
49           always contains the default locale "C".
50
51       string = Glib::get_real_name
52
53           Get the current user's real name.
54
55       list = Glib::get_system_config_dirs
56
57           Returns an ordered list of base directories in which to access sys‐
58           tem-wide configuration information.
59
60       list = Glib::get_system_data_dirs
61
62           Returns an ordered list of base directories in which to access sys‐
63           tem-wide application data.
64
65       string = Glib::get_tmp_dir
66
67           Get the temp dir as appropriate for the current system.  See the
68           GLib docs for info on how it works.
69
70       string = Glib::get_user_cache_dir
71
72           Gets the base directory in which to store non-essential, cached
73           data specific to particular user.
74
75       string = Glib::get_user_config_dir
76
77           Gets the base directory in which to store user-specific application
78           configuration information such as user preferences and settings.
79
80       string = Glib::get_user_data_dir
81
82           Get the base directory for application data such as icons that is
83           customized for a particular user.
84
85       string = Glib::get_user_name
86
87           Get the current user's name by whatever system-dependent means nec‐
88           essary.
89

SEE ALSO

91       Glib
92
94       Copyright (C) 2003-2007 by the gtk2-perl team.
95
96       This software is licensed under the LGPL.  See Glib for a full notice.
97
98
99
100perl v5.8.8                       2007-02-26                    Glib::Utils(3)
Impressum