1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2008 Collabora Ltd.
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.
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.
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.
20 * Authors: Xavier Claessens <xclaesse@gmail.com>
23 #ifndef __EMPATHY_CHAT_VIEW_H__
24 #define __EMPATHY_CHAT_VIEW_H__
26 #include <gtk/gtktextview.h>
28 #include <libempathy/empathy-contact.h>
29 #include <libempathy/empathy-message.h>
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))
38 typedef struct _EmpathyChatView EmpathyChatView;
39 typedef struct _EmpathyChatViewIface EmpathyChatViewIface;
41 struct _EmpathyChatViewIface {
42 GTypeInterface base_iface;
45 void (*append_message) (EmpathyChatView *view,
47 void (*append_event) (EmpathyChatView *view,
49 void (*scroll) (EmpathyChatView *view,
50 gboolean allow_scrolling);
51 void (*scroll_down) (EmpathyChatView *view);
52 gboolean (*get_has_selection) (EmpathyChatView *view);
53 void (*clear) (EmpathyChatView *view);
54 gboolean (*find_previous) (EmpathyChatView *view,
55 const gchar *search_criteria,
57 gboolean (*find_next) (EmpathyChatView *view,
58 const gchar *search_criteria,
60 void (*find_abilities) (EmpathyChatView *view,
61 const gchar *search_criteria,
62 gboolean *can_do_previous,
63 gboolean *can_do_next);
64 void (*highlight) (EmpathyChatView *view,
66 void (*copy_clipboard) (EmpathyChatView *view);
69 GType empathy_chat_view_get_type (void) G_GNUC_CONST;
70 void empathy_chat_view_append_message (EmpathyChatView *view,
72 void empathy_chat_view_append_event (EmpathyChatView *view,
74 void empathy_chat_view_scroll (EmpathyChatView *view,
75 gboolean allow_scrolling);
76 void empathy_chat_view_scroll_down (EmpathyChatView *view);
77 gboolean empathy_chat_view_get_has_selection (EmpathyChatView *view);
78 void empathy_chat_view_clear (EmpathyChatView *view);
79 gboolean empathy_chat_view_find_previous (EmpathyChatView *view,
80 const gchar *search_criteria,
82 gboolean empathy_chat_view_find_next (EmpathyChatView *view,
83 const gchar *search_criteria,
85 void empathy_chat_view_find_abilities (EmpathyChatView *view,
86 const gchar *search_criteria,
87 gboolean *can_do_previous,
88 gboolean *can_do_next);
89 void empathy_chat_view_highlight (EmpathyChatView *view,
91 void empathy_chat_view_copy_clipboard (EmpathyChatView *view);
95 #endif /* __EMPATHY_CHAT_VIEW_H__ */