aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-tab.h
blob: 5f3f8666b88897f1e1ce4887d7ad1833488519a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
 * Borrowed from Moblin-Web-Browser: The web browser for Moblin
 * Copyright (c) 2009, Intel Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU Lesser General Public License,
 * version 2.1, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 * License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef E_MAIL_TAB_H
#define E_MAIL_TAB_H

#include <clutter/clutter.h>
#include <mx/mx.h>

/* Standard GObject macros */
#define E_TYPE_MAIL_TAB \
    (e_mail_tab_get_type ())
#define E_MAIL_TAB(obj) \
    (G_TYPE_CHECK_INSTANCE_CAST \
    ((obj), E_TYPE_MAIL_TAB, EMailTab))
#define E_MAIL_TAB_CLASS(cls) \
    (G_TYPE_CHECK_CLASS_CAST \
    ((cls), E_TYPE_MAIL_TAB, EMailTabClass))
#define E_MAIL_IS_TAB(obj) \
    (G_TYPE_CHECK_INSTANCE_TYPE \
    ((obj), E_TYPE_MAIL_TAB))
#define E_MAIL_IS_TAB_CLASS(cls) \
    (G_TYPE_CHECK_CLASS_TYPE \
    ((cls), E_TYPE_MAIL_TAB))
#define E_MAIL_TAB_GET_CLASS(obj) \
    (G_TYPE_INSTANCE_GET_CLASS ( \
    (obj), E_TYPE_MAIL_TAB, EMailTabClass))

G_BEGIN_DECLS

typedef struct _EMailTab EMailTab;
typedef struct _EMailTabClass EMailTabClass;
typedef struct _EMailTabPrivate EMailTabPrivate;

struct _EMailTab {
    MxWidget parent;
    EMailTabPrivate *priv;
};

struct _EMailTabClass {
    MxWidgetClass parent_class;

    void        (*clicked)      (EMailTab *tab);
    void        (*closed)       (EMailTab *tab);
    void        (*transition_complete)  (EMailTab *tab);
};

GType       e_mail_tab_get_type     (void) G_GNUC_CONST;
ClutterActor *  e_mail_tab_new          (void);
ClutterActor *  e_mail_tab_new_full     (const gchar  *text,
                         ClutterActor *icon,
                         gint width);
void        e_mail_tab_set_text     (EMailTab *tab,
                         const gchar  *text);
void        e_mail_tab_set_default_icon (EMailTab *tab,
                         ClutterActor *icon);
void        e_mail_tab_set_icon     (EMailTab *tab,
                         ClutterActor *icon);
void        e_mail_tab_set_can_close    (EMailTab *tab,
                         gboolean can_close);
void        e_mail_tab_set_width        (EMailTab *tab,
                         gint width);
void        e_mail_tab_set_docking      (EMailTab *tab,
                         gboolean docking);
void        e_mail_tab_set_preview_actor    (EMailTab *tab,
                         ClutterActor *actor);
void        e_mail_tab_set_preview_mode (EMailTab *tab,
                         gboolean preview);
void        e_mail_tab_set_preview_duration (EMailTab *tab,
                         guint duration);
void        e_mail_tab_set_spacing      (EMailTab *tab,
                         gfloat spacing);
void        e_mail_tab_set_private      (EMailTab *tab,
                         gboolean private_);
void        e_mail_tab_set_active       (EMailTab *tab,
                         gboolean active);
const gchar *   e_mail_tab_get_text     (EMailTab *tab);
ClutterActor *  e_mail_tab_get_icon     (EMailTab *tab);
gboolean    e_mail_tab_get_can_close    (EMailTab *tab);
gint        e_mail_tab_get_width        (EMailTab *tab);
gboolean    e_mail_tab_get_docking      (EMailTab *tab);
ClutterActor *  e_mail_tab_get_preview_actor    (EMailTab *tab);
gboolean    e_mail_tab_get_preview_mode (EMailTab *tab);
void        e_mail_tab_get_height_no_preview
                        (EMailTab *tab,
                         gfloat for_width,
                         gfloat *min_height_p,
                         gfloat *natural_height_p);
guint       e_mail_tab_get_preview_duration (EMailTab *tab);
gfloat      e_mail_tab_get_spacing      (EMailTab *tab);
gboolean    e_mail_tab_get_private      (EMailTab *tab);
gboolean    e_mail_tab_get_active       (EMailTab *tab);
void        e_mail_tab_alert        (EMailTab *tab);
void        e_mail_tab_enable_drag      (EMailTab *tab,
                         gboolean enable);

G_END_DECLS

#endif /* E_MAIL_TAB_H */