php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35930 GTK Scribble Widget and Demo
Submitted: 2006-01-08 13:03 UTC Modified: 2006-01-08 16:09 UTC
From: joseph dot cohen at gmail dot com Assigned: sfox (profile)
Status: Closed Package: PHP-GTK related
PHP Version: 5.1.1 OS: Gentoo Linux 2005.1-r1
Private report: No CVE-ID: None
 [2006-01-08 13:03 UTC] 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...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-08 14:01 UTC] 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 16:09 UTC] sfox@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC