blob: 33e5b6a2d131864a11e9974e1206581946102f5f [file] [log] [blame]
Stepan Salenikovichd2cad062016-01-08 13:43:49 -05001/*
Guillaume Roguez77c579d2018-01-30 15:54:02 -05002 * Copyright (C) 2016-2018 Savoir-faire Linux Inc.
Stepan Salenikovichd2cad062016-01-08 13:43:49 -05003 * Author: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
Sébastien Blin55bff9d2017-10-03 15:15:23 -04004 * Author: Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
5 * Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
Stepan Salenikovichd2cad062016-01-08 13:43:49 -05006 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21
aviau039001d2016-09-29 16:39:05 -040022#pragma once
Stepan Salenikovichd2cad062016-01-08 13:43:49 -050023
Sébastien Blin55bff9d2017-10-03 15:15:23 -040024// Gtk
Stepan Salenikovichd2cad062016-01-08 13:43:49 -050025#include <gtk/gtk.h>
Sébastien Blin55bff9d2017-10-03 15:15:23 -040026
27// Client related
28#include "accountcontainer.h"
aviau039001d2016-09-29 16:39:05 -040029#include "webkitchatcontainer.h"
Stepan Salenikovichd2cad062016-01-08 13:43:49 -050030
Sébastien Blin55bff9d2017-10-03 15:15:23 -040031namespace lrc
32{
33namespace api
34{
35namespace conversation
36{
37 struct Info;
38}
39}
40}
Stepan Salenikovichd2cad062016-01-08 13:43:49 -050041
42G_BEGIN_DECLS
43
44#define CHAT_VIEW_TYPE (chat_view_get_type ())
45#define CHAT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAT_VIEW_TYPE, ChatView))
46#define CHAT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), CHAT_VIEW_TYPE, ChatViewClass))
47#define IS_CHAT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), CHAT_VIEW_TYPE))
48#define IS_CHAT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), CHAT_VIEW_TYPE))
49
50typedef struct _ChatView ChatView;
51typedef struct _ChatViewClass ChatViewClass;
52
Stepan Salenikovich09e0b782016-09-07 16:28:50 -040053GType chat_view_get_type (void) G_GNUC_CONST;
Sébastien Blin55bff9d2017-10-03 15:15:23 -040054GtkWidget *chat_view_new (WebKitChatContainer* view,
55 AccountContainer* accountContainer,
56 lrc::api::conversation::Info* conversation);
57lrc::api::conversation::Info chat_view_get_conversation(ChatView*);
58bool chat_view_get_temporary(ChatView*);
59void chat_view_update_temporary(ChatView*, bool);
60void chat_view_set_header_visible(ChatView*, gboolean);
Stepan Salenikovichd2cad062016-01-08 13:43:49 -050061
62G_END_DECLS