/* * This file is part of Maemo Examples * * Copyright (C) 2005 Nokia Corporation. * * * This software is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA * */ /* Includes */ #include #include int main(int argc, char *argv[]) { /* Create needed variables */ HildonProgram *program; HildonWindow *window; /* Initialize the GTK. */ gtk_init(&argc, &argv); /* Create the hildon program and setup the title */ program = HILDON_PROGRAM(hildon_program_get_instance()); g_set_application_name("App Title"); /* Create HildonWindow and set it to HildonProgram */ window = HILDON_WINDOW(hildon_window_new()); hildon_program_add_window(program, window); /* Add example label to window */ gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(gtk_label_new("HildonProgram Example"))); /* Begin the main application */ gtk_widget_show_all(GTK_WIDGET(window)); /* Connect signal to X in the upper corner */ g_signal_connect(G_OBJECT(window), "delete_event", G_CALLBACK(gtk_main_quit), NULL); gtk_main(); /* Exit */ return 0; }