* Changes in the autotools stuff affecting a lot of platform dependent
[modest] / src / widgets / modest-header-view-observer.h
1 #ifndef __MODEST_HEADER_VIEW_OBSERVER_H__
2 #define __MODEST_HEADER_VIEW_OBSERVER_H__
3
4 /* Copyright (c) 2006, Nokia Corporation
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are
9  * met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  *   notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above copyright
14  *   notice, this list of conditions and the following disclaimer in the
15  *   documentation and/or other materials provided with the distribution.
16  * * Neither the name of the Nokia Corporation nor the names of its
17  *   contributors may be used to endorse or promote products derived from
18  *   this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
21  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
24  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32
33 #include <glib.h>
34 #include <glib-object.h>
35 #include <gtk/gtk.h>
36
37 G_BEGIN_DECLS
38
39 #define MODEST_TYPE_HEADER_VIEW_OBSERVER \
40                 (modest_header_view_observer_get_type ())
41
42 #define MODEST_HEADER_VIEW_OBSERVER(obj) \
43                 (G_TYPE_CHECK_INSTANCE_CAST((obj), \
44                 MODEST_TYPE_HEADER_VIEW_OBSERVER, \
45                 ModestHeaderViewObserver))
46 #define MODEST_IS_HEADER_VIEW_OBSERVER(obj) \
47                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
48                 MODEST_TYPE_HEADER_VIEW_OBSERVER))
49
50 #define MODEST_HEADER_VIEW_OBSERVER_GET_IFACE(inst) \
51                 (G_TYPE_INSTANCE_GET_INTERFACE((inst), \
52                 MODEST_TYPE_HEADER_VIEW_OBSERVER, \
53                 ModestHeaderViewObserverIface))
54
55 typedef struct _ModestHeaderViewObserver ModestHeaderViewObserver;
56 typedef struct _ModestHeaderViewObserverIface ModestHeaderViewObserverIface;
57
58 struct _ModestHeaderViewObserverIface
59 {
60         GTypeInterface parent;
61
62         void (*update_func)(
63                         ModestHeaderViewObserver *self,
64                         GtkTreeModel *model,
65                         const gchar *tny_folder_id);
66 };
67
68 GType modest_header_view_observer_get_type();
69
70 void modest_header_view_observer_update(
71                 ModestHeaderViewObserver *self,
72                 GtkTreeModel *model,
73                 const gchar *tny_folder_id);
74
75 G_END_DECLS
76
77 #endif
78