[Fwd: [PHP-GTK] xid on windows32]
| From: | Christian Weiske | Date: | Sat, 22 Jan 2005 17:18:46 +0000 |
| Subject: | [Fwd: [PHP-GTK] xid on windows32] | ||
| Groups: | php.gtk.dev | ||
| Request: | Send a blank email to php-gtk-dev+get-895@lists.php.net to get a copy of this message | ||
I must have missed that patch. Can you forward it to me? Here it is.-------- Original Message -------- Subject: [PHP-GTK] xid on windows32 Date: Sun, 12 Dec 2004 14:55:26 +1000 From: Tom Rogers <trogers@kwikin.com> Reply-To: Tom Rogers <trogers@kwikin.com> Organization: Perfect Web Site Designs To: php-gtk-general@lists.php.net Hi Here is a patch to enable finding the hwnd for a gtkWindow on a windows32 box.
--- php_gtk+_types.c 7 Aug 2004 06:49:34 -0000 1.25.4.2 +++ php_gtk+_types.c 12 Dec 2004 04:45:08 -0000@@ -25,6 +25,8 @@ #if HAVE_PHP_GTK #ifndef PHP_WIN32 #include <gdk/gdkx.h> +#else +#include "win32/gdkwin32.h" #endif int le_php_gtk_wrapper; @@ -768,12 +770,9 @@
gdk_window_get_geometry(win, NULL, NULL, NULL, NULL, &x);
RETURN_LONG(x);
}
-#ifndef PHP_WIN32
else if (!strcmp(prop_name, "xid")) {
- RETURN_LONG(GDK_WINDOW_XWINDOW(win));
+ RETURN_LONG((long) GDK_WINDOW_XWINDOW(win));
}-#endif -
if (Z_OBJCE_P(object) == gdk_window_ce) {
if (!strcmp(prop_name, "x")) {
gdk_window_get_position(win, &x, NULL);
Usage is
<?php
$window =& new GtkWindow();
$window->show();
$win = $window->window;
echo 'HWND:'.$win->xid."\n";
.
.
//and for the children:
$wkids = $win->children;
foreach($wkids as $w){
echo 'kwin HWND:'.($w->xid)."\n";
}
Tom
Regards/MfG,
Christian Weiske
--
XMMS is playing now:
2Raumwohnung - Ich Weiss Warum
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc