Mercurial > projects > doodle
diff tk/events.d @ 16:9e63308b749c
* Fix up public/private includes
* Make Mask a struct
author | David Bryant <daveb@acres.com.au> |
---|---|
date | Mon, 13 Jul 2009 16:16:17 +0930 |
parents | f0ade1b49fe7 |
children | c643c04e3f5e |
line wrap: on
line diff
--- a/tk/events.d Sun Jul 12 13:23:06 2009 +0930 +++ b/tk/events.d Mon Jul 13 16:16:17 2009 +0930 @@ -1,14 +1,16 @@ module tk.events; -import tk.types; -import tk.geometry; +public { + import tk.types; + import tk.geometry; +} abstract class Event { - this(Mask mask) { + this(in Mask mask) { mMask = mask; } - const(Mask) mask() const { return mMask; } + Mask mask() const { return mMask; } private { Mask mMask; @@ -16,7 +18,7 @@ } final class CrossingEvent : Event { - this(Mask mask) { + this(in Mask mask) { super(mask); } @@ -25,7 +27,7 @@ } final class KeyEvent : Event { - this(string str, uint value, Mask mask) { + this(in string str, in uint value, in Mask mask) { super(mask); mStr = str; mValue = value; @@ -44,7 +46,7 @@ } abstract class PointerEvent : Event { - this(in Point screen_point, in Point model_point, Mask mask) { + this(in Point screen_point, in Point model_point, in Mask mask) { super(mask); mScreenPoint = screen_point; mModelPoint = model_point; @@ -60,11 +62,11 @@ } final class ButtonEvent : PointerEvent { - this(ButtonAction button_action, - ButtonName button_name, - Point screen_point, - Point model_point, - Mask mask) { + this(in ButtonAction button_action, + in ButtonName button_name, + in Point screen_point, + in Point model_point, + in Mask mask) { super(screen_point, model_point, mask); mButtonAction = button_action; mButtonName = button_name; @@ -88,7 +90,7 @@ final class MotionEvent : PointerEvent { this(in Point screen_point, in Point model_point, - Mask mask) { + in Mask mask) { super(screen_point, model_point, mask); } @@ -102,7 +104,7 @@ this(in ScrollDirection scroll_direction, in Point screen_point, in Point model_point, - Mask mask) { + in Mask mask) { super(screen_point, model_point, mask); mScrollDirection = scroll_direction; }