blob: c4ba26b434d83ee12607b21ab2e6d0a51b166f74 [file] [log] [blame]
aviau039001d2016-09-29 16:39:05 -04001/*
Guillaume Roguez77c579d2018-01-30 15:54:02 -05002 * Copyright (C) 2016-2018 Savoir-faire Linux Inc.
aviau039001d2016-09-29 16:39:05 -04003 * Author: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
Sébastien Blin55bff9d2017-10-03 15:15:23 -04004 * Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
aviau039001d2016-09-29 16:39:05 -04005 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (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
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#pragma once
22
Sébastien Blin55bff9d2017-10-03 15:15:23 -040023// Gtk
aviau039001d2016-09-29 16:39:05 -040024#include <gtk/gtk.h>
25
Sébastien Blin55bff9d2017-10-03 15:15:23 -040026// LRC
27#include <api/interaction.h>
aviau039001d2016-09-29 16:39:05 -040028
29G_BEGIN_DECLS
30
31#define WEBKIT_CHAT_CONTAINER_TYPE (webkit_chat_container_get_type ())
32#define WEBKIT_CHAT_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WEBKIT_CHAT_CONTAINER_TYPE, WebKitChatContainer))
33#define WEBKIT_CHAT_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_CHAT_CONTAINER_TYPE, WebKitChatContainerClass))
34#define IS_WEBKIT_CHAT_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_CHAT_CONTAINER_TYPE))
35#define IS_WEBKIT_CHAT_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_CHAT_CONTAINER_TYPE))
36
37typedef struct _WebKitChatContainer WebKitChatContainer;
38typedef struct _WebKitChatContainerClass WebKitChatContainerClass;
39
Sébastien Blin55bff9d2017-10-03 15:15:23 -040040GType webkit_chat_container_get_type (void) G_GNUC_CONST;
41GtkWidget* webkit_chat_container_new (void);
42void webkit_chat_container_clear (WebKitChatContainer *view);
43void webkit_chat_container_clear_sender_images (WebKitChatContainer *view);
44void webkit_chat_container_print_new_interaction(WebKitChatContainer *view, uint64_t msgId, const lrc::api::interaction::Info& interaction);
45void webkit_chat_container_update_interaction (WebKitChatContainer *view, uint64_t msgId, const lrc::api::interaction::Info& interaction);
46void webkit_chat_container_set_sender_image (WebKitChatContainer *view, const std::string& sender, const std::string& senderImage);
47gboolean webkit_chat_container_is_ready (WebKitChatContainer *view);
48void webkit_chat_container_set_display_links (WebKitChatContainer *view, bool display);
49void webkit_chat_disable_send_interaction (WebKitChatContainer *view, bool isDisabled);
50void webkit_chat_container_set_temporary (WebKitChatContainer *view, bool temporary);
51void webkit_chat_container_set_invitation (WebKitChatContainer *view, bool show, const std::string& contactUri);
aviau039001d2016-09-29 16:39:05 -040052
53G_END_DECLS