Details
g_get_prgname ()
gchar* g_get_prgname (void); |
Gets the name of the program.
(If you are using GDK or GTK the program name is set in gdk_init(), which
is called by gtk_init(). The program name is found by taking the last
component of argv[0].)
g_set_prgname ()
void g_set_prgname (const gchar *prgname); |
Sets the name of the program.
g_getenv ()
Returns an environment variable.
On windows systems the returned value is only valid until the next call to
g_getenv().
g_get_user_name ()
gchar* g_get_user_name (void); |
Gets the user name of the current user.
g_get_real_name ()
gchar* g_get_real_name (void); |
Gets the real name of the user. This comes from the user's entry in the
passwd file.
g_get_home_dir ()
gchar* g_get_home_dir (void); |
Gets the current user's home directory.
g_get_tmp_dir ()
gchar* g_get_tmp_dir (void); |
Gets the directory to use for temporary files.
This is found from inspecting the environment variables TMPDIR, TMP, and TEMP
in that order. If none of those are defined "/tmp" is returned.
g_get_current_dir ()
gchar* g_get_current_dir (void); |
Gets the current directory.
The returned string should be freed when no longer needed.
g_basename ()
Gets the name of the file without any leading directory components.
It returns a pointer into the given file name string.
g_dirname ()
Gets the directory components of a file name.
If the file name has no directory components "." is returned.
The returned string should be freed when no longer needed.
g_path_is_absolute ()
Returns TRUE if the given file_name is an absolute file name,
i.e. it contains a full path from the root directory such as '/usr/local'
or 'C:/windows' on windows systems.
g_path_skip_root ()
Returns a pointer into file_name after the root component, i.e. after
the '/' in Unix or 'C:/' under Windows. If file_name is not an absolute
path it returns NULL.
g_bit_nth_lsf ()
Find the position of the first bit set in mask, searching from (but not
including) nth_bit upwards. Bits are numbered from 0 (least significant)
to 31. To start searching from the 0th bit, set nth_bit to -1.
g_bit_nth_msf ()
Find the position of the first bit set in mask, searching from (but not
including) nth_bit downwards. Bits are numbered from 0 (least significant)
to 31. To start searching from the 31st bit, set nth_bit to 32 or -1.
g_bit_storage ()
Gets the number of bits used to hold number,
e.g. if number is 4, 3 bits are needed.
g_spaced_primes_closest ()
Gets the smallest prime number from a built-in array of primes which
is larger than num. This is used within GLib to calculate the optimum
size of a GHashTable.
The built-in array of primes ranges from 11 to 13845163 such that
each prime is approximately 1.5-2 times the previous prime.
g_atexit ()
Specifies a function to be called at normal program termination.
g_parse_debug_string ()
Parses a string containing debugging options separated by ':' into a guint
containing bit flags.
This is used within GDK and GTK to parse the debug options passed on the
command line or through environment variables.
struct GDebugKey
struct GDebugKey
{
gchar *key;
guint value;
}; |
Associates a string with a bit flag.
Used in g_parse_debug_string().
GVoidFunc ()
void (*GVoidFunc) (void); |
Declares a type of function which takes no arguments and has no return value.
It is used to specify the type function passed to g_atexit().
GFreeFunc ()
Declares a type of function which takes an arbitrary data pointer argument
and has no return value. It is not currently used in GLib or GTK+.