/* * Copyright (C) 2005 Ray Strode , * Matthias Clasen , * Søren Sandmann * * This program 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 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * Originally written by: Ray Strode * * Later contributions by: Matthias Clasen * Søren Sandmann */ #include #include #include #include #include #include #include #include #include #include #include "gs-theme-window.h" static gchar *geometry = NULL; static GOptionEntry options[] = { {"geometry", 0, 0, G_OPTION_ARG_STRING, &geometry, N_("The initial size and position of window"), N_("WIDTHxHEIGHT+X+Y")}, {NULL} }; int main (int argc, char *argv[]) { GtkWidget *window; GtkWidget *drawing_area; GtkStateType state; GError *error; error = NULL; gtk_init_with_args (&argc, &argv, /* translators: the word "image" here * represents a command line argument */ _("image - floats images around the screen"), NULL, NULL, &error); if (error != NULL) { g_printerr (_("%s. See --help for usage information.\n"), _(error->message)); g_error_free (error); return EX_SOFTWARE; } window = gs_theme_window_new (); g_signal_connect (G_OBJECT (window), "delete-event", G_CALLBACK (gtk_main_quit), NULL); drawing_area = gtk_drawing_area_new (); gtk_widget_show (drawing_area); gtk_container_add (GTK_CONTAINER (window), drawing_area); if ((geometry == NULL) || !gtk_window_parse_geometry (GTK_WINDOW (window), geometry)) { gtk_window_set_default_size (GTK_WINDOW (window), 640, 480); } gtk_widget_show (window); gtk_main (); return EX_OK; }