blob: ad1e317e03a60fcba252317c915a3021b5c3a64d [file] [log] [blame]
aviau039001d2016-09-29 16:39:05 -04001/*
2 * Copyright (C) 2016 Savoir-faire Linux Inc.
3 * Author: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (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
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20#pragma once
21
22#include <gtk/gtk.h>
23
24class QModelIndex;
25class QString;
26class QVariant;
27
28G_BEGIN_DECLS
29
30#define WEBKIT_CHAT_CONTAINER_TYPE (webkit_chat_container_get_type ())
31#define WEBKIT_CHAT_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WEBKIT_CHAT_CONTAINER_TYPE, WebKitChatContainer))
32#define WEBKIT_CHAT_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_CHAT_CONTAINER_TYPE, WebKitChatContainerClass))
33#define IS_WEBKIT_CHAT_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_CHAT_CONTAINER_TYPE))
34#define IS_WEBKIT_CHAT_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_CHAT_CONTAINER_TYPE))
35
36typedef struct _WebKitChatContainer WebKitChatContainer;
37typedef struct _WebKitChatContainerClass WebKitChatContainerClass;
38
39GType webkit_chat_container_get_type (void) G_GNUC_CONST;
40GtkWidget* webkit_chat_container_new (void);
41void webkit_chat_container_clear (WebKitChatContainer *view);
42void webkit_chat_container_print_new_message (WebKitChatContainer *view, const QModelIndex &idx);
43void webkit_chat_container_update_message (WebKitChatContainer *view, const QModelIndex &idx);
44void webkit_chat_container_set_sender_image (WebKitChatContainer *view, QString sender_name, QVariant sender_image);
45gboolean webkit_chat_container_is_ready (WebKitChatContainer *view);
46
47G_END_DECLS