chatview.h 2.36 KB
Newer Older
1
/*
2
 *  Copyright (C) 2016-2019 Savoir-faire Linux Inc.
3
 *  Author: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
4 5
 *  Author: Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
 *  Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
6
 *  Author: Hugo Lefeuvre <hugo.lefeuvre@savoirfairelinux.com>
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
 */

aviau's avatar
aviau committed
23
#pragma once
24

25
// Gtk
26
#include <gtk/gtk.h>
27 28

// Client related
29
#include "api/account.h"
aviau's avatar
aviau committed
30
#include "webkitchatcontainer.h"
31
#include "accountinfopointer.h"
32

33 34 35 36
namespace lrc
{
namespace api
{
37
class AVModel;
38 39 40 41 42 43
namespace conversation
{
    struct Info;
}
}
}
44 45 46 47 48 49 50 51 52 53 54 55

G_BEGIN_DECLS

#define CHAT_VIEW_TYPE            (chat_view_get_type ())
#define CHAT_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAT_VIEW_TYPE, ChatView))
#define CHAT_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), CHAT_VIEW_TYPE, ChatViewClass))
#define IS_CHAT_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), CHAT_VIEW_TYPE))
#define IS_CHAT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), CHAT_VIEW_TYPE))

typedef struct _ChatView      ChatView;
typedef struct _ChatViewClass ChatViewClass;

56
GType          chat_view_get_type   (void) G_GNUC_CONST;
57
GtkWidget     *chat_view_new        (WebKitChatContainer* view,
58
                                     AccountInfoPointer const & accountInfo,
59 60
                                     lrc::api::conversation::Info* conversation,
                                     lrc::api::AVModel& avModel);
61
lrc::api::conversation::Info chat_view_get_conversation(ChatView*);
62
void chat_view_update_temporary(ChatView*);
63
void chat_view_set_header_visible(ChatView*, gboolean);
64
void chat_view_set_record_visible(ChatView*, gboolean);
65 66

G_END_DECLS