Re: simple pixmap example?
| From: | Frank M. Kromann | Date: | Tue, 23 Oct 2001 04:02:17 +0000 |
| Subject: | Re: simple pixmap example? | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-379@lists.php.net to get a copy of this message | ||
Voila.
- Frank
<?php
// this file is used to make sure the gtk-extension is loaded.
if (!extension_loaded("gtk")) {
if (strtoupper(substr(PHP_OS, 0,3) == "WIN"))
dl("php_gtk.dll");
else
dl("php_gtk.so");
}
function quit() {
Gtk::main_quit();
}
$main_window = &new GtkWindow();
$main_window->realize();
$main_window->connect('destroy', 'quit');
$img = Gdk::pixmap_create_from_xpm($main_window->window, null, "img.xpm");
$image = &new GtkPixmap($img[0], $img[1]);
$image->show();
$main_window->add($image);
$main_window->show();
Gtk::main();
?>
> Hi again, can anyone please post the simplest of examples that displays a pixmap, sorry to be
> dull but I am a windows head.
> Just a simple window with a pixmap in any widget would be very helpful (no need to post the
> pixmap itself)
> Cheers
> Simon Wheeler.
> firepages.org
>