dh-notebook.h 2.02 KB
Newer Older
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
2
/* SPDX-FileCopyrightText: 2018 Sébastien Wilmet <swilmet@gnome.org>
3
 * SPDX-License-Identifier: GPL-3.0-or-later
4 5
 */

6 7
#ifndef DH_NOTEBOOK_H
#define DH_NOTEBOOK_H
8 9

#include <gtk/gtk.h>
10 11 12
#include <devhelp/dh-profile.h>
#include <devhelp/dh-tab.h>
#include <devhelp/dh-web-view.h>
13 14 15 16

G_BEGIN_DECLS

#define DH_TYPE_NOTEBOOK             (dh_notebook_get_type ())
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
#define DH_NOTEBOOK(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), DH_TYPE_NOTEBOOK, DhNotebook))
#define DH_NOTEBOOK_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), DH_TYPE_NOTEBOOK, DhNotebookClass))
#define DH_IS_NOTEBOOK(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DH_TYPE_NOTEBOOK))
#define DH_IS_NOTEBOOK_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), DH_TYPE_NOTEBOOK))
#define DH_NOTEBOOK_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), DH_TYPE_NOTEBOOK, DhNotebookClass))

typedef struct _DhNotebook         DhNotebook;
typedef struct _DhNotebookClass    DhNotebookClass;
typedef struct _DhNotebookPrivate  DhNotebookPrivate;

struct _DhNotebook {
        GtkNotebook parent;

        DhNotebookPrivate *priv;
};
32 33 34 35 36 37 38 39

struct _DhNotebookClass {
        GtkNotebookClass parent_class;

        /* Padding for future expansion */
        gpointer padding[12];
};

40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
GType           dh_notebook_get_type                    (void);

DhNotebook *    dh_notebook_new                         (DhProfile *profile);

DhProfile *     dh_notebook_get_profile                 (DhNotebook *notebook);

void            dh_notebook_open_new_tab                (DhNotebook  *notebook,
                                                         const gchar *uri,
                                                         gboolean     switch_focus);

DhTab *         dh_notebook_get_active_tab              (DhNotebook *notebook);

DhWebView *     dh_notebook_get_active_web_view         (DhNotebook *notebook);

GList *         dh_notebook_get_all_web_views           (DhNotebook *notebook);
55

56 57
G_END_DECLS

58
#endif /* DH_NOTEBOOK_H */