Login
Newsletter
Werbung

Thema: Bassi: Ist Vala tot?

2 Kommentar(e) || Alle anzeigen ||  RSS
Kommentare von Lesern spiegeln nicht unbedingt die Meinung der Redaktion wider.
0
Von What?? am Do, 16. Februar 2017 um 21:55 #

https://github.com/GNOME/vala/tree/master/vapi
https://github.com/nemequ/vala-extra-vapis

+ alles was Gobject ist (vapigen, pure OO)
+ alles was C ist. (ohne function call table) durch einfache vapis (OO oder auch nicht)

GO:
+ Bindings (function tables at the best und kein memory mangaement, und keine actors, const -> thread programming )
http://go-lang.cat-v.org/library-bindings

(Offizielle) Libraries in go (actors memory management und const)
https://golang.org/pkg/

Ich finde da hat vala mehr ;) auch ohne rauchen

[
| Versenden | Drucken ]
  • 0
    Von What?? am Do, 16. Februar 2017 um 21:59 #

    vala (imer aktuellstes gtk+)
    --------------------------
    using Gtk;

    int main (string[] args) {
    Gtk.init (ref args);

    var window = new Window ();
    window.title = "First GTK+ Program";
    window.border_width = 10;
    window.window_position = WindowPosition.CENTER;
    window.set_default_size (350, 70);
    window.destroy.connect (Gtk.main_quit);

    var button = new Button.with_label ("Click me!");
    button.clicked.connect (() => {
    button.label = "Thank you";
    });

    window.add (button);
    window.show_all ();

    Gtk.main ();
    return 0;
    }

    --------------------------
    go (mit wrappern)

    package main

    import (
    "github.com/conformal/gotk3/gtk"
    "log"
    )

    func main() {
    // Initialize GTK without parsing any command line arguments.
    gtk.Init(nil)

    // Create a new toplevel window, set its title, and connect it to the
    // "destroy" signal to exit the GTK main loop when it is destroyed.
    win, err := gtk.WindowNew(gtk.WINDOW_TOPLEVEL)
    if err != nil {
    log.Fatal("Unable to create window:", err)
    }
    win.SetTitle("Simple Example")
    win.Connect("destroy", func() {
    gtk.MainQuit()
    })

    // Create a new label widget to show in the window.
    l, err := gtk.LabelNew("Hello, gotk3!")
    if err != nil {
    log.Fatal("Unable to create label:", err)
    }

    // Add the label to the window.
    win.Add(l)

    // Set the default window size.
    win.SetDefaultSize(800, 600)

    // Recursively show all widgets contained in this window.
    win.ShowAll()

    // Begin executing the GTK main loop. This blocks until
    // gtk.MainQuit() is run.
    gtk.Main()
    }

    [
    | Versenden | Drucken ]
Pro-Linux
Pro-Linux @Facebook
Neue Nachrichten
Werbung