gdk::pixmap_create_from_xpm() returns a array consisting of a GdkPixmap and a GdkBitmap mask that has been created from the specified .xpm file.
The GdkPixmap is the underlying structure that holds the image ready to be displayed in a GtkPixmap. In order to make that image appear on the screen, you will need to use one of the following constructs:
<?php $gdkpixmap = gdk::pixmap_create_from_xpm($main_window->window, null, 'test.xpm'); $image = &new GtkPixmap($gdkpixmap[0], $gdkpixmap[1]); ?>
<?php list ($gdkpixmap, $mask) = gdk::pixmap_create_from_xpm($gdkwindow, $transparent_color, 'test.xpm'); $image = &new GtkPixmap($gdkpixmap, $mask); ?>
The transparent_color determines what color the None pixels will get if you don't use the pixmask.
See the tutorial for more details and some examples.