#35930 [Sus->Csd]: GTK Scribble Widget and Demo
| From: | sfox@php.net | Date: | Sun, 08 Jan 2006 15:09:02 +0000 |
| Subject: | #35930 [Sus->Csd]: GTK Scribble Widget and Demo | ||
| References: | 1 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-2167@lists.php.net to get a copy of this message | ||
ID: 35930
Updated by: sfox@php.net
Reported By: joseph dot cohen at gmail dot com
-Status: Suspended
+Status: Closed
Bug Type: PHP-GTK related
Operating System: Gentoo Linux 2005.1-r1
PHP Version: 5.1.1
Assigned To: sfox
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
I got around to implementing get_size() and get_position() for
GtkWindow now (since they're easy). Awaiting Andrei's decision on
GdkWindow::get_size(), but closing this report as there's a way to pick
up these dimensions in user space now.
Previous Comments:
------------------------------------------------------------------------
[2006-01-08 14:01:41] sfox@php.net
PHP-GTK is still pre-beta, and there are quite a few methods that have
not been (manually) written yet. When you see that error message, it
just means you've found another of these... but they're listed in the
build logs anyway.
When we _do_ get around to writing them, the syntax you're using here
won't work anyway(!). It's not gtk::gtk_window_get_size(), it's
GtkWindow::get_size(), and we'll implement it in PHP so that you don't
pass parameters to either of these functions.
Leaving the bug report open for now as a reminder to self to implement
get_size() and get_position() for GtkWindow - I'm not entirely sure
whether the GdkDrawable version of get_size() should be exposed in user
space.
------------------------------------------------------------------------
[2006-01-08 13:03:07] joseph dot cohen at gmail dot com
Description:
------------
gtk::gtk_window_get_size() , gdk::gdk_window_get_size(),
$foo->get_size() and $foo->window->get_size() are all broken.
Reproduce code:
---------------
1st attempt Broken:
$foo = new GtkWindow;
$foo->get_size(&$x, &$y);
echo $x.' '.$y."\n";
2nd attempt Broken:
$foo = new GtkWindow;
$foo->window->get_size(&$x, &$y);
echo $x.' '.$y."\n";
3rd attempt Broken:
$foo = new GtkWindow;
gtk::gtk_window_get_size($foo,&$x,&$y);
echo $x.' '.$y."\n";
4th attempt Broken:
$foo = new GtkWindow;
gtk::gtk_window_get_size($foo->window,&$x,&$y);
echo $x.' '.$y."\n";
5th attempt Broken:
$foo = new GtkWindow;
gdk::gdk_window_get_size($foo,&$x,&$y);
echo $x.' '.$y."\n";
6th attempt Broken:
$foo = new GtkWindow;
gdk::gdk_window_get_size($foo->window,&$x,&$y);
echo $x.' '.$y."\n";
Expected result:
----------------
return of width and heigth of window.
Actual result:
--------------
Fatal error: Call to undefined method GdkWindow::get_size() in...
OR
Fatal error: Call to undefined method Gtk::gtk_window_get_size() in...
OR
Fatal error: Call to undefined method Gdk::gdk_window_get_size() in...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35930&edit=1