add first source and waf build script
This commit is contained in:
parent
6da834d6f9
commit
8d6729841e
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/build/
|
||||||
|
/.waf*/
|
24
src/main.vala
Normal file
24
src/main.vala
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using Gtk;
|
||||||
|
|
||||||
|
int main(string[] args)
|
||||||
|
{
|
||||||
|
Gtk.init(ref args);
|
||||||
|
|
||||||
|
var window = new Window();
|
||||||
|
window.title = "File selector demo";
|
||||||
|
window.border_width = 10;
|
||||||
|
window.window_position = WindowPosition.CENTER;
|
||||||
|
window.destroy.connect(Gtk.main_quit);
|
||||||
|
|
||||||
|
var button = new Button.with_label("Select a file");
|
||||||
|
button.clicked.connect(() => {
|
||||||
|
button.label = "clicked";
|
||||||
|
});
|
||||||
|
|
||||||
|
window.add(button);
|
||||||
|
window.show_all();
|
||||||
|
|
||||||
|
Gtk.main();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
25
wscript
Normal file
25
wscript
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
def options(opt):
|
||||||
|
opt.load("compiler_c")
|
||||||
|
opt.load("vala")
|
||||||
|
|
||||||
|
def configure(conf):
|
||||||
|
conf.load("compiler_c")
|
||||||
|
conf.load("vala")
|
||||||
|
conf.check_cfg(
|
||||||
|
package = "glib-2.0",
|
||||||
|
uselib_store = "GLIB",
|
||||||
|
mandatory = 1,
|
||||||
|
args = "--cflags --libs")
|
||||||
|
conf.check_cfg(
|
||||||
|
package = "gtk+-3.0",
|
||||||
|
uselib_store = "GTK",
|
||||||
|
mandatory = 1,
|
||||||
|
args = "--cflags --libs")
|
||||||
|
|
||||||
|
def build(bld):
|
||||||
|
bld.program(
|
||||||
|
packages = "gtk+-3.0",
|
||||||
|
target = "vala-file-chooser",
|
||||||
|
uselib = "GTK GLIB",
|
||||||
|
source = bld.path.ant_glob("src/**/*.vala")
|
||||||
|
)
|
Loading…
x
Reference in New Issue
Block a user