1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- 2 * 3 * Copyright (C) 2010 Red Hat, Inc. 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 * 19 */ 20 21 22 #ifndef __ND_STACK_H 23 #define __ND_STACK_H 24 25 #include <gtk/gtk.h> 26 #include "nd-bubble.h" 27 28 G_BEGIN_DECLS 29 30 #define ND_TYPE_STACK (nd_stack_get_type ()) 31 #define ND_STACK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), ND_TYPE_STACK, NdStack)) 32 #define ND_STACK_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), ND_TYPE_STACK, NdStackClass)) 33 #define ND_IS_STACK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), ND_TYPE_STACK)) 34 #define ND_IS_STACK_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ND_TYPE_STACK)) 35 #define ND_STACK_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ND_TYPE_STACK, NdStackClass)) 36 37 typedef struct NdStackPrivate NdStackPrivate; 38 39 typedef struct 40 { 41 GObject parent; 42 NdStackPrivate *priv; 43 } NdStack; 44 45 typedef struct 46 { 47 GObjectClass parent_class; 48 } NdStackClass; 49 50 typedef enum 51 { 52 ND_STACK_LOCATION_UNKNOWN = -1, 53 ND_STACK_LOCATION_TOP_LEFT, 54 ND_STACK_LOCATION_TOP_RIGHT, 55 ND_STACK_LOCATION_BOTTOM_LEFT, 56 ND_STACK_LOCATION_BOTTOM_RIGHT, 57 ND_STACK_LOCATION_DEFAULT = ND_STACK_LOCATION_TOP_RIGHT 58 } NdStackLocation; 59 60 GType nd_stack_get_type (void); 61 62 NdStack * nd_stack_new (GdkScreen *screen, 63 guint monitor); 64 65 void nd_stack_set_location (NdStack *stack, 66 NdStackLocation location); 67 void nd_stack_add_bubble (NdStack *stack, 68 NdBubble *bubble, 69 gboolean new_notification); 70 void nd_stack_remove_bubble (NdStack *stack, 71 NdBubble *bubble); 72 void nd_stack_remove_all (NdStack *stack); 73 GList * nd_stack_get_bubbles (NdStack *stack); 74 void nd_stack_queue_update_position (NdStack *stack); 75 76 G_END_DECLS 77 78 #endif /* __ND_STACK_H */ 79