1 #include <hildon/hildon-program.h>
2 #include <gtk/gtkmain.h>
3 #include <gtk/gtkbutton.h>
5 int main(int argc, char *argv[])
7 /* Create needed variables */
8 HildonProgram *program;
12 /* Initialize the GTK. */
13 gtk_init(&argc, &argv);
15 /* Create the hildon program and setup the title */
16 program = HILDON_PROGRAM(hildon_program_get_instance());
17 g_set_application_name("Hello maemo!");
19 /* Create HildonWindow and set it to HildonProgram */
20 window = HILDON_WINDOW(hildon_window_new());
21 hildon_program_add_window(program, window);
23 /* Create button and add it to main view */
24 button = gtk_button_new_with_label("Hello!");
25 gtk_container_add(GTK_CONTAINER(window), button);
27 /* Connect signal to X in the upper corner */
28 g_signal_connect(G_OBJECT(window), "delete_event",
29 G_CALLBACK(gtk_main_quit), NULL);
31 /* Begin the main application */
32 gtk_widget_show_all(GTK_WIDGET(window));