--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+/*\r
+ *\r
+ * @author Toni Kalajainen\r
+ */\r
+package org.simantics.scenegraph.g2d.events;\r
+\r
+/**\r
+ * @author Toni Kalajainen\r
+ */\r
+public interface IEventHandler {\r
+\r
+ /**\r
+ * Returns a bit mask based on the constants in {@link EventTypes} to\r
+ * restrict which type of events should be propagated to this event handler.\r
+ * The value returned by this method must be constant, it must not change\r
+ * during the handler's life cycle.\r
+ * \r
+ * @return a bit mask defining the events to propagate to this handler\r
+ * @see EventTypes\r
+ */\r
+ int getEventMask();\r
+\r
+ /**\r
+ * Process an event. If this method returns true, the event will be eaten\r
+ * and not sent to lower levels of the handler stack.\r
+ * \r
+ * @return true if the handler consumed the event. Consumed events are not\r
+ * propagated further.\r
+ */\r
+ boolean handleEvent(Event e);\r
+\r
+}\r