summaryrefslogtreecommitdiffstats
path: root/third_party/rust/uniffi-example-sprites/src/sprites.udl
blob: 6781c6cee5fe338a9de224b5f92481fc88cfa92a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace sprites {
  Point translate([ByRef] Point position, Vector direction);
};

dictionary Point {
  double x;
  double y;
};

dictionary Vector {
  double dx;
  double dy;
};

interface Sprite {
  constructor(Point? initial_position);
  [Name=new_relative_to] constructor(Point reference, Vector direction);
  Point get_position();
  void move_to(Point position);
  void move_by(Vector direction);
};