1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2002-2007 Imendio AB
4 * Copyright (C) 2007-2008 Collabora Ltd.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 * Boston, MA 02110-1301 USA
21 * Authors: Mikael Hallendal <micke@imendio.com>
22 * Richard Hult <richard@imendio.com>
23 * Martyn Russell <martyn@imendio.com>
24 * Geert-Jan Van den Bogaerde <geertjan@gnome.org>
25 * Xavier Claessens <xclaesse@gmail.com>
28 #ifndef __EMPATHY_CHAT_H__
29 #define __EMPATHY_CHAT_H__
33 #include "empathy-contact.h"
34 #include "empathy-theme-adium.h"
35 #include "empathy-tp-chat.h"
36 #include "empathy-smiley-manager.h"
40 #define EMPATHY_TYPE_CHAT (empathy_chat_get_type ())
41 #define EMPATHY_CHAT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CHAT, EmpathyChat))
42 #define EMPATHY_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_CHAT, EmpathyChatClass))
43 #define EMPATHY_IS_CHAT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CHAT))
44 #define EMPATHY_IS_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CHAT))
45 #define EMPATHY_CHAT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CHAT, EmpathyChatClass))
47 typedef struct _EmpathyChat EmpathyChat
;
48 typedef struct _EmpathyChatClass EmpathyChatClass
;
49 typedef struct _EmpathyChatPriv EmpathyChatPriv
;
53 EmpathyChatPriv
*priv
;
56 EmpathyThemeAdium
*view
;
57 GtkWidget
*input_text_view
;
60 struct _EmpathyChatClass
{
64 GType
empathy_chat_get_type (void);
65 EmpathyChat
* empathy_chat_new (EmpathyTpChat
*tp_chat
);
66 EmpathyTpChat
* empathy_chat_get_tp_chat (EmpathyChat
*chat
);
67 void empathy_chat_set_tp_chat (EmpathyChat
*chat
,
68 EmpathyTpChat
*tp_chat
);
69 TpAccount
* empathy_chat_get_account (EmpathyChat
*chat
);
70 const gchar
* empathy_chat_get_id (EmpathyChat
*chat
);
71 gchar
* empathy_chat_dup_name (EmpathyChat
*chat
);
72 const gchar
* empathy_chat_get_subject (EmpathyChat
*chat
);
73 EmpathyContact
* empathy_chat_get_remote_contact (EmpathyChat
*chat
);
74 GtkWidget
* empathy_chat_get_contact_menu (EmpathyChat
*chat
);
75 void empathy_chat_clear (EmpathyChat
*chat
);
76 void empathy_chat_scroll_down (EmpathyChat
*chat
);
77 void empathy_chat_cut (EmpathyChat
*chat
);
78 void empathy_chat_copy (EmpathyChat
*chat
);
79 void empathy_chat_paste (EmpathyChat
*chat
);
80 void empathy_chat_find (EmpathyChat
*chat
);
81 void empathy_chat_correct_word (EmpathyChat
*chat
,
84 const gchar
*new_word
);
85 void empathy_chat_join_muc (EmpathyChat
*chat
,
87 gboolean
empathy_chat_is_room (EmpathyChat
*chat
);
88 void empathy_chat_set_show_contacts (EmpathyChat
*chat
,
90 guint
empathy_chat_get_nb_unread_messages (EmpathyChat
*chat
);
91 gboolean
empathy_chat_is_highlighted (EmpathyChat
*chat
);
92 void empathy_chat_messages_read (EmpathyChat
*self
);
94 gboolean
empathy_chat_is_composing (EmpathyChat
*chat
);
96 gboolean
empathy_chat_is_sms_channel (EmpathyChat
*self
);
97 guint
empathy_chat_get_n_messages_sending (EmpathyChat
*self
);
99 gchar
* empathy_chat_dup_text (EmpathyChat
*self
);
100 void empathy_chat_set_text (EmpathyChat
*self
,
102 void empathy_chat_insert_smiley (GtkTextBuffer
*buffer
,
103 EmpathySmiley
*smiley
);
107 #endif /* __EMPATHY_CHAT_H__ */