]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-chat-view.h
Move should_create_salut_account to local-xmpp-assistant-widget
[empathy.git] / libempathy-gtk / empathy-chat-view.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2008 Collabora Ltd.
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., 51 Franklin St, Fifth Floor,
18  * Boston, MA  02110-1301  USA
19  *
20  * Authors: Xavier Claessens <xclaesse@gmail.com>
21  */
22
23 #ifndef __EMPATHY_CHAT_VIEW_H__
24 #define __EMPATHY_CHAT_VIEW_H__
25
26 #include <gtk/gtk.h>
27
28 #include <libempathy/empathy-contact.h>
29 #include <libempathy/empathy-message.h>
30
31 G_BEGIN_DECLS
32
33 #define EMPATHY_TYPE_CHAT_VIEW         (empathy_chat_view_get_type ())
34 #define EMPATHY_CHAT_VIEW(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CHAT_VIEW, EmpathyChatView))
35 #define EMPATHY_IS_CHAT_VIEW(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CHAT_VIEW))
36 #define EMPATHY_TYPE_CHAT_VIEW_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), EMPATHY_TYPE_CHAT_VIEW, EmpathyChatViewIface))
37
38 typedef struct _EmpathyChatView      EmpathyChatView;
39 typedef struct _EmpathyChatViewIface EmpathyChatViewIface;
40
41 struct _EmpathyChatViewIface {
42         GTypeInterface   base_iface;
43
44         /* VTabled */
45         void             (*append_message)       (EmpathyChatView *view,
46                                                   EmpathyMessage  *msg,
47                                                   gboolean         should_highlight);
48         void             (*append_event)         (EmpathyChatView *view,
49                                                   const gchar     *str);
50         void             (*append_event_markup)  (EmpathyChatView *view,
51                                                   const gchar     *markup_text,
52                                                   const gchar     *fallback_text);
53         void             (*edit_message)         (EmpathyChatView *view,
54                                                   EmpathyMessage  *message);
55         void             (*scroll)               (EmpathyChatView *view,
56                                                   gboolean         allow_scrolling);
57         void             (*scroll_down)          (EmpathyChatView *view);
58         gboolean         (*get_has_selection)    (EmpathyChatView *view);
59         void             (*clear)                (EmpathyChatView *view);
60         gboolean         (*find_previous)        (EmpathyChatView *view,
61                                                   const gchar     *search_criteria,
62                                                   gboolean         new_search,
63                                                   gboolean         match_case);
64         gboolean         (*find_next)            (EmpathyChatView *view,
65                                                   const gchar     *search_criteria,
66                                                   gboolean         new_search,
67                                                   gboolean         match_case);
68         void             (*find_abilities)       (EmpathyChatView *view,
69                                                   const gchar     *search_criteria,
70                                                   gboolean         match_case,
71                                                   gboolean        *can_do_previous,
72                                                   gboolean        *can_do_next);
73         void             (*highlight)            (EmpathyChatView *view,
74                                                   const gchar     *text,
75                                                   gboolean         match_case);
76         void             (*copy_clipboard)       (EmpathyChatView *view);
77         void             (*focus_toggled)        (EmpathyChatView *view,
78                                                   gboolean         has_focus);
79         void             (*message_acknowledged) (EmpathyChatView *view,
80                                                   EmpathyMessage  *message);
81 };
82
83 GType            empathy_chat_view_get_type             (void) G_GNUC_CONST;
84 void             empathy_chat_view_append_message       (EmpathyChatView *view,
85                                                          EmpathyMessage  *msg,
86                                                          gboolean         should_highlight);
87 void             empathy_chat_view_append_event         (EmpathyChatView *view,
88                                                          const gchar     *str);
89 void             empathy_chat_view_append_event_markup  (EmpathyChatView *view,
90                                                          const gchar     *markup_text,
91                                                          const gchar     *fallback_text);
92 void             empathy_chat_view_edit_message         (EmpathyChatView *view,
93                                                          EmpathyMessage  *message);
94 void             empathy_chat_view_scroll               (EmpathyChatView *view,
95                                                          gboolean         allow_scrolling);
96 void             empathy_chat_view_scroll_down          (EmpathyChatView *view);
97 gboolean         empathy_chat_view_get_has_selection    (EmpathyChatView *view);
98 void             empathy_chat_view_clear                (EmpathyChatView *view);
99 gboolean         empathy_chat_view_find_previous        (EmpathyChatView *view,
100                                                          const gchar     *search_criteria,
101                                                          gboolean         new_search,
102                                                          gboolean         match_case);
103 gboolean         empathy_chat_view_find_next            (EmpathyChatView *view,
104                                                          const gchar     *search_criteria,
105                                                          gboolean         new_search,
106                                                          gboolean         match_case);
107 void             empathy_chat_view_find_abilities       (EmpathyChatView *view,
108                                                          const gchar     *search_criteria,
109                                                          gboolean         match_case,
110                                                          gboolean        *can_do_previous,
111                                                          gboolean        *can_do_next);
112 void             empathy_chat_view_highlight            (EmpathyChatView *view,
113                                                          const gchar     *text,
114                                                          gboolean         match_case);
115 void             empathy_chat_view_copy_clipboard       (EmpathyChatView *view);
116 void             empathy_chat_view_focus_toggled        (EmpathyChatView *view,
117                                                          gboolean         has_focus);
118 void             empathy_chat_view_message_acknowledged (EmpathyChatView *view,
119                                                          EmpathyMessage  *message);
120
121 G_END_DECLS
122
123 #endif /* __EMPATHY_CHAT_VIEW_H__ */
124