Adding cursor example program
[platform/upstream/evolution-data-server.git] / tests / cursor-example / cursor-slot.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2013 Intel Corporation
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of version 2 of the GNU Lesser General Public
7  * License as published by the Free Software Foundation.
8  *
9  * This program 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  * 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 program; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  *
19  * Author: Tristan Van Berkom <tristanvb@openismus.com>
20  */
21  
22 #ifndef CURSOR_SLOT_H
23 #define CURSOR_SLOT_H
24
25 #include <gtk/gtk.h>
26 #include <libebook/libebook.h>
27
28 G_BEGIN_DECLS
29
30 #define CURSOR_TYPE_SLOT            (cursor_slot_get_type())
31 #define CURSOR_SLOT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), CURSOR_TYPE_SLOT, CursorSlot))
32 #define CURSOR_SLOT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), CURSOR_TYPE_SLOT, CursorSlotClass))
33 #define CURSOR_IS_SLOT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CURSOR_TYPE_SLOT))
34 #define CURSOR_IS_SLOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CURSOR_TYPE_SLOT))
35 #define CURSOR_SLOT_GET_CLASS(o)    (G_TYPE_INSTANCE_GET_CLASS ((o), CURSOR_SLOT, CursorSlotClass))
36
37 typedef struct _CursorSlot         CursorSlot;
38 typedef struct _CursorSlotPrivate  CursorSlotPrivate;
39 typedef struct _CursorSlotClass    CursorSlotClass;
40
41 struct _CursorSlot
42 {
43         GtkGrid parent_instance;
44
45         CursorSlotPrivate *priv;
46 };
47
48 struct _CursorSlotClass
49 {
50         GtkGridClass parent_class;
51 };
52
53 GType       cursor_slot_get_type         (void) G_GNUC_CONST;
54 GtkWidget  *cursor_slot_new              (EContact *contact);
55 void        cursor_slot_set_from_contact (CursorSlot *slot,
56                                           EContact   *contact);
57
58 G_END_DECLS
59
60 #endif /* CURSOR_SLOT_H */