use strict;
use warnings;
use Xchat qw(:all);
use Glib qw(TRUE FALSE);
use Gtk2 -init;
sub get_inputbox {
my $widget = Glib::Object->new_from_pointer( get_info( "win_ptr" ), 0 );
my $input_box;
my @containers = ($widget);
while( @containers ) {
my $container = shift @containers;
for my $child ( $container->get_children ) {
if( $child->get( "name" ) eq 'xchat-inputbox' ) {
$input_box = $child;
last;
} elsif( $child->isa( "Gtk2::Container" ) ) {
push @containers, $child;
}
}
}
return $input_box;
}
sub get_hbox {
my $widget = shift;
my $hbox;
while( $widget->parent ) {
if( $widget->parent->