Mercurial > projects > doodle
annotate icanvas.d @ 2:d6f44347373d
* Switched over to geometry done with structs instead of classes.
* Removed direct access to gtk structs
* Refactoring
author | David Bryant <daveb@acres.com.au> |
---|---|
date | Fri, 10 Jul 2009 15:15:27 +0930 |
parents | e907d2c54ec3 |
children | 7d57cae10805 |
rev | line source |
---|---|
0 | 1 module icanvas; |
2 | |
2
d6f44347373d
* Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
0
diff
changeset
|
3 import tk.geometry2; |
0 | 4 |
5 interface ICanvas { | |
2
d6f44347373d
* Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
0
diff
changeset
|
6 void rel_zoom(Point2 screen_datum, double factor); |
d6f44347373d
* Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
0
diff
changeset
|
7 void rel_pan(Vector2 screen_displacement); |
0 | 8 //void damage(); |
9 } | |
10 | |
11 import tk.events; | |
12 | |
13 interface ICanvasEventHandler { | |
14 bool handle_button_press(ICanvas canvas, ButtonEvent event); | |
15 bool handle_button_release(ICanvas canvas, ButtonEvent event); | |
16 bool handle_key_press(ICanvas canvas, KeyEvent event); | |
17 bool handle_key_release(ICanvas canvas, KeyEvent event); | |
18 bool handle_motion(ICanvas canvas, MotionEvent event); | |
19 bool handle_scroll(ICanvas canvas, ScrollEvent event); | |
20 //bool handle_expose(ICanvas canvas, ExposeEvent event); | |
21 //bool handle_enter(ICanvas, CrossingEvent event); | |
22 //bool handle_leave(ICanvas, CrossingEvent event); | |
23 //bool handle_focus_in(ICanvas, FocusEvent event); | |
24 //bool handle_focus_out(ICanvas, FocusEvent event); | |
25 } |