logo       

cvs: php-gtk /ext/gtk+ gdk.overrides: msg#00009

Subject: cvs: php-gtk /ext/gtk+ gdk.overrides
auroraeosrose           Fri Jun 15 21:06:31 2007 UTC

  Modified files:              
    /php-gtk/ext/gtk+   gdk.overrides 
  Log:
  Gdkpixbuf::get_formats() override - returns information about available 
pixbuf loaders
  
http://cvs.php.net/viewvc.cgi/php-gtk/ext/gtk+/gdk.overrides?r1=1.75&r2=1.76&diff_format=u
Index: php-gtk/ext/gtk+/gdk.overrides
diff -u php-gtk/ext/gtk+/gdk.overrides:1.75 php-gtk/ext/gtk+/gdk.overrides:1.76
--- php-gtk/ext/gtk+/gdk.overrides:1.75 Sun Feb 11 07:28:57 2007
+++ php-gtk/ext/gtk+/gdk.overrides      Fri Jun 15 21:06:31 2007
@@ -2198,6 +2198,58 @@
 }
 
 %%
+override gdk_pixbuf_get_formats
+PHP_METHOD
+{
+    GSList *list, *tmp;
+    zval *item, *mimes;
+    gchar *sval, **aval;
+    gint i;
+    GdkPixbufFormat *format;
+
+    list = gdk_pixbuf_get_formats();
+    array_init(return_value);
+    for (tmp = list; tmp != NULL; tmp = tmp->next) {
+        format = tmp->data;
+
+        MAKE_STD_ZVAL(item);
+        array_init(item);
+
+        sval = gdk_pixbuf_format_get_name(format);
+        add_assoc_string(item, "name", sval, 1);
+        g_free(sval);
+
+        sval = gdk_pixbuf_format_get_description(format);
+        add_assoc_string(item, "description", sval, 1);
+        g_free(sval);
+
+        aval = gdk_pixbuf_format_get_mime_types(format);
+        MAKE_STD_ZVAL(mimes);
+        array_init(mimes);
+        for (i = 0; aval[i] != NULL; i++) {
+            add_next_index_string(mimes, aval[i], 1);
+        }
+        add_assoc_zval(item, "description", mimes);
+        g_strfreev(aval);
+
+        aval = gdk_pixbuf_format_get_extensions(format);
+        MAKE_STD_ZVAL(mimes);
+        array_init(mimes);
+        for (i = 0; aval[i] != NULL; i++) {
+            add_next_index_string(mimes, aval[i], 1);
+        }
+        add_assoc_zval(item, "extensions", mimes);
+        g_strfreev(aval);
+
+        add_assoc_long(item, "is_writable", 
gdk_pixbuf_format_is_writable(format));
+        add_assoc_long(item, "is_scalable", 
gdk_pixbuf_format_is_scalable(format));
+
+        add_next_index_zval(return_value, item);
+    }
+    g_slist_free(list);
+}
+
+%%
 add-arginfo GdkPixbuf fill
 static
 ZEND_BEGIN_ARG_INFO_EX(ARGINFO_NAME, 0, 0, 1)

-- 
PHP-GTK CVS Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe