<?php
if( !extension_loaded('gtk')) {
dl( 'php_gtk.' . PHP_SHLIB_SUFFIX);
}
$window = &new GtkWindow();
$window->set_default_size(300, 300);
$window->connect_object('destroy', array('gtk', 'main_quit'));
$cursorpmp = array(
"16 16 3 1",
" c None",
". c white",
"1 c black",
" ",
".... . . ... ",
".111..1.1.111. ",
".1..1.1.1.1..1. ",
".111..111.111. ",
".1.. .1.1.1.. ",
".1. .1.1.1. ",
" . . . ",
" ... . ",
" .111. .1. . . ",
".1... .1..1..1.",
".1. .. .1..1.1. ",
".1..11.111.11. ",
".1. .1..1..1.1. ",
" .111. .11.1..1.",
" ... .. . . ",
);
$window->realize();
$gdkwin = $window->window;
list($pixmap, $mask) = gdk::pixmap_create_from_xpm_d($gdkwin, null, $cursorpmp);
$colBlue = &new GdkColor( 'blue');
$style = new GtkStyle();
$cursor =gdk::cursor_new_from_pixmap($pixmap, $mask, $style->white, $colBlue, 1, 1);
$gdkwin->set_cursor($cursor);
$window->show();
gtk::main();
?> |