Our First App
Launch-able, Build-able, and Shareable
Hello (Again) World!
/*
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2023 Your Name <[email protected]>
*/
public class MyApp : Gtk.Application {
public MyApp () {
Object (
application_id: "io.github.yourusername.yourrepositoryname",
flags: ApplicationFlags.DEFAULT_FLAGS
);
}
protected override void activate () {
var label = new Gtk.Label ("Hello Again World!");
var main_window = new Gtk.ApplicationWindow (this) {
child = label,
default_height = 300,
default_width = 300,
title = "Hello World"
};
main_window.present ();
}
public static int main (string[] args) {
return new MyApp ().run (args);
}
}License
Last updated
Was this helpful?