Display a context menu when clicking on audio/video icons (#590051)
[empathy-mirror.git] / libempathy-gtk / empathy-chat-text-view.h
blob0180f21d1ddfadd57c8bc17cc0bcf6caa0aa9e33
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) 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 * Xavier Claessens <xclaesse@gmail.com>
27 #ifndef __EMPATHY_CHAT_TEXT_VIEW_H__
28 #define __EMPATHY_CHAT_TEXT_VIEW_H__
30 #include <gtk/gtk.h>
32 #include <libempathy/empathy-contact.h>
33 #include <libempathy/empathy-message.h>
35 #include "empathy-chat-view.h"
37 G_BEGIN_DECLS
39 #define EMPATHY_TYPE_CHAT_TEXT_VIEW (empathy_chat_text_view_get_type ())
40 #define EMPATHY_CHAT_TEXT_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CHAT_TEXT_VIEW, EmpathyChatTextView))
41 #define EMPATHY_CHAT_TEXT_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_CHAT_TEXT_VIEW, EmpathyChatTextViewClass))
42 #define EMPATHY_IS_CHAT_TEXT_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CHAT_TEXT_VIEW))
43 #define EMPATHY_IS_CHAT_TEXT_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CHAT_TEXT_VIEW))
44 #define EMPATHY_CHAT_TEXT_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CHAT_TEXT_VIEW, EmpathyChatTextViewClass))
46 typedef struct _EmpathyChatTextView EmpathyChatTextView;
47 typedef struct _EmpathyChatTextViewClass EmpathyChatTextViewClass;
49 struct _EmpathyChatTextView {
50 GtkTextView parent;
51 gpointer priv;
54 struct _EmpathyChatTextViewClass {
55 GtkTextViewClass parent_class;
57 /* <vtable> */
58 void (*append_message) (EmpathyChatTextView *view,
59 EmpathyMessage *message);
62 #define EMPATHY_CHAT_TEXT_VIEW_TAG_CUT "cut"
63 #define EMPATHY_CHAT_TEXT_VIEW_TAG_HIGHLIGHT "highlight"
64 #define EMPATHY_CHAT_TEXT_VIEW_TAG_SPACING "spacing"
65 #define EMPATHY_CHAT_TEXT_VIEW_TAG_TIME "time"
66 #define EMPATHY_CHAT_TEXT_VIEW_TAG_ACTION "action"
67 #define EMPATHY_CHAT_TEXT_VIEW_TAG_BODY "body"
68 #define EMPATHY_CHAT_TEXT_VIEW_TAG_EVENT "event"
69 #define EMPATHY_CHAT_TEXT_VIEW_TAG_LINK "link"
71 GType empathy_chat_text_view_get_type (void) G_GNUC_CONST;
72 EmpathyContact * empathy_chat_text_view_get_last_contact (EmpathyChatTextView *view);
73 void empathy_chat_text_view_set_only_if_date (EmpathyChatTextView *view,
74 gboolean only_if_date);
75 void empathy_chat_text_view_append_body (EmpathyChatTextView *view,
76 const gchar *body,
77 const gchar *tag);
78 void empathy_chat_text_view_append_spacing (EmpathyChatTextView *view);
79 GtkTextTag * empathy_chat_text_view_tag_set (EmpathyChatTextView *view,
80 const gchar *tag_name,
81 const gchar *first_property_name,
82 ...);
84 G_END_DECLS
86 #endif /* __EMPATHY_CHAT_TEXT_VIEW_H__ */