GtkSocket::steal

void steal(int wid);

This function takes the xid of an existing window and reparents the window into itself, so that the former window acts as a child of the socket.

This method is deprecated and does not fully work. Avoid to use it.

The following example creates a normal GtkWindow and echoes the xid of its GdkWindow. Pass this id to the example application of the GtkSocket constructor and try to resize this window.

Ejemplo 39. Stealing a window

<?php
if( !extension_loaded('gtk')) {	
	dl( 'php_gtk.' . PHP_SHLIB_SUFFIX); 
}

$label	= &new GtkLabel( 'I\'m an innocent window');

$window	= &new GtkWindow();
$window->set_title( 'this window will be stolen');
$window->set_default_size( 200, 100);
$window->connect_object('destroy', array('gtk', 'main_quit'));
$vbox = &new GtkVBox();

$window->add( $label);
$window->show_all();

echo 'window xid: ' . $window->window->xid . "\r\n";

gtk::main();
?>