~bcurtiswx/ubuntu/precise/empathy/3.4.2.1-0ubuntu1

« back to all changes in this revision

Viewing changes to libempathy-gtk/gossip-chat.h

  • Committer: Bazaar Package Importer
  • Author(s): Sjoerd Simons
  • Date: 2007-05-20 15:31:42 UTC
  • Revision ID: james.westby@ubuntu.com-20070520153142-r3auwguxdgxhktqb
Tags: upstream-0.4
ImportĀ upstreamĀ versionĀ 0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 
2
/*
 
3
 * Copyright (C) 2002-2007 Imendio AB
 
4
 * Copyright (C) 2007 Collabora Ltd.
 
5
 *
 
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.
 
10
 *
 
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.
 
15
 *
 
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.
 
20
 *
 
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>
 
26
 */
 
27
 
 
28
#ifndef __GOSSIP_CHAT_H__
 
29
#define __GOSSIP_CHAT_H__
 
30
 
 
31
#include <glib-object.h>
 
32
 
 
33
#include <libempathy/gossip-contact.h>
 
34
#include <libempathy/gossip-message.h>
 
35
#include <libempathy/empathy-tp-chat.h>
 
36
 
 
37
#include "gossip-chat-view.h"
 
38
#include "gossip-spell.h" 
 
39
 
 
40
G_BEGIN_DECLS
 
41
 
 
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))
 
48
 
 
49
typedef struct _GossipChat       GossipChat;
 
50
typedef struct _GossipChatClass  GossipChatClass;
 
51
typedef struct _GossipChatPriv   GossipChatPriv;
 
52
 
 
53
#include "gossip-chat-window.h"
 
54
 
 
55
struct _GossipChat {
 
56
        GObject          parent;
 
57
 
 
58
        /* Protected */
 
59
        GossipChatView  *view;
 
60
        GtkWidget       *input_text_view;
 
61
        gboolean         is_first_char;
 
62
        McAccount       *account;
 
63
};
 
64
 
 
65
struct _GossipChatClass {
 
66
        GObjectClass parent;
 
67
 
 
68
        /* VTable */
 
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);
 
74
};
 
75
 
 
76
GType             gossip_chat_get_type              (void);
 
77
 
 
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);
 
94
 
 
95
void              gossip_chat_save_geometry         (GossipChat       *chat,
 
96
                                                     gint              x,
 
97
                                                     gint              y,
 
98
                                                     gint              w,
 
99
                                                     gint              h);
 
100
void              gossip_chat_load_geometry         (GossipChat       *chat,
 
101
                                                     gint             *x,
 
102
                                                     gint             *y,
 
103
                                                     gint             *w,
 
104
                                                     gint             *h);
 
105
void              gossip_chat_set_tp_chat           (GossipChat       *chat,
 
106
                                                     EmpathyTpChat    *tp_chat);
 
107
const gchar *     gossip_chat_get_id                (GossipChat       *chat);
 
108
 
 
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,
 
112
                                                     GtkTextIter       start,
 
113
                                                     GtkTextIter       end,
 
114
                                                     const gchar      *new_word);
 
115
gboolean          gossip_chat_should_play_sound     (GossipChat       *chat);
 
116
gboolean          gossip_chat_should_highlight_nick (GossipMessage    *message);
 
117
 
 
118
G_END_DECLS
 
119
 
 
120
#endif /* __GOSSIP_CHAT_H__ */