Re: GdkPixbufFormat struct

From: Date: Thu, 02 Mar 2006 17:20:19 +0000
Subject: Re: GdkPixbufFormat struct
References: 1 2  Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-2480@lists.php.net to get a copy of this message
I don't think we need a separate object for this. Just an associative array. $info['domain'] and so on. -Andrei On Mar 2, 2006, at 5:49 AM, Scott Mattocks wrote:
Christian Weiske wrote:
Hello all, Andrei, xxoes is about to implement
GdkPixbuf::pixbuf_get_file_info($filename,&$width,&$height);
it returns a GdkPixbufFormat. He thought it would be the most easy thing to return an associative array with all the values, and additional to the struct keys, return width and height in the same array. Is that ok? Would it be better to make an own class for GdkPixbufFormat?
If you return an array, you will have to define a bunch of constants for the array keys in order to make everyone's life easier. You can't expect everyone to just remember that the third element is the domain, but you can expect them to remember they can get the domain with $pixbufFormat[Gdk::PIXBUF_FORMAT_DOMAIN]. If the GdkPixbuf::format_* methods are already implemented it might just be easier to keep the current functionality. It would mean less development and testing. -- Scott Mattocks http://www.crisscott.com -- PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.gtk.dev (#2480) next »