20#ifndef PED_CONSTRAINT_H_INCLUDED
21#define PED_CONSTRAINT_H_INCLUDED
PedGeometry * ped_constraint_solve_nearest(const PedConstraint *constraint, const PedGeometry *geom)
Return the nearest region to geom that satisfy a constraint.
Definition: constraint.c:411
void ped_constraint_destroy(PedConstraint *constraint)
Release the memory allocated for a PedConstraint constructed with ped_constraint_new().
Definition: constraint.c:278
PedConstraint * ped_constraint_exact(const PedGeometry *geom)
Return a constraint that only the given region will satisfy.
Definition: constraint.c:510
int ped_constraint_init(PedConstraint *constraint, const PedAlignment *start_align, const PedAlignment *end_align, const PedGeometry *start_range, const PedGeometry *end_range, PedSector min_size, PedSector max_size)
Initializes a pre-allocated piece of memory to contain a constraint with the supplied default values.
Definition: constraint.c:59
PedConstraint * ped_constraint_any(const PedDevice *dev)
Return a constraint that any region on the given device will satisfy.
Definition: constraint.c:490
PedConstraint * ped_constraint_new_from_min_max(const PedGeometry *min, const PedGeometry *max)
Return a constraint that requires a region to be entirely contained inside max, and to entirely conta...
Definition: constraint.c:123
PedConstraint * ped_constraint_new_from_max(const PedGeometry *max)
Return a constraint that requires a region to be entirely contained inside max.
Definition: constraint.c:168
PedConstraint * ped_constraint_duplicate(const PedConstraint *constraint)
Duplicate a constraint.
Definition: constraint.c:183
int ped_constraint_is_solution(const PedConstraint *constraint, const PedGeometry *geom) _GL_ATTRIBUTE_PURE
Check whether geom satisfies the given constraint.
Definition: constraint.c:463
void ped_constraint_done(PedConstraint *constraint)
Release the memory allocated for a PedConstraint constructed with ped_constraint_init().
Definition: constraint.c:263
PedConstraint * ped_constraint_intersect(const PedConstraint *a, const PedConstraint *b)
Return a constraint that requires a region to satisfy both a and b.
Definition: constraint.c:206
PedConstraint * ped_constraint_new(const PedAlignment *start_align, const PedAlignment *end_align, const PedGeometry *start_range, const PedGeometry *end_range, PedSector min_size, PedSector max_size)
Convenience wrapper for ped_constraint_init().
Definition: constraint.c:92
PedGeometry * ped_constraint_solve_max(const PedConstraint *constraint)
Find the largest region that satisfies a constraint.
Definition: constraint.c:445
PedConstraint * ped_constraint_new_from_min(const PedGeometry *min)
Return a constraint that requires a region to entirely contain min.
Definition: constraint.c:151
long long PedSector
We can address 2^63 sectors.
Definition: device.h:31
Definition: constraint.h:29
PedSector max_size
Definition: constraint.h:35
PedGeometry * end_range
Definition: constraint.h:33
PedAlignment * start_align
Definition: constraint.h:30
PedGeometry * start_range
Definition: constraint.h:32
PedAlignment * end_align
Definition: constraint.h:31
PedSector min_size
Definition: constraint.h:34
A block device - for example, /dev/hda, not /dev/hda3.
Definition: device.h:74
Geometry of the partition.
Definition: geom.h:35