Commit f640ab38 authored by Felipe Borges's avatar Felipe Borges 👣

examples: Add Vala example

From now on this example will be the test bed for Gtk-fRDP.
parent 39cb6d3c
/* gtk-frdp-viewer.vala
*
* Copyright (C) 2018 Felipe Borges <felipeborges@gnome.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Gtk;
using Frdp;
private class GtkRdpViewer.Application: Gtk.Application {
private Gtk.ApplicationWindow window;
private Frdp.Display display;
public Application () {
application_id = "org.gnome.GtkRdpViewer";
}
protected override void activate () {
if (window != null)
return;
window = new Gtk.ApplicationWindow (this);
display = new Frdp.Display();
display.open_host ("10.43.12.92", 3389);
window.add(display);
window.show_all ();
}
}
public int main (string[] args) {
var app = new GtkRdpViewer.Application ();
var exit_status = app.run (args);
return exit_status;
}
......@@ -5,3 +5,17 @@ example_application_sources = [
example_application = executable('gtk-frdp-viewer', example_application_sources,
dependencies: gtk_frdp_dep,
)
vala_args = [
'--vapidir', vapidir,
]
vala_example_application = executable('gtk-frdp-viewer-vala',
'gtk-frdp-viewer.vala',
vala_args: vala_args,
link_with: gtk_frdp_lib,
dependencies: [
dependency ('gtk+-3.0'),
dependency ('gtk-frdp-0.1')
],
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment