[AdgTrail] Added localization
[adg.git] / adg / adg-alignment.h
blobc6bbdbd0d47100439e67ff6ac967e1e8168483c8
1 /* ADG - Automatic Drawing Generation
2 * Copyright (C) 2007,2008,2009 Nicola Fontana <ntd at entidi.it>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
21 #ifndef __ADG_ALIGNMENT_H__
22 #define __ADG_ALIGNMENT_H__
24 #include <adg/adg-container.h>
25 #include <adg/adg-pair.h>
28 G_BEGIN_DECLS
30 #define ADG_TYPE_ALIGNMENT (adg_alignment_get_type())
31 #define ADG_ALIGNMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ADG_TYPE_ALIGNMENT, AdgAlignment))
32 #define ADG_ALIGNMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ADG_TYPE_ALIGNMENT, AdgAlignmentClass))
33 #define ADG_IS_ALIGNMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ADG_TYPE_ALIGNMENT))
34 #define ADG_IS_ALIGNMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), ADG_TYPE_ALIGNMENT))
35 #define ADG_ALIGNMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ADG_TYPE_ALIGNMENT, AdgAlignmentClass))
38 typedef struct _AdgAlignment AdgAlignment;
39 typedef struct _AdgAlignmentClass AdgAlignmentClass;
41 struct _AdgAlignment {
42 /*< private >*/
43 AdgContainer parent;
44 gpointer data;
47 struct _AdgAlignmentClass {
48 /*< private >*/
49 AdgContainerClass parent_class;
53 GType adg_alignment_get_type (void) G_GNUC_CONST;
55 AdgAlignment * adg_alignment_new (const AdgPair *factor);
56 AdgAlignment * adg_alignment_new_explicit (gdouble x_factor,
57 gdouble y_factor);
59 void adg_alignment_set_factor (AdgAlignment *alignment,
60 const AdgPair *factor);
61 void adg_alignment_set_factor_explicit
62 (AdgAlignment *alignment,
63 gdouble x_factor,
64 gdouble y_factor);
65 const AdgPair * adg_alignment_get_factor (AdgAlignment *alignment);
67 G_END_DECLS
70 #endif /* __ADG_ALIGNMENT_H__ */