]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-chat-text-view.h
Move should_create_salut_account to local-xmpp-assistant-widget
[empathy.git] / libempathy-gtk / empathy-chat-text-view.h
index 2e8bee48ddff62cce1be796433c94755d7964369..ce83fd2fa8ab8a4ac8549e0d78f9b61a28192ec0 100644 (file)
@@ -15,9 +15,9 @@
  *
  * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- * 
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA  02110-1301  USA
+ *
  * Authors: Mikael Hallendal <micke@imendio.com>
  *          Richard Hult <richard@imendio.com>
  *          Martyn Russell <martyn@imendio.com>
@@ -27,7 +27,7 @@
 #ifndef __EMPATHY_CHAT_TEXT_VIEW_H__
 #define __EMPATHY_CHAT_TEXT_VIEW_H__
 
-#include <gtk/gtktextview.h>
+#include <gtk/gtk.h>
 
 #include <libempathy/empathy-contact.h>
 #include <libempathy/empathy-message.h>
@@ -38,16 +38,14 @@ G_BEGIN_DECLS
 
 #define EMPATHY_TYPE_CHAT_TEXT_VIEW         (empathy_chat_text_view_get_type ())
 #define EMPATHY_CHAT_TEXT_VIEW(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CHAT_TEXT_VIEW, EmpathyChatTextView))
-#define EMPATHY_CHAT_TEXT_VIEW_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_CHAT_TEXT_VIEW, EmpathyChatViewClass))
+#define EMPATHY_CHAT_TEXT_VIEW_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_CHAT_TEXT_VIEW, EmpathyChatTextViewClass))
 #define EMPATHY_IS_CHAT_TEXT_VIEW(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CHAT_TEXT_VIEW))
 #define EMPATHY_IS_CHAT_TEXT_VIEW_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CHAT_TEXT_VIEW))
-#define EMPATHY_CHAT_TEXT_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CHAT_TEXT_VIEW, EmpathyChatViewClass))
+#define EMPATHY_CHAT_TEXT_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CHAT_TEXT_VIEW, EmpathyChatTextViewClass))
 
 typedef struct _EmpathyChatTextView      EmpathyChatTextView;
 typedef struct _EmpathyChatTextViewClass EmpathyChatTextViewClass;
 
-#include "empathy-theme.h"
-
 struct _EmpathyChatTextView {
        GtkTextView parent;
        gpointer priv;
@@ -55,10 +53,35 @@ struct _EmpathyChatTextView {
 
 struct _EmpathyChatTextViewClass {
        GtkTextViewClass parent_class;
+
+       /* <vtable> */
+       void (*append_message) (EmpathyChatTextView *view,
+                               EmpathyMessage      *message,
+                               gboolean             should_highlight);
 };
 
-GType                empathy_chat_text_view_get_type (void) G_GNUC_CONST;
-EmpathyChatTextView *empathy_chat_text_view_new      (void);
+#define EMPATHY_CHAT_TEXT_VIEW_TAG_CUT "cut"
+#define EMPATHY_CHAT_TEXT_VIEW_TAG_HIGHLIGHT "highlight"
+#define EMPATHY_CHAT_TEXT_VIEW_TAG_SPACING "spacing"
+#define EMPATHY_CHAT_TEXT_VIEW_TAG_TIME "time"
+#define EMPATHY_CHAT_TEXT_VIEW_TAG_ACTION "action"
+#define EMPATHY_CHAT_TEXT_VIEW_TAG_BODY "body"
+#define EMPATHY_CHAT_TEXT_VIEW_TAG_EVENT "event"
+#define EMPATHY_CHAT_TEXT_VIEW_TAG_LINK "link"
+
+GType                empathy_chat_text_view_get_type           (void) G_GNUC_CONST;
+EmpathyContact *     empathy_chat_text_view_get_last_contact   (EmpathyChatTextView *view);
+gint64               empathy_chat_text_view_get_last_timestamp (EmpathyChatTextView *view);
+void                 empathy_chat_text_view_set_only_if_date   (EmpathyChatTextView *view,
+                                                               gboolean             only_if_date);
+void                 empathy_chat_text_view_append_body        (EmpathyChatTextView *view,
+                                                               const gchar         *body,
+                                                               const gchar         *tag);
+void                 empathy_chat_text_view_append_spacing     (EmpathyChatTextView *view);
+GtkTextTag *         empathy_chat_text_view_tag_set            (EmpathyChatTextView *view,
+                                                               const gchar         *tag_name,
+                                                               const gchar         *first_property_name,
+                                                               ...);
 
 G_END_DECLS