1 /* 2 * Copyright (C) 2009 - 2011 Vivien Malerba <malerba@gnome-db.org> 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 20 #ifndef __POPUP_CONTAINER_H__ 21 #define __POPUP_CONTAINER_H__ 22 23 #include <gtk/gtk.h> 24 25 G_BEGIN_DECLS 26 27 #define POPUP_CONTAINER_TYPE (popup_container_get_type()) 28 #define POPUP_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, POPUP_CONTAINER_TYPE, PopupContainer)) 29 #define POPUP_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, POPUP_CONTAINER_TYPE, PopupContainerClass)) 30 #define IS_POPUP_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, POPUP_CONTAINER_TYPE)) 31 #define IS_POPUP_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), POPUP_CONTAINER_TYPE)) 32 33 typedef struct _PopupContainer PopupContainer; 34 typedef struct _PopupContainerClass PopupContainerClass; 35 typedef struct _PopupContainerPrivate PopupContainerPrivate; 36 37 typedef void (*PopupContainerPositionFunc) (PopupContainer *cont, gint *out_x, gint *out_y); 38 39 struct _PopupContainer { 40 GtkWindow parent; 41 PopupContainerPrivate *priv; 42 }; 43 44 struct _PopupContainerClass { 45 GtkWindowClass parent_class; 46 }; 47 48 GType popup_container_get_type (void) G_GNUC_CONST; 49 GtkWidget *popup_container_new (GtkWidget *position_widget); 50 GtkWidget *popup_container_new_with_func (PopupContainerPositionFunc pos_func); 51 52 G_END_DECLS 53 54 #endif 55