/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */

/*
 *  Copyright (C) 2003 Hiroyuki Ikezoe
 *
 *  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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef __GTKUTILS_H__
#define __GTKUTILS_H__

#include <gtk/gtk.h>

G_BEGIN_DECLS

#if (GTK_MAJOR_VERSION == 2) && (GTK_MINOR_VERSION < 1)
#  define gtkutil_notebook_get_n_pages(notebook) \
   (GTK_IS_NOTEBOOK (notebook) ? g_list_length(GTK_NOTEBOOK(notebook)->children) : 0)
#else /* (GTK_MAJOR_VERSION == 2) && (GTK_MAJOR_VERSION < 1) */
#  define gtkutil_notebook_get_n_pages gtk_notebook_get_n_pages
#endif /* (GTK_MAJOR_VERSION == 2) && (GTK_MAJOR_VERSION < 1) */

void menu_position_under_widget (GtkMenu *menu, gint *x, gint *y,
				 gboolean *push_in, gpointer user_data);

G_END_DECLS

#endif /* __GTKUTILS_H__ */
