view 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
line wrap: on
line source

module icanvas;

import tk.geometry2;

interface ICanvas {
    void rel_zoom(Point2 screen_datum, double factor);
    void rel_pan(Vector2 screen_displacement);
    //void damage();
}

import tk.events;

interface ICanvasEventHandler {
    bool handle_button_press(ICanvas canvas, ButtonEvent event);
    bool handle_button_release(ICanvas canvas, ButtonEvent event);
    bool handle_key_press(ICanvas canvas, KeyEvent event);
    bool handle_key_release(ICanvas canvas, KeyEvent event);
    bool handle_motion(ICanvas canvas, MotionEvent event);
    bool handle_scroll(ICanvas canvas, ScrollEvent event);
    //bool handle_expose(ICanvas canvas, ExposeEvent event);
    //bool handle_enter(ICanvas, CrossingEvent event);
    //bool handle_leave(ICanvas, CrossingEvent event);
    //bool handle_focus_in(ICanvas, FocusEvent event);
    //bool handle_focus_out(ICanvas, FocusEvent event);
}