bygfoot/src/support.h

86 lines
2.6 KiB
C
Raw Normal View History

2004-12-23 13:58:39 +01:00
/*
support.h
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
http://bygfoot.sourceforge.net
Copyright (C) 2005 Gyözö Both (gyboth@bygfoot.com)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
2004-12-23 13:58:39 +01:00
#include "bygfoot_struct.h"
2004-12-23 13:58:39 +01:00
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
/*
* Standard gettext macros.
*/
#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) dgettext (PACKAGE, String)
2005-07-15 16:01:35 +02:00
# define Q_(String) g_strip_context ((String), gettext (String))
2004-12-23 13:58:39 +01:00
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define textdomain(String) (String)
# define gettext(String) (String)
# define dgettext(Domain,Message) (Message)
# define dcgettext(Domain,Message,Type) (Message)
# define bindtextdomain(Domain,Directory) (Domain)
# define _(String) (String)
2005-07-15 16:01:35 +02:00
# define Q_(String) g_strip_context ((String), (String))
2004-12-23 13:58:39 +01:00
# define N_(String) (String)
#endif
#define GTK_HOOKUP_OBJECT(component,builder,name) \
g_object_set_data_full (G_OBJECT (component), name, \
gtk_widget_ref (GTK_WIDGET (gtk_builder_get_object \
(builder, name))), (GDestroyNotify) gtk_widget_unref)
2004-12-23 13:58:39 +01:00
/*
* Public Functions.
*/
/*
* This function returns a widget in a component created by Glade.
* Call it with the toplevel widget in the component (i.e. a window/dialog),
* or alternatively any widget in the component, and the name of the widget
* you want returned.
*/
GtkWidget* lookup_widget (GtkWidget *widget,
const gchar *widget_name);
/** This will load the ui file, connect the signals and return the builder
*/
GtkBuilder*
load_ui (const gchar *filename);
2004-12-23 13:58:39 +01:00
GtkBuilder*
load_ui_with_userdata (const gchar *filename, Bygfoot *bygfoot);
2004-12-23 13:58:39 +01:00
/* Use this function to set the directory containing installed pixmaps. */
void add_pixmap_directory (const gchar *directory);