1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2002-2007 Imendio AB
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: Mikael Hallendal <micke@imendio.com>
21 * Richard Hult <richard@imendio.com>
22 * Martyn Russell <martyn@imendio.com>
25 #ifndef __EMPATHY_CHAT_VIEW_H__
26 #define __EMPATHY_CHAT_VIEW_H__
28 #include <gtk/gtktextview.h>
29 #include <gtk/gtktooltips.h>
31 #include <libempathy/empathy-contact.h>
32 #include <libempathy/empathy-message.h>
36 #define EMPATHY_TYPE_CHAT_VIEW (empathy_chat_view_get_type ())
37 #define EMPATHY_CHAT_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CHAT_VIEW, EmpathyChatView))
38 #define EMPATHY_CHAT_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_CHAT_VIEW, EmpathyChatViewClass))
39 #define EMPATHY_IS_CHAT_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CHAT_VIEW))
40 #define EMPATHY_IS_CHAT_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CHAT_VIEW))
41 #define EMPATHY_CHAT_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CHAT_VIEW, EmpathyChatViewClass))
43 typedef struct _EmpathyChatView EmpathyChatView;
44 typedef struct _EmpathyChatViewClass EmpathyChatViewClass;
45 typedef struct _EmpathyChatViewPriv EmpathyChatViewPriv;
47 struct _EmpathyChatView {
51 struct _EmpathyChatViewClass {
52 GtkTextViewClass parent_class;
56 EMPATHY_SMILEY_NORMAL, /* :) */
57 EMPATHY_SMILEY_WINK, /* ;) */
58 EMPATHY_SMILEY_BIGEYE, /* =) */
59 EMPATHY_SMILEY_NOSE, /* :-) */
60 EMPATHY_SMILEY_CRY, /* :'( */
61 EMPATHY_SMILEY_SAD, /* :( */
62 EMPATHY_SMILEY_SCEPTICAL, /* :/ */
63 EMPATHY_SMILEY_BIGSMILE, /* :D */
64 EMPATHY_SMILEY_INDIFFERENT, /* :| */
65 EMPATHY_SMILEY_TOUNGE, /* :p */
66 EMPATHY_SMILEY_SHOCKED, /* :o */
67 EMPATHY_SMILEY_COOL, /* 8) */
68 EMPATHY_SMILEY_SORRY, /* *| */
69 EMPATHY_SMILEY_KISS, /* :* */
70 EMPATHY_SMILEY_SHUTUP, /* :# */
71 EMPATHY_SMILEY_YAWN, /* |O */
72 EMPATHY_SMILEY_CONFUSED, /* :$ */
73 EMPATHY_SMILEY_ANGEL, /* <) */
74 EMPATHY_SMILEY_OOOH, /* :x */
75 EMPATHY_SMILEY_LOOKAWAY, /* *) */
76 EMPATHY_SMILEY_BLUSH, /* *S */
77 EMPATHY_SMILEY_COOLBIGSMILE, /* 8D */
78 EMPATHY_SMILEY_ANGRY, /* :@ */
79 EMPATHY_SMILEY_BOSS, /* @) */
80 EMPATHY_SMILEY_MONKEY, /* #) */
81 EMPATHY_SMILEY_SILLY, /* O) */
82 EMPATHY_SMILEY_SICK, /* +o( */
87 GType empathy_chat_view_get_type (void) G_GNUC_CONST;
88 EmpathyChatView *empathy_chat_view_new (void);
89 void empathy_chat_view_append_message (EmpathyChatView *view,
91 void empathy_chat_view_append_event (EmpathyChatView *view,
93 void empathy_chat_view_append_button (EmpathyChatView *view,
97 void empathy_chat_view_set_margin (EmpathyChatView *view,
99 void empathy_chat_view_scroll (EmpathyChatView *view,
100 gboolean allow_scrolling);
101 void empathy_chat_view_scroll_down (EmpathyChatView *view);
102 gboolean empathy_chat_view_get_selection_bounds (EmpathyChatView *view,
105 void empathy_chat_view_clear (EmpathyChatView *view);
106 gboolean empathy_chat_view_find_previous (EmpathyChatView *view,
107 const gchar *search_criteria,
108 gboolean new_search);
109 gboolean empathy_chat_view_find_next (EmpathyChatView *view,
110 const gchar *search_criteria,
111 gboolean new_search);
112 void empathy_chat_view_find_abilities (EmpathyChatView *view,
113 const gchar *search_criteria,
114 gboolean *can_do_previous,
115 gboolean *can_do_next);
116 void empathy_chat_view_highlight (EmpathyChatView *view,
118 void empathy_chat_view_copy_clipboard (EmpathyChatView *view);
119 gboolean empathy_chat_view_get_irc_style (EmpathyChatView *view);
120 void empathy_chat_view_set_irc_style (EmpathyChatView *view,
122 void empathy_chat_view_set_margin (EmpathyChatView *view,
124 GdkPixbuf * empathy_chat_view_get_smiley_image (EmpathySmiley smiley);
125 const gchar * empathy_chat_view_get_smiley_text (EmpathySmiley smiley);
126 GtkWidget * empathy_chat_view_get_smiley_menu (GCallback callback,
128 GtkTooltips *tooltips);
129 void empathy_chat_view_set_is_group_chat (EmpathyChatView *view,
130 gboolean is_group_chat);
134 #endif /* __EMPATHY_CHAT_VIEW_H__ */