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

« back to all changes in this revision

Viewing changes to libempathy-gtk/gossip-chat-view.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
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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.
 
19
 * 
 
20
 * Authors: Mikael Hallendal <micke@imendio.com>
 
21
 *          Richard Hult <richard@imendio.com>
 
22
 *          Martyn Russell <martyn@imendio.com>
 
23
 */
 
24
 
 
25
#ifndef __GOSSIP_CHAT_VIEW_H__
 
26
#define __GOSSIP_CHAT_VIEW_H__
 
27
 
 
28
#include <gtk/gtktextview.h>
 
29
#include <gtk/gtktooltips.h>
 
30
 
 
31
#include <libempathy/gossip-contact.h>
 
32
#include <libempathy/gossip-message.h>
 
33
 
 
34
G_BEGIN_DECLS
 
35
 
 
36
#define GOSSIP_TYPE_CHAT_VIEW         (gossip_chat_view_get_type ())
 
37
#define GOSSIP_CHAT_VIEW(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_CHAT_VIEW, GossipChatView))
 
38
#define GOSSIP_CHAT_VIEW_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GOSSIP_TYPE_CHAT_VIEW, GossipChatViewClass))
 
39
#define GOSSIP_IS_CHAT_VIEW(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_CHAT_VIEW))
 
40
#define GOSSIP_IS_CHAT_VIEW_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_CHAT_VIEW))
 
41
#define GOSSIP_CHAT_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_CHAT_VIEW, GossipChatViewClass))
 
42
 
 
43
typedef struct _GossipChatView      GossipChatView;
 
44
typedef struct _GossipChatViewClass GossipChatViewClass;
 
45
typedef struct _GossipChatViewPriv  GossipChatViewPriv;
 
46
 
 
47
struct _GossipChatView {
 
48
        GtkTextView parent;
 
49
};
 
50
 
 
51
struct _GossipChatViewClass {
 
52
        GtkTextViewClass parent_class;
 
53
};
 
54
 
 
55
typedef enum {
 
56
        GOSSIP_SMILEY_NORMAL,       /*  :)   */
 
57
        GOSSIP_SMILEY_WINK,         /*  ;)   */
 
58
        GOSSIP_SMILEY_BIGEYE,       /*  =)   */
 
59
        GOSSIP_SMILEY_NOSE,         /*  :-)  */
 
60
        GOSSIP_SMILEY_CRY,          /*  :'(  */
 
61
        GOSSIP_SMILEY_SAD,          /*  :(   */
 
62
        GOSSIP_SMILEY_SCEPTICAL,    /*  :/   */
 
63
        GOSSIP_SMILEY_BIGSMILE,     /*  :D   */
 
64
        GOSSIP_SMILEY_INDIFFERENT,  /*  :|   */
 
65
        GOSSIP_SMILEY_TOUNGE,       /*  :p   */
 
66
        GOSSIP_SMILEY_SHOCKED,      /*  :o   */
 
67
        GOSSIP_SMILEY_COOL,         /*  8)   */
 
68
        GOSSIP_SMILEY_SORRY,        /*  *|   */
 
69
        GOSSIP_SMILEY_KISS,         /*  :*   */
 
70
        GOSSIP_SMILEY_SHUTUP,       /*  :#   */
 
71
        GOSSIP_SMILEY_YAWN,         /*  |O   */
 
72
        GOSSIP_SMILEY_CONFUSED,     /*  :$   */
 
73
        GOSSIP_SMILEY_ANGEL,        /*  <)   */
 
74
        GOSSIP_SMILEY_OOOH,         /*  :x   */
 
75
        GOSSIP_SMILEY_LOOKAWAY,     /*  *)   */
 
76
        GOSSIP_SMILEY_BLUSH,        /*  *S   */
 
77
        GOSSIP_SMILEY_COOLBIGSMILE, /*  8D   */
 
78
        GOSSIP_SMILEY_ANGRY,        /*  :@   */
 
79
        GOSSIP_SMILEY_BOSS,         /*  @)   */
 
80
        GOSSIP_SMILEY_MONKEY,       /*  #)   */
 
81
        GOSSIP_SMILEY_SILLY,        /*  O)   */
 
82
        GOSSIP_SMILEY_SICK,         /*  +o(  */
 
83
 
 
84
        GOSSIP_SMILEY_COUNT
 
85
} GossipSmiley;
 
86
 
 
87
GType           gossip_chat_view_get_type                  (void) G_GNUC_CONST;
 
88
GossipChatView *gossip_chat_view_new                       (void);
 
89
void            gossip_chat_view_append_message            (GossipChatView *view,
 
90
                                                            GossipMessage  *msg);
 
91
void            gossip_chat_view_append_event              (GossipChatView *view,
 
92
                                                            const gchar    *str);
 
93
void            gossip_chat_view_append_button             (GossipChatView *view,
 
94
                                                            const gchar    *message,
 
95
                                                            GtkWidget      *button1,
 
96
                                                            GtkWidget      *button2);
 
97
void            gossip_chat_view_set_margin                (GossipChatView *view,
 
98
                                                            gint            margin);
 
99
void            gossip_chat_view_scroll                    (GossipChatView *view,
 
100
                                                            gboolean        allow_scrolling);
 
101
void            gossip_chat_view_scroll_down               (GossipChatView *view);
 
102
gboolean        gossip_chat_view_get_selection_bounds      (GossipChatView *view,
 
103
                                                            GtkTextIter    *start,
 
104
                                                            GtkTextIter    *end);
 
105
void            gossip_chat_view_clear                     (GossipChatView *view);
 
106
gboolean        gossip_chat_view_find_previous             (GossipChatView *view,
 
107
                                                            const gchar    *search_criteria,
 
108
                                                            gboolean        new_search);
 
109
gboolean        gossip_chat_view_find_next                 (GossipChatView *view,
 
110
                                                            const gchar    *search_criteria,
 
111
                                                            gboolean        new_search);
 
112
void            gossip_chat_view_find_abilities            (GossipChatView *view,
 
113
                                                            const gchar    *search_criteria,
 
114
                                                            gboolean       *can_do_previous,
 
115
                                                            gboolean       *can_do_next);
 
116
void            gossip_chat_view_highlight                 (GossipChatView *view,
 
117
                                                            const gchar    *text);
 
118
void            gossip_chat_view_copy_clipboard            (GossipChatView *view);
 
119
gboolean        gossip_chat_view_get_irc_style             (GossipChatView *view);
 
120
void            gossip_chat_view_set_irc_style             (GossipChatView *view,
 
121
                                                            gboolean        irc_style);
 
122
void            gossip_chat_view_set_margin                (GossipChatView *view,
 
123
                                                            gint            margin);
 
124
GdkPixbuf *     gossip_chat_view_get_smiley_image          (GossipSmiley    smiley);
 
125
const gchar *   gossip_chat_view_get_smiley_text           (GossipSmiley    smiley);
 
126
GtkWidget *     gossip_chat_view_get_smiley_menu           (GCallback       callback,
 
127
                                                            gpointer        user_data,
 
128
                                                            GtkTooltips    *tooltips);
 
129
void            gossip_chat_view_set_is_group_chat         (GossipChatView *view,
 
130
                                                            gboolean        is_group_chat);
 
131
 
 
132
G_END_DECLS
 
133
 
 
134
#endif /* __GOSSIP_CHAT_VIEW_H__ */