File: gdl-dock.h

package info (click to toggle)
screem 0.16.1-4.2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 17,132 kB
  • ctags: 5,870
  • sloc: ansic: 76,256; sh: 8,628; xml: 2,900; makefile: 907
file content (100 lines) | stat: -rw-r--r-- 3,633 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/* -*- 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 Giráldez <gustavo.giraldez@gmx.net>
 *
 * 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 2 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., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.  
 */

#ifndef __GDL_DOCK_H__
#define __GDL_DOCK_H__

#include <gtk/gtk.h>
#include <gdl/gdl-dock-object.h>
#include <gdl/gdl-dock-item.h>
#include <gdl/gdl-dock-placeholder.h>

G_BEGIN_DECLS

/* standard macros */
#define GDL_TYPE_DOCK            (gdl_dock_get_type ())
#define GDL_DOCK(obj)            (GTK_CHECK_CAST ((obj), GDL_TYPE_DOCK, GdlDock))
#define GDL_DOCK_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GDL_TYPE_DOCK, GdlDockClass))
#define GDL_IS_DOCK(obj)         (GTK_CHECK_TYPE ((obj), GDL_TYPE_DOCK))
#define GDL_IS_DOCK_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GDL_TYPE_DOCK))
#define GDL_DOCK_GET_CLASS(obj)  (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_DOCK, GdlDockClass))

/* data types & structures */
typedef struct _GdlDock        GdlDock;
typedef struct _GdlDockClass   GdlDockClass;
typedef struct _GdlDockPrivate GdlDockPrivate;

struct _GdlDock {
    GdlDockObject    object;

    GdlDockObject   *root;

    GdlDockPrivate  *_priv;
};

struct _GdlDockClass {
    GdlDockObjectClass parent_class;

    void  (* layout_changed)  (GdlDock *dock);    /* proxy signal for the master */
};

/* additional macros */
#define GDL_DOCK_IS_CONTROLLER(dock)  \
    (gdl_dock_master_get_controller (GDL_DOCK_OBJECT_GET_MASTER (dock)) == \
     GDL_DOCK_OBJECT (dock))

/* public interface */
 
GtkWidget     *gdl_dock_new               (void);

GtkWidget     *gdl_dock_new_from          (GdlDock          *original,
                                           gboolean          floating);

GType          gdl_dock_get_type          (void);

void           gdl_dock_add_item          (GdlDock          *dock,
                                           GdlDockItem      *item,
                                           GdlDockPlacement  place);

void           gdl_dock_add_floating_item (GdlDock        *dock,
                                           GdlDockItem    *item,
                                           gint            x,
                                           gint            y,
                                           gint            width,
                                           gint            height);

GdlDockItem   *gdl_dock_get_item_by_name  (GdlDock     *dock,
                                           const gchar *name);

GdlDockPlaceholder *gdl_dock_get_placeholder_by_name (GdlDock     *dock,
                                                      const gchar *name);

GList         *gdl_dock_get_named_items   (GdlDock    *dock);

GdlDock       *gdl_dock_object_get_toplevel (GdlDockObject *object);

void           gdl_dock_xor_rect            (GdlDock       *dock,
                                             GdkRectangle  *rect);

G_END_DECLS

#endif