summaryrefslogtreecommitdiff
path: root/src/spring-model.h
blob: 83ee1dadd4e6a7049efb9ee6af24a3ff055a95d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */

#include "window.h"

typedef struct XYPair Point;
typedef struct XYPair Vector;
typedef struct Spring Spring;
typedef struct Object Object;
typedef struct Model Model;

Model *model_new (MetaRectangle *rectangle,
		  gboolean       expand);
void model_destroy (Model *model);
void
model_get_position (Model *model,
		    int	   i,
		    int    j,
		    double *x,
		    double *y);
void
model_step (Model *model);
void
model_destroy (Model *model);
gboolean
model_is_calm (Model *model);
void
model_set_anchor (Model *model,
		  int	 x,
		  int    y);
void
model_begin_move (Model *model, int x, int y);
void
model_update_move (Model *model, int x, int y);