[Vala] Looking for vapi for gimp
Anybody working on vala binding for gimp? hand Nor Jaidi Tuah ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] [Genie] I can't create a new widget Gtk.Switch (from Gtk3) Vala 0.11.7
On Thu, Mar 17, 2011 at 01:11:45AM +0200, Dmitriy Kovalenko wrote: > /home/dmitriy/source/valagenie/gtk3switch.c:93: error: ‘GtkSwitch’ > undeclared (first use in this function) > /home/dmitriy/source/valagenie/gtk3switch.c:93: error: (Each > undeclared identifier is reported only once > /home/dmitriy/source/valagenie/gtk3switch.c:93: error: for each > function it appears in.) > /home/dmitriy/source/valagenie/gtk3switch.c:93: error: ‘_tmp0_’ > undeclared (first use in this function) > /home/dmitriy/source/valagenie/gtk3switch.c:94: error: ‘swith_button’ > undeclared (first use in this function) > /home/dmitriy/source/valagenie/gtk3switch.c:96: error: expected > expression before ‘)’ token > error: cc exited with status 256 > Compilation failed: 1 error(s), 0 warning(s) > dmitriy@runningmaster:~/source/valagenie$ > > > Can anybody help me? thanks (Vala 0.11.7, Ubuntu 10.10) You obviously need libgtk-3-dev. -- http://www.debian.org - The Universal Operating System ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
[Vala] [Genie] I can't create a new widget Gtk.Switch (from Gtk3) Vala 0.11.7
Hi all, Button description: -- http://library.gnome.org/devel/gtk3/stable/GtkSwitch.html gtk+-3.0.vapi - [CCode (cheader_filename = "gtk/gtk.h")] public class Switch : Gtk.Widget, Atk.Implementor, Gtk.Buildable, Gtk.Activatable { [CCode (type = "GtkWidget*", has_construct_function = false)] public Switch (); public bool get_active (); public void set_active (bool is_active); public bool active { get; set; } } My source file: /* * valac --verbose --debug --save-temps --pkg gtk+-3.0 gtk3switch.gs */ [indent = 4] init Gtk.init (ref args) var mainwindow = new MainWindow () mainwindow.title = "Test" mainwindow.window_position = Gtk.WindowPosition.CENTER mainwindow.show_all () Gtk.main () class MainWindow : Gtk.Window _hbox : Gtk.HBox = new Gtk.HBox (false, 0) init default_height = 400 default_width = 500 destroy.connect (Gtk.main_quit) construct MainWindow () super self.add (_hbox) test_switch_button () def private test_switch_button () var switch_button = new Gtk.Switch () _hbox.pack_start (switch_button, false, false) valac output: - dmitriy@runningmaster:~/source/valagenie$ valac --verbose --debug --save-temps --pkg gtk+-3.0 gtk3switch.gs cc -g -o '/home/dmitriy/source/valagenie/gtk3switch' '/home/dmitriy/source/valagenie/gtk3switch.c' -pthread -DGSEAL_ENABLE -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-3.0 -I/usr/lib/gtk-3.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -pthread -lgtk-x11-3.0 -lcairo-gobject -lpangoft2-1.0 -lfreetype -lfontconfig -lgio-2.0 -latk-1.0 -lgdk-x11-3.0 -lgdk_pixbuf-2.0 -lm -lpng12 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 /home/dmitriy/source/valagenie/gtk3switch.c: In function ‘main_window_test_swith_button’: /home/dmitriy/source/valagenie/gtk3switch.c:93: error: ‘GtkSwitch’ undeclared (first use in this function) /home/dmitriy/source/valagenie/gtk3switch.c:93: error: (Each undeclared identifier is reported only once /home/dmitriy/source/valagenie/gtk3switch.c:93: error: for each function it appears in.) /home/dmitriy/source/valagenie/gtk3switch.c:93: error: ‘_tmp0_’ undeclared (first use in this function) /home/dmitriy/source/valagenie/gtk3switch.c:94: error: ‘swith_button’ undeclared (first use in this function) /home/dmitriy/source/valagenie/gtk3switch.c:96: error: expected expression before ‘)’ token error: cc exited with status 256 Compilation failed: 1 error(s), 0 warning(s) dmitriy@runningmaster:~/source/valagenie$ Can anybody help me? thanks (Vala 0.11.7, Ubuntu 10.10) -- Banzai, Dmitriy Kovalenko ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
[Vala] [ANNOUNCE] Vala 0.11.7 - Compiler for the GObject type system
We are pleased to announce version 0.11.7 of Vala, a compiler for the GObject type system. Vala 0.11.7 is now available for download at: http://download.gnome.org/sources/vala/0.11/ This is a development release leading toward 0.12. Changes since 0.11.6 * Add support for async signal handlers (Frederik Sdun). * More refactoring in the code generator (Luca Bruno). * Improvements to the .gir writer (Michal Hruby). * Many bug fixes and binding updates. Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C. valac, the Vala compiler, is a self-hosting compiler that translates Vala source code into C source and header files. It uses the GObject type system to create classes and interfaces declared in the Vala source code. The syntax of Vala is similar to C#, modified to better fit the GObject type system. Vala supports modern language features as the following: * Interfaces * Properties * Signals * Foreach * Lambda expressions * Type inference for local variables * Generics * Non-null types * Assisted memory management * Exception handling Vala is designed to allow access to existing C libraries, especially GObject-based libraries, without the need for runtime bindings. All that is needed to use a library with Vala is an API file, containing the class and method declarations in Vala syntax. Vala currently comes with bindings for GLib and GTK+. It's planned to provide generated bindings for the full GNOME Platform at a later stage. Using classes and methods written in Vala from an application written in C is not difficult. The Vala library only has to install the generated header files and C applications may then access the GObject-based API of the Vala library as usual. It should also be easily possible to write a bindings generator for access to Vala libraries from applications written in e.g. C# as the Vala parser is written as a library, so that all compile-time information is available when generating a binding. More information about Vala is available at http://www.vala-project.org/ Jürg Billeter ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] badly generated code
On Wed, 2011-03-16 at 13:54 +, Raul Gutierrez Segales wrote: > /tmp/test.vala.c:239:7: error: variable or field ‘_tmp1_’ declared void > /tmp/test.vala.c:248:155: error: ‘g_dbus_connection_get_proxy’ > undeclared (first use in this function) This is now fixed in master. Jürg ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala broken on non-gnu systems
On Tue, 2011-03-15 at 20:05 +0100, pancake wrote: > The commit a2s2120.. dated at 2011-02-10 adds the use of strnlen > function in glib-2.0.vapi. > > This function is a gnu extension on libc. This is not glib and this > function is only available in GNU LibC. Do the build breaks on OSX, > Windows and probably all BSD systems. This is now fixed in master. strnlen is in POSIX 2008 but Mac OS X doesn't appear to support it yet. Jürg ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] subclasses in vapi
On 03/16/2011 12:29 PM, Pavol Klačanský wrote: Hi, is there way to define them? ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list http://live.gnome.org/Vala/Tutorial#Inheritance -- Jonathan Ryan ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] subclasses in vapi
On 03/16/11 17:29, Pavol Klačanský wrote: Hi, is there way to define them? yeah, just in the same way you do it in Vala ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
[Vala] subclasses in vapi
Hi, is there way to define them? signature.asc Description: This is a digitally signed message part ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Non global vars outside classes
As discussed in the IRC.. I have opened a bug for this issue. it's more a design problem than a bug in itself. it needs some work to add support for modules in Vala. https://bugzilla.gnome.org/show_bug.cgi?id=644920 On 03/16/11 02:33, pancake wrote: I have noticed that vala always generates a extern definition of the vars defined outside the class. I would like to define them private in some way and make them 'static' at C level. Am i doing something? Is this intentional? ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
[Vala] badly generated code
Hi, the following test program (which for me looks correct) generates bad C code (treats void as an actual assignable type): /* * valac --pkg gio-2.0 ./test.vala */ using GLib; [DBus (name = "com.meego.libsocialweb.ItemView")] public interface ItemView : GLib.DBusProxy { public abstract void Start () throws GLib.IOError; } public int main () { var conn = Bus.get_sync (BusType.SESSION); conn.get_proxy.begin ( "com.meego.libsocialweb", "/foo/bar", 0, null, (v) => { ItemView view = (ItemView)v; message ("Closures in Vala"); view.Start (); }); return 0; } valac bails with : /tmp/test.vala.c:239:7: error: variable or field ‘_tmp1_’ declared void /tmp/test.vala.c:248:155: error: ‘g_dbus_connection_get_proxy’ undeclared (first use in this function) I am guessing the combination of GLib.DBusConnection.get_proxy being async + taking Generic parameters might be confusing valac? Has any one stumbled with something similar? Cheers, Raúl ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala broken on non-gnu systems
/* Result of the benchmark: $ time ./a.out 1 real0m0.225s user0m0.223s sys 0m0.000s $ time ./a.out 0 real0m0.380s user0m0.377s sys 0m0.000s */ #include #include #define ITERS 10 int slen = ; char *str; static inline size_t mystrnlen(const char* str, size_t maxlen) { char* p = memchr(str, 0, maxlen); if (p == NULL) return maxlen; else return (p - str); } int test_memchr () { int i; int ret = 0; for (i=0; i< ITERS; i++) { ret += mystrnlen (str, slen); } return ret; } void test_strnlen () { int i; int ret = 0; for (i=0; i< ITERS; i++) { ret += strnlen (str, slen); } return ret; } main(int argc, char **argv) { if (argc>1) { str = malloc (slen+1); memset (str, 'A', slen); str[slen] = 0; switch (atoi (argv[1])) { case 0: test_memchr (); break; case 1: test_strnlen (); break; } } else printf ("Usage: memchr [0|1]\n"); } On 03/16/11 09:59, Anatol Pomozov wrote: Hi On Wed, Mar 16, 2011 at 1:37 AM, Alexander Kojevnikov wrote: On 16 March 2011 16:33, Anatol Pomozov wrote: But now tests are broken because of other error: make check-TESTS TEST: Building... FAIL cc1: error: -Wuninitialized is not supported without -O error: cc exited with status 256 Compilation failed: 1 error(s), 0 warning(s) make[4]: *** [check-TESTS] Error 1 make[3]: *** [check-am] Error 2 make[2]: *** [check] Error 2 make[1]: *** [check-recursive] Error 1 make: *** [check] Error 2 This should be fixed by the patch in the other bug I mentioned, please give it a try: https://bugzilla.gnome.org/show_bug.cgi?id=644876 Thanks for your patches. It is much better now. Now only dbus tests fail with /dbus/basic-types/server:FAIL Failed to start message bus: launchd's environment variable DBUS_LAUNCHD_SESSION_BUS_SOCKET is empty, but should contain a socket path. EOF in dbus-launch reading address from bus daemon ** CRITICAL **: file /Users/anatol/sources/vala/tests/_test/main.c: line 19824: uncaught error: Error connecting: No such file or directory (g-io-error-quark, 1) aborting... dbus.basic_types.server.check: line 4: 74545 Abort trap ./test /dbus/basic-types/server kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] It looks similar to this issue https://trac.macports.org/ticket/26712 ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala broken on non-gnu systems
Hi On Wed, Mar 16, 2011 at 1:37 AM, Alexander Kojevnikov wrote: > On 16 March 2011 16:33, Anatol Pomozov wrote: >> But now tests are broken because of other error: >> >> make check-TESTS >> TEST: Building... FAIL >> cc1: error: -Wuninitialized is not supported without -O >> error: cc exited with status 256 >> Compilation failed: 1 error(s), 0 warning(s) >> make[4]: *** [check-TESTS] Error 1 >> make[3]: *** [check-am] Error 2 >> make[2]: *** [check] Error 2 >> make[1]: *** [check-recursive] Error 1 >> make: *** [check] Error 2 >> > > This should be fixed by the patch in the other bug I mentioned, please > give it a try: > > https://bugzilla.gnome.org/show_bug.cgi?id=644876 Thanks for your patches. It is much better now. Now only dbus tests fail with /dbus/basic-types/server:FAIL Failed to start message bus: launchd's environment variable DBUS_LAUNCHD_SESSION_BUS_SOCKET is empty, but should contain a socket path. EOF in dbus-launch reading address from bus daemon ** CRITICAL **: file /Users/anatol/sources/vala/tests/_test/main.c: line 19824: uncaught error: Error connecting: No such file or directory (g-io-error-quark, 1) aborting... dbus.basic_types.server.check: line 4: 74545 Abort trap ./test /dbus/basic-types/server kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] It looks similar to this issue https://trac.macports.org/ticket/26712 ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala broken on non-gnu systems
On 16 March 2011 16:33, Anatol Pomozov wrote: > But now tests are broken because of other error: > > make check-TESTS > TEST: Building... FAIL > cc1: error: -Wuninitialized is not supported without -O > error: cc exited with status 256 > Compilation failed: 1 error(s), 0 warning(s) > make[4]: *** [check-TESTS] Error 1 > make[3]: *** [check-am] Error 2 > make[2]: *** [check] Error 2 > make[1]: *** [check-recursive] Error 1 > make: *** [check] Error 2 > This should be fixed by the patch in the other bug I mentioned, please give it a try: https://bugzilla.gnome.org/show_bug.cgi?id=644876 ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala broken on non-gnu systems
Hi On Tue, Mar 15, 2011 at 11:43 PM, Alexander Kojevnikov wrote: > On 16 March 2011 13:49, Anatol Pomozov wrote: >> On Tue, Mar 15, 2011 at 10:46 PM, Alexander Kojevnikov >> wrote: >>> On 16 March 2011 12:07, Anatol Pomozov wrote: While you are here you might want to fix tests/testrunner.sh that also uses GNU extension (xargs -r). See line 167. >>> >>> Which Unix are you using? >> >> macosx 10.6.4 > > I filed this as bgo#644884 [0], please test the attached patch and > comment in the bug. > > [0] https://bugzilla.gnome.org/show_bug.cgi?id=644884 Current HEAD is broken on macosx so I checked out revision before the Jurg's change $ git checkout a2d2120b~ applied your patch and it fixes the issue with "xargs -r". But now tests are broken because of other error: make check-TESTS TEST: Building... FAIL cc1: error: -Wuninitialized is not supported without -O error: cc exited with status 256 Compilation failed: 1 error(s), 0 warning(s) make[4]: *** [check-TESTS] Error 1 make[3]: *** [check-am] Error 2 make[2]: *** [check] Error 2 make[1]: *** [check-recursive] Error 1 make: *** [check] Error 2 ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list