client.h 2 KB
Newer Older
1
/*
2
 *  Copyright (C) 2015-2019 Savoir-faire Linux Inc.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
 *  Author: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
 *
 *  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.
 */

20 21
#ifndef CLIENT_H_
#define CLIENT_H_
22 23

#include <gtk/gtk.h>
24
#include "config.h"
25

26 27
G_BEGIN_DECLS

28
#define GSETTINGS_SCHEMA JAMI_CLIENT_APP_ID
29

30 31 32 33 34
#define CLIENT_TYPE (client_get_type())
#define CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CLIENT_TYPE, Client))
#define CLIENT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), CLIENT_TYPE, ClientClass))
#define IS_CLIENT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), CLIENT_TYPE))
#define IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), CLIENT_TYPE))
35

36 37
typedef struct _ClientClass   ClientClass;
typedef struct _Client        Client;
38 39

/* Public interface */
40 41 42
GType       client_get_type (void) G_GNUC_CONST;
Client *client_new      (int argc, char *argv[]);
GtkWindow  *client_get_main_window(Client *client);
43

44 45
/**
 * Sets if the client should attempt to restore the main window state (hidden or not) to what it was
46
 * when it was last quit (stored by the "show-main-window" gsetting). This function must be
47 48
 * called before the main window is created for the first time for it to have an effect.
 */
49
void        client_set_restore_main_window_state(Client *client, gboolean restore);
50

51
G_END_DECLS
52

53
#endif /* CLIENT_H_ */