2
libparted - a library for manipulating disk partitions
3
Copyright (C) 1998-2000, 2007, 2009-2012 Free Software Foundation, Inc.
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 3 of the License, or
8
(at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program. If not, see <http://www.gnu.org/licenses/>.
19
#ifndef PED_CONSTRAINT_H_INCLUDED
20
#define PED_CONSTRAINT_H_INCLUDED
22
typedef struct _PedConstraint PedConstraint;
24
#include <parted/device.h>
25
#include <parted/geom.h>
26
#include <parted/natmath.h>
28
struct _PedConstraint {
29
PedAlignment* start_align;
30
PedAlignment* end_align;
31
PedGeometry* start_range;
32
PedGeometry* end_range;
39
PedConstraint* constraint,
40
const PedAlignment* start_align,
41
const PedAlignment* end_align,
42
const PedGeometry* start_range,
43
const PedGeometry* end_range,
49
const PedAlignment* start_align,
50
const PedAlignment* end_align,
51
const PedGeometry* start_range,
52
const PedGeometry* end_range,
57
ped_constraint_new_from_min_max (
58
const PedGeometry* min,
59
const PedGeometry* max);
62
ped_constraint_new_from_min (const PedGeometry* min);
65
ped_constraint_new_from_max (const PedGeometry* max);
68
ped_constraint_duplicate (const PedConstraint* constraint);
71
ped_constraint_done (PedConstraint* constraint);
74
ped_constraint_destroy (PedConstraint* constraint);
77
ped_constraint_intersect (const PedConstraint* a, const PedConstraint* b);
80
ped_constraint_solve_max (const PedConstraint* constraint);
83
ped_constraint_solve_nearest (
84
const PedConstraint* constraint, const PedGeometry* geom);
87
ped_constraint_is_solution (const PedConstraint* constraint,
88
const PedGeometry* geom)
89
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
90
__attribute ((__pure__))
95
ped_constraint_any (const PedDevice* dev);
98
ped_constraint_exact (const PedGeometry* geom);
100
#endif /* PED_CONSTRAINT_H_INCLUDED */