Re: How to emit signals in Glib::Object derived modules?



On Thu, 2004-09-02 at 10:48, Samuel Abels wrote:

use Glib::Object::Subclass
    TestClass::,
    signals => {
      my_new_signal => {
        class_closure => sub { print "BLA\n" },
        flags         => [qw(run-first)],
        return_type   => undef,
        param_types   => []
      }
    };

When use()ing Glib::Object::Subclass, the first argument is the parent
you want to derive from.  In your case that would be Glib::Object.  If
you wanted to create a custom button, it would be Gtk2::Button.  See

  perldoc Glib::Object::Subclass

for additional details.

-- 
HTH,
-Torsten




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]