Re: iconize a window
- From: Jens Luedicke <jens irs-net com>
- To: Pavel Rousnak <pr rpb ru>
- Cc: gtk-perl-list gnome org, inline perl org
- Subject: Re: iconize a window
- Date: Mon, 4 Feb 2002 10:49:19 +0100 (CET)
Pavel Rousnak <pr rpb ru> wrote:
I don't know how to do this with Perl.
I had the problem like this and didn't find anything better than
low-level Xlib function XIconifyWindow:
private = (GdkWindowPrivate*)widget->window;
if (!private->destroyed)
XIconifyWindow(private->xdisplay, private->xwindow, 0);
I glued this Xlib function to Perl using Inline C:
<code>
#!/usr/bin/perl
use Inline C => 'DATA' =>
INC => `gtk-config --cflags`,
LIBS => `gtk-config --libs`;
use Gtk;
init Gtk;
$window = new Gtk::Window();
$button = new Gtk::Button('minimize');
$button->signal_connect('clicked', sub {
iconify($window->window->XDISPLAY(), $window->window->XWINDOW());
});
$window->add($button);
$window->show_all();
main Gtk;
__DATA__
__C__
void iconify(int xdisplay, int xwindow) {
XIconifyWindow(xdisplay, xwindow, 0);
}
</code>
--
Jens Luedicke
jens irs-net com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]