Ross McFarland > Gnome2-GConf-1.000 > xs/GConfEntry.xs

Download:
Gtk2-Perl/Gnome2-GConf-1.000.tar.gz

Annotate this POD

CPAN RT

Open  0
Report a bug
Source   Latest Release: Gnome2-GConf-1.044

SYNOPSIS ^

  $client = Gnome2::GConf::Client->get_default;
  $client->notify_add($config_key, sub {
      my ($client, $cnxn_id, $entry) = @_;
      return unless $entry;
      
      unless ($entry->{value})
      {
        $label->set_text('');
      }
      elsif ($entry->{value}->{type} eq 'string')
      {
        $label->set_text($entry->{value}->{value});
      }
      else
      {
        $label->set_text('!type error!');
      }
    });

DESCRIPTION ^

In C, GConfEntry is a opaque container for the key string and for the GConfValue bound to that key. In perl, it's an hashref consisting of these keys:

key

The key that is being monitored.

value

An hashref, representing a GConfValue (see Gnome2::GConf::Value), which contains the type and the value of the key; it may be undef if the key has been unset. Every method of the C API is replaced by standard perl functions that operate on hashrefs.

SEE ALSO ^

Gnome2::GConf(3pm), Gnome2::GConf::Value(3pm).