Kevin Ryde > chart > Glib::Ex::SignalObject

Download:
chart-249.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

New  16
Open  3
View/Report Bugs
Source  

NAME ^

Glib::Ex::SignalObject -- object for Glib signal connection

SYNOPSIS ^

 use Glib::Ex::SignalObject;
 $signal = Glib::Ex::SignalObject->new (object => $my_obj,
                                        name   => 'some-signal',
                                        callback => \&my_handler,
                                        userdata => 'some data');

 $signal->disconnect;   # explicit disconnect
 $signal->connect;      # reconnect later
 $signal->set_connected ($bool);  # or control connectedness

 $signal->set_object ($other_obj);   # change origin object
 $signal->set_name ('diff-signal');  # change signal name

 $signal = undef;       # disconnected by forgetting

DESCRIPTION ^

Glib::Ex::SignalObject is an object-oriented way to manage a signal connection on a Glib object (including Gtk widgets). It features,

FUNCTIONS ^

Glib::Ex::SignalObject->new (key => value, ...)

Create and return a new signal object. The following parameters are taken in key/value style,

    object          originating object (Glib::Object etc), or undef
    name            signal name (string), or undef
    callback        handler function to call
    userdata        data passed to the callback function
    weak_userdata   flag to weaken userdata reference
    connect         flag to not immediately connect

SEE ALSO ^

Glib::Object

syntax highlighting: