/* gtkDPSwidget.c * Copyright (C) 1997, 1998 GYVE Development Team * * Author: Terumoto 'tel' HAYAKAWA * Created: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" #include "gtkDPScontext.h" #include "gtkDPSwidget.h" #include "gtkDPSintl.h" #include #include const char * gtk_dps_version() { return VERSION; } static void gtk_dps_quit (gpointer data); static gboolean gtk_dps_initialized = FALSE; static gboolean gtk_dps_finalized = FALSE; void gtk_dps_init (int *argc, char ***argv) { g_return_if_fail(gtk_dps_initialized == FALSE); gdk_dps_init(argc, argv); gtk_quit_add(1, /* ??? */ (GtkFunction)gtk_dps_quit, NULL); gtk_dps_initialized = TRUE; #ifdef ENABLE_NLS bindtextdomain("gtkDPS", LOCALEDIR); #endif } static void gtk_dps_quit (gpointer data) { g_return_if_fail(gtk_dps_finalized == FALSE); gdk_dps_exit(); gtk_dps_finalized = TRUE; } static void gtk_dps_widget_class_init (GtkDPSWidgetClass *klass); static void gtk_dps_widget_init (GtkDPSWidget *dps_widget); guint gtk_dps_widget_get_type () { static guint dps_widget_type = 0; if (!dps_widget_type) { GtkTypeInfo dps_widget_info = { "GtkDPSWidget", sizeof (GtkDPSWidget), sizeof (GtkDPSWidgetClass), (GtkClassInitFunc) gtk_dps_widget_class_init, (GtkObjectInitFunc) gtk_dps_widget_init, (GtkArgSetFunc) NULL, (GtkArgGetFunc) NULL }; dps_widget_type = gtk_type_unique (gtk_widget_get_type (), &dps_widget_info); } return dps_widget_type; } static void gtk_dps_widget_class_init (GtkDPSWidgetClass *class) { } static void gtk_dps_widget_init (GtkDPSWidget *dps_widget) { #ifdef GTK_BASIC GTK_WIDGET_SET_FLAGS (dps_widget, GTK_BASIC); #endif /* GTK_BASIC */ dps_widget->gtk_dps_context = NULL; }