Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

glib::flags(3) [suse man page]

Glib::Flags(3)						User Contributed Perl Documentation					    Glib::Flags(3)

NAME
Glib::Flags DESCRIPTION
Glib maps flag and enum values to the nicknames strings provided by the underlying C libraries. Representing flags this way in Perl is an interesting problem, which Glib solves by using some cool overloaded operators. The functions described here actually do the work of those overloaded operators. See the description of the flags operators in the "This Is Now That" section of Glib for more info. HIERARCHY
Glib::Flags METHODS
scalar = $class->new ($a) o $a (scalar) Create a new flags object with given bits. This is for use from a subclass, it's not possible to create a "Glib::Flags" object as such. For example, my $f1 = Glib::ParamFlags->new ('readable'); my $f2 = Glib::ParamFlags->new (['readable','writable']); An object like this can then be used with the overloaded operators. scalar = $a->all ($b, $swap) o $b (scalar) o $swap (scalar) ref = $a->as_arrayref integer = $a->bool ($b, $swap) o $b (scalar) o $swap (integer) integer = $a->eq ($b, $swap) o $b (scalar) o $swap (integer) integer = $a->ge ($b, $swap) o $b (scalar) o $swap (integer) scalar = $a->intersect ($b, $swap) o $b (scalar) o $swap (scalar) integer = $a->ne ($b, $swap) o $b (scalar) o $swap (integer) scalar = $a->sub ($b, $swap) o $b (scalar) o $swap (scalar) scalar = $a->union ($b, $swap) o $b (scalar) o $swap (scalar) scalar = $a->xor ($b, $swap) o $b (scalar) o $swap (scalar) SEE ALSO
Glib COPYRIGHT
Copyright (C) 2003-2009 by the gtk2-perl team. This software is licensed under the LGPL. See Glib for a full notice. perl v5.12.1 2010-07-05 Glib::Flags(3)

Check Out this Related Man Page

Glib::Log(3pm)						User Contributed Perl Documentation					    Glib::Log(3pm)

NAME
Glib::Log - A flexible logging mechanism METHODS
scalar = Glib::Log->set_always_fatal ($fatal_mask) o $fatal_mask (scalar) Glib->critical ($domain, $message) o $domain (string or undef) o $message (string) Glib::Log::default_handler ($log_domain, $log_level, $message, ...) o $log_domain (string) o $log_level (scalar) o $message (string) o ... (list) possible "userdata" argument ignored The arguments are the same as taken by the function for set_handler or set_default_handler. prev_log_func = Glib->set_default_handler ($log_func, $user_data) o $log_func (subroutine) handler function or undef o $user_data (scalar) Install log_func as the default log handler. log_func is called for anything which doesn't otherwise have a handler (either Glib::Log->set_handler, or the Glib::xsapi gperl_handle_logs_for), &$log_func ($log_domain, $log_levels, $message, $user_data) where $log_domain is a string, and $log_levels is a Glib::LogLevelFlags of level and flags being reported. If log_func is &Glib::Log::default_handler or undef then Glib's default handler is set. The return value from "set_default_handler" is the previous handler. This is &Glib::Log::default_handler for Glib's default, otherwise a Perl function previously installed. If the handler is some other non-Perl function then currently the return is undef, but perhaps that will change to some wrapped thing, except that without associated userdata there's very little which could be done with it (it couldn't be reinstalled later without its userdata). Since: glib 2.6 Glib->error ($domain, $message) o $domain (string or undef) o $message (string) scalar = Glib::Log->set_fatal_mask ($log_domain, $fatal_mask) o $log_domain (string) o $fatal_mask (scalar) integer = Glib::Log->set_handler ($log_domain, $log_levels, $log_func, $user_data=undef) o $log_domain (string or undef) name of the domain to handle with this callback. o $log_levels (Glib::LogLevelFlags) log levels to handle with this callback o $log_func (subroutine) handler function o $user_data (scalar) $log_func will be called as &$log_func ($log_domain, $log_levels, $message, $user_data); where $log_domain is the name requested and $log_levels is a Glib::LogLevelFlags of level and flags being reported. Glib->log ($log_domain, $log_level, $message) o $log_domain (string or undef) o $log_level (scalar) o $message (string) Glib->message ($domain, $message) o $domain (string or undef) o $message (string) Glib::Log->remove_handler ($log_domain, $handler_id) o $log_domain (string or undef) o $handler_id (integer) as returned by "set_handler" Glib->warning ($domain, $message) o $domain (string or undef) o $message (string) ENUMS AND FLAGS
flags Glib::LogLevelFlags o 'recursion' / 'G_LOG_FLAG_RECURSION' o 'fatal' / 'G_LOG_FLAG_FATAL' o 'error' / 'G_LOG_LEVEL_ERROR' o 'critical' / 'G_LOG_LEVEL_CRITICAL' o 'warning' / 'G_LOG_LEVEL_WARNING' o 'message' / 'G_LOG_LEVEL_MESSAGE' o 'info' / 'G_LOG_LEVEL_INFO' o 'debug' / 'G_LOG_LEVEL_DEBUG' o 'fatal-mask' / 'G_LOG_FATAL_MASK' SEE ALSO
Glib COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team. This software is licensed under the LGPL. See Glib for a full notice. perl v5.14.2 2012-05-24 Glib::Log(3pm)
Man Page