Initial commit.
[gnt.git] / gntline.h
blobfaf8e2c8a7f8c672aac000154d14c1a4c17480d7
1 /**
2 * @file gntline.h Line API
3 * @ingroup gnt
4 */
5 /*
6 * GNT - The GLib Ncurses Toolkit
8 * GNT is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
12 * This library is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
27 #ifndef GNT_LINE_H
28 #define GNT_LINE_H
30 #include "gntwidget.h"
31 #include "gnt.h"
32 #include "gntcolors.h"
33 #include "gntkeys.h"
35 #define GNT_TYPE_LINE (gnt_line_get_gtype())
36 #define GNT_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_LINE, GntLine))
37 #define GNT_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_LINE, GntLineClass))
38 #define GNT_IS_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_LINE))
39 #define GNT_IS_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_LINE))
40 #define GNT_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_LINE, GntLineClass))
42 #define GNT_LINE_FLAGS(obj) (GNT_LINE(obj)->priv.flags)
43 #define GNT_LINE_SET_FLAGS(obj, flags) (GNT_LINE_FLAGS(obj) |= flags)
44 #define GNT_LINE_UNSET_FLAGS(obj, flags) (GNT_LINE_FLAGS(obj) &= ~(flags))
46 typedef struct _GntLine GntLine;
47 typedef struct _GntLinePriv GntLinePriv;
48 typedef struct _GntLineClass GntLineClass;
50 struct _GntLine
52 GntWidget parent;
54 gboolean vertical;
57 struct _GntLineClass
59 GntWidgetClass parent;
61 void (*gnt_reserved1)(void);
62 void (*gnt_reserved2)(void);
63 void (*gnt_reserved3)(void);
64 void (*gnt_reserved4)(void);
67 G_BEGIN_DECLS
69 /**
70 * @return GType for GntLine.
72 GType gnt_line_get_gtype(void);
74 #define gnt_hline_new() gnt_line_new(FALSE)
75 #define gnt_vline_new() gnt_line_new(TRUE)
77 /**
78 * Create new line
80 * @param vertical @c TRUE if the line should be vertical, @c FALSE for a horizontal line.
82 * @return The newly created line.
84 GntWidget * gnt_line_new(gboolean vertical);
86 G_END_DECLS
88 #endif /* GNT_LINE_H */