Create Cursor works

From: Date: Fri, 06 Aug 2004 05:55:00 +0000
Subject: Create Cursor works
Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-689@lists.php.net to get a copy of this message
Hi Andrei put the changes in cvs this night; and it works on my box. A note... The pixmap specs allow the first line to have 6 instead of 4 parameters; the last two can contain the x and y hotspot position for the case the pixmap is used as a cursor. Would it be *hard* to make the x and y parameter in the cursor_new_from_pixmap optional (default 0,0) and try to use the hotspot coordinates from the first line of the pixmap array? ============= <?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); $style = new GtkStyle(); $cursor =gdk::cursor_new_from_pixmap($pixmap, $mask, $style->white, $style->black, 1, 1); $gdkwin->set_cursor($cursor); $window->show(); gtk::main(); ?> ============ Regards/MfG, Christian Weiske -- XMMS is playing now: Christina Aguilera - Contigo En La Distancia

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.gtk.dev (#689) next »