]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-theme.h
Updatre python binding
[empathy.git] / libempathy-gtk / empathy-theme.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2007 Imendio AB
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of the
8  * License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20
21 #ifndef __EMPATHY_THEME_H__
22 #define __EMPATHY_THEME_H__
23
24 #include <glib-object.h>
25 #include <gtk/gtktextbuffer.h>
26
27 G_BEGIN_DECLS
28
29 #define EMPATHY_TYPE_THEME            (empathy_theme_get_type ())
30 #define EMPATHY_THEME(o)              (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_THEME, EmpathyTheme))
31 #define EMPATHY_THEME_CLASS(k)        (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_THEME, EmpathyThemeClass))
32 #define EMPATHY_IS_THEME(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_THEME))
33 #define EMPATHY_IS_THEME_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_THEME))
34 #define EMPATHY_THEME_GET_CLASS(o)    (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_THEME, EmpathyThemeClass))
35
36 typedef struct _EmpathyTheme      EmpathyTheme;
37 typedef struct _EmpathyThemeClass EmpathyThemeClass;
38
39 #include "empathy-chat-view.h"
40
41 struct _EmpathyTheme {
42         GObject parent;
43 };
44
45 struct _EmpathyThemeClass {
46         GObjectClass parent_class;
47
48         /* <vtable> */
49         void (*update_view)         (EmpathyTheme    *theme,
50                                      EmpathyChatView *view);
51         void (*append_message)      (EmpathyTheme    *theme,
52                                      EmpathyChatView *view,
53                                      EmpathyMessage  *message);
54         void (*append_event)        (EmpathyTheme    *theme,
55                                      EmpathyChatView *view,
56                                      const gchar     *str);
57         void (*append_timestamp)    (EmpathyTheme    *theme,
58                                      EmpathyChatView *view,
59                                      EmpathyMessage  *message,
60                                      gboolean         show_date,
61                                      gboolean         show_time);
62         void (*append_spacing)      (EmpathyTheme    *theme,
63                                      EmpathyChatView *view);
64 };
65
66 GType          empathy_theme_get_type                   (void) G_GNUC_CONST;
67 void           empathy_theme_update_view                (EmpathyTheme    *theme,
68                                                          EmpathyChatView *view);
69 void           empathy_theme_append_message             (EmpathyTheme    *theme,
70                                                          EmpathyChatView *view,
71                                                          EmpathyMessage  *msg);
72 void           empathy_theme_append_text                (EmpathyTheme    *theme,
73                                                          EmpathyChatView *view,
74                                                          const gchar     *body,
75                                                          const gchar     *tag, 
76                                                          const gchar     *link_tag);
77 void           empathy_theme_append_spacing             (EmpathyTheme    *theme,
78                                                          EmpathyChatView *view);
79 void           empathy_theme_append_event               (EmpathyTheme    *theme,
80                                                          EmpathyChatView *view,
81                                                          const gchar     *str);
82 void           empathy_theme_append_timestamp           (EmpathyTheme    *theme,
83                                                          EmpathyChatView *view,
84                                                          EmpathyMessage  *message,
85                                                          gboolean         show_date,
86                                                          gboolean         show_time);
87 void           empathy_theme_maybe_append_date_and_time (EmpathyTheme    *theme,
88                                                          EmpathyChatView *view,
89                                                          EmpathyMessage  *message);
90 gboolean       empathy_theme_get_show_avatars           (EmpathyTheme    *theme);
91 void           empathy_theme_set_show_avatars           (EmpathyTheme    *theme,
92                                                          gboolean         show);
93
94 G_END_DECLS
95
96 #endif /* __EMPATHY_THEME_H__ */
97