1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 /* 3 * Copyright (C) 2013 Intel Corporation 4 * 5 * This library is free software: you can redistribute it and/or modify it 6 * under the terms of the GNU Lesser General Public License as published by 7 * the Free Software Foundation. 8 * 9 * This library is distributed in the hope that it will be useful, but 10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 12 * for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public License 15 * along with this library. If not, see <http://www.gnu.org/licenses/>. 16 * 17 * Authors: Tristan Van Berkom <tristanvb@openismus.com> 18 */ 19 20 #ifndef CURSOR_SLOT_H 21 #define CURSOR_SLOT_H 22 23 #include <gtk/gtk.h> 24 #include <libebook/libebook.h> 25 26 G_BEGIN_DECLS 27 28 #define CURSOR_TYPE_SLOT (cursor_slot_get_type()) 29 #define CURSOR_SLOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CURSOR_TYPE_SLOT, CursorSlot)) 30 #define CURSOR_SLOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CURSOR_TYPE_SLOT, CursorSlotClass)) 31 #define CURSOR_IS_SLOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CURSOR_TYPE_SLOT)) 32 #define CURSOR_IS_SLOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CURSOR_TYPE_SLOT)) 33 #define CURSOR_SLOT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CURSOR_SLOT, CursorSlotClass)) 34 35 typedef struct _CursorSlot CursorSlot; 36 typedef struct _CursorSlotPrivate CursorSlotPrivate; 37 typedef struct _CursorSlotClass CursorSlotClass; 38 39 struct _CursorSlot 40 { 41 GtkGrid parent_instance; 42 43 CursorSlotPrivate *priv; 44 }; 45 46 struct _CursorSlotClass 47 { 48 GtkGridClass parent_class; 49 }; 50 51 GType cursor_slot_get_type (void) G_GNUC_CONST; 52 GtkWidget *cursor_slot_new (EContact *contact); 53 void cursor_slot_set_from_contact (CursorSlot *slot, 54 EContact *contact); 55 56 G_END_DECLS 57 58 #endif /* CURSOR_SLOT_H */ 59