root/trunk/libtinymailui-gtk/tny-gtk-msg-view.h

Revision 3304 (checked in by pvanhoof, 10 months ago)

2008-01-28 Philip Van Hoof <pvanhoof@gnome.org>

        • Removed the _func from all the interfaces and virtual function

pointers in the classes. This should not be an ABI but is an API
change.

        • This was a major API change
Line 
1 #ifndef TNY_GTK_MSG_VIEW_H
2 #define TNY_GTK_MSG_VIEW_H
3
4 /* libtinymailui-gtk - The Tiny Mail UI library for Gtk+
5  * Copyright (C) 2006-2007 Philip Van Hoof <pvanhoof@gnome.org>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with self library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22
23 #include <gtk/gtk.h>
24 #include <glib-object.h>
25 #include <tny-shared.h>
26
27 #include <tny-msg-view.h>
28 #include <tny-header-view.h>
29 #include <tny-header.h>
30 #include <tny-msg.h>
31 #include <tny-stream.h>
32 #include <tny-mime-part.h>
33
34 G_BEGIN_DECLS
35
36 #define TNY_TYPE_GTK_MSG_VIEW             (tny_gtk_msg_view_get_type ())
37 #define TNY_GTK_MSG_VIEW(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), TNY_TYPE_GTK_MSG_VIEW, TnyGtkMsgView))
38 #define TNY_GTK_MSG_VIEW_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), TNY_TYPE_GTK_MSG_VIEW, TnyGtkMsgViewClass))
39 #define TNY_IS_GTK_MSG_VIEW(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TNY_TYPE_GTK_MSG_VIEW))
40 #define TNY_IS_GTK_MSG_VIEW_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TNY_TYPE_GTK_MSG_VIEW))
41 #define TNY_GTK_MSG_VIEW_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_CLASS ((inst), TNY_TYPE_GTK_MSG_VIEW, TnyGtkMsgViewClass))
42
43 typedef struct _TnyGtkMsgView TnyGtkMsgView;
44 typedef struct _TnyGtkMsgViewClass TnyGtkMsgViewClass;
45
46 struct _TnyGtkMsgView
47 {
48         GtkBin parent;
49         GtkContainer *viewers;
50 };
51
52 struct _TnyGtkMsgViewClass
53 {
54         GtkBinClass parent_class;
55
56         /* virtual methods */
57         TnyMimePart* (*get_part) (TnyMimePartView *self);
58         void (*set_part) (TnyMimePartView *self, TnyMimePart *part);
59         TnyMsg* (*get_msg) (TnyMsgView *self);
60         void (*set_msg) (TnyMsgView *self, TnyMsg *msg);
61         void (*set_unavailable) (TnyMsgView *self);
62         void (*clear) (TnyMsgView *self);
63         TnyMimePartView* (*create_mime_part_view_for) (TnyMsgView *self, TnyMimePart *part);
64         TnyMsgView* (*create_new_inline_viewer) (TnyMsgView *self);
65
66         TnyHeaderView* (*create_header_view) (TnyGtkMsgView *self);
67 };
68
69 GType tny_gtk_msg_view_get_type (void);
70 TnyMsgView* tny_gtk_msg_view_new (void);
71
72 void tny_gtk_msg_view_set_display_html (TnyGtkMsgView *self, gboolean setting);
73 void tny_gtk_msg_view_set_display_rfc822 (TnyGtkMsgView *self, gboolean setting);
74 void tny_gtk_msg_view_set_display_attachments (TnyGtkMsgView *self, gboolean setting);
75 void tny_gtk_msg_view_set_display_plain (TnyGtkMsgView *self, gboolean setting);
76
77 gboolean tny_gtk_msg_view_get_display_html (TnyGtkMsgView *self);
78 gboolean tny_gtk_msg_view_get_display_rfc822 (TnyGtkMsgView *self);
79 gboolean tny_gtk_msg_view_get_display_attachments (TnyGtkMsgView *self);
80 gboolean tny_gtk_msg_view_get_display_plain (TnyGtkMsgView *self);
81
82
83 void tny_gtk_msg_view_set_status_callback (TnyGtkMsgView *self, TnyStatusCallback status_callback, gpointer status_user_data);
84 void tny_gtk_msg_view_get_status_callback (TnyGtkMsgView *self, TnyStatusCallback *status_callback, gpointer *status_user_data);
85
86 void tny_gtk_msg_view_set_parented (TnyGtkMsgView *self, gboolean parented);
87
88 G_END_DECLS
89
90 #endif
Note: See TracBrowser for help on using the browser.