~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/libvpsc/csolve_VPSC.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * \brief Bridge for C programs to access solve_VPSC (which is in C++)
 
3
 *
 
4
 * Authors:
 
5
 *   Tim Dwyer <tgdwyer@gmail.com>
 
6
 *
 
7
 * Copyright (C) 2005 Authors
 
8
 *
 
9
 * Released under GNU LGPL.  Read the file 'COPYING' for more information.
 
10
 */
 
11
#ifndef _CSOLVE_VPSC_H_
 
12
#define _CSOLVE_VPSC_H_
 
13
#ifdef __cplusplus
 
14
class vpsc::Variable;
 
15
class vpsc::Constraint;
 
16
class vpsc::Solver;
 
17
class vpsc::IncSolver;
 
18
using namespace vpsc;
 
19
extern "C" {
 
20
#else
 
21
typedef struct Variable Variable;
 
22
typedef struct Constraint Constraint;
 
23
typedef struct Solver Solver;
 
24
typedef struct IncSolver IncSolver;
 
25
#endif
 
26
Variable* newVariable(int id, double desiredPos, double weight);
 
27
void setVariableDesiredPos(Variable *, double desiredPos);
 
28
double getVariablePos(Variable*);
 
29
 
 
30
Constraint* newConstraint(Variable* left, Variable* right, double gap);
 
31
 
 
32
Solver* newSolver(int n, Variable* vs[], int m, Constraint* cs[]);
 
33
void deleteSolver(Solver*);
 
34
void deleteConstraint(Constraint*);
 
35
void deleteVariable(Variable*);
 
36
Constraint** newConstraints(int m);
 
37
void deleteConstraints(int m,Constraint**);
 
38
void remapInConstraints(Variable *u, Variable *v, double dgap);
 
39
void remapOutConstraints(Variable *u, Variable *v, double dgap);
 
40
int getLeftVarID(Constraint *c);
 
41
int getRightVarID(Constraint *c);
 
42
double getSeparation(Constraint *c);
 
43
 
 
44
#ifndef HAVE_POINTF_S
 
45
typedef struct pointf_s { double x, y; } pointf;
 
46
typedef struct { pointf LL, UR; } boxf;
 
47
#endif
 
48
int genXConstraints(int n, boxf[], Variable** vs, Constraint*** cs,
 
49
                int transitiveClosure);
 
50
int genYConstraints(int n, boxf[], Variable** vs, Constraint*** cs);
 
51
 
 
52
void satisfyVPSC(Solver*);
 
53
void solveVPSC(Solver*);
 
54
Solver* newIncSolver(int n, Variable* vs[], int m, Constraint* cs[]);
 
55
void splitIncSolver(IncSolver*);
 
56
int getSplitCnt(IncSolver *vpsc);
 
57
#ifdef __cplusplus
 
58
}
 
59
#endif
 
60
#endif /* _CSOLVE_VPSC_H_ */