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 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., 59 Temple Place - Suite 330,
19
* Boston, MA 02111-1307, 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 __GOSSIP_CHAT_H__
29
#define __GOSSIP_CHAT_H__
31
#include <glib-object.h>
33
#include <libempathy/gossip-contact.h>
34
#include <libempathy/gossip-message.h>
35
#include <libempathy/empathy-tp-chat.h>
37
#include "gossip-chat-view.h"
38
#include "gossip-spell.h"
42
#define GOSSIP_TYPE_CHAT (gossip_chat_get_type ())
43
#define GOSSIP_CHAT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_CHAT, GossipChat))
44
#define GOSSIP_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOSSIP_TYPE_CHAT, GossipChatClass))
45
#define GOSSIP_IS_CHAT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_CHAT))
46
#define GOSSIP_IS_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_CHAT))
47
#define GOSSIP_CHAT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_CHAT, GossipChatClass))
49
typedef struct _GossipChat GossipChat;
50
typedef struct _GossipChatClass GossipChatClass;
51
typedef struct _GossipChatPriv GossipChatPriv;
53
#include "gossip-chat-window.h"
60
GtkWidget *input_text_view;
61
gboolean is_first_char;
65
struct _GossipChatClass {
69
const gchar * (*get_name) (GossipChat *chat);
70
gchar * (*get_tooltip) (GossipChat *chat);
71
const gchar * (*get_status_icon_name)(GossipChat *chat);
72
GtkWidget * (*get_widget) (GossipChat *chat);
73
gboolean (*is_group_chat) (GossipChat *chat);
76
GType gossip_chat_get_type (void);
78
GossipChatView * gossip_chat_get_view (GossipChat *chat);
79
GossipChatWindow *gossip_chat_get_window (GossipChat *chat);
80
void gossip_chat_set_window (GossipChat *chat,
81
GossipChatWindow *window);
82
void gossip_chat_present (GossipChat *chat);
83
void gossip_chat_clear (GossipChat *chat);
84
void gossip_chat_scroll_down (GossipChat *chat);
85
void gossip_chat_cut (GossipChat *chat);
86
void gossip_chat_copy (GossipChat *chat);
87
void gossip_chat_paste (GossipChat *chat);
88
const gchar * gossip_chat_get_name (GossipChat *chat);
89
gchar * gossip_chat_get_tooltip (GossipChat *chat);
90
const gchar * gossip_chat_get_status_icon_name (GossipChat *chat);
91
GtkWidget * gossip_chat_get_widget (GossipChat *chat);
92
gboolean gossip_chat_is_group_chat (GossipChat *chat);
93
gboolean gossip_chat_is_connected (GossipChat *chat);
95
void gossip_chat_save_geometry (GossipChat *chat,
100
void gossip_chat_load_geometry (GossipChat *chat,
105
void gossip_chat_set_tp_chat (GossipChat *chat,
106
EmpathyTpChat *tp_chat);
107
const gchar * gossip_chat_get_id (GossipChat *chat);
109
/* For spell checker dialog to correct the misspelled word. */
110
gboolean gossip_chat_get_is_command (const gchar *str);
111
void gossip_chat_correct_word (GossipChat *chat,
114
const gchar *new_word);
115
gboolean gossip_chat_should_play_sound (GossipChat *chat);
116
gboolean gossip_chat_should_highlight_nick (GossipMessage *message);
120
#endif /* __GOSSIP_CHAT_H__ */