gdl-dock-layout.h 3.82 KB
Newer Older
1 2 3 4 5 6
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 *
 * This file is part of the GNOME Devtools Libraries.
 *
 * Copyright (C) 2002 Gustavo Girldez <gustavo.giraldez@gmx.net>
 *
7 8 9 10
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
11
 *
12
 * This library is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
16
 *
17 18 19
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20 21
 */

22 23 24 25

#ifndef __GDL_DOCK_LAYOUT_H__
#define __GDL_DOCK_LAYOUT_H__

26 27
#include <glib-object.h>
#include <gdl/gdl-dock-master.h>
28 29
#include <gdl/gdl-dock.h>

30
G_BEGIN_DECLS
31

32
/* standard macros */
33
#define	GDL_TYPE_DOCK_LAYOUT		  (gdl_dock_layout_get_type ())
34 35 36 37 38
#define GDL_DOCK_LAYOUT(object)		  (G_TYPE_CHECK_INSTANCE_CAST ((object), GDL_TYPE_DOCK_LAYOUT, GdlDockLayout))
#define GDL_DOCK_LAYOUT_CLASS(klass)	  (G_TYPE_CHECK_CLASS_CAST ((klass), GDL_TYPE_DOCK_LAYOUT, GdlDockLayoutClass))
#define GDL_IS_DOCK_LAYOUT(object)	  (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDL_TYPE_DOCK_LAYOUT))
#define GDL_IS_DOCK_LAYOUT_CLASS(klass)	  (G_TYPE_CHECK_CLASS_TYPE ((klass), GDL_TYPE_DOCK_LAYOUT))
#define	GDL_DOCK_LAYOUT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GDL_TYPE_DOCK_LAYOUT, GdlDockLayoutClass))
39

40
/* data types & structures */
41
typedef struct _GdlDockLayout GdlDockLayout;
42
typedef struct _GdlDockLayoutPrivate GdlDockLayoutPrivate;
43
typedef struct _GdlDockLayoutClass GdlDockLayoutClass;
44

45 46 47 48 49 50
/**
 * GdlDockLayout:
 *
 * The GdlDockLayout struct contains only private fields
 * and should not be directly accessed.
 */
51
struct _GdlDockLayout {
52
    GObject               g_object;
53

54
    /*< private >*/
55
#ifndef GDL_DISABLE_DEPRECATED
56 57
    gboolean              deprecated_dirty;
    GdlDockMaster        *deprecated_master;
58
#endif
59
    GdlDockLayoutPrivate *priv;
60 61 62 63 64 65 66
};

struct _GdlDockLayoutClass {
    GObjectClass  g_object_class;
};


67
/* public interface */
68

69 70
GType            gdl_dock_layout_get_type       (void);

71
GdlDockLayout   *gdl_dock_layout_new            (GObject       *master);
72

73 74 75
void             gdl_dock_layout_set_master     (GdlDockLayout *layout,
                                                 GObject       *master);
GObject         *gdl_dock_layout_get_master     (GdlDockLayout *layout);
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96

gboolean         gdl_dock_layout_load_layout    (GdlDockLayout *layout,
                                                 const gchar   *name);

void             gdl_dock_layout_save_layout    (GdlDockLayout *layout,
                                                 const gchar   *name);

void             gdl_dock_layout_delete_layout  (GdlDockLayout *layout,
                                                 const gchar   *name);

GList           *gdl_dock_layout_get_layouts    (GdlDockLayout *layout,
                                                 gboolean       include_default);

gboolean         gdl_dock_layout_load_from_file (GdlDockLayout *layout,
                                                 const gchar   *filename);

gboolean         gdl_dock_layout_save_to_file   (GdlDockLayout *layout,
                                                 const gchar   *filename);

gboolean         gdl_dock_layout_is_dirty       (GdlDockLayout *layout);

97 98 99 100
#ifndef GDL_DISABLE_DEPRECATED
void             gdl_dock_layout_attach         (GdlDockLayout *layout,
                                                 GdlDockMaster *master);
#endif
101 102 103

G_END_DECLS

104 105 106
#endif