### ----------------------------------------------------
### -- GTK::Simple
### -- Licenses: Artistic-2.0
### -- Authors: Jonathan Worthington, Moritz Lenz, Timo Paulssen, Ahmad M. Zawawi, Jonathan Stowe, ab5tract, momozor, Zoffix Znet, Nick Logan, finanalyst aka Richard Hainsworth
### -- File: lib/GTK/Simple/ConnectionHandler.rakumod
### ----------------------------------------------------

use v6;

use GTK::Simple::Raw;

unit class GTK::Simple::ConnectionHandler;

has $.instance;
has $.handler;
has $.connected = True;

method disconnect {
    if $.connected {
        g_signal_handler_disconnect($.instance, $.handler);
        $!connected = False;
    }
}


